mirror of
https://github.com/golang/go
synced 2024-11-12 10:20:27 -07:00
syscall: add network interface constants for linux/386, linux/amd64
R=rsc CC=golang-dev https://golang.org/cl/3266042
This commit is contained in:
parent
f980577064
commit
6555cfc6c6
@ -29,6 +29,8 @@ includes_Linux='
|
||||
#include <sys/stat.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/if_tun.h>
|
||||
#include <net/if.h>
|
||||
#include <netpacket/packet.h>
|
||||
'
|
||||
|
||||
@ -83,24 +85,27 @@ done
|
||||
echo "${!indirect} $includes" | $GCC -x c - -E -dM $ccflags |
|
||||
awk '
|
||||
$1 != "#define" || $2 ~ /\(/ {next}
|
||||
|
||||
|
||||
$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
|
||||
$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
|
||||
$2 ~ /^(SCM_SRCRT)$/ {next}
|
||||
$2 ~ /^(MAP_FAILED)$/ {next}
|
||||
|
||||
$2 !~ /^ETH_/ &&
|
||||
$2 ~ /^E[A-Z0-9_]+$/ ||
|
||||
$2 ~ /^SIG[^_]/ ||
|
||||
$2 ~ /^IN_/ ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|EVFILT|EV|SHUT|PROT|MAP|PACKET|MSG|SCM)_/ ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|EVFILT|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|IFF)_/ ||
|
||||
$2 == "SOMAXCONN" ||
|
||||
$2 == "NAME_MAX" ||
|
||||
$2 == "IFNAMSIZ" ||
|
||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||
$2 ~ /^(O|F|FD|NAME|S|PTRACE)_/ ||
|
||||
$2 ~ /^SIO/ ||
|
||||
$2 ~ /^W[A-Z0-9]+$/ {printf("\t$%s = %s,\n", $2, $2)}
|
||||
$2 ~ /^__WCOREFLAG$/ {next}
|
||||
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t$%s = %s,\n", substr($2,3), $2)}
|
||||
|
||||
|
||||
{next}
|
||||
' | sort
|
||||
|
||||
|
@ -232,6 +232,29 @@ const (
|
||||
F_ULOCK = 0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
IFF_BROADCAST = 0x2
|
||||
IFF_DEBUG = 0x4
|
||||
IFF_DYNAMIC = 0x8000
|
||||
IFF_LOOPBACK = 0x8
|
||||
IFF_MASTER = 0x400
|
||||
IFF_MULTICAST = 0x1000
|
||||
IFF_NOARP = 0x80
|
||||
IFF_NOTRAILERS = 0x20
|
||||
IFF_NO_PI = 0x1000
|
||||
IFF_ONE_QUEUE = 0x2000
|
||||
IFF_POINTOPOINT = 0x10
|
||||
IFF_PORTSEL = 0x2000
|
||||
IFF_PROMISC = 0x100
|
||||
IFF_RUNNING = 0x40
|
||||
IFF_SLAVE = 0x800
|
||||
IFF_TAP = 0x2
|
||||
IFF_TUN = 0x1
|
||||
IFF_TUN_EXCL = 0x8000
|
||||
IFF_UP = 0x1
|
||||
IFF_VNET_HDR = 0x4000
|
||||
IFNAMSIZ = 0x10
|
||||
IN_ACCESS = 0x1
|
||||
IN_ALL_EVENTS = 0xfff
|
||||
IN_ATTRIB = 0x4
|
||||
@ -723,6 +746,19 @@ const (
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_SYNCNT = 0x7
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETIFF = 0x800454d2
|
||||
TUNGETSNDBUF = 0x800454d3
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETGROUP = 0x400454ce
|
||||
TUNSETIFF = 0x400454ca
|
||||
TUNSETLINK = 0x400454cd
|
||||
TUNSETNOCSUM = 0x400454c8
|
||||
TUNSETOFFLOAD = 0x400454d0
|
||||
TUNSETOWNER = 0x400454cc
|
||||
TUNSETPERSIST = 0x400454cb
|
||||
TUNSETSNDBUF = 0x400454d4
|
||||
TUNSETTXFILTER = 0x400454d1
|
||||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
|
@ -232,6 +232,29 @@ const (
|
||||
F_ULOCK = 0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
IFF_BROADCAST = 0x2
|
||||
IFF_DEBUG = 0x4
|
||||
IFF_DYNAMIC = 0x8000
|
||||
IFF_LOOPBACK = 0x8
|
||||
IFF_MASTER = 0x400
|
||||
IFF_MULTICAST = 0x1000
|
||||
IFF_NOARP = 0x80
|
||||
IFF_NOTRAILERS = 0x20
|
||||
IFF_NO_PI = 0x1000
|
||||
IFF_ONE_QUEUE = 0x2000
|
||||
IFF_POINTOPOINT = 0x10
|
||||
IFF_PORTSEL = 0x2000
|
||||
IFF_PROMISC = 0x100
|
||||
IFF_RUNNING = 0x40
|
||||
IFF_SLAVE = 0x800
|
||||
IFF_TAP = 0x2
|
||||
IFF_TUN = 0x1
|
||||
IFF_TUN_EXCL = 0x8000
|
||||
IFF_UP = 0x1
|
||||
IFF_VNET_HDR = 0x4000
|
||||
IFNAMSIZ = 0x10
|
||||
IN_ACCESS = 0x1
|
||||
IN_ALL_EVENTS = 0xfff
|
||||
IN_ATTRIB = 0x4
|
||||
@ -724,6 +747,19 @@ const (
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_SYNCNT = 0x7
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETIFF = 0x800454d2
|
||||
TUNGETSNDBUF = 0x800454d3
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETGROUP = 0x400454ce
|
||||
TUNSETIFF = 0x400454ca
|
||||
TUNSETLINK = 0x400454cd
|
||||
TUNSETNOCSUM = 0x400454c8
|
||||
TUNSETOFFLOAD = 0x400454d0
|
||||
TUNSETOWNER = 0x400454cc
|
||||
TUNSETPERSIST = 0x400454cb
|
||||
TUNSETSNDBUF = 0x400454d4
|
||||
TUNSETTXFILTER = 0x400454d1
|
||||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
|
Loading…
Reference in New Issue
Block a user