11 Commits

Author SHA1 Message Date
Tobias Klauser
5f58ad60dd ipv4: use type IPMreqn from x/sys/unix
Use the IPMreqn type and the SizeofIPMreqn defined in the
golang.org/x/sys/unix package instead of locally duplicating them.

Change-Id: I98768e01fd4b0d1018892d5ed49455366a7356bb
Reviewed-on: https://go-review.googlesource.com/c/net/+/312490
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-04-23 18:45:38 +00:00
Tobias Klauser
d25e304258 ipv4: use all socket option consts from x/sys/unix
Remove the remaining local definitions of the IP_RECVDSTADDR, IP_RECVIF
and IP_RECVTTL socket option constants and use the constants defined in
the golang.org/x/sys/unix package instead.

Change-Id: I5308f5c5b3586e9d5c050e6cf126aeba48b47ba7
Reviewed-on: https://go-review.googlesource.com/c/net/+/311289
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-04-20 07:25:03 +00:00
Tobias Klauser
c8897c278d ipv4: use IP_PKTINFO const from x/sys/unix
Change-Id: I9b9bbebe0cfe36585709e9cbc7b8216d6427376a
Reviewed-on: https://go-review.googlesource.com/c/net/+/305590
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2021-03-30 14:28:15 +00:00
Tobias Klauser
d1beb07c20 ipv4: 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, sysIP_PKTINFO and sysIP_RECVTTL are still needed
because they are used in code shared with other platforms.

Change-Id: Iae627111837a3707fc9079d490d11e34ee3365cf
Reviewed-on: https://go-review.googlesource.com/c/net/+/304330
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-24 20:56:30 +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
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
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
Mikio Hara
a14f429b86 ipv4: rename internal types and constants generated by cgo
To match up with other packages that work with IP protocol stack.

Change-Id: I2d20e4194617b05b6b46d6fba5df1f6c12ae2793
Reviewed-on: https://go-review.googlesource.com/30574
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:42 +00:00
David Anderson
58b2fb074e ipv4: support attaching packet filters to PacketConn/RawConn.
Updates golang/go#14974

Change-Id: I80da378a788d5d826b3b79ab308372231c012391
Reviewed-on: https://go-review.googlesource.com/23105
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-05-15 02:52:58 +00:00
Mikio Hara
119dea2c0f x/net/ipv4: add icmp filter type, constant for linux
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/182950043
2014-12-02 13:12:05 +09:00
Mikio Hara
1d6af0dc02 x/net/ipv4: fix freebsd/{386,arm}, linux/{386,arm} build
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/172360043
2014-11-13 07:19:40 +09:00