OLD | NEW |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 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 darwin freebsd linux netbsd openbsd windows | 5 // +build darwin dragonfly freebsd linux netbsd openbsd windows |
6 | 6 |
7 package ipv4 | 7 package ipv4 |
8 | 8 |
9 import ( | 9 import ( |
10 "net" | 10 "net" |
11 "syscall" | 11 "syscall" |
12 ) | 12 ) |
13 | 13 |
14 // MulticastTTL returns the time-to-live field value for outgoing | 14 // MulticastTTL returns the time-to-live field value for outgoing |
15 // multicast packets. | 15 // multicast packets. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 fd, err := c.sysfd() | 116 fd, err := c.sysfd() |
117 if err != nil { | 117 if err != nil { |
118 return err | 118 return err |
119 } | 119 } |
120 grp := netAddrToIP4(group) | 120 grp := netAddrToIP4(group) |
121 if grp == nil { | 121 if grp == nil { |
122 return errMissingAddress | 122 return errMissingAddress |
123 } | 123 } |
124 return leaveIPv4Group(fd, ifi, grp) | 124 return leaveIPv4Group(fd, ifi, grp) |
125 } | 125 } |
OLD | NEW |