Matt Layher
79b0c68887
unix: add Linux block device ioctl types and constants
...
These types and constants are taken from hdreg.h, and will enable
querying and manipulation of block devices on Linux.
Fixes golang/go#24971
Change-Id: Iafe8f81ba7ab9f1e127743dab6a9fb1912874a5c
Reviewed-on: https://go-review.googlesource.com/108455
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-04-20 14:53:19 +00:00
Matt Layher
3ccc7e5779
unix: fix typos in linux/types.go.
...
Change-Id: I0cd02100844d7565f6fc18278ff52a8cceaacec5
Reviewed-on: https://go-review.googlesource.com/107938
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-04-18 21:24:19 +00:00
Matt Layher
9b00609908
unix: add tcp_md5sig on Linux
...
This structure is used with setsockopt in BGP speaker implementations.
For more information, please see:
https://criticalindirection.com/2015/05/12/tcp_md5sig/ .
Fixes golang/go#24830
Change-Id: Ic2137e843ad502dbe9a4227362b63164789c5877
Reviewed-on: https://go-review.googlesource.com/106656
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2018-04-18 18:02:25 +00:00
Matt Layher
b9cf5f96b6
unix: add cgroupstats type and constants
...
The cgroupstats structure is available via Linux's generic netlink
taskstats interface.
For more information, please see:
https://www.kernel.org/doc/Documentation/accounting/cgroupstats.txt .
Fixes golang/go#23388 .
Change-Id: I8a05a3875209e99a427d54049eacc98f415e44cf
Reviewed-on: https://go-review.googlesource.com/86975
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-01-09 18:07:26 +00:00
Matt Layher
ab9e364efd
unix: add generic netlink types and constants on Linux
...
Generic netlink is a generalized netlink family which enables a series
of different communication channels to be multiplexed on a single
netlink family.
For more information, please see: https://lwn.net/Articles/208755/ .
Fixes golang/go#21682 .
Change-Id: I2095150e06471f4a0e1322fba669573aa8f0a9b1
Reviewed-on: https://go-review.googlesource.com/59931
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-08-29 18:59:17 +00:00
Matt Layher
2d6f6f883a
unix: add taskstats enum values
...
I falsely assumed that enum values would be generated automatically,
but now realize that the previous values I added were actually generated
from preprocessor define statements.
This change adds some missing values I intended to add in CL 59050.
Fixes golang/go#21623 .
Change-Id: I3c40c8454ee1d323e1e4e014febe0874e859a378
Reviewed-on: https://go-review.googlesource.com/59090
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-08-25 19:46:20 +00:00
Matt Layher
22e23b7432
unix: add taskstats type and constants on Linux
...
Taskstats is a netlink-based interface for sending per-task and
per-process statistics from the kernel to userspace.
For more information, please see:
https://www.kernel.org/doc/Documentation/accounting/taskstats.txt .
Fixes golang/go#21616 .
Change-Id: I7d4b8035aa8e993074d61911d9a8c3a3e61c9b2e
Reviewed-on: https://go-review.googlesource.com/59050
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-08-25 17:12:00 +00:00
Matt Layher
7716a567fb
unix: add PacketMreq on Linux
...
The packet_mreq structure is used on Linux to modify the behavior
of packet sockets using setsockopt. See 'man 7 packet' for more
details.
Change-Id: I34e5b99a6b6eb1f23d49a9c9f25ce7b77121c8f0
Reviewed-on: https://go-review.googlesource.com/51710
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2017-07-28 16:07:29 +00:00
Matt Layher
a55a760868
unix: add IoctlGetInt and IoctlSetInt on Linux
...
This CL adds basic integer get/set functions which wrap a generic
ioctl call. The API is similar the one introduced for solaris/amd64
in CL 14587, but the request parameter has been changed to a uint
instead of an int. This makes requests with a number larger than the
maximum signed 32-bit integer work on linux/386.
For consistency, the solaris/amd64 API has also been updated to make
use of a uint instead of an int for the request number.
Fixes golang/go#20474
Change-Id: Iaae1ee2e4bb4bfcc420dcec252fe53c8d90ce81d
Reviewed-on: https://go-review.googlesource.com/44009
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2017-05-24 19:12:47 +00:00
Matt Layher
99f16d856c
unix: SockaddrVM uses "context ID" terminology instead of "client ID"
...
"When the client creates a connection, instead of providing an IP address
to choose its server, the client must provide the context ID (CID) of a
virtual machine or host."
Reference:
https://pubs.vmware.com/vsphere-60/topic/com.vmware.ICbase/PDF/ws9_esx60_vmci_sockets.pdf
Change-Id: Ia2dfe015594e0ca43a3c8acec1f43d418f5781af
Reviewed-on: https://go-review.googlesource.com/37864
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-03-08 15:33:27 +00:00
Matt Layher
d67a3279ae
unix: implement Linux AF_VSOCK sockets
...
Adds the required constants and new SockaddrVM type for working
with Linux VM sockets. For more information, see:
https://vmsplice.net/~stefan/stefanha-kvm-forum-2015.pdf .
Fixes golang/go#19434
Change-Id: I9aefb35441b2c7dc412bdfb806ebe08d5c20f6b1
Reviewed-on: https://go-review.googlesource.com/37937
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-03-08 01:50:38 +00:00
Matt Layher
e4594059fe
unix: add missing netlink constants on Linux
...
Fixes golang/go#19262
Change-Id: I67ceb187cd68e90a9387a706a89aafded0befe53
Reviewed-on: https://go-review.googlesource.com/37344
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-02-23 22:51:00 +00:00
Matt Layher
075e574b89
unix: implement Vmsplice, add SPLICE_F_* constants
...
Fixes golang/go#19125
Change-Id: I822b6f260f980178da29a552c6170cb261c8e254
Reviewed-on: https://go-review.googlesource.com/37152
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-02-17 00:34:42 +00:00
Matt Layher
e24f485414
unix: add support for AF_ALG sockets on Linux
...
Fixes golang/go#19033 .
Change-Id: Icbd249f63cd4a9035a1decaa8bf4c521303b4494
Reviewed-on: https://go-review.googlesource.com/36805
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2017-02-13 22:57:39 +00:00
Matt Layher
2c41184ab0
x/sys/unix: allow nil argument slice for Utimes on Linux
...
Fixes golang/go#11830 .
Change-Id: Ie7ffd4579a7b8143ca85a30d24acd3e2e7eece78
Reviewed-on: https://go-review.googlesource.com/12648
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Rob Pike <r@golang.org >
2015-07-24 22:00:13 +00:00