syscall.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. )