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 linux netbsd | 5 // +build darwin freebsd linux netbsd openbsd |
6 | 6 |
7 package net | 7 package net |
8 | 8 |
9 /* | 9 /* |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
11 #include <sys/socket.h> | 11 #include <sys/socket.h> |
12 #include <netinet/in.h> | 12 #include <netinet/in.h> |
13 #include <netdb.h> | 13 #include <netdb.h> |
14 #include <stdlib.h> | 14 #include <stdlib.h> |
15 #include <unistd.h> | 15 #include <unistd.h> |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 func cgoLookupCNAME(name string) (cname string, err error, completed bool) { | 134 func cgoLookupCNAME(name string) (cname string, err error, completed bool) { |
135 _, cname, err, completed = cgoLookupIPCNAME(name) | 135 _, cname, err, completed = cgoLookupIPCNAME(name) |
136 return | 136 return |
137 } | 137 } |
138 | 138 |
139 func copyIP(x IP) IP { | 139 func copyIP(x IP) IP { |
140 y := make(IP, len(x)) | 140 y := make(IP, len(x)) |
141 copy(y, x) | 141 copy(y, x) |
142 return y | 142 return y |
143 } | 143 } |
OLD | NEW |