ip_shared.py 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. """Shared constants for IPv4 and IPv6."""
  2. # Protocol numbers - http://www.iana.org/assignments/protocol-numbers
  3. IP_PROTO_IP = 0 # dummy for IP
  4. IP_PROTO_HOPOPTS = IP_PROTO_IP # IPv6 hop-by-hop options
  5. IP_PROTO_ICMP = 1 # ICMP
  6. IP_PROTO_IGMP = 2 # IGMP
  7. IP_PROTO_GGP = 3 # gateway-gateway protocol
  8. IP_PROTO_IPIP = 4 # IP in IP
  9. IP_PROTO_ST = 5 # ST datagram mode
  10. IP_PROTO_TCP = 6 # TCP
  11. IP_PROTO_CBT = 7 # CBT
  12. IP_PROTO_EGP = 8 # exterior gateway protocol
  13. IP_PROTO_IGP = 9 # interior gateway protocol
  14. IP_PROTO_BBNRCC = 10 # BBN RCC monitoring
  15. IP_PROTO_NVP = 11 # Network Voice Protocol
  16. IP_PROTO_PUP = 12 # PARC universal packet
  17. IP_PROTO_ARGUS = 13 # ARGUS
  18. IP_PROTO_EMCON = 14 # EMCON
  19. IP_PROTO_XNET = 15 # Cross Net Debugger
  20. IP_PROTO_CHAOS = 16 # Chaos
  21. IP_PROTO_UDP = 17 # UDP
  22. IP_PROTO_MUX = 18 # multiplexing
  23. IP_PROTO_DCNMEAS = 19 # DCN measurement
  24. IP_PROTO_HMP = 20 # Host Monitoring Protocol
  25. IP_PROTO_PRM = 21 # Packet Radio Measurement
  26. IP_PROTO_IDP = 22 # Xerox NS IDP
  27. IP_PROTO_TRUNK1 = 23 # Trunk-1
  28. IP_PROTO_TRUNK2 = 24 # Trunk-2
  29. IP_PROTO_LEAF1 = 25 # Leaf-1
  30. IP_PROTO_LEAF2 = 26 # Leaf-2
  31. IP_PROTO_RDP = 27 # "Reliable Datagram" proto
  32. IP_PROTO_IRTP = 28 # Inet Reliable Transaction
  33. IP_PROTO_TP = 29 # ISO TP class 4
  34. IP_PROTO_NETBLT = 30 # Bulk Data Transfer
  35. IP_PROTO_MFPNSP = 31 # MFE Network Services
  36. IP_PROTO_MERITINP = 32 # Merit Internodal Protocol
  37. IP_PROTO_SEP = 33 # Sequential Exchange proto
  38. IP_PROTO_3PC = 34 # Third Party Connect proto
  39. IP_PROTO_IDPR = 35 # Interdomain Policy Route
  40. IP_PROTO_XTP = 36 # Xpress Transfer Protocol
  41. IP_PROTO_DDP = 37 # Datagram Delivery Proto
  42. IP_PROTO_CMTP = 38 # IDPR Ctrl Message Trans
  43. IP_PROTO_TPPP = 39 # TP++ Transport Protocol
  44. IP_PROTO_IL = 40 # IL Transport Protocol
  45. IP_PROTO_IP6 = 41 # IPv6
  46. IP_PROTO_SDRP = 42 # Source Demand Routing
  47. IP_PROTO_ROUTING = 43 # IPv6 routing header
  48. IP_PROTO_FRAGMENT = 44 # IPv6 fragmentation header
  49. IP_PROTO_RSVP = 46 # Reservation protocol
  50. IP_PROTO_GRE = 47 # General Routing Encap
  51. IP_PROTO_MHRP = 48 # Mobile Host Routing
  52. IP_PROTO_ENA = 49 # ENA
  53. IP_PROTO_ESP = 50 # Encap Security Payload
  54. IP_PROTO_AH = 51 # Authentication Header
  55. IP_PROTO_INLSP = 52 # Integated Net Layer Sec
  56. IP_PROTO_SWIPE = 53 # SWIPE
  57. IP_PROTO_NARP = 54 # NBMA Address Resolution
  58. IP_PROTO_MOBILE = 55 # Mobile IP, RFC 2004
  59. IP_PROTO_TLSP = 56 # Transport Layer Security
  60. IP_PROTO_SKIP = 57 # SKIP
  61. IP_PROTO_ICMP6 = 58 # ICMP for IPv6
  62. IP_PROTO_NONE = 59 # IPv6 no next header
  63. IP_PROTO_DSTOPTS = 60 # IPv6 destination Woptions
  64. IP_PROTO_ANYHOST = 61 # any host internal proto
  65. IP_PROTO_CFTP = 62 # CFTP
  66. IP_PROTO_ANYNET = 63 # any local network
  67. IP_PROTO_EXPAK = 64 # SATNET and Backroom EXPAK
  68. IP_PROTO_KRYPTOLAN = 65 # Kryptolan
  69. IP_PROTO_RVD = 66 # MIT Remote Virtual Disk
  70. IP_PROTO_IPPC = 67 # Inet Pluribus Packet Core
  71. IP_PROTO_DISTFS = 68 # any distributed fs
  72. IP_PROTO_SATMON = 69 # SATNET Monitoring
  73. IP_PROTO_VISA = 70 # VISA Protocol
  74. IP_PROTO_IPCV = 71 # Inet Packet Core Utility
  75. IP_PROTO_CPNX = 72 # Comp Proto Net Executive
  76. IP_PROTO_CPHB = 73 # Comp Protocol Heart Beat
  77. IP_PROTO_WSN = 74 # Wang Span Network
  78. IP_PROTO_PVP = 75 # Packet Video Protocol
  79. IP_PROTO_BRSATMON = 76 # Backroom SATNET Monitor
  80. IP_PROTO_SUNND = 77 # SUN ND Protocol
  81. IP_PROTO_WBMON = 78 # WIDEBAND Monitoring
  82. IP_PROTO_WBEXPAK = 79 # WIDEBAND EXPAK
  83. IP_PROTO_EON = 80 # ISO CNLP
  84. IP_PROTO_VMTP = 81 # Versatile Msg Transport
  85. IP_PROTO_SVMTP = 82 # Secure VMTP
  86. IP_PROTO_VINES = 83 # VINES
  87. IP_PROTO_TTP = 84 # TTP
  88. IP_PROTO_NSFIGP = 85 # NSFNET-IGP
  89. IP_PROTO_DGP = 86 # Dissimilar Gateway Proto
  90. IP_PROTO_TCF = 87 # TCF
  91. IP_PROTO_EIGRP = 88 # EIGRP
  92. IP_PROTO_OSPF = 89 # Open Shortest Path First
  93. IP_PROTO_SPRITERPC = 90 # Sprite RPC Protocol
  94. IP_PROTO_LARP = 91 # Locus Address Resolution
  95. IP_PROTO_MTP = 92 # Multicast Transport Proto
  96. IP_PROTO_AX25 = 93 # AX.25 Frames
  97. IP_PROTO_IPIPENCAP = 94 # yet-another IP encap
  98. IP_PROTO_MICP = 95 # Mobile Internet Ctrl
  99. IP_PROTO_SCCSP = 96 # Semaphore Comm Sec Proto
  100. IP_PROTO_ETHERIP = 97 # Ethernet in IPv4
  101. IP_PROTO_ENCAP = 98 # encapsulation header
  102. IP_PROTO_ANYENC = 99 # private encryption scheme
  103. IP_PROTO_GMTP = 100 # GMTP
  104. IP_PROTO_IFMP = 101 # Ipsilon Flow Mgmt Proto
  105. IP_PROTO_PNNI = 102 # PNNI over IP
  106. IP_PROTO_PIM = 103 # Protocol Indep Multicast
  107. IP_PROTO_ARIS = 104 # ARIS
  108. IP_PROTO_SCPS = 105 # SCPS
  109. IP_PROTO_QNX = 106 # QNX
  110. IP_PROTO_AN = 107 # Active Networks
  111. IP_PROTO_IPCOMP = 108 # IP Payload Compression
  112. IP_PROTO_SNP = 109 # Sitara Networks Protocol
  113. IP_PROTO_COMPAQPEER = 110 # Compaq Peer Protocol
  114. IP_PROTO_IPXIP = 111 # IPX in IP
  115. IP_PROTO_VRRP = 112 # Virtual Router Redundancy
  116. IP_PROTO_PGM = 113 # PGM Reliable Transport
  117. IP_PROTO_ANY0HOP = 114 # 0-hop protocol
  118. IP_PROTO_L2TP = 115 # Layer 2 Tunneling Proto
  119. IP_PROTO_DDX = 116 # D-II Data Exchange (DDX)
  120. IP_PROTO_IATP = 117 # Interactive Agent Xfer
  121. IP_PROTO_STP = 118 # Schedule Transfer Proto
  122. IP_PROTO_SRP = 119 # SpectraLink Radio Proto
  123. IP_PROTO_UTI = 120 # UTI
  124. IP_PROTO_SMP = 121 # Simple Message Protocol
  125. IP_PROTO_SM = 122 # SM
  126. IP_PROTO_PTP = 123 # Performance Transparency
  127. IP_PROTO_ISIS = 124 # ISIS over IPv4
  128. IP_PROTO_FIRE = 125 # FIRE
  129. IP_PROTO_CRTP = 126 # Combat Radio Transport
  130. IP_PROTO_CRUDP = 127 # Combat Radio UDP
  131. IP_PROTO_SSCOPMCE = 128 # SSCOPMCE
  132. IP_PROTO_IPLT = 129 # IPLT
  133. IP_PROTO_SPS = 130 # Secure Packet Shield
  134. IP_PROTO_PIPE = 131 # Private IP Encap in IP
  135. IP_PROTO_SCTP = 132 # Stream Ctrl Transmission
  136. IP_PROTO_FC = 133 # Fibre Channel
  137. IP_PROTO_RSVPIGN = 134 # RSVP-E2E-IGNORE
  138. IP_PROTO_RAW = 255 # Raw IP packets
  139. IP_PROTO_RESERVED = IP_PROTO_RAW # Reserved
  140. IP_PROTO_MAX = 255