Commit Graph

165 Commits

Author SHA1 Message Date
Tobias Klauser
34ac3e1c20 ipv4: remove unused type inetPktinfo
This type is not used in this package on windows and it is no
corresponding C type defined in the Windows API C headers.

Change-Id: Ic581331d1f04599369361e26d8b38cf2e32241ab
Reviewed-on: https://go-review.googlesource.com/c/net/+/301809
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-15 17:06:53 +00:00
Russ Cox
5f55cee0dc all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I5b2b7d93424e828a3c5f76ae3f30ab825aca388e
Reviewed-on: https://go-review.googlesource.com/c/net/+/294371
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>
2021-02-20 03:31:24 +00:00
billofarrell
146b70c837 all: add support for zos/s390x
This adds net support for zos/s390x. These changes should not affect other platforms.

Fixes golang/go#42130

Change-Id: Ia7faa29de76b7c5713120657b296106c2e27bfd2
Reviewed-on: https://go-review.googlesource.com/c/net/+/264028
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
2020-10-26 09:15:29 +00:00
Tamir Duberstein
dbdefad45b ipv4: refactor multicast tests to use subtests
- Improve error discipline
- Narrow test types from net.UDPAddr to net.IPAddr where possible

Change-Id: I6c403ae69685ac3f35e427f56027fe4a29fde540
Reviewed-on: https://go-review.googlesource.com/c/net/+/260679
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-10-09 03:24:41 +00:00
Cherry Zhang
328152dc79 all: add GOOS=ios
Following CL 254740, this CL does it on x/net.

Updates golang/go#38485.

Change-Id: I80831dd0faa6f216d8d3b8f1af0af811aacce43f
Reviewed-on: https://go-review.googlesource.com/c/net/+/255537
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-09-23 18:22:12 +00:00
Tobias Klauser
7e3656a080 ipv4: remove unused const maxHeaderLen
It's unused since CL 162598.

Change-Id: I434dbc9950bb535167c40498ed7c15589db74eaf
Reviewed-on: https://go-review.googlesource.com/c/net/+/232537
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-05-06 14:57:44 +00:00
Tobias Klauser
f229aea8fa ipv4, ipv6: remove or move unused err* vars
errNoSuchInterface is only used in ipv4/sys_asmreq.go which is not built
e.g. on Linux, so move it there.

Change-Id: I18b2e2ec8f321db3df164dcc6a69b8c92e6ab68c
Reviewed-on: https://go-review.googlesource.com/c/net/+/220097
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-02-19 18:36:38 +00:00
Tobias Klauser
fc4aabc6c9 ipv4, ipv6: use SockFprog definitions from x/sys/unix
This fixes the mips{,64}{,le} builders failing the bpf-related
tests and also avoids duplicating these consts/types across packages.

Fixes golang/go#35669

Change-Id: I1ea96817464e3040e8cc00bff63c168fa5e75a71
Reviewed-on: https://go-review.googlesource.com/c/net/+/207286
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-11-19 07:31:36 +00:00
Brad Fitzpatrick
fe3aa8a452 ipv4: use unsafe.Sizeof on struct size, not pointer size
Fix for CL 203400.

Change-Id: Ia0006cdeff4992a218c7a355bd83354138706833
Reviewed-on: https://go-review.googlesource.com/c/net/+/203777
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-10-28 08:55:09 +00:00
Cuong Manh Le
d64ee3fa51 ipv4: fix unsafe pointer conversion in parseInterface
Fixes golang/go#35174

Change-Id: I01ae0ec25c90da0d05b1b262b33a32233f88260f
Reviewed-on: https://go-review.googlesource.com/c/net/+/203400
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-10-27 21:20:02 +00:00
Dmitri Goutnik
83d349e8ac ipv4, ipv6: add support for freebsd/arm64
Updates golang/go#35183

Change-Id: I3d820a1638526197ca7b5e622f6f6f1317141f7b
Reviewed-on: https://go-review.googlesource.com/c/net/+/203518
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-10-27 09:30:00 +00:00
Tobias Klauser
3b0461eec8 internal/socket, ipv4, ipv6: add support for GOOS=illumos
Treat it like GOOS=solaris for now.

Change-Id: I2b99427e80058f6c7308fe3752de21610457a3ba
Reviewed-on: https://go-review.googlesource.com/c/net/+/183277
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-06-20 20:02:07 +00:00
Tobias Klauser
d28f0bde59 all: follow convention for generated code comment
Follow the convertion (https://golang.org/s/generatedcode) for generated
code.

Change-Id: I3101fb91db42644ead179ffaeffe0211359ac886
Reviewed-on: https://go-review.googlesource.com/c/net/+/182137
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 19:41:53 +00:00
CarlosEDP
018c4d40a1 ipv4, ipv6, internal/socket: add riscv64 support
Updates golang/go#27532

Change-Id: I64285280680e5d1d3903c352454f2c67cc653c88
GitHub-Last-Rev: 3747f61487
GitHub-Pull-Request: golang/net#43
Reviewed-on: https://go-review.googlesource.com/c/net/+/177997
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-05-20 21:01:07 +00:00
Mikio Hara
afa5a82059 ipv4: clarify the range of broken freebsd kernel versions
Change-Id: Ic37732f28e747c98cb513e100983d685efd3928d
Reviewed-on: https://go-review.googlesource.com/c/net/+/173077
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-04-20 06:30:19 +00:00
chigotc
c98bf442cc ipv4: add port for aix/ppc64
Change-Id: Ida9aed579c9a33883dadfef094c30a658edce88e
Reviewed-on: https://go-review.googlesource.com/c/net/+/170558
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
2019-04-19 01:02:24 +00:00
Yuval Pavel Zholkover
4a65cf94b6 ipv4: work around FreeBSD 12.0 kernel running COMPAT_FREEBSD32
Followup for CL 168297, a fix was released for the kernel bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236737

https://svnweb.freebsd.org/base?view=revision&revision=345741
https://svnweb.freebsd.org/base?view=revision&revision=346019
https://svnweb.freebsd.org/base?view=revision&revision=346020

Thus the bug won't affect 11.3-RELEASE and 12.1-RELEASE when they are out.

Update adjustFreeBSD32 to handle only FreeBSD 12.0-RELEASE ranges of freebsdVersion.

Updates golang/go#30899

Change-Id: I6beeaa55023dbe86a3d6fd8d6d5094516ec6978a
Reviewed-on: https://go-review.googlesource.com/c/net/+/171937
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-04-15 10:05:56 +00:00
Mikio Hara
63eda1eb06 all: use of nettest, remove internal/nettest
This change uses the nettest package where possible and removes the
internal/nettest package.

Change-Id: I5615a3ab7957183fecea6b5646df99dbb7c186e2
Reviewed-on: https://go-review.googlesource.com/c/net/+/123057
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-27 21:43:58 +00:00
Mikio Hara
1272bf9dcd ipv4: work around FreeBSD 11.3 or 12 kernel running COMPAT_FREEBSD32
On FreeBSD 11.3 or 12 kernel running COMPAT_FREEBSD32, it looks like the
system call recvmsg always returns an incorrect length for the
out-of-band data. This change adjusts the length when it looks incorrect
and the running kernel is FreeBSD 11.3 or above.

Fixes golang/go#30899.

Change-Id: Ia58d8b4bd4caf3783d2e38161ee4afd1a64ca522
Reviewed-on: https://go-review.googlesource.com/c/net/+/168297
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-20 06:40:53 +00:00
Mikio Hara
d196dffd7c Revert "ipv4: work around FreeBSD 12 kernel running COMPAT_FREEBSD32"
This reverts commit 7a92b5139a.

Reason for revert: not completely functional on FreeBSD 12 or above and
broke FreeBSD 11 or below.

Change-Id: Icd43d9ecebc0059a577751802e589a6e5f0cd363
Reviewed-on: https://go-review.googlesource.com/c/net/+/168078
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
2019-03-18 22:16:13 +00:00
Mikio Hara
7a92b5139a ipv4: work around FreeBSD 12 kernel running COMPAT_FREEBSD32
On FreeBSD 12 kernel running COMPAT_FREEBSD32, it looks like the system
call recvmsg always returns an incorrect​ length for the out-of-band
data. This change adjusts the length when it looks incorrect.

Fixes golang/go#30899.

Change-Id: Ibb0cbcf9b1f5f959279c20395916d47bd75d289c
Reviewed-on: https://go-review.googlesource.com/c/net/+/168077
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-18 21:45:11 +00:00
Mikio Hara
7949ac6f08 ipv4: skip tests on aix, fuchsia and hurd
Also marks test helper functions.

Change-Id: I3417885fb81c8ab27cdfbe80c83270b94b878862
Reviewed-on: https://go-review.googlesource.com/c/net/+/167339
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-13 22:01:53 +00:00
Mikio Hara
511f7948e3 ipv4: replace errOpNoSupport with errNotImplemented
Change-Id: Ia1ba33c01c571cfca14921e6fe963b63e10dec3c
Reviewed-on: https://go-review.googlesource.com/c/net/+/167337
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-13 21:54:35 +00:00
Mikio Hara
784e4c8c97 ipv4: drop support for go1.8 or below
Change-Id: I27e30dbb0cbbd5c3dd53333882a794f0ef1092ff
Reviewed-on: https://go-review.googlesource.com/c/net/+/162598
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2019-03-10 07:45:25 +00:00
Mikio Hara
b774fd8d5c ipv4: fix error values on header manipulation
This change makes header manipulation methods and functions return a nil
header error if the receiver or wire header is nil, a header too short
error if the header length field value of receiver or wire header is
short, and a extension header error if the wire extnsion header is
short.

Also replaces syscall.EWINDOWS or syscall.EPLAN9 with more descriptive,
platform independent error values.

Change-Id: I923fb60b1d68857cffc9df20f3f6cb2babbcdb1f
Reviewed-on: https://go-review.googlesource.com/c/net/+/129136
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-10 01:40:29 +00:00
sergeydobrodey
e86916475b ipv4: fix typo in comment
Change-Id: I60db66b5bbe25b434d8ec1fbc031438a16720dfa
GitHub-Last-Rev: 152f0ce49b
GitHub-Pull-Request: golang/net#30
Reviewed-on: https://go-review.googlesource.com/c/163865
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-27 15:44:36 +00:00
Mikio Hara
1ea17d6c21 ipv4: rename freebsd32o64 with compatFreeBSD32 for consistency
The variable name compatFreeBSD32 refers to the kernel configuration
directive COMPAT_FREEBSD32 and is also used in route and ipv4 packages.

Change-Id: Ia6f123833af0c11398f46dfa31c3e5c5ab121fc0
Reviewed-on: https://go-review.googlesource.com/c/149878
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-27 02:21:04 +00:00
Tobias Klauser
be88a9aa50 ipv4, ipv6: directly initialize ctlOpts and sockOpts
After CL 156597 it's no longer necessary to initialize the ctlOpts and
sockOpts tables in the init func. Instead, just directly initialize them.

Change-Id: I62b4dd980b3cb87e3cbc71ea4874f6512b5cfefa
Reviewed-on: https://go-review.googlesource.com/c/156797
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-08 15:08:41 +00:00
Tobias Klauser
45ffb0cd1b ipv4, ipv6: drop support for macOS 10.7 and earlier
Drop the check for macOS 10.7 and earlier. Go 1.11 requires at least
macOS 10.10 and macOS 10.7 is no longer supported by Apple anyhow.

Change-Id: Ie7d9d27e0b9156ea478bf560734f4a85dfa163d6
Reviewed-on: https://go-review.googlesource.com/c/156597
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-01-07 21:02:23 +00:00
Mikio Hara
10aee18199 icmp, ipv4, ipv6: re-adjust build constraints
Also updates package documentation for AIX.

Change-Id: I4809a334f0a4b8f3fb5345749477394b8f3e7546
Reviewed-on: https://go-review.googlesource.com/c/147678
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-06 06:57:22 +00:00
Mikio Hara
b6095f65a0 ipv4: clarify the format used by raw IP socket
On BSD variants, for some historical reason, the data format used by raw
IP socket may differ from the IPv4 wire format. This change clarifies
that input and output of Header type must conform to the raw IP socket
format.

Change-Id: I6ca363f7ea9a3d7645ee81b588785204dee00cba
Reviewed-on: https://go-review.googlesource.com/128215
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-08 00:41:02 +00:00
Mikio Hara
27e6fde75f ipv4: fix a typo
Change-Id: I7012df3e9083f5a158367009d5f41fc2517ac486
Reviewed-on: https://go-review.googlesource.com/126639
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2018-07-30 21:41:24 +00:00
Mikio Hara
4d581e05a3 all: re-adjust build constraints for JS and NaCl
This change fixes the build breakage of h2i on JS and NaCl, and avoids
using unintentional code path on JS.

Change-Id: Ib08f0f6d1d79aecc9bf1e9ee7de52b0a57c22baf
Reviewed-on: https://go-review.googlesource.com/122539
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-07-09 03:26:41 +00:00
Mikio Hara
c0ac1a5574 ipv4: drop the use of syscall package in platform-independent code
Change-Id: I5a8eac6e80fd2c9f4604231d51cb91d3b8514fea
Reviewed-on: https://go-review.googlesource.com/121882
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-02 21:24:22 +00:00
Mikio Hara
4721d2d970 ipv4: don't fail test on JS
Change-Id: Ie3df352e1b59b7035bdf50a5b06feb3d1859de2a
Reviewed-on: https://go-review.googlesource.com/121556
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-06-29 03:53:19 +00:00
Matt Layher
2491c5de34 ipv4: fix typo in Header.Parse documentation
Change-Id: I889a02587b39e448ccdc5d723183ab550104ec5b
Reviewed-on: https://go-review.googlesource.com/112816
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-05-11 17:46:49 +00:00
Mikio Hara
344b2e31b5 ipv4: update icmp parameters
Updates golang/go#24440.

Change-Id: Icd7dbb9b6748ba8dd165eec1c0021650b7f4d97d
Reviewed-on: https://go-review.googlesource.com/63997
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-19 15:14:10 +00:00
Kevin Burke
0ed95abb35 all: use HTTPS for iana.org links
iana.org, www.iana.org and data.iana.org all present a valid TLS
certificate, so let's use it when fetching data to avoid errors in
transit.

Change-Id: I1f295442d24a221fe2b722c4782dceee38b960ec
Reviewed-on: https://go-review.googlesource.com/89415
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-24 06:09:56 +00:00
Mikio Hara
f073e08683 Revert "ipv4: enable {Read,Write}Batch methods of {Packet,Raw}Conn on NetBSD"
This reverts commit eb818ae5e4.

Change-Id: I2034119c7a512c7ceffa72e837e4bed3ff01ed8d
Reviewed-on: https://go-review.googlesource.com/82696
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2017-12-07 22:19:59 +00:00
Mikio Hara
eb818ae5e4 ipv4: enable {Read,Write}Batch methods of {Packet,Raw}Conn on NetBSD
Change-Id: I21ec68eef6cf14e0ff30b437d717d46e1dc9fea5
Reviewed-on: https://go-review.googlesource.com/82456
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-07 21:46:33 +00:00
Mikio Hara
cabdc3af38 ipv4: update RFC number of IPv6 specification in docs
Change-Id: Ia3dbad890e3574b34370034fd4cb4bf96323bab3
Reviewed-on: https://go-review.googlesource.com/49790
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-19 08:39:33 +00:00
Mikio Hara
e1ae248e8a ipv4: simplify tests and benchmarks
Change-Id: I588bc65b0052efb12b3b7bc2267deedcdad029ce
Reviewed-on: https://go-review.googlesource.com/47371
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2017-07-04 09:14:29 +00:00
Mikio Hara
a272b72a74 ipv4: report a destination address on write error
Change-Id: If48cad79ce060625db0c04ad80f6305fd8d4b338
Reviewed-on: https://go-review.googlesource.com/46232
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-21 08:22:37 +00:00
Mikio Hara
ec5a957fe4 ipv4: don't crash with corrupted control messages
Change-Id: I474b5832672e699f1eba1487f7f793bed3c1ff83
Reviewed-on: https://go-review.googlesource.com/45113
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-06-09 22:10:13 +00:00
Mikio Hara
bcf7175ad5 ipv4: deflake multicast listener tests
Fixes golang/go#20558.

Change-Id: Iead39205e508aef4fa4cdbe5dabac96b0a60133a
Reviewed-on: https://go-review.googlesource.com/44775
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-06-05 03:37:27 +00:00
Mikio Hara
b7a1f62a47 ipv4: add {Read,Write}Batch methods to {Packet,Raw}Conn
This change provides message IO functionality that may support the
construction of modern datagram transport protocols.

The modern datagram transport protocols on a multihomed node basically
need to control each packet path for traffic engineering by using
information belongs to network- or link-layer implementation. In
addtion, it's desirable to be able to do simultaneous transmission
across multiple network- or link-layer adjacencies wihtout any
additional cost.

The ReadBatch and WriteBatch methods of PacketConn and RawConn can be
used to read and write an IO message that contains the information of
network- or link-layer implementation, and read and write a batch of
IO messages on Linux. The Marshal and Parse methods of ControlMessage
and Header can help to marshal and parse information contained in IO
messages.

Updates golang/go#3661.

Change-Id: Ia84a9d3bc51641406eaaf4258f2a3066945cc323
Reviewed-on: https://go-review.googlesource.com/38275
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-05-27 06:01:44 +00:00
Mikio Hara
aa0b216c89 Revert "ipv4, ipv6, internal/netreflect, bpf: fix the x/net build"
This reverts https://go-review.googlesource.com/c/37401

Updates golang/go#19051.

Change-Id: Ia3cbc42213e3c519f91650e6308a7ca1f56b6189
Reviewed-on: https://go-review.googlesource.com/37417
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-05-24 08:43:35 +00:00
Mikio Hara
c4fa6e0d08 ipv4: plumb in the standard library of Go 1.9 by using internal/socket package
This change uses the internal/socket package to ensure that the ipv4
package works with all supported versions of the Go standard library.

Fixes golang/go#19051.

Change-Id: If0256007c749c319970533823a10afdc1ffbce31
Reviewed-on: https://go-review.googlesource.com/37036
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-05-24 08:42:31 +00:00
Brad Fitzpatrick
b64f02211f ipv4, ipv6, internal/netreflect, bpf: fix the x/net build
The x/net package is currently broken for Go 1.9 (#19051) so
I am unable to use trybots for x/net/http2.

This disables the tests for the broken stuff and makes things compile
at least, so x/net trybots aren't broken for others.

Updates golang/go#19051

Change-Id: I67401d7ad32d855e99a417545328eb4e803287cc
Reviewed-on: https://go-review.googlesource.com/37401
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Martin Möhrmann <moehrmann@google.com>
2017-02-23 22:48:12 +00:00
Dmitri Shuralyov
357296a763 all: single space after period
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions, and changes in go repository. This means
contributors won't be confused by misleading precedence.

This CL was generated with:

	perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')

on top of copyright headers change in https://golang.org/cl/32878.

Follows https://golang.org/cl/20022.

Change-Id: I821e4a300122b4668aa31e12eaa914db615e5369
Reviewed-on: https://go-review.googlesource.com/32879
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-02-01 21:02:21 +00:00