Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 1 | // Copyright 2013 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 5 | // +build dragonfly plan9 solaris |
| 6 | |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 7 | package ipv6 |
| 8 | |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 9 | import "net" |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 10 | |
| 11 | // MulticastHopLimit returns the hop limit field value for outgoing |
| 12 | // multicast packets. |
| 13 | func (c *dgramOpt) MulticastHopLimit() (int, error) { |
| 14 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 15 | return 0, errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | // SetMulticastHopLimit sets the hop limit field value for future |
| 19 | // outgoing multicast packets. |
| 20 | func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error { |
| 21 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 22 | return errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | // MulticastInterface returns the default interface for multicast |
| 26 | // packet transmissions. |
| 27 | func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { |
| 28 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 29 | return nil, errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | // SetMulticastInterface sets the default interface for future |
| 33 | // multicast packet transmissions. |
| 34 | func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { |
| 35 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 36 | return errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | // MulticastLoopback reports whether transmitted multicast packets |
| 40 | // should be copied and send back to the originator. |
| 41 | func (c *dgramOpt) MulticastLoopback() (bool, error) { |
| 42 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 43 | return false, errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | // SetMulticastLoopback sets whether transmitted multicast packets |
| 47 | // should be copied and send back to the originator. |
| 48 | func (c *dgramOpt) SetMulticastLoopback(on bool) error { |
| 49 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 50 | return errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | // JoinGroup joins the group address group on the interface ifi. |
| 54 | // It uses the system assigned multicast interface when ifi is nil, |
| 55 | // although this is not recommended because the assignment depends on |
| 56 | // platforms and sometimes it might require routing configuration. |
| 57 | func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { |
| 58 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 59 | return errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | // LeaveGroup leaves the group address group on the interface ifi. |
| 63 | func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { |
| 64 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 65 | return errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | // Checksum reports whether the kernel will compute, store or verify a |
| 69 | // checksum for both incoming and outgoing packets. If on is true, it |
| 70 | // returns an offset in bytes into the data of where the checksum |
| 71 | // field is located. |
| 72 | func (c *dgramOpt) Checksum() (on bool, offset int, err error) { |
| 73 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 74 | return false, 0, errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | // SetChecksum enables the kernel checksum processing. If on is ture, |
| 78 | // the offset should be an offset in bytes into the data of where the |
| 79 | // checksum field is located. |
| 80 | func (c *dgramOpt) SetChecksum(on bool, offset int) error { |
| 81 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 82 | return errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | // ICMPFilter returns an ICMP filter. |
| 86 | func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { |
| 87 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 88 | return nil, errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | // SetICMPFilter deploys the ICMP filter. |
| 92 | func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { |
| 93 | // TODO(mikio): Implement this |
Mikio Hara | 0cda728 | 2014-01-23 06:36:22 +0100 | [diff] [blame] | 94 | return errOpNoSupport |
Mikio Hara | cdfc4ce | 2013-06-04 17:42:58 +0900 | [diff] [blame] | 95 | } |