syscall.go 1.7 KB

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