13 Commits

Author SHA1 Message Date
Dmitri Shuralyov
d23d9bc549 all: update go directive to 1.18
Done with:

go get go@1.18
go mod tidy
go fix ./...

Using go1.21.3.

With a manual change to keep golang.org/x/net/context testing itself,
not context in the standard library.

For golang/go#60268.

Change-Id: I00682bf7cf1e3ba4370e2a3e7f63dc245b294a36
Reviewed-on: https://go-review.googlesource.com/c/net/+/534241
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-10-11 21:58:12 +00:00
Ian Lance Taylor
7431dee09d lif: import syscall rather than golang.org/x/sys/unix
It happens that everything we need is already defined in syscall.
This avoids problems when this package is vendored into the
standard library.

For golang/go#54259

Change-Id: I999eba5d089a1dfb341e27ebf3651ace0de26947
Reviewed-on: https://go-review.googlesource.com/c/net/+/421419
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-08-05 01:12:31 +00:00
Tobias Klauser
69896b7148 lif: use SIOCGLIF*, AF_* and SOCK_DGRAM consts from x/sys/unix
Use the the constants already defined in the golang.org/x/sys/unix
package instead of locally duplicating them.

Change-Id: I8ec55dccf67aa28abbca119521bac86005d80839
Reviewed-on: https://go-review.googlesource.com/c/net/+/414994
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-06-30 21:51:02 +00:00
Tobias Klauser
1bab6f366d lif: use IFT_* consts from x/sys/unix
Use the the IFT_* constants already defined in the golang.org/x/sys/unix
package instead of locally duplicating them.

Change-Id: Ifdcedae547f909535f4b447968712c7c1495c821
Reviewed-on: https://go-review.googlesource.com/c/net/+/413275
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-24 21:49:02 +00:00
Tobias Klauser
263ec571b3 lif: remove unused sysIFF_* constants
These are not used inside the package. In case they're ever nedded, they
are already defined in package golang.org/x/sys/unix for solaris.

Change-Id: Iaacc60592431a4e146ed8f6c69521ea54ef8c479
Reviewed-on: https://go-review.googlesource.com/c/net/+/413274
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
2022-06-22 18:45:35 +00:00
Tobias Klauser
e5c9674774 internal/socket, lif: add missing //go:build lines
Change-Id: I62c10c4ddd5cc7a037795db4bcf015ccf9bccb1f
Reviewed-on: https://go-review.googlesource.com/c/net/+/362914
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-11-11 08:36:44 +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
fcc8ed8e87 lif: rename internal types
This is a followup to https://go-review.googlesource.com/30576.

Change-Id: I48bc5f1781275d2cef963876745fa59ac08b5eb5
Reviewed-on: https://go-review.googlesource.com/43070
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-05-09 22:28:08 +00:00
Mikio Hara
a25ba901e3 lif: don't fail test when at least one version of INET protocols is available
This is not perfect but is enough for during the dual IP stack era.

Change-Id: Icd318f75b3ed8c73ccd588be8122379b263651fb
Reviewed-on: https://go-review.googlesource.com/41514
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-24 22:08:14 +00:00
Mikio Hara
7bf7a75e31 lif: use of nativeEndian to make API endian agnostic
Change-Id: Ib5e3eac7c98d07c286dfb49fced89ac90bd0aafc
Reviewed-on: https://go-review.googlesource.com/37916
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-03-08 16:54:22 +00:00
Mikio Hara
adc6ba92b9 lif: drop support for go1.5
This change drops a workaround for golang.org/issues/13372.

The compiler in Go 1.6 or above handles the "conversion of a
unsafe.Pointer to uintptr when calling syscall.Syscall" case
correctly.

Change-Id: I5b45094a78f15a631da277bbea0cb79fde25bb2a
Reviewed-on: https://go-review.googlesource.com/37170
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-18 08:01:40 +00:00
Mikio Hara
084869ab42 lif: rename internal types and constants generated by cgo
To match up with other packages that work with IP protocol stack.

Change-Id: Idc3ee5b2399c4982dbd9114aac441f6d7452aeef
Reviewed-on: https://go-review.googlesource.com/30576
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:59:10 +00:00
Mikio Hara
9f0e377a8a lif: new package
This change introduces a package that provides basic functions for the
manipulation of logical network interfaces, interface addresses and
data links on Solaris.

As BSD variants implement routing socket and routing messages, Linux
implements netlink socket and netlink messages, Solaris implements
STREAMS-like interface for reading, writing network facility
information inside the kernel. The package wraps various I/O control
calls which involve message exchanges between kernel protocol modules
in exposed APIs.

At present, the package supports Solaris 11 or above.

Updates golang/go#7177.

Change-Id: I192d85e53b0bee942dfefca0f73a3eb94ab8bfe9
Reviewed-on: https://go-review.googlesource.com/29893
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-29 00:31:53 +00:00