Commit Graph

26 Commits

Author SHA1 Message Date
Mikio Hara
26b81fba4e internel/nettest: add SupportsIPv6MulticastDeliveryOnLoopback
Also consolidate platform-dependent helper files.

Updates golang/go#17015.

Change-Id: Ibf09479762029ecc7229ab4bb233138e0d4e69d9
Reviewed-on: https://go-review.googlesource.com/28997
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-14 08:42:56 +00:00
Mikio Hara
9bc2a3340c internal/netreflect: fix test on nacl, plan9 and windows
Change-Id: Ia274e47affd5fc2b9bdea077fa8043887044d0ec
Reviewed-on: https://go-review.googlesource.com/28110
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-08-31 03:06:24 +00:00
Mikio Hara
6c89f96179 internal/netreflect: new package
This change introduces an internal package that provides the
manipulation of net package facilities by using runtime reflection.
The package is supposed to be used by ipv4 and ipv6 packages.

Change-Id: I73ec3b7d3762e675ca03ad9ee5e8a68e75ceb997
Reviewed-on: https://go-review.googlesource.com/27732
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-08-26 03:27:45 +00:00
Mikio Hara
0899459b4d internal/iana: update protocol numbers
Change-Id: I88b1fac3419f3e655a11cb22050fcd9a9a6c6616
Reviewed-on: https://go-review.googlesource.com/19786
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-23 00:41:38 +00:00
Mikio Hara
d9eac8b368 internal/iana: update protocol numbers
Change-Id: I643468dde9f2b3c8719795e92df821f821070ab4
Reviewed-on: https://go-review.googlesource.com/12628
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-24 21:59:50 +00:00
Mikio Hara
d9558e5c97 internal/nettest: fix build on nacl
Change-Id: Ib3cd96ec4156737d80feda0504c349da5d41dc75
Reviewed-on: https://go-review.googlesource.com/11603
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-06-29 08:41:31 +00:00
Mikio Hara
af03a19e5e netutil, internal/nettest: deflake TestLimitListener
Change-Id: Ic82974bcafa1723c96ece0b6b0b717b00b27774b
Reviewed-on: https://go-review.googlesource.com/11533
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-26 04:58:29 +00:00
David Symonds
a19b75acff internal/timeseries: New package.
This implements a time series data structure.
It is not a general purpose package, but will be used
by the upcoming trace package.

Change-Id: I3aa547b2f76582fea246b2b35b465b35499f3fda
Reviewed-on: https://go-review.googlesource.com/10720
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-05 00:09:03 +00:00
Mikio Hara
8bc62b7ce1 internal/nettest: add SupportsRawIPSocket that reports raw IP socket availability
This change copies a few code fragments from
https://golang.org/cl/13422044.

Change-Id: I7ceae3a59e15dc9f9ef4b2b64a41753aa9d6798b
Reviewed-on: https://go-review.googlesource.com/3400
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-29 10:45:53 +00:00
Mikio Hara
a1cbdfe7f2 internal/iana: update protocol numbers
Also fixes parseProtocolNumbers to make it possible to grab the recently
added keyword "deprecated" correctly.

Change-Id: I431da33a722eab9aa13ce1834acab4e9e6346bfd
Reviewed-on: https://go-review.googlesource.com/2852
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-16 01:10:03 +00:00
David Symonds
cbcac7bb84 internal/iana: fix a import comment in code generator.
Change-Id: I09adabf07366426451303f72b0f2e6a0869b7508
2014-12-10 15:17:44 +11:00
David Symonds
8aa6e209cb net: add import comments.
Change-Id: Ifab0fdaec1d810d268b7c19ad30f476802203b37
2014-12-09 14:17:11 +11:00
Mikio Hara
b745b482fe x/net/icmp: new package
This CL makes icmp an external package.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/182370043
2014-12-03 12:32:52 +09:00
Mikio Hara
fc168c3c5c x/net/internal/icmp: add support for non-privileged ICMP endpoint, known as ping socket
This CL adds PacketConn struct that implements net.PacketConn
interface.

Update golang/go#9166

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/182110043
2014-12-03 09:34:28 +09:00
Mikio Hara
2a8857c36e x/net/internal/icmp: add ParseIPv4Header
This CL adds ParseIPv4Header for parsing an IPv4 header in ICMP
error message. We cannot use ipv4.ParseHeader for it because they
are different things processed by either ip_input or icmp_input.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/184850043
2014-12-03 09:34:08 +09:00
Mikio Hara
a21e453f9c x/net/internal/icmp: add support for error message
This CL introduces few ICMP error message body types such as
DstUnreach, PacketTooBig, TimeExceeded or ParamProb.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/183850043
2014-12-03 09:33:49 +09:00
Mikio Hara
e93b1edd55 x/net/{internal/icmp,ipv4,ipv6}: better method for icmp.Type interface
LGTM=iant
R=iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/173670044
2014-11-29 10:11:10 +09:00
Mikio Hara
89143d4521 x/net/internal/nettest: make routableIP not return the ipv6 loopback address
On some platform the IPv6 loopback address is not suitable to assign a name.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/165710043
2014-11-10 09:47:34 +09:00
Andrew Gerrand
fbe893ddcd go.net: use golang.org/x/... import paths
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/167030043
2014-11-10 09:04:43 +11:00
Mikio Hara
7db411a191 go.net/internal/nettest: add ProtocolNotSupported function
Moves from go.net/ipv4 pacakge to here, we use this function not only
for ipv4 testing but ipv6 testing.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/169150043
2014-11-09 20:13:42 +09:00
Mikio Hara
d8abf88473 go.net/internal/icmp: fix typo
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/149680043
2014-10-10 06:55:56 +09:00
Mikio Hara
fb10a5fdb4 go.net/internal/nettest: new package
This CL factors out testing utilities used by both ipv4 and ipv6 packages.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/152070043
2014-10-07 06:58:24 +09:00
Mikio Hara
4dee47b476 go.net/internal/icmp: make sure IPv6PseudoHeader takes only IPv6 addresses
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/142540044
2014-09-24 12:44:28 +09:00
Mikio Hara
cb96e72df2 go.net/internal/icmp: fix reordered arguments in test case
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/146210043
2014-09-24 08:38:34 +09:00
Mikio Hara
8916b1d9cd go.net/internal/icmp: new package
This CL factors out ICMP utilities used by both ipv4 and ipv6 packages.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/143460043
2014-09-23 23:18:00 +09:00
Mikio Hara
27bf1b86b6 go.net/internal/iana: new package
This CL factors out number resources used by both ipv4 and ipv6 packages.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/124340043
2014-09-20 10:39:36 +09:00