lhl2617
0cec03c779
unix: add consts and structs for <mtd/mtd-user.h>
...
It would be convenient to have MTD user space consts and structs
in the package.
Checked that the regexes in unix/mkerrors.sh are not too general,
and that all the defined constants in <mtd/mtd-user.h> are included
in the generated code.
Checked that all structs and enums added in unix/linux/types.go
are complete.
Fixes golang/go#46063
Change-Id: I190ac290f3f32a4f817cc7506df0dddb24d881b8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/318211
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-05-21 20:33:32 +00:00
Tobias Klauser
413ae7eecf
unix/linux: update Dockerfile to Kernel 5.12, Go 1.16.3
...
Change-Id: I4e98e902508ad8bf0dede6c571bffed92611e02e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/313391
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-26 23:06:21 +00:00
Tobias Klauser
49726bf1d1
unix: add ICMPV6_FILTER_* consts on linux
...
Change-Id: If626dab3c708d78768ae593b7b3f8bff280ee641
Reviewed-on: https://go-review.googlesource.com/c/sys/+/305049
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-26 22:08:04 +00:00
Tobias Klauser
1e4c9ba3b0
unix: add ICMP_FILTER constant on linux
...
Change-Id: I9ce0932c28ae8634270d69b0bd23216e963cc105
Reviewed-on: https://go-review.googlesource.com/c/sys/+/303369
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-20 14:08:29 +00:00
Tom Thorogood
b80eb88b80
unix: add HIDRAW ioctls
...
This change adds (most) of the ioctl API for the Linux HIDRAW interface.
Reading and writing non-numbered HID reports is done using the read and
write system calls respectively.
Some of the HIDIOC* request numbers are exported directly while others
are kept unexported. This is because some of the #defines require a len
attribute that doesn't have a specific well defined value.
Wrapper types are added for most of the request numbers as is standard.
No wrapper is added for HIDIOCGRDESCSIZE as it would just be
IoctlGetUint32.
The HIDIOC[GS]FEATURE, HIDIOC[GS]INPUT and HIDIOC[GS]OUTPUT request
numbers, which are required for numbered HID reports, are entirely
ommitted as the len attribute has to be a runtime variable. These could
be added later by doing something like
`HIDIOCGFEATURE(0) | (len << _IOC_SIZESHIFT)`,
with care taken that len doesn't overflow _IOC_XSIZEMASK.
Outdated documentation for the HIDRAW interface is available at:
https://www.kernel.org/doc/Documentation/hid/hidraw.txt .
Change-Id: I2ae5060f0f46150f6fb52959c2e55f50927c1f69
Reviewed-on: https://go-review.googlesource.com/c/sys/+/289169
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
2021-02-23 08:53:22 +00:00
Russ Cox
9a76102bfb
all: go fmt ./...
...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184 ).
See https://golang.org/design/draft-gobuild
Change-Id: I01667f826428426a39c84717d02efa25fa44553c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/294490
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Keith Randall <khr@golang.org >
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Trust: Josh Bleecher Snyder <josharian@gmail.com >
Trust: Russ Cox <rsc@golang.org >
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com >
Run-TryBot: Russ Cox <rsc@golang.org >
2021-02-20 05:07:31 +00:00
Tobias Klauser
b926d437f3
unix/linux: update Dockerfile to Kernel 5.11, glibc 2.33, Go 1.16
...
The FS_POLICY_FLAGS_VALID const is kernel-internal and was removed from
the UAPI headers in
3ceb6543e9
Change-Id: I21b1efe895fbd7f640a7604805cf7ce39c5a43f4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/291637
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Matt Layher <mdlayher@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-02-17 10:54:51 +00:00
Tobias Klauser
ba0562f347
unix: re-generate linux consts after CL 283413
...
ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF was removed from linux/types.go and
mkerrors.sh will catch it instead.
Change-Id: I76e063cbfee4411e5ea9f2e0e5359e169d56b195
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283595
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-01-13 13:13:15 +00:00
Matt Layher
eaf3bda374
unix: add ethtool constants for Linux
...
The ethtool generic netlink interface also uses these constants
in addition to the ones I previously added.
For more information about this interface, see:
https://www.kernel.org/doc/html/latest/networking/ethtool-netlink.html .
Change-Id: I8861e5faa23bfc0179725314fc5a528486e328b2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283413
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-01-13 00:00:19 +00:00
Matt Layher
789bb1bd40
unix: add ethtool generic netlink constants for Linux
...
For more information about this interface, see:
https://www.kernel.org/doc/html/latest/networking/ethtool-netlink.html .
Change-Id: I4fe37e7dce3c52d72286bee047de2b49fe559b13
Reviewed-on: https://go-review.googlesource.com/c/sys/+/282812
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Matt Layher <mdlayher@gmail.com >
2021-01-10 05:19:26 +00:00
Tobias Klauser
f9fddec55a
unix/linux: update Dockerfile to kernel 5.10 and Go 1.15.6
...
Also include some newly added consts.
Change-Id: Iaf9fad92a4cbbf9f1e97ed544116bd93525dddde
Reviewed-on: https://go-review.googlesource.com/c/sys/+/277254
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 >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-12-14 21:06:02 +00:00
Matt Layher
ade898ef86
unix: add Linux lwtunnel constants for use with rtnetlink APIs
...
Change-Id: Ibe39b315321c18916870dcfc97b083a18b91be2b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271077
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Trust: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-18 18:01:33 +00:00
Tobias Klauser
56aa3af1a1
unix: update Dockerfile to Linux 5.9 and Go 1.15.2
...
Also add some newly added IFLA_* and PERF_* consts and adjust the
renamed NFTA_LIST_UNPEC const (see torvalds/linux@da9125df85 ).
Change-Id: Ic37f39e5b5bfe063ae6d7701de05ced07e62abfb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261457
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-10-13 06:48:17 +00:00
Lehner Florian
765f4ea38d
unix: update PERF consts on linux
...
Update the PERF_* consts from /usr/include/linux/perf_event.h.
Change-Id: I2dfa09445547682fa7ed99b385476319e8493c27
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259477
Trust: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-05 06:50:44 +00:00
Matt Layher
f6757f2700
unix: add Linux watchdog structures and missing constants
...
This CL also adds the type-safe wrappers IoctlGetWatchdogInfo
and IoctlWatchdogKeepalive around the raw ioctl interface.
Change-Id: I98e3970807b28832e49524700b17b6b6f75d91ed
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259497
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Terin Stock <terinjokes@gmail.com >
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
2020-10-04 23:06:29 +00:00
Tobias Klauser
aee5d888a8
unix: add IoctlFile{Clone,CloneRange,DedupeRange} on linux
...
Add wrappers for the FICLONE, FICLONERANGE and FIDEDUPERANGE ioctl
operations on linux. See the ioctl_ficlone(2), ioctl_ficlonerange(2) and
ioctl_fideduperange(2) man pages for details.
Change-Id: If3bad98facc362d4f7524e8d7a128815e9e2f204
Reviewed-on: https://go-review.googlesource.com/c/sys/+/256000
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 >
2020-09-22 07:02:32 +00:00
Stephan Klatt
8dfe04af21
unix: add constants for raw CAN sockets
...
Fixes golang/go#41091
Change-Id: Icae9ad639599474144b286510f744f4a283aba06
GitHub-Last-Rev: 541bdb97bb
GitHub-Pull-Request: golang/sys#83
Reviewed-on: https://go-review.googlesource.com/c/sys/+/251357
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2020-08-28 15:00:25 +00:00
Stephan Klatt
131dc92a58
unix: add CAN error constants
...
Fixes golang/go#41067
Change-Id: I110ed054074c9173911ce36009087bf1d0dc9499
GitHub-Last-Rev: 2309ec0882
GitHub-Pull-Request: golang/sys#82
Reviewed-on: https://go-review.googlesource.com/c/sys/+/251037
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-08-28 08:12:04 +00:00
Anatol Pomozov
3d37ad5750
unix: add dm-ioctl constants and types
...
This interface is used by devicemapper framework to manage its block
devices.
Change-Id: If86a679461867dac18b56bdf005567ffc4b7f951
Reviewed-on: https://go-review.googlesource.com/c/sys/+/247437
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-08-14 20:00:57 +00:00
Tobias Klauser
5acd03effb
unix: update Dockerfile to glibc 2.32
...
Change-Id: Ia5ebb34a743c6e676d3cb2febaefc55afa9fc7ac
Reviewed-on: https://go-review.googlesource.com/c/sys/+/247157
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-08-06 12:55:47 +00:00
Tobias Klauser
fd5f0c170a
unix: update Dockerfile to Linux 5.8
...
Change-Id: If6643e7e092c5d482f9cefe838640ebcec22188e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/246417
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-08-03 15:09:36 +00:00
Tobias Klauser
8d3cce7afc
unix: update Dockerfile to Linux 5.7 and Go 1.14.4
...
Some BPF related macros were converted to enum values, so add them to
linux/types.go
Change-Id: I6fa9cc17b6ff3be91f3aa0b7ef2cfe19faf069bd
Reviewed-on: https://go-review.googlesource.com/c/sys/+/236097
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-06-02 10:08:48 +00:00
Maxim Pugachev
1f56873058
unix: add support for timerfd syscalls on Linux
...
timerfd_create, timerfd_gettime and timerfd_settime syscalls have been added.
Fixes golang/go#38733
Change-Id: I306d68103b6efb2515c74f384646210c4b68f66e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/230798
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-04-30 08:24:07 +00:00
Tobias Klauser
c3d8025017
unix: update Dockerfile to Linux 5.6, and Go 1.13.9
...
We cannot update to Go 1.14 yet, since cgo code generation for certain
types is broken due to golang/go#37621 .
Change-Id: I7b60d23ff4e79a7bb7fa4f0e0625893e4eff81f1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/226577
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-03-31 12:40:33 +00:00
Tobias Klauser
9dae0f8f57
unix: add fs-verity consts and types
...
See https://www.kernel.org/doc/html/latest/filesystems/fsverity.html for
details.
Change-Id: I5b02d0ef84f21d05ea3f1ac8e905232733ea3739
Reviewed-on: https://go-review.googlesource.com/c/sys/+/225698
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-03-27 17:32:47 +00:00
Tom Parkin
9a0dfc3c55
unix: implement L2TPIP socket address on Linux
...
Add constants and types to support IP-encapsulated L2TP/RFC3931
tunnels on Linux systems.
The L2TP subsystem for IP encapsulated tunnels hooks into the inet
kernel code using a specific IP protocol value. In order to handle
this, anyToSockaddr now has to query the socket protocol type using
GetsockoptInt for the AF_INET and AF_INET6 address families.
Although this change is reasonably simple, unit tests have been added
to validate handling of the new types.
Fixes golang/go#37787
Change-Id: I16ae1e24dcced4ccc6ce6a79a90a5a2f6a560967
GitHub-Last-Rev: ca554ad1b6
GitHub-Pull-Request: golang/sys#60
Reviewed-on: https://go-review.googlesource.com/c/sys/+/223157
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-03-16 20:21:46 +00:00
Johan Jansson
c5d0d7b4ec
unix: merge duplicate code in zerrors_linux_*.go
...
Run mkmerge.go on zerrors_linux_*.go to merge duplicate consts, funcs,
and types into zerrors_linux.go
Please see https://gist.github.com/jupj/639b5cda305d251161fec2304c27c9b9
for a script to validate these changes.
Updates golang/go#33059
Change-Id: I168b5efc7fd6d2fcf7fc8dfe1ef5eea07f07f9c2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/221318
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-03-01 04:06:27 +00:00