OLD | NEW |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 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 openbsd |
| 6 |
5 // Network interface identification for BSD variants | 7 // Network interface identification for BSD variants |
6 | 8 |
7 package net | 9 package net |
8 | 10 |
9 import ( | 11 import ( |
10 "os" | 12 "os" |
11 "syscall" | 13 "syscall" |
12 "unsafe" | 14 "unsafe" |
13 ) | 15 ) |
14 | 16 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 if ifa.IP.IsLinkLocalUnicast() { | 164 if ifa.IP.IsLinkLocalUnicast() { |
163 // remove embedded scope zone ID | 165 // remove embedded scope zone ID |
164 ifa.IP[2], ifa.IP[3] = 0, 0 | 166 ifa.IP[2], ifa.IP[3] = 0, 0 |
165 } | 167 } |
166 ifat = append(ifat, ifa.toAddr()) | 168 ifat = append(ifat, ifa.toAddr()) |
167 } | 169 } |
168 } | 170 } |
169 | 171 |
170 return ifat, nil | 172 return ifat, nil |
171 } | 173 } |
OLD | NEW |