|
@@ -11,42 +11,36 @@ import "net"
|
|
|
// MulticastHopLimit returns the hop limit field value for outgoing
|
|
// MulticastHopLimit returns the hop limit field value for outgoing
|
|
|
// multicast packets.
|
|
// multicast packets.
|
|
|
func (c *dgramOpt) MulticastHopLimit() (int, error) {
|
|
func (c *dgramOpt) MulticastHopLimit() (int, error) {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return 0, errOpNoSupport
|
|
return 0, errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// SetMulticastHopLimit sets the hop limit field value for future
|
|
// SetMulticastHopLimit sets the hop limit field value for future
|
|
|
// outgoing multicast packets.
|
|
// outgoing multicast packets.
|
|
|
func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
|
|
func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return errOpNoSupport
|
|
return errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// MulticastInterface returns the default interface for multicast
|
|
// MulticastInterface returns the default interface for multicast
|
|
|
// packet transmissions.
|
|
// packet transmissions.
|
|
|
func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
|
|
func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return nil, errOpNoSupport
|
|
return nil, errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// SetMulticastInterface sets the default interface for future
|
|
// SetMulticastInterface sets the default interface for future
|
|
|
// multicast packet transmissions.
|
|
// multicast packet transmissions.
|
|
|
func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
|
|
func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return errOpNoSupport
|
|
return errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// MulticastLoopback reports whether transmitted multicast packets
|
|
// MulticastLoopback reports whether transmitted multicast packets
|
|
|
// should be copied and send back to the originator.
|
|
// should be copied and send back to the originator.
|
|
|
func (c *dgramOpt) MulticastLoopback() (bool, error) {
|
|
func (c *dgramOpt) MulticastLoopback() (bool, error) {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return false, errOpNoSupport
|
|
return false, errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// SetMulticastLoopback sets whether transmitted multicast packets
|
|
// SetMulticastLoopback sets whether transmitted multicast packets
|
|
|
// should be copied and send back to the originator.
|
|
// should be copied and send back to the originator.
|
|
|
func (c *dgramOpt) SetMulticastLoopback(on bool) error {
|
|
func (c *dgramOpt) SetMulticastLoopback(on bool) error {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return errOpNoSupport
|
|
return errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -55,13 +49,11 @@ func (c *dgramOpt) SetMulticastLoopback(on bool) error {
|
|
|
// although this is not recommended because the assignment depends on
|
|
// although this is not recommended because the assignment depends on
|
|
|
// platforms and sometimes it might require routing configuration.
|
|
// platforms and sometimes it might require routing configuration.
|
|
|
func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
|
|
func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return errOpNoSupport
|
|
return errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// LeaveGroup leaves the group address group on the interface ifi.
|
|
// LeaveGroup leaves the group address group on the interface ifi.
|
|
|
func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
|
|
func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return errOpNoSupport
|
|
return errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -70,7 +62,6 @@ func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
|
|
|
// returns an offset in bytes into the data of where the checksum
|
|
// returns an offset in bytes into the data of where the checksum
|
|
|
// field is located.
|
|
// field is located.
|
|
|
func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
|
|
func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return false, 0, errOpNoSupport
|
|
return false, 0, errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -78,18 +69,15 @@ func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
|
|
|
// the offset should be an offset in bytes into the data of where the
|
|
// the offset should be an offset in bytes into the data of where the
|
|
|
// checksum field is located.
|
|
// checksum field is located.
|
|
|
func (c *dgramOpt) SetChecksum(on bool, offset int) error {
|
|
func (c *dgramOpt) SetChecksum(on bool, offset int) error {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return errOpNoSupport
|
|
return errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ICMPFilter returns an ICMP filter.
|
|
// ICMPFilter returns an ICMP filter.
|
|
|
func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
|
|
func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return nil, errOpNoSupport
|
|
return nil, errOpNoSupport
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// SetICMPFilter deploys the ICMP filter.
|
|
// SetICMPFilter deploys the ICMP filter.
|
|
|
func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
|
|
func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
|
|
|
- // TODO(mikio): Implement this
|
|
|
|
|
return errOpNoSupport
|
|
return errOpNoSupport
|
|
|
}
|
|
}
|