mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
unix/linux: add TUN flags and virtio_net_hdr constants
Change-Id: I10c86c100f4db77740eff6f07d91d6489b21b6f8
GitHub-Last-Rev: 3e8d7343cd
GitHub-Pull-Request: golang/sys#148
Reviewed-on: https://go-review.googlesource.com/c/sys/+/468656
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
committed by
Gopher Robot
parent
2977c7732d
commit
71a906ea0c
@@ -110,6 +110,7 @@ struct termios2 {
|
||||
#include <linux/if_bridge.h>
|
||||
#include <linux/if_packet.h>
|
||||
#include <linux/if_pppox.h>
|
||||
#include <linux/if_tun.h>
|
||||
#include <linux/if_xdp.h>
|
||||
#include <linux/ipc.h>
|
||||
#include <linux/kcm.h>
|
||||
@@ -141,9 +142,10 @@ struct termios2 {
|
||||
#include <linux/stat.h>
|
||||
#include <linux/taskstats.h>
|
||||
#include <linux/tipc.h>
|
||||
#include <linux/virtio_net.h>
|
||||
#include <linux/vm_sockets.h>
|
||||
#include <linux/watchdog.h>
|
||||
#include <linux/wireguard.h>
|
||||
#include <linux/vm_sockets.h>
|
||||
|
||||
#include <mtd/mtd-user.h>
|
||||
|
||||
@@ -5666,3 +5668,31 @@ const (
|
||||
AUDIT_NLGRP_NONE = C.AUDIT_NLGRP_NONE
|
||||
AUDIT_NLGRP_READLOG = C.AUDIT_NLGRP_READLOG
|
||||
)
|
||||
|
||||
// generated by:
|
||||
// perl -nlE '/^#define (TUN_F_\w+)/ && say "$1 = C.$1"' include/uapi/linux/if_tun.h
|
||||
const (
|
||||
TUN_F_CSUM = C.TUN_F_CSUM
|
||||
TUN_F_TSO4 = C.TUN_F_TSO4
|
||||
TUN_F_TSO6 = C.TUN_F_TSO6
|
||||
TUN_F_TSO_ECN = C.TUN_F_TSO_ECN
|
||||
TUN_F_UFO = C.TUN_F_UFO
|
||||
)
|
||||
|
||||
// generated by:
|
||||
// perl -nlE '/^#define (VIRTIO_NET_HDR_F_\w+)/ && say "$1 = C.$1"' include/uapi/linux/virtio_net.h
|
||||
const (
|
||||
VIRTIO_NET_HDR_F_NEEDS_CSUM = C.VIRTIO_NET_HDR_F_NEEDS_CSUM
|
||||
VIRTIO_NET_HDR_F_DATA_VALID = C.VIRTIO_NET_HDR_F_DATA_VALID
|
||||
VIRTIO_NET_HDR_F_RSC_INFO = C.VIRTIO_NET_HDR_F_RSC_INFO
|
||||
)
|
||||
|
||||
// generated by:
|
||||
// perl -nlE '/^#define (VIRTIO_NET_HDR_GSO_\w+)/ && say "$1 = C.$1"' include/uapi/linux/virtio_net.h
|
||||
const (
|
||||
VIRTIO_NET_HDR_GSO_NONE = C.VIRTIO_NET_HDR_GSO_NONE
|
||||
VIRTIO_NET_HDR_GSO_TCPV4 = C.VIRTIO_NET_HDR_GSO_TCPV4
|
||||
VIRTIO_NET_HDR_GSO_UDP = C.VIRTIO_NET_HDR_GSO_UDP
|
||||
VIRTIO_NET_HDR_GSO_TCPV6 = C.VIRTIO_NET_HDR_GSO_TCPV6
|
||||
VIRTIO_NET_HDR_GSO_ECN = C.VIRTIO_NET_HDR_GSO_ECN
|
||||
)
|
||||
|
||||
@@ -5752,3 +5752,25 @@ const (
|
||||
AUDIT_NLGRP_NONE = 0x0
|
||||
AUDIT_NLGRP_READLOG = 0x1
|
||||
)
|
||||
|
||||
const (
|
||||
TUN_F_CSUM = 0x1
|
||||
TUN_F_TSO4 = 0x2
|
||||
TUN_F_TSO6 = 0x4
|
||||
TUN_F_TSO_ECN = 0x8
|
||||
TUN_F_UFO = 0x10
|
||||
)
|
||||
|
||||
const (
|
||||
VIRTIO_NET_HDR_F_NEEDS_CSUM = 0x1
|
||||
VIRTIO_NET_HDR_F_DATA_VALID = 0x2
|
||||
VIRTIO_NET_HDR_F_RSC_INFO = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
VIRTIO_NET_HDR_GSO_NONE = 0x0
|
||||
VIRTIO_NET_HDR_GSO_TCPV4 = 0x1
|
||||
VIRTIO_NET_HDR_GSO_UDP = 0x3
|
||||
VIRTIO_NET_HDR_GSO_TCPV6 = 0x4
|
||||
VIRTIO_NET_HDR_GSO_ECN = 0x80
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user