summaryrefslogtreecommitdiff
path: root/src/net/port_unix.go
Commit message (Collapse)AuthorAgeFilesLines
* all: go fmt std cmd (but revert vendor)Russ Cox2021-02-201-0/+1
| | | | | | | | | | | | | | | | Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: Ia0534360e4957e58cd9a18429c39d0e32a6addb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/294430 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* all: remove the nacl port (part 1)Brad Fitzpatrick2019-10-091-1/+1
| | | | | | | | | | | | | | | | | | You were a useful port and you've served your purpose. Thanks for all the play. A subsequent CL will remove amd64p32 (including assembly files and toolchain bits) and remaining bits. The amd64p32 removal will be separated into its own CL in case we want to support the Linux x32 ABI in the future and want our old amd64p32 support as a starting point. Updates #30439 Change-Id: Ia3a0c7d49804adc87bf52a4dea7e3d3007f2b1cd Reviewed-on: https://go-review.googlesource.com/c/go/+/199499 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* net: add AIX operating systemClément Chigot2018-10-101-1/+1
| | | | | | | | | | | | | This commit adds AIX operating system to net package for ppc64 architecture. Updates: #25893 Change-Id: I46bbc7b03931019beb969443cb3f9a756956c66c Reviewed-on: https://go-review.googlesource.com/c/138724 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: use internal/bytealg insetad of linkname tricksIlya Tocar2018-08-211-2/+5
| | | | | | | | | | | | | | We are currently using go:linkname for some algorithms from strings/bytes packages, to avoid importing strings/bytes. But strings/bytes are just wrappers around internal/bytealg, so we should use internal/bytealg directly. Change-Id: I2836f779b88bf8876d5fa725043a6042bdda0390 Reviewed-on: https://go-review.googlesource.com/130515 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: add js/wasm architectureRichard Musiol2018-06-041-1/+1
| | | | | | | | | | | | | | | | This commit adds the js/wasm architecture to the net package. The net package is not supported by js/wasm, but a simple fake networking is available so tests of other packages that require basic TCP sockets can pass. The tests of the net package itself are mostly disabled. Updates #18892 Change-Id: Id287200c39f0a3e23d20ef17260ca15ccdcca032 Reviewed-on: https://go-review.googlesource.com/109995 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* net: defer file.close() + minor style cleanupEmmanuel Odeke2017-04-261-1/+2
| | | | | | | | | | | | | Moved the relevant file.close() usages close to after the file opens and put them in defer statements, so that readers don't have to think too much as to where the file is being closed. Change-Id: Ic4190b02ea2f5ac281b9ba104e0023e9f87ca8c7 Reviewed-on: https://go-review.googlesource.com/41796 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* net: use baked-in port numbers as fallback if cgo port lookup failsBrad Fitzpatrick2016-12-071-3/+2
| | | | | | | | | | Fixes TestLookupPort_Minimal on android. Fixes #18213 Change-Id: I1b65e790525d339a4cb7f17afe7e3a02c4587302 Reviewed-on: https://go-review.googlesource.com/34014 Reviewed-by: Russ Cox <rsc@golang.org>
* net: make LookupPort and lookupProtocol work on naclBrad Fitzpatrick2016-09-111-22/+3
| | | | | | | | | | | | | | | | | | | | | | | | Also, flesh out the baked-in /etc/services table for LookupPort a bit. This services map moves from a unix-specific file to a portable file where nacl can use it. Also, remove the duplicated entries in the protocol map in different cases, and just canonicalize the input before looking in the map. Now it handles any case, including MiXeD cAse. In the process, add a test that service names for LookupPort are case insensitive. They were on Windows, but not cgo. Now there's a test and they're case insensitive in all 3+ paths. Maybe it breaks plan9. We'll see. Fixes #17045 Change-Id: Idce7d68703f371727c7505cda03a32bd842298cd Reviewed-on: https://go-review.googlesource.com/28951 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
* net: simplify internal dtoi and xtoi funcsDan Peterson2016-08-171-1/+1
| | | | | | | | | | | | | Callers pass strings sliced as necessary instead of giving an offset. Fixes #16350 Change-Id: I7ba896f6ff09e0fd0094ca6c5af5d9a81622f15e Reviewed-on: https://go-review.googlesource.com/27206 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* net: fix inconsistent error values on LookupMikio Hara2015-04-211-1/+1
| | | | | | | | | | | This change fixes inconsistent error values on Lookup{Addr,CNAME,Host,IP.MX,NS,Port,SRV,TXT}. Updates #4856. Change-Id: I059bc8ffb96ee74dff8a8c4e8e6ae3e4a462a7ef Reviewed-on: https://go-review.googlesource.com/9108 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: separate NaCl dependent placeholders from BSD'sMikio Hara2014-09-181-1/+1
| | | | | | | | | To clarify the dependency of NaCl platform. LGTM=adg R=golang-codereviews, adg CC=golang-codereviews https://golang.org/cl/143830044
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+73
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.