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, sysIP_RECVDSTADDR, sysIP_RECVIF, sysIP_RECVTTL and
sysIP_PKTINFO still need to be defined because they are used in code
shared with other platforms.
Change-Id: I9bb953dc72dea19e9e9d84dc641346fe95bad070
Reviewed-on: https://go-review.googlesource.com/c/net/+/303909
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This change uses the internal/socket package to ensure that the ipv4
package works with all supported versions of the Go standard library.
Fixesgolang/go#19051.
Change-Id: If0256007c749c319970533823a10afdc1ffbce31
Reviewed-on: https://go-review.googlesource.com/37036
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The size of sockaddr_storage is fixed for interoperability on each
platform. There is no need to depend on changable cgo-generated
offset values.
Change-Id: I7469fe330d49867bbdbdfae128834140244925ec
Reviewed-on: https://go-review.googlesource.com/30177
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
According to github.com/opensource-apple/xnu.git, IP_STRIPHDR sticky
socket option was introduced in xnu-517 (Darwin 7.0, OS X 10.3).
LGTM=iant
R=iant, gobot
CC=golang-codereviews
https://golang.org/cl/176480043
This reduces allocation and copy ops with net.IPConn-based
ipv4.PacketConn on latest darwin kernels.
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/184770043
This CL chops existing ancillary data socket option handlers and
puts them into platform dependent ancillary data socket option
binding table for code readability.
Fixesgolang/go#6710.
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/153860043
This CL chops existing sticky socket option handlers and puts them
into platform dependent sticky socket option binding table for
supporting multicast features such as source filtering for any-source
multicast, source-specific multicast.
Also adds tiny syscall shims to help to support solaris, to improve
existing platform support.
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/140640045
This CL adds support for dragonfly and IP_PKTINFO support for darwin
with less dependency on syscall package.
Update golang/go#7175Fixesgolang/go#7172.
LGTM=iant
R=golang-codereviews, gobot, iant
CC=golang-codereviews
https://golang.org/cl/97800043