зеркало из https://github.com/golang/sys.git
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>
This commit is contained in:
Родитель
3f8b81556e
Коммит
a24fb2fb8a
|
@ -94,6 +94,7 @@ struct termios2 {
|
|||
#include <linux/ethtool.h>
|
||||
#include <linux/ethtool_netlink.h>
|
||||
#include <linux/fanotify.h>
|
||||
#include <linux/fib_rules.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fsverity.h>
|
||||
|
@ -5450,3 +5451,42 @@ const (
|
|||
NL80211_WPA_VERSION_2 = C.NL80211_WPA_VERSION_2
|
||||
NL80211_WPA_VERSION_3 = C.NL80211_WPA_VERSION_3
|
||||
)
|
||||
|
||||
// generated by:
|
||||
// perl -nlE '/^\s*((FR_ACT|FRA)_\w+)/ && say "$1 = C.$1"' include/uapi/linux/fib_rules.h
|
||||
const (
|
||||
FRA_UNSPEC = C.FRA_UNSPEC
|
||||
FRA_DST = C.FRA_DST
|
||||
FRA_SRC = C.FRA_SRC
|
||||
FRA_IIFNAME = C.FRA_IIFNAME
|
||||
FRA_GOTO = C.FRA_GOTO
|
||||
FRA_UNUSED2 = C.FRA_UNUSED2
|
||||
FRA_PRIORITY = C.FRA_PRIORITY
|
||||
FRA_UNUSED3 = C.FRA_UNUSED3
|
||||
FRA_UNUSED4 = C.FRA_UNUSED4
|
||||
FRA_UNUSED5 = C.FRA_UNUSED5
|
||||
FRA_FWMARK = C.FRA_FWMARK
|
||||
FRA_FLOW = C.FRA_FLOW
|
||||
FRA_TUN_ID = C.FRA_TUN_ID
|
||||
FRA_SUPPRESS_IFGROUP = C.FRA_SUPPRESS_IFGROUP
|
||||
FRA_SUPPRESS_PREFIXLEN = C.FRA_SUPPRESS_PREFIXLEN
|
||||
FRA_TABLE = C.FRA_TABLE
|
||||
FRA_FWMASK = C.FRA_FWMASK
|
||||
FRA_OIFNAME = C.FRA_OIFNAME
|
||||
FRA_PAD = C.FRA_PAD
|
||||
FRA_L3MDEV = C.FRA_L3MDEV
|
||||
FRA_UID_RANGE = C.FRA_UID_RANGE
|
||||
FRA_PROTOCOL = C.FRA_PROTOCOL
|
||||
FRA_IP_PROTO = C.FRA_IP_PROTO
|
||||
FRA_SPORT_RANGE = C.FRA_SPORT_RANGE
|
||||
FRA_DPORT_RANGE = C.FRA_DPORT_RANGE
|
||||
FR_ACT_UNSPEC = C.FR_ACT_UNSPEC
|
||||
FR_ACT_TO_TBL = C.FR_ACT_TO_TBL
|
||||
FR_ACT_GOTO = C.FR_ACT_GOTO
|
||||
FR_ACT_NOP = C.FR_ACT_NOP
|
||||
FR_ACT_RES3 = C.FR_ACT_RES3
|
||||
FR_ACT_RES4 = C.FR_ACT_RES4
|
||||
FR_ACT_BLACKHOLE = C.FR_ACT_BLACKHOLE
|
||||
FR_ACT_UNREACHABLE = C.FR_ACT_UNREACHABLE
|
||||
FR_ACT_PROHIBIT = C.FR_ACT_PROHIBIT
|
||||
)
|
||||
|
|
|
@ -215,6 +215,7 @@ struct ltchars {
|
|||
#include <linux/ethtool_netlink.h>
|
||||
#include <linux/falloc.h>
|
||||
#include <linux/fanotify.h>
|
||||
#include <linux/fib_rules.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fscrypt.h>
|
||||
|
@ -613,6 +614,7 @@ ccflags="$@"
|
|||
$2 ~ /^OTP/ ||
|
||||
$2 ~ /^MEM/ ||
|
||||
$2 ~ /^WG/ ||
|
||||
$2 ~ /^FIB_RULE_/ ||
|
||||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
||||
$2 ~ /^__WCOREFLAG$/ {next}
|
||||
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
|
||||
|
|
|
@ -873,6 +873,13 @@ const (
|
|||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FIB_RULE_DEV_DETACHED = 0x8
|
||||
FIB_RULE_FIND_SADDR = 0x10000
|
||||
FIB_RULE_IIF_DETACHED = 0x8
|
||||
FIB_RULE_INVERT = 0x2
|
||||
FIB_RULE_OIF_DETACHED = 0x10
|
||||
FIB_RULE_PERMANENT = 0x1
|
||||
FIB_RULE_UNRESOLVED = 0x4
|
||||
FIDEDUPERANGE = 0xc0189436
|
||||
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
|
||||
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
|
||||
|
|
|
@ -5542,3 +5542,40 @@ const (
|
|||
NL80211_WPA_VERSION_2 = 0x2
|
||||
NL80211_WPA_VERSION_3 = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
FRA_UNSPEC = 0x0
|
||||
FRA_DST = 0x1
|
||||
FRA_SRC = 0x2
|
||||
FRA_IIFNAME = 0x3
|
||||
FRA_GOTO = 0x4
|
||||
FRA_UNUSED2 = 0x5
|
||||
FRA_PRIORITY = 0x6
|
||||
FRA_UNUSED3 = 0x7
|
||||
FRA_UNUSED4 = 0x8
|
||||
FRA_UNUSED5 = 0x9
|
||||
FRA_FWMARK = 0xa
|
||||
FRA_FLOW = 0xb
|
||||
FRA_TUN_ID = 0xc
|
||||
FRA_SUPPRESS_IFGROUP = 0xd
|
||||
FRA_SUPPRESS_PREFIXLEN = 0xe
|
||||
FRA_TABLE = 0xf
|
||||
FRA_FWMASK = 0x10
|
||||
FRA_OIFNAME = 0x11
|
||||
FRA_PAD = 0x12
|
||||
FRA_L3MDEV = 0x13
|
||||
FRA_UID_RANGE = 0x14
|
||||
FRA_PROTOCOL = 0x15
|
||||
FRA_IP_PROTO = 0x16
|
||||
FRA_SPORT_RANGE = 0x17
|
||||
FRA_DPORT_RANGE = 0x18
|
||||
FR_ACT_UNSPEC = 0x0
|
||||
FR_ACT_TO_TBL = 0x1
|
||||
FR_ACT_GOTO = 0x2
|
||||
FR_ACT_NOP = 0x3
|
||||
FR_ACT_RES3 = 0x4
|
||||
FR_ACT_RES4 = 0x5
|
||||
FR_ACT_BLACKHOLE = 0x6
|
||||
FR_ACT_UNREACHABLE = 0x7
|
||||
FR_ACT_PROHIBIT = 0x8
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче