github.com/sagernet/netlink@v0.0.0-20240612041022-b9a21c07ac6a/nl/syscall.go (about) 1 package nl 2 3 // syscall package lack of rule attributes type. 4 // Thus there are defined below 5 const ( 6 FRA_UNSPEC = iota 7 FRA_DST /* destination address */ 8 FRA_SRC /* source address */ 9 FRA_IIFNAME /* interface name */ 10 FRA_GOTO /* target to jump to (FR_ACT_GOTO) */ 11 FRA_UNUSED2 12 FRA_PRIORITY /* priority/preference */ 13 FRA_UNUSED3 14 FRA_UNUSED4 15 FRA_UNUSED5 16 FRA_FWMARK /* mark */ 17 FRA_FLOW /* flow/class id */ 18 FRA_TUN_ID 19 FRA_SUPPRESS_IFGROUP 20 FRA_SUPPRESS_PREFIXLEN 21 FRA_TABLE /* Extended table id */ 22 FRA_FWMASK /* mask for netfilter mark */ 23 FRA_OIFNAME 24 FRA_PAD 25 FRA_L3MDEV /* iif or oif is l3mdev goto its table */ 26 FRA_UID_RANGE /* UID range */ 27 FRA_PROTOCOL /* Originator of the rule */ 28 FRA_IP_PROTO /* ip proto */ 29 FRA_SPORT_RANGE /* sport */ 30 FRA_DPORT_RANGE /* dport */ 31 ) 32 33 // ip rule netlink request types 34 const ( 35 FR_ACT_UNSPEC = iota 36 FR_ACT_TO_TBL /* Pass to fixed table */ 37 FR_ACT_GOTO /* Jump to another rule */ 38 FR_ACT_NOP /* No operation */ 39 FR_ACT_RES3 40 FR_ACT_RES4 41 FR_ACT_BLACKHOLE /* Drop without notification */ 42 FR_ACT_UNREACHABLE /* Drop with ENETUNREACH */ 43 FR_ACT_PROHIBIT /* Drop with EACCES */ 44 ) 45 46 // socket diags related 47 const ( 48 SOCK_DIAG_BY_FAMILY = 20 /* linux.sock_diag.h */ 49 TCPDIAG_NOCOOKIE = 0xFFFFFFFF /* TCPDIAG_NOCOOKIE in net/ipv4/tcp_diag.h*/ 50 ) 51 52 // RTA_ENCAP subtype 53 const ( 54 MPLS_IPTUNNEL_UNSPEC = iota 55 MPLS_IPTUNNEL_DST 56 ) 57 58 // light weight tunnel encap types 59 const ( 60 LWTUNNEL_ENCAP_NONE = iota 61 LWTUNNEL_ENCAP_MPLS 62 LWTUNNEL_ENCAP_IP 63 LWTUNNEL_ENCAP_ILA 64 LWTUNNEL_ENCAP_IP6 65 LWTUNNEL_ENCAP_SEG6 66 LWTUNNEL_ENCAP_BPF 67 LWTUNNEL_ENCAP_SEG6_LOCAL 68 ) 69 70 // routing header types 71 const ( 72 IPV6_SRCRT_STRICT = 0x01 // Deprecated; will be removed 73 IPV6_SRCRT_TYPE_0 = 0 // Deprecated; will be removed 74 IPV6_SRCRT_TYPE_2 = 2 // IPv6 type 2 Routing Header 75 IPV6_SRCRT_TYPE_4 = 4 // Segment Routing with IPv6 76 )