Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 netbsd openbsd | 5 // +build darwin freebsd netbsd openbsd |
6 | 6 |
7 package ipv4 | 7 package ipv4 |
8 | 8 |
9 import ( | 9 import ( |
10 "net" | 10 "net" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 v := m.Data[:4] | 99 v := m.Data[:4] |
100 cm.Dst = net.IPv4(v[0], v[1], v[2], v[3]) | 100 cm.Dst = net.IPv4(v[0], v[1], v[2], v[3]) |
101 case syscall.IP_RECVIF: | 101 case syscall.IP_RECVIF: |
102 sadl := (*syscall.SockaddrDatalink)(unsafe.Pointer(&m.Da ta[0])) | 102 sadl := (*syscall.SockaddrDatalink)(unsafe.Pointer(&m.Da ta[0])) |
103 cm.IfIndex = int(sadl.Index) | 103 cm.IfIndex = int(sadl.Index) |
104 } | 104 } |
105 } | 105 } |
106 return cm, nil | 106 return cm, nil |
107 } | 107 } |
108 | 108 |
109 func marshalControlMessage(cm *ControlMessage) []byte { | 109 func marshalControlMessage(cm *ControlMessage) []byte { |
dfc
2012/09/05 06:27:16
is this a TODO here? Plan9 has it down as to be im
mikio
2012/09/06 10:43:48
Done.
| |
110 // TODO(mikio): Implement IP_PKTINFO stuff when OS X 10.8 comes | |
110 return nil | 111 return nil |
111 } | 112 } |
LEFT | RIGHT |