Tobias Klauser
a1a9c4b846
unix/linux: update to Linux kernel 6.4 and Go 1.21rc2
...
Also fix the glibc 2.37 release date in a comment.
Change-Id: Ibd972a2846f0085bacf67c847ce4726bf130d5ba
Reviewed-on: https://go-review.googlesource.com/c/sys/+/506017
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Carlos Amedee <carlos@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2023-06-27 17:19:37 +00:00
Anton Kuklin
e0c3b6e6ae
unix: add Mremap for linux
...
For golang/go#60409
Change-Id: I75a9732ee996f0aeb91599d80803f96ada468c27
GitHub-Last-Rev: c348b6194d
GitHub-Pull-Request: golang/sys#164
Reviewed-on: https://go-review.googlesource.com/c/sys/+/502715
Auto-Submit: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
2023-06-16 19:37:35 +00:00
Tobias Klauser
df9fef2097
unix/linux: update to Linux kernel 6.3 and Go 1.20.5
...
Change-Id: I347341ae0e45e73477e9a310a3749d37bafa8da7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/503255
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-06-16 18:27:25 +00:00
Tobias Klauser
39c2d6a01d
unix: add UDP socket option constants on linux
...
Change-Id: I4c947319f98754a5135b306d8ff042a986ab5440
Reviewed-on: https://go-review.googlesource.com/c/sys/+/484637
Reviewed-by: David Chase <drchase@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
2023-04-14 20:11:08 +00:00
Tobias Klauser
972870e3e1
unix/linux: update to Linux kernel 6.2, glibc 2.37 and Go 1.20.1
...
Also remove some manually defined AT_* contstants which are now defined
in the libc headers.
Change-Id: I342976a22948e9b05e38dc7503d9dd356cee6c7b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/470176
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
2023-02-23 15:22:10 +00:00
chenguoqi
7a75290698
unix/linux: update to glibc 2.36
...
Support for LoongArch has been merged upstream. This allows to
drop the loong64 specific glibc patches.
Because the header file sys/mount.h of glibc 2.36 includes fcntl.h
(commit 78a408ee7ba041fc8d5dbd5f67065b4a982c11e5), this will leads to
duplicate definition of structure stat on MIPS64. In order to solve
this error, use the custom type my_stat to generate the Go Stat_t.
Change-Id: I888280d777d1c7089548acf1b3821762011d79b0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/453555
Reviewed-by: xiaodong liu <teaofmoli@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2023-01-31 14:54:23 +00:00
Tobias Klauser
6e4d1c53cf
unix/linux: update to Linux kernel 6.1 and Go 1.20-rc2
...
Change-Id: Iaff9781793b2896aba6d4788faf0d5dde18c1395
Reviewed-on: https://go-review.googlesource.com/c/sys/+/461297
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
2023-01-16 08:36:32 +00:00
ianwoolf
c6bc011c0c
unix: add socket constants
...
Fixes golang/go#53557
Change-Id: Ic3d57d9431d7c89f6650ff742888481bcabb23c6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/417994
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-07-21 23:06:56 +00:00
Florian Lehner
c0bba94af5
unix: add constants for netlink/audit
...
Change-Id: Idaa02498b43360fa647d52423bc2f4c0cd5a9523
Reviewed-on: https://go-review.googlesource.com/c/sys/+/416754
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-07-15 15:14:00 +00:00
Tobias Klauser
af78867b19
unix/linux: update to Linux kernel 5.19-rc2
...
Update to 5.19-rc2 instead of 5.18 for the following reasons:
- Support for LoongArch has been merged upstream. This allows to drop
the loong64 specific kernel patches.
- Fixes [1] an issue encountered with when generating the
SOCK_TXREHASH_DEFAULT constant from linux/socket.h on 5.18
- Contains a fix [2] to provide SYS_MEMFD_SECRET on linux/riscv64 as
well, The underlying syscall was already available in earlier kernel
versions. Also see golang/go#51547 .
[1] https://lore.kernel.org/r/20220531094345.13801-1-tklauser@distanz.ch
[2] https://lore.kernel.org/r/20220505081815.22808-1-tklauser@distanz.ch
Change-Id: I6c3ec30a067eae339c443ee55962d94c84feffd9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411375
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2022-06-15 21:21:18 +00:00
limeidan
88d2bb9c0c
unix: add generate component files support for linux/loong64
...
Updates golang/go#46229
Change-Id: If0ee99997360608d7ba218880a1ef180ca6db551
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399336
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.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 >
Reviewed-by: Than McIntosh <thanm@google.com >
2022-04-22 01:37:25 +00:00
Florian Lehner
a24fb2fb8a
unix: add constants for netlink/routing rules
...
Change-Id: Ic68b65e71125b755418f9d8d01a9500aa1e9ffc1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399194
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Auto-Submit: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2022-04-08 20:14:24 +00:00
Tobias Klauser
3f8b81556e
unix/linux: update to Linux kernel 5.17
...
Change-Id: I8e982e355d6058198f5b555c2f33e18301872909
Reviewed-on: https://go-review.googlesource.com/c/sys/+/398435
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-04-06 16:36:25 +00:00
Matt Layher
36772127a2
unix: implement Waitid on Linux
...
waitid(2) can be used to wait on pidfds. Update TestPidfd to test this new
functionality as well.
Change-Id: I5f26140b9afd5a6ec3f04217fb1c91542936a2c3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/395936
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-03-25 20:38:50 +00:00
Matt Layher
dbe011f71a
unix: add Linux Kernel Connection Multiplexor types and constants
...
For details on KCM, see:
https://www.kernel.org/doc/Documentation/networking/kcm.txt .
Change-Id: I14ebf0aaad17f5a9078f027bd50e050c69b08981
Reviewed-on: https://go-review.googlesource.com/c/sys/+/348449
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-02-24 00:32:55 +00:00
Oscar Söderlund
96fed51e14
unix: add can netlink types and constants
...
Change-Id: Ie234f26c38a9ced6407f2970fa97b49d18119f06
Reviewed-on: https://go-review.googlesource.com/c/sys/+/387474
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Trust: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com >
2022-02-23 15:53:57 +00:00
Matt Layher
3681064d51
unix: implement getitimer(2) and setitimer(2) on Linux
...
Wrap the low-level system calls with a more idiomatic Go API and a set of
constants to indicate which timer should be queried or modified.
man 2 getitimer indicates that these system calls are obsolete as of
POSIX.1-2008, but the code I am working on has not been ported to the modern
timer_gettime(2) and timer_settime(2) APIs as of yet.
Change-Id: I91482e141047846cadf47aa2417b8770955986bf
Reviewed-on: https://go-review.googlesource.com/c/sys/+/384054
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Dominik Honnef <dominik@honnef.co >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Trust: Matt Layher <mdlayher@gmail.com >
2022-02-09 21:45:40 +00:00
Tobias Klauser
1c1b9b1eba
unix/linux: update to glibc 2.35, Go 1.17.6
...
Change-Id: I90b7eee499d6ed6ea431d2c8539aae5afa25cfab
Reviewed-on: https://go-review.googlesource.com/c/sys/+/383134
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2022-02-04 13:58:22 +00:00
Tobias Klauser
a018aaa089
unix/linux: update to Linux Kernel 5.16
...
Change-Id: I83f84e8aa6f75fc2a6fd1744546e8dc3d5bc3a55
Reviewed-on: https://go-review.googlesource.com/c/sys/+/377134
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2022-01-10 18:14:12 +00:00
Matt Layher
4825e8c387
unix: add WireGuard generic netlink interface constants on Linux
...
Change-Id: I619c49f745da8cfd17bc2aae28d97aff73daf4d5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/371674
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-12-14 23:44:02 +00:00
Kir Kolyshkin
0a5406a544
unix: add mount_setattr support for linux
...
This brings in mount_setattr(2) support, added to Linux 5.12 kernel and
documented at https://man7.org/linux/man-pages/man2/mount_setattr.2.html
Change-Id: I5609980c18aef80f9429a8c8cec8c1e129f74ab7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/363444
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
2021-11-16 06:13:58 +00:00
Johan Jansson
7580c6e521
unix: factor out mkmerge into a proper package
...
Factor mkmerge.go and mkmerge_test.go into package internal/mkmerge.
Due to ignore constraints, mkmerge_test.go wasn't run by the Go
builders and failing tests were unnoticed.
Factoring mkmerge into its own package and removing ignore constraints
makes the tests run automatically by the Go builders.
Fixes golang/go#49484
Change-Id: I56a0b7220e40d1d7e5193490cb547cad4202f9ac
Reviewed-on: https://go-review.googlesource.com/c/sys/+/363334
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Bryan C. Mills <bcmills@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-11-12 16:43:55 +00:00
Tobias Klauser
39c9dd3799
unix/linux: update Dockerfile to Kernel 5.15
...
Change-Id: I032465fbaecd49ffb6048577cd2f3fcb3d8e11d0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/359678
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-01 20:44:03 +00:00
Dustin Spicuzza
969570ce7c
unix: add Sysv shared memory support
...
Implements proposed API from https://golang.org/issue/46084 . I chose
`SysvShmDesc` since it's a clearer name than `SysvShm`. Initially supports Darwin and Linux.
Solaris support has a blocker (https://golang.org/issue/46084#issuecomment-836980018 )
For golang/go#46084
Change-Id: Ied0f768a74c448254adc3315348417825a7ec63e
GitHub-Last-Rev: befbd7af6b
GitHub-Pull-Request: golang/sys#110
Reviewed-on: https://go-review.googlesource.com/c/sys/+/327830
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-09-30 14:19:18 +00:00
Tobias Klauser
c212e73226
unix: add Landlock consts and types
...
Change-Id: I5b8eee0594072e58951dd8b655058b96caeba497
Reviewed-on: https://go-review.googlesource.com/c/sys/+/348349
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-09-08 14:30:11 +00:00
Tobias Klauser
f4d43177bf
unix/linux: update Dockerfile to Kernel 5.14
...
Change-Id: Ie6b9521c70c0e91a507a923811f44f797b64e064
Reviewed-on: https://go-review.googlesource.com/c/sys/+/346029
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-08-31 04:25:30 +00:00
Mark Jeffery
bce67f0961
unix: add SetsockoptTCPRepairOpt on Linux
...
There is currently no function to allow for setting repair options for sockets in repair mode.
There are 4 options catered for in the linux implementation.
TCPOPT_WINDOW
TCPOPT_MAXSEG
TCPOPT_SACK_PERMITTED
TCPOPT_TIMESTAMP
Details of the patch to the kernel and the thinking behind it is here https://lwn.net/Articles/495304
Work done in this commit
Included the tcp options type and length for inclusion in the Docker build
Added TCPOPT to the regular expression in mkerrors.sh. There was only TCP_ previously
Add the new function to syscall_unix.go
I have tested locally and verified each option with ss -i
I am not sure whether to commit tests because I don't know if socket creation is possible on the test runs in the offical pipeline.
I did check for existing tests but didn't see any that created sockets, only one that validated a string option.
Fixes golang/go#46984
Change-Id: Iade0434c05cebf2fbdfb5f04b2a7b51c8b358423
Reviewed-on: https://go-review.googlesource.com/c/sys/+/332709
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-08-19 07:21:35 +00:00
Tobias Klauser
27a6752fd0
unix/linux: update Dockerfile to Kernel 5.13
...
Fixes golang/go#47057
Change-Id: I47bc7491ed46afd76d4955c2843f2bb1295c672b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/332969
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-08-16 07:10:01 +00:00
Tobias Klauser
b1c119fd70
unix: move ICMP{,V6}_FILTER* const definitions
...
The C headers defining these constants pull in <netinet/in.h> which
leads to definition conflicts between kernel and glibc headers when
running mkerrors.sh for Linux kernel 5.13. Avoid these by moving this
const definitions to linux/types.go.
For golang/go#47057
Change-Id: I09a2391dfe4c6bb38b7069e952748070c10824e6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/332929
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-08-16 07:09:50 +00:00
Ed Schouten
e2b7044e8c
unix: add SEEK_* constants on Darwin, FreeBSD, Linux
...
The Go "os" package already provides bindings for SEEK_CUR, SEEK_SET and
SEEK_END. Most operating systems also support SEEK_HOLE and SEEK_DATA,
which you can use to skip sparse regions in a file. Let's add bindings,
so we can also do this from within Go.
Change-Id: If9243b05a8f563b4bce2452aa4bff145d9442cc2
GitHub-Last-Rev: ac8aed2d4a
GitHub-Pull-Request: golang/sys#112
Reviewed-on: https://go-review.googlesource.com/c/sys/+/328170
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2021-06-16 04:58:30 +00:00
Tom Thorogood
9665404d36
unix: support Linux NFC Subsystem
...
This adds the constants and types needed for the Linux NFC Subsystem.
It also adds support for sockaddr_nfc and sockaddr_nfc_llcp to Connect.
The Linux NFC Subsystem is documented in:
https://www.kernel.org/doc/html/latest/networking/nfc.html .
Change-Id: Ic6a79afdba85e9b154ec46f191f27714b4b38a57
Reviewed-on: https://go-review.googlesource.com/c/sys/+/323551
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-06-03 12:58:02 +00:00
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