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