14 Commits

Author SHA1 Message Date
Tobias Klauser
53308faee3 ipv6: use socket option consts from x/sys/unix on linux
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.

Note that for now, sysIPV6_TCLASS, sysIPV6_PATHMTU, sysIPV6_PKTINFO,
sysIPV6_HOPLIMIT and sysIPV6_NEXTHOP still need to be defined because
they are used in code shared with other platforms.

Change-Id: Iba40f51959c4c0e61557322d00c4621b783cd8c0
Reviewed-on: https://go-review.googlesource.com/c/net/+/305389
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-29 18:18:31 +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
Mikio Hara
bd58382b56 ipv6: 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 ipv6
package works with all supported versions of the Go standard library.

Fixes golang/go#19051.

Change-Id: I74911a8c5bba79e082a10d64e621ed415be1c033
Reviewed-on: https://go-review.googlesource.com/37042
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-05-24 08:42:47 +00:00
Dmitri Shuralyov
5d997795f7 all: make copyright headers consistent with one space after period
Go policy has been single space after periods in comments for some time.

The copyright header template at:

	https://golang.org/doc/contribute.html#copyright

also uses a single space.

Make them all consistent.

This CL was generated with:

	perl -i -npe 's,^(// Copyright [0-9]+ The Go Authors\.)  (All rights reserved\.)$,$1 $2,' $(git grep -l -E '^// Copyright [0-9]+ The Go Authors\.  All rights reserved\.$')

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

Change-Id: I66671dddf821f5dc027bc254e0196b3e3a2bdf3b
Reviewed-on: https://go-review.googlesource.com/32878
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-07 23:52:11 +00:00
Mikio Hara
30df40a6a1 ipv6: rename internal types and constants generated by cgo
To match up with other packages that work with IP protocol stack.

Change-Id: I1f4eb76051964766113914c9698233022e73d5eb
Reviewed-on: https://go-review.googlesource.com/30575
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-10-07 03:58:57 +00:00
Mikio Hara
c4bb2f7b3d ipv6: remove unnecessary sysSockoptLen type
Change-Id: I87887ea03c36ca7d26e1ab2cb55d723611c942a8
Reviewed-on: https://go-review.googlesource.com/21354
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-03-31 04:07:02 +00:00
Mikio Hara
fb6231e1cc x/net/ipv6: enable IPV6_PATHMTU ancillary data option for Linux
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/176980043
2014-11-19 06:08:13 +09:00
Mikio Hara
e9210114b2 x/net/ipv6: add sticky source-specific multicast socket options
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/175010043
2014-11-13 17:20:40 +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
66b3e5ee27 go.net/ipv6: make use of internal/iana package
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/166210043
2014-11-09 20:14:52 +09:00
Mikio Hara
77024ba92f go.net/ipv6: add ancillary data socket option binding tables
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/164540044
2014-11-06 10:47:13 +09:00
Mikio Hara
235e882169 go.net/ipv6: implement each platform's sticky socket option binding table
Also adds helper methods for platform-dependent types.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/165920044
2014-11-01 09:19:28 +09:00
Mikio Hara
0c9245840e go.net/ipv6: restore use of syscall
This CL restores use of syscall functions and constants that
doesn't break the build on Go 1.1 and beyond.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/92320046
2014-05-19 12:20:39 +09:00
Mikio Hara
d3003bed6f go.net/ipv6: implement getsockopt, setsockopt syscalls
This CL implements a part of syscall package that's not included
in Go 1.1 release for not to annoy people who need some package
in go.net sub repository with Go 1.1.

Update golang/go#6548

R=dave, dsymonds, adg
CC=golang-dev
https://golang.org/cl/19940044
2013-11-05 10:09:42 +09:00