pypcapkit 1.3.3.post1__cp313-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (466) hide show
  1. pcapkit/__init__.py +126 -0
  2. pcapkit/__main__.py +138 -0
  3. pcapkit/all.py +136 -0
  4. pcapkit/const/__init__.py +81 -0
  5. pcapkit/const/arp/__init__.py +25 -0
  6. pcapkit/const/arp/hardware.py +181 -0
  7. pcapkit/const/arp/operation.py +131 -0
  8. pcapkit/const/ftp/__init__.py +25 -0
  9. pcapkit/const/ftp/command.py +309 -0
  10. pcapkit/const/ftp/return_code.py +304 -0
  11. pcapkit/const/hip/__init__.py +94 -0
  12. pcapkit/const/hip/certificate.py +77 -0
  13. pcapkit/const/hip/cipher.py +65 -0
  14. pcapkit/const/hip/di.py +59 -0
  15. pcapkit/const/hip/ecdsa_curve.py +59 -0
  16. pcapkit/const/hip/ecdsa_low_curve.py +56 -0
  17. pcapkit/const/hip/eddsa_curve.py +65 -0
  18. pcapkit/const/hip/esp_transform_suite.py +98 -0
  19. pcapkit/const/hip/group.py +86 -0
  20. pcapkit/const/hip/hi_algorithm.py +86 -0
  21. pcapkit/const/hip/hit_suite.py +68 -0
  22. pcapkit/const/hip/nat_traversal.py +62 -0
  23. pcapkit/const/hip/notify_message.py +200 -0
  24. pcapkit/const/hip/packet.py +89 -0
  25. pcapkit/const/hip/parameter.py +377 -0
  26. pcapkit/const/hip/registration.py +68 -0
  27. pcapkit/const/hip/registration_failure.py +84 -0
  28. pcapkit/const/hip/suite.py +71 -0
  29. pcapkit/const/hip/transport.py +59 -0
  30. pcapkit/const/http/__init__.py +39 -0
  31. pcapkit/const/http/error_code.py +95 -0
  32. pcapkit/const/http/frame.py +95 -0
  33. pcapkit/const/http/method.py +184 -0
  34. pcapkit/const/http/setting.py +96 -0
  35. pcapkit/const/http/status_code.py +294 -0
  36. pcapkit/const/ipv4/__init__.py +57 -0
  37. pcapkit/const/ipv4/classification_level.py +64 -0
  38. pcapkit/const/ipv4/option_class.py +55 -0
  39. pcapkit/const/ipv4/option_number.py +137 -0
  40. pcapkit/const/ipv4/protection_authority.py +63 -0
  41. pcapkit/const/ipv4/qs_function.py +51 -0
  42. pcapkit/const/ipv4/router_alert.py +251 -0
  43. pcapkit/const/ipv4/tos_del.py +51 -0
  44. pcapkit/const/ipv4/tos_ecn.py +55 -0
  45. pcapkit/const/ipv4/tos_pre.py +63 -0
  46. pcapkit/const/ipv4/tos_rel.py +51 -0
  47. pcapkit/const/ipv4/tos_thr.py +51 -0
  48. pcapkit/const/ipv4/ts_flag.py +53 -0
  49. pcapkit/const/ipv6/__init__.py +53 -0
  50. pcapkit/const/ipv6/extension_header.py +66 -0
  51. pcapkit/const/ipv6/option.py +137 -0
  52. pcapkit/const/ipv6/option_action.py +55 -0
  53. pcapkit/const/ipv6/qs_function.py +51 -0
  54. pcapkit/const/ipv6/router_alert.py +266 -0
  55. pcapkit/const/ipv6/routing.py +80 -0
  56. pcapkit/const/ipv6/seed_id.py +55 -0
  57. pcapkit/const/ipv6/smf_dpd_mode.py +51 -0
  58. pcapkit/const/ipv6/tagger_id.py +62 -0
  59. pcapkit/const/ipx/__init__.py +27 -0
  60. pcapkit/const/ipx/packet.py +72 -0
  61. pcapkit/const/ipx/socket.py +104 -0
  62. pcapkit/const/l2tp/__init__.py +21 -0
  63. pcapkit/const/l2tp/type.py +51 -0
  64. pcapkit/const/mh/__init__.py +204 -0
  65. pcapkit/const/mh/access_type.py +92 -0
  66. pcapkit/const/mh/ack_status_code.py +71 -0
  67. pcapkit/const/mh/ani_suboption.py +74 -0
  68. pcapkit/const/mh/auth_subtype.py +53 -0
  69. pcapkit/const/mh/binding_ack_flag.py +66 -0
  70. pcapkit/const/mh/binding_error.py +51 -0
  71. pcapkit/const/mh/binding_revocation.py +59 -0
  72. pcapkit/const/mh/binding_update_flag.py +81 -0
  73. pcapkit/const/mh/cga_extension.py +66 -0
  74. pcapkit/const/mh/cga_sec.py +57 -0
  75. pcapkit/const/mh/cga_type.py +68 -0
  76. pcapkit/const/mh/dhcp_support_mode.py +53 -0
  77. pcapkit/const/mh/dns_status_code.py +65 -0
  78. pcapkit/const/mh/dsmip6_tls_packet.py +62 -0
  79. pcapkit/const/mh/dsmipv6_home_address.py +74 -0
  80. pcapkit/const/mh/enumerating_algorithm.py +56 -0
  81. pcapkit/const/mh/fb_ack_status.py +62 -0
  82. pcapkit/const/mh/fb_action.py +71 -0
  83. pcapkit/const/mh/fb_indication_trigger.py +65 -0
  84. pcapkit/const/mh/fb_type.py +59 -0
  85. pcapkit/const/mh/flow_id_status.py +77 -0
  86. pcapkit/const/mh/flow_id_suboption.py +71 -0
  87. pcapkit/const/mh/handoff_type.py +71 -0
  88. pcapkit/const/mh/handover_ack_flag.py +54 -0
  89. pcapkit/const/mh/handover_ack_status.py +92 -0
  90. pcapkit/const/mh/handover_initiate_flag.py +57 -0
  91. pcapkit/const/mh/handover_initiate_status.py +62 -0
  92. pcapkit/const/mh/home_address_reply.py +71 -0
  93. pcapkit/const/mh/lla_code.py +63 -0
  94. pcapkit/const/mh/lma_mag_suboption.py +59 -0
  95. pcapkit/const/mh/mn_group_id.py +59 -0
  96. pcapkit/const/mh/mn_id_subtype.py +77 -0
  97. pcapkit/const/mh/operator_id.py +63 -0
  98. pcapkit/const/mh/option.py +260 -0
  99. pcapkit/const/mh/packet.py +119 -0
  100. pcapkit/const/mh/qos_attribute.py +89 -0
  101. pcapkit/const/mh/revocation_status_code.py +83 -0
  102. pcapkit/const/mh/revocation_trigger.py +86 -0
  103. pcapkit/const/mh/status_code.py +232 -0
  104. pcapkit/const/mh/traffic_selector.py +62 -0
  105. pcapkit/const/mh/upa_status.py +71 -0
  106. pcapkit/const/mh/upn_reason.py +80 -0
  107. pcapkit/const/ospf/__init__.py +27 -0
  108. pcapkit/const/ospf/authentication.py +65 -0
  109. pcapkit/const/ospf/packet.py +71 -0
  110. pcapkit/const/pcapng/__init__.py +51 -0
  111. pcapkit/const/pcapng/block_type.py +152 -0
  112. pcapkit/const/pcapng/filter_type.py +48 -0
  113. pcapkit/const/pcapng/hash_algorithm.py +59 -0
  114. pcapkit/const/pcapng/option_type.py +233 -0
  115. pcapkit/const/pcapng/record_type.py +57 -0
  116. pcapkit/const/pcapng/secrets_type.py +56 -0
  117. pcapkit/const/pcapng/verdict_type.py +53 -0
  118. pcapkit/const/reg/__init__.py +34 -0
  119. pcapkit/const/reg/apptype.py +32702 -0
  120. pcapkit/const/reg/ethertype.py +714 -0
  121. pcapkit/const/reg/linktype.py +902 -0
  122. pcapkit/const/reg/transtype.py +523 -0
  123. pcapkit/const/tcp/__init__.py +35 -0
  124. pcapkit/const/tcp/checksum.py +55 -0
  125. pcapkit/const/tcp/flags.py +73 -0
  126. pcapkit/const/tcp/mp_tcp_option.py +80 -0
  127. pcapkit/const/tcp/option.py +198 -0
  128. pcapkit/const/vlan/__init__.py +23 -0
  129. pcapkit/const/vlan/priority_level.py +71 -0
  130. pcapkit/corekit/__init__.py +59 -0
  131. pcapkit/corekit/fields/__init__.py +45 -0
  132. pcapkit/corekit/fields/collections.py +282 -0
  133. pcapkit/corekit/fields/field.py +269 -0
  134. pcapkit/corekit/fields/ipaddress.py +274 -0
  135. pcapkit/corekit/fields/misc.py +722 -0
  136. pcapkit/corekit/fields/numbers.py +375 -0
  137. pcapkit/corekit/fields/strings.py +245 -0
  138. pcapkit/corekit/infoclass.py +394 -0
  139. pcapkit/corekit/io.py +506 -0
  140. pcapkit/corekit/module.py +39 -0
  141. pcapkit/corekit/multidict.py +626 -0
  142. pcapkit/corekit/protochain.py +263 -0
  143. pcapkit/corekit/version.py +33 -0
  144. pcapkit/dumpkit/__init__.py +15 -0
  145. pcapkit/dumpkit/common.py +199 -0
  146. pcapkit/dumpkit/null.py +77 -0
  147. pcapkit/dumpkit/pcap.py +144 -0
  148. pcapkit/foundation/__init__.py +45 -0
  149. pcapkit/foundation/engines/__init__.py +36 -0
  150. pcapkit/foundation/engines/dpkt.py +230 -0
  151. pcapkit/foundation/engines/engine.py +194 -0
  152. pcapkit/foundation/engines/pcap.py +188 -0
  153. pcapkit/foundation/engines/pcapng.py +310 -0
  154. pcapkit/foundation/engines/pyshark.py +166 -0
  155. pcapkit/foundation/engines/scapy.py +161 -0
  156. pcapkit/foundation/extraction.py +915 -0
  157. pcapkit/foundation/reassembly/__init__.py +49 -0
  158. pcapkit/foundation/reassembly/data/__init__.py +48 -0
  159. pcapkit/foundation/reassembly/data/ip.py +117 -0
  160. pcapkit/foundation/reassembly/data/tcp.py +145 -0
  161. pcapkit/foundation/reassembly/ip.py +192 -0
  162. pcapkit/foundation/reassembly/ipv4.py +50 -0
  163. pcapkit/foundation/reassembly/ipv6.py +50 -0
  164. pcapkit/foundation/reassembly/reassembly.py +389 -0
  165. pcapkit/foundation/reassembly/tcp.py +249 -0
  166. pcapkit/foundation/registry/__init__.py +41 -0
  167. pcapkit/foundation/registry/foundation.py +327 -0
  168. pcapkit/foundation/registry/protocols.py +885 -0
  169. pcapkit/foundation/traceflow/__init__.py +44 -0
  170. pcapkit/foundation/traceflow/data/__init__.py +30 -0
  171. pcapkit/foundation/traceflow/data/tcp.py +105 -0
  172. pcapkit/foundation/traceflow/tcp.py +159 -0
  173. pcapkit/foundation/traceflow/traceflow.py +390 -0
  174. pcapkit/interface/__init__.py +22 -0
  175. pcapkit/interface/core.py +185 -0
  176. pcapkit/interface/misc.py +120 -0
  177. pcapkit/protocols/__init__.py +85 -0
  178. pcapkit/protocols/application/NotImplemented/bgp.py +0 -0
  179. pcapkit/protocols/application/NotImplemented/dhcp.py +0 -0
  180. pcapkit/protocols/application/NotImplemented/dhcpv6.py +0 -0
  181. pcapkit/protocols/application/NotImplemented/dns.py +0 -0
  182. pcapkit/protocols/application/NotImplemented/imap.py +0 -0
  183. pcapkit/protocols/application/NotImplemented/ldap.py +0 -0
  184. pcapkit/protocols/application/NotImplemented/mqtt.py +0 -0
  185. pcapkit/protocols/application/NotImplemented/nntp.py +0 -0
  186. pcapkit/protocols/application/NotImplemented/ntp.py +0 -0
  187. pcapkit/protocols/application/NotImplemented/onc_rpc.py +0 -0
  188. pcapkit/protocols/application/NotImplemented/pop.py +0 -0
  189. pcapkit/protocols/application/NotImplemented/rip.py +0 -0
  190. pcapkit/protocols/application/NotImplemented/rtp.py +0 -0
  191. pcapkit/protocols/application/NotImplemented/sip.py +0 -0
  192. pcapkit/protocols/application/NotImplemented/smtp.py +0 -0
  193. pcapkit/protocols/application/NotImplemented/snmp.py +0 -0
  194. pcapkit/protocols/application/NotImplemented/ssh.py +0 -0
  195. pcapkit/protocols/application/NotImplemented/telnet.py +0 -0
  196. pcapkit/protocols/application/NotImplemented/tls.py +0 -0
  197. pcapkit/protocols/application/NotImplemented/xmpp.py +0 -0
  198. pcapkit/protocols/application/__init__.py +34 -0
  199. pcapkit/protocols/application/application.py +114 -0
  200. pcapkit/protocols/application/ftp.py +206 -0
  201. pcapkit/protocols/application/http.py +176 -0
  202. pcapkit/protocols/application/httpv1.py +320 -0
  203. pcapkit/protocols/application/httpv2.py +1255 -0
  204. pcapkit/protocols/data/__init__.py +192 -0
  205. pcapkit/protocols/data/application/__init__.py +57 -0
  206. pcapkit/protocols/data/application/ftp.py +59 -0
  207. pcapkit/protocols/data/application/httpv1.py +79 -0
  208. pcapkit/protocols/data/application/httpv2.py +293 -0
  209. pcapkit/protocols/data/data.py +25 -0
  210. pcapkit/protocols/data/internet/__init__.py +298 -0
  211. pcapkit/protocols/data/internet/ah.py +31 -0
  212. pcapkit/protocols/data/internet/hip.py +804 -0
  213. pcapkit/protocols/data/internet/hopopt.py +351 -0
  214. pcapkit/protocols/data/internet/ipv4.py +369 -0
  215. pcapkit/protocols/data/internet/ipv6.py +67 -0
  216. pcapkit/protocols/data/internet/ipv6_frag.py +29 -0
  217. pcapkit/protocols/data/internet/ipv6_opts.py +368 -0
  218. pcapkit/protocols/data/internet/ipv6_route.py +86 -0
  219. pcapkit/protocols/data/internet/ipx.py +56 -0
  220. pcapkit/protocols/data/internet/mh.py +509 -0
  221. pcapkit/protocols/data/link/__init__.py +33 -0
  222. pcapkit/protocols/data/link/arp.py +74 -0
  223. pcapkit/protocols/data/link/ethernet.py +28 -0
  224. pcapkit/protocols/data/link/l2tp.py +63 -0
  225. pcapkit/protocols/data/link/ospf.py +58 -0
  226. pcapkit/protocols/data/link/vlan.py +42 -0
  227. pcapkit/protocols/data/misc/__init__.py +109 -0
  228. pcapkit/protocols/data/misc/null.py +18 -0
  229. pcapkit/protocols/data/misc/pcap/__init__.py +18 -0
  230. pcapkit/protocols/data/misc/pcap/frame.py +56 -0
  231. pcapkit/protocols/data/misc/pcap/header.py +53 -0
  232. pcapkit/protocols/data/misc/pcapng.py +925 -0
  233. pcapkit/protocols/data/misc/raw.py +25 -0
  234. pcapkit/protocols/data/protocol.py +32 -0
  235. pcapkit/protocols/data/transport/__init__.py +71 -0
  236. pcapkit/protocols/data/transport/tcp.py +555 -0
  237. pcapkit/protocols/data/transport/udp.py +29 -0
  238. pcapkit/protocols/internet/NotImplemented/ecn.py +0 -0
  239. pcapkit/protocols/internet/NotImplemented/esp.py +97 -0
  240. pcapkit/protocols/internet/NotImplemented/icmp.py +0 -0
  241. pcapkit/protocols/internet/NotImplemented/icmpv6.py +0 -0
  242. pcapkit/protocols/internet/NotImplemented/igmp.py +0 -0
  243. pcapkit/protocols/internet/NotImplemented/shim6.py +0 -0
  244. pcapkit/protocols/internet/__init__.py +43 -0
  245. pcapkit/protocols/internet/ah.py +275 -0
  246. pcapkit/protocols/internet/hip.py +4727 -0
  247. pcapkit/protocols/internet/hopopt.py +1879 -0
  248. pcapkit/protocols/internet/internet.py +240 -0
  249. pcapkit/protocols/internet/ip.py +51 -0
  250. pcapkit/protocols/internet/ipsec.py +50 -0
  251. pcapkit/protocols/internet/ipv4.py +1782 -0
  252. pcapkit/protocols/internet/ipv6.py +361 -0
  253. pcapkit/protocols/internet/ipv6_frag.py +258 -0
  254. pcapkit/protocols/internet/ipv6_opts.py +1890 -0
  255. pcapkit/protocols/internet/ipv6_route.py +710 -0
  256. pcapkit/protocols/internet/ipx.py +230 -0
  257. pcapkit/protocols/internet/mh.py +2764 -0
  258. pcapkit/protocols/link/NotImplemented/dsl.py +0 -0
  259. pcapkit/protocols/link/NotImplemented/eapol.py +1 -0
  260. pcapkit/protocols/link/NotImplemented/fddi.py +0 -0
  261. pcapkit/protocols/link/NotImplemented/isdn.py +0 -0
  262. pcapkit/protocols/link/NotImplemented/ndp.py +0 -0
  263. pcapkit/protocols/link/NotImplemented/ppp.py +0 -0
  264. pcapkit/protocols/link/__init__.py +35 -0
  265. pcapkit/protocols/link/arp.py +421 -0
  266. pcapkit/protocols/link/ethernet.py +248 -0
  267. pcapkit/protocols/link/l2tp.py +267 -0
  268. pcapkit/protocols/link/link.py +140 -0
  269. pcapkit/protocols/link/ospf.py +342 -0
  270. pcapkit/protocols/link/rarp.py +82 -0
  271. pcapkit/protocols/link/vlan.py +225 -0
  272. pcapkit/protocols/misc/__init__.py +37 -0
  273. pcapkit/protocols/misc/null.py +129 -0
  274. pcapkit/protocols/misc/pcap/__init__.py +17 -0
  275. pcapkit/protocols/misc/pcap/frame.py +478 -0
  276. pcapkit/protocols/misc/pcap/header.py +358 -0
  277. pcapkit/protocols/misc/pcapng.py +5520 -0
  278. pcapkit/protocols/misc/raw.py +180 -0
  279. pcapkit/protocols/protocol.py +1216 -0
  280. pcapkit/protocols/schema/__init__.py +140 -0
  281. pcapkit/protocols/schema/application/__init__.py +40 -0
  282. pcapkit/protocols/schema/application/ftp.py +21 -0
  283. pcapkit/protocols/schema/application/httpv1.py +21 -0
  284. pcapkit/protocols/schema/application/httpv2.py +384 -0
  285. pcapkit/protocols/schema/internet/__init__.py +294 -0
  286. pcapkit/protocols/schema/internet/ah.py +40 -0
  287. pcapkit/protocols/schema/internet/hip.py +1184 -0
  288. pcapkit/protocols/schema/internet/hopopt.py +679 -0
  289. pcapkit/protocols/schema/internet/ipv4.py +576 -0
  290. pcapkit/protocols/schema/internet/ipv6.py +63 -0
  291. pcapkit/protocols/schema/internet/ipv6_frag.py +48 -0
  292. pcapkit/protocols/schema/internet/ipv6_opts.py +680 -0
  293. pcapkit/protocols/schema/internet/ipv6_route.py +198 -0
  294. pcapkit/protocols/schema/internet/ipx.py +40 -0
  295. pcapkit/protocols/schema/internet/mh.py +718 -0
  296. pcapkit/protocols/schema/link/__init__.py +19 -0
  297. pcapkit/protocols/schema/link/arp.py +39 -0
  298. pcapkit/protocols/schema/link/ethernet.py +51 -0
  299. pcapkit/protocols/schema/link/l2tp.py +88 -0
  300. pcapkit/protocols/schema/link/ospf.py +90 -0
  301. pcapkit/protocols/schema/link/vlan.py +69 -0
  302. pcapkit/protocols/schema/misc/__init__.py +108 -0
  303. pcapkit/protocols/schema/misc/null.py +18 -0
  304. pcapkit/protocols/schema/misc/pcap/__init__.py +10 -0
  305. pcapkit/protocols/schema/misc/pcap/frame.py +51 -0
  306. pcapkit/protocols/schema/misc/pcap/header.py +63 -0
  307. pcapkit/protocols/schema/misc/pcapng.py +1689 -0
  308. pcapkit/protocols/schema/misc/raw.py +24 -0
  309. pcapkit/protocols/schema/schema.py +809 -0
  310. pcapkit/protocols/schema/transport/__init__.py +69 -0
  311. pcapkit/protocols/schema/transport/tcp.py +928 -0
  312. pcapkit/protocols/schema/transport/udp.py +90 -0
  313. pcapkit/protocols/transport/NotImplemented/dccp.py +0 -0
  314. pcapkit/protocols/transport/NotImplemented/rsvp.py +0 -0
  315. pcapkit/protocols/transport/NotImplemented/sctp.py +0 -0
  316. pcapkit/protocols/transport/__init__.py +27 -0
  317. pcapkit/protocols/transport/tcp.py +3025 -0
  318. pcapkit/protocols/transport/transport.py +158 -0
  319. pcapkit/protocols/transport/udp.py +214 -0
  320. pcapkit/py.typed +0 -0
  321. pcapkit/toolkit/__init__.py +57 -0
  322. pcapkit/toolkit/dpkt.py +306 -0
  323. pcapkit/toolkit/pcap.py +212 -0
  324. pcapkit/toolkit/pcapng.py +251 -0
  325. pcapkit/toolkit/pyshark.py +99 -0
  326. pcapkit/toolkit/scapy.py +297 -0
  327. pcapkit/utilities/__init__.py +20 -0
  328. pcapkit/utilities/compat.py +196 -0
  329. pcapkit/utilities/decorators.py +192 -0
  330. pcapkit/utilities/exceptions.py +365 -0
  331. pcapkit/utilities/logging.py +55 -0
  332. pcapkit/utilities/warnings.py +185 -0
  333. pcapkit/vendor/__init__.py +105 -0
  334. pcapkit/vendor/__main__.py +92 -0
  335. pcapkit/vendor/arp/__init__.py +27 -0
  336. pcapkit/vendor/arp/hardware.py +29 -0
  337. pcapkit/vendor/arp/operation.py +29 -0
  338. pcapkit/vendor/default.py +474 -0
  339. pcapkit/vendor/ftp/__init__.py +27 -0
  340. pcapkit/vendor/ftp/command.py +244 -0
  341. pcapkit/vendor/ftp/return_code.py +256 -0
  342. pcapkit/vendor/hip/__init__.py +94 -0
  343. pcapkit/vendor/hip/certificate.py +29 -0
  344. pcapkit/vendor/hip/cipher.py +29 -0
  345. pcapkit/vendor/hip/di.py +29 -0
  346. pcapkit/vendor/hip/ecdsa_curve.py +29 -0
  347. pcapkit/vendor/hip/ecdsa_low_curve.py +29 -0
  348. pcapkit/vendor/hip/eddsa_curve.py +85 -0
  349. pcapkit/vendor/hip/esp_transform_suite.py +29 -0
  350. pcapkit/vendor/hip/group.py +87 -0
  351. pcapkit/vendor/hip/hi_algorithm.py +29 -0
  352. pcapkit/vendor/hip/hit_suite.py +29 -0
  353. pcapkit/vendor/hip/nat_traversal.py +29 -0
  354. pcapkit/vendor/hip/notify_message.py +29 -0
  355. pcapkit/vendor/hip/packet.py +88 -0
  356. pcapkit/vendor/hip/parameter.py +88 -0
  357. pcapkit/vendor/hip/registration.py +29 -0
  358. pcapkit/vendor/hip/registration_failure.py +29 -0
  359. pcapkit/vendor/hip/suite.py +29 -0
  360. pcapkit/vendor/hip/transport.py +29 -0
  361. pcapkit/vendor/http/__init__.py +39 -0
  362. pcapkit/vendor/http/error_code.py +95 -0
  363. pcapkit/vendor/http/frame.py +91 -0
  364. pcapkit/vendor/http/method.py +167 -0
  365. pcapkit/vendor/http/setting.py +93 -0
  366. pcapkit/vendor/http/status_code.py +185 -0
  367. pcapkit/vendor/ipv4/__init__.py +57 -0
  368. pcapkit/vendor/ipv4/classification_level.py +91 -0
  369. pcapkit/vendor/ipv4/option_class.py +80 -0
  370. pcapkit/vendor/ipv4/option_number.py +105 -0
  371. pcapkit/vendor/ipv4/protection_authority.py +84 -0
  372. pcapkit/vendor/ipv4/qs_function.py +78 -0
  373. pcapkit/vendor/ipv4/router_alert.py +93 -0
  374. pcapkit/vendor/ipv4/tos_del.py +78 -0
  375. pcapkit/vendor/ipv4/tos_ecn.py +95 -0
  376. pcapkit/vendor/ipv4/tos_pre.py +84 -0
  377. pcapkit/vendor/ipv4/tos_rel.py +78 -0
  378. pcapkit/vendor/ipv4/tos_thr.py +77 -0
  379. pcapkit/vendor/ipv4/ts_flag.py +79 -0
  380. pcapkit/vendor/ipv6/__init__.py +53 -0
  381. pcapkit/vendor/ipv6/extension_header.py +171 -0
  382. pcapkit/vendor/ipv6/option.py +104 -0
  383. pcapkit/vendor/ipv6/option_action.py +90 -0
  384. pcapkit/vendor/ipv6/qs_function.py +78 -0
  385. pcapkit/vendor/ipv6/router_alert.py +93 -0
  386. pcapkit/vendor/ipv6/routing.py +87 -0
  387. pcapkit/vendor/ipv6/seed_id.py +81 -0
  388. pcapkit/vendor/ipv6/smf_dpd_mode.py +78 -0
  389. pcapkit/vendor/ipv6/tagger_id.py +81 -0
  390. pcapkit/vendor/ipx/__init__.py +37 -0
  391. pcapkit/vendor/ipx/packet.py +123 -0
  392. pcapkit/vendor/ipx/socket.py +125 -0
  393. pcapkit/vendor/l2tp/__init__.py +21 -0
  394. pcapkit/vendor/l2tp/type.py +78 -0
  395. pcapkit/vendor/mh/__init__.py +204 -0
  396. pcapkit/vendor/mh/access_type.py +87 -0
  397. pcapkit/vendor/mh/ack_status_code.py +88 -0
  398. pcapkit/vendor/mh/ani_suboption.py +88 -0
  399. pcapkit/vendor/mh/auth_subtype.py +83 -0
  400. pcapkit/vendor/mh/binding_ack_flag.py +148 -0
  401. pcapkit/vendor/mh/binding_error.py +78 -0
  402. pcapkit/vendor/mh/binding_revocation.py +87 -0
  403. pcapkit/vendor/mh/binding_update_flag.py +147 -0
  404. pcapkit/vendor/mh/cga_extension.py +91 -0
  405. pcapkit/vendor/mh/cga_sec.py +91 -0
  406. pcapkit/vendor/mh/cga_type.py +74 -0
  407. pcapkit/vendor/mh/dhcp_support_mode.py +77 -0
  408. pcapkit/vendor/mh/dns_status_code.py +87 -0
  409. pcapkit/vendor/mh/dsmip6_tls_packet.py +87 -0
  410. pcapkit/vendor/mh/dsmipv6_home_address.py +87 -0
  411. pcapkit/vendor/mh/enumerating_algorithm.py +82 -0
  412. pcapkit/vendor/mh/fb_ack_status.py +87 -0
  413. pcapkit/vendor/mh/fb_action.py +88 -0
  414. pcapkit/vendor/mh/fb_indication_trigger.py +87 -0
  415. pcapkit/vendor/mh/fb_type.py +88 -0
  416. pcapkit/vendor/mh/flow_id_status.py +87 -0
  417. pcapkit/vendor/mh/flow_id_suboption.py +87 -0
  418. pcapkit/vendor/mh/handoff_type.py +87 -0
  419. pcapkit/vendor/mh/handover_ack_flag.py +143 -0
  420. pcapkit/vendor/mh/handover_ack_status.py +87 -0
  421. pcapkit/vendor/mh/handover_initiate_flag.py +143 -0
  422. pcapkit/vendor/mh/handover_initiate_status.py +87 -0
  423. pcapkit/vendor/mh/home_address_reply.py +87 -0
  424. pcapkit/vendor/mh/lla_code.py +97 -0
  425. pcapkit/vendor/mh/lma_mag_suboption.py +88 -0
  426. pcapkit/vendor/mh/mn_group_id.py +87 -0
  427. pcapkit/vendor/mh/mn_id_subtype.py +87 -0
  428. pcapkit/vendor/mh/operator_id.py +87 -0
  429. pcapkit/vendor/mh/option.py +83 -0
  430. pcapkit/vendor/mh/packet.py +82 -0
  431. pcapkit/vendor/mh/qos_attribute.py +87 -0
  432. pcapkit/vendor/mh/revocation_status_code.py +87 -0
  433. pcapkit/vendor/mh/revocation_trigger.py +87 -0
  434. pcapkit/vendor/mh/status_code.py +91 -0
  435. pcapkit/vendor/mh/traffic_selector.py +87 -0
  436. pcapkit/vendor/mh/upa_status.py +87 -0
  437. pcapkit/vendor/mh/upn_reason.py +87 -0
  438. pcapkit/vendor/ospf/__init__.py +27 -0
  439. pcapkit/vendor/ospf/authentication.py +29 -0
  440. pcapkit/vendor/ospf/packet.py +29 -0
  441. pcapkit/vendor/pcapng/__init__.py +51 -0
  442. pcapkit/vendor/pcapng/block_type.py +94 -0
  443. pcapkit/vendor/pcapng/filter_type.py +77 -0
  444. pcapkit/vendor/pcapng/hash_algorithm.py +82 -0
  445. pcapkit/vendor/pcapng/option_type.py +287 -0
  446. pcapkit/vendor/pcapng/record_type.py +81 -0
  447. pcapkit/vendor/pcapng/secrets_type.py +81 -0
  448. pcapkit/vendor/pcapng/verdict_type.py +79 -0
  449. pcapkit/vendor/reg/__init__.py +34 -0
  450. pcapkit/vendor/reg/apptype.py +338 -0
  451. pcapkit/vendor/reg/ethertype.py +121 -0
  452. pcapkit/vendor/reg/linktype.py +110 -0
  453. pcapkit/vendor/reg/transtype.py +111 -0
  454. pcapkit/vendor/tcp/__init__.py +35 -0
  455. pcapkit/vendor/tcp/checksum.py +80 -0
  456. pcapkit/vendor/tcp/flags.py +149 -0
  457. pcapkit/vendor/tcp/mp_tcp_option.py +90 -0
  458. pcapkit/vendor/tcp/option.py +103 -0
  459. pcapkit/vendor/vlan/__init__.py +23 -0
  460. pcapkit/vendor/vlan/priority_level.py +97 -0
  461. pypcapkit-1.3.3.post1.dist-info/LICENSE +29 -0
  462. pypcapkit-1.3.3.post1.dist-info/METADATA +236 -0
  463. pypcapkit-1.3.3.post1.dist-info/RECORD +466 -0
  464. pypcapkit-1.3.3.post1.dist-info/WHEEL +5 -0
  465. pypcapkit-1.3.3.post1.dist-info/entry_points.txt +3 -0
  466. pypcapkit-1.3.3.post1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,63 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """Protection Authority Bit Assignments
4
+ ==========================================
5
+
6
+ .. module:: pcapkit.const.ipv4.protection_authority
7
+
8
+ This module contains the constant enumeration for **Protection Authority Bit Assignments**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.protection_authority.ProtectionAuthority`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['ProtectionAuthority']
16
+
17
+
18
+ class ProtectionAuthority(IntEnum):
19
+ """[ProtectionAuthority] Protection Authority Bit Assignments"""
20
+
21
+ GENSER = 0
22
+
23
+ SIOP_ESI = 1
24
+
25
+ SCI = 2
26
+
27
+ NSA = 3
28
+
29
+ DOE = 4
30
+
31
+ Unassigned_5 = 5
32
+
33
+ Unassigned_6 = 6
34
+
35
+ Field_Termination_Indicator = 7
36
+
37
+ @staticmethod
38
+ def get(key: 'int | str', default: 'int' = -1) -> 'ProtectionAuthority':
39
+ """Backport support for original codes.
40
+
41
+ Args:
42
+ key: Key to get enum item.
43
+ default: Default value if not found.
44
+
45
+ :meta private:
46
+ """
47
+ if isinstance(key, int):
48
+ return ProtectionAuthority(key)
49
+ if key not in ProtectionAuthority._member_map_: # pylint: disable=no-member
50
+ return extend_enum(ProtectionAuthority, key, default)
51
+ return ProtectionAuthority[key] # type: ignore[misc]
52
+
53
+ @classmethod
54
+ def _missing_(cls, value: 'int') -> 'ProtectionAuthority':
55
+ """Lookup function used when value is not found.
56
+
57
+ Args:
58
+ value: Value to get enum item.
59
+
60
+ """
61
+ if not (isinstance(value, int) and value >= 0):
62
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
63
+ return extend_enum(cls, 'Unassigned_%d' % value, value)
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """QS Functions
4
+ ==================
5
+
6
+ .. module:: pcapkit.const.ipv4.qs_function
7
+
8
+ This module contains the constant enumeration for **QS Functions**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.qs_function.QSFunction`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['QSFunction']
16
+
17
+
18
+ class QSFunction(IntEnum):
19
+ """[QSFunction] QS Functions"""
20
+
21
+ Quick_Start_Request = 0
22
+
23
+ Report_of_Approved_Rate = 8
24
+
25
+ @staticmethod
26
+ def get(key: 'int | str', default: 'int' = -1) -> 'QSFunction':
27
+ """Backport support for original codes.
28
+
29
+ Args:
30
+ key: Key to get enum item.
31
+ default: Default value if not found.
32
+
33
+ :meta private:
34
+ """
35
+ if isinstance(key, int):
36
+ return QSFunction(key)
37
+ if key not in QSFunction._member_map_: # pylint: disable=no-member
38
+ return extend_enum(QSFunction, key, default)
39
+ return QSFunction[key] # type: ignore[misc]
40
+
41
+ @classmethod
42
+ def _missing_(cls, value: 'int') -> 'QSFunction':
43
+ """Lookup function used when value is not found.
44
+
45
+ Args:
46
+ value: Value to get enum item.
47
+
48
+ """
49
+ if not (isinstance(value, int) and 0 <= value <= 8):
50
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
51
+ return extend_enum(cls, 'Unassigned_%d' % value, value)
@@ -0,0 +1,251 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """IPv4 Router Alert Option Values
4
+ =====================================
5
+
6
+ .. module:: pcapkit.const.ipv4.router_alert
7
+
8
+ This module contains the constant enumeration for **IPv4 Router Alert Option Values**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.router_alert.RouterAlert`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['RouterAlert']
16
+
17
+
18
+ class RouterAlert(IntEnum):
19
+ """[RouterAlert] IPv4 Router Alert Option Values"""
20
+
21
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
22
+ Aggregated_Reservation_Nesting_Level_0 = 1
23
+
24
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
25
+ Aggregated_Reservation_Nesting_Level_1 = 2
26
+
27
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
28
+ Aggregated_Reservation_Nesting_Level_2 = 3
29
+
30
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
31
+ Aggregated_Reservation_Nesting_Level_3 = 4
32
+
33
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
34
+ Aggregated_Reservation_Nesting_Level_4 = 5
35
+
36
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
37
+ Aggregated_Reservation_Nesting_Level_5 = 6
38
+
39
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
40
+ Aggregated_Reservation_Nesting_Level_6 = 7
41
+
42
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
43
+ Aggregated_Reservation_Nesting_Level_7 = 8
44
+
45
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
46
+ Aggregated_Reservation_Nesting_Level_8 = 9
47
+
48
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
49
+ Aggregated_Reservation_Nesting_Level_9 = 10
50
+
51
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
52
+ Aggregated_Reservation_Nesting_Level_10 = 11
53
+
54
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
55
+ Aggregated_Reservation_Nesting_Level_11 = 12
56
+
57
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
58
+ Aggregated_Reservation_Nesting_Level_12 = 13
59
+
60
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
61
+ Aggregated_Reservation_Nesting_Level_13 = 14
62
+
63
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
64
+ Aggregated_Reservation_Nesting_Level_14 = 15
65
+
66
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
67
+ Aggregated_Reservation_Nesting_Level_15 = 16
68
+
69
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
70
+ Aggregated_Reservation_Nesting_Level_16 = 17
71
+
72
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
73
+ Aggregated_Reservation_Nesting_Level_17 = 18
74
+
75
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
76
+ Aggregated_Reservation_Nesting_Level_18 = 19
77
+
78
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
79
+ Aggregated_Reservation_Nesting_Level_19 = 20
80
+
81
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
82
+ Aggregated_Reservation_Nesting_Level_20 = 21
83
+
84
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
85
+ Aggregated_Reservation_Nesting_Level_21 = 22
86
+
87
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
88
+ Aggregated_Reservation_Nesting_Level_22 = 23
89
+
90
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
91
+ Aggregated_Reservation_Nesting_Level_23 = 24
92
+
93
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
94
+ Aggregated_Reservation_Nesting_Level_24 = 25
95
+
96
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
97
+ Aggregated_Reservation_Nesting_Level_25 = 26
98
+
99
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
100
+ Aggregated_Reservation_Nesting_Level_26 = 27
101
+
102
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
103
+ Aggregated_Reservation_Nesting_Level_27 = 28
104
+
105
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
106
+ Aggregated_Reservation_Nesting_Level_28 = 29
107
+
108
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
109
+ Aggregated_Reservation_Nesting_Level_29 = 30
110
+
111
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
112
+ Aggregated_Reservation_Nesting_Level_30 = 31
113
+
114
+ #: Aggregated Reservation Nesting Level [:rfc:`3175`]
115
+ Aggregated_Reservation_Nesting_Level_31 = 32
116
+
117
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
118
+ QoS_NSLP_Aggregation_Level_0 = 33
119
+
120
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
121
+ QoS_NSLP_Aggregation_Level_1 = 34
122
+
123
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
124
+ QoS_NSLP_Aggregation_Level_2 = 35
125
+
126
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
127
+ QoS_NSLP_Aggregation_Level_3 = 36
128
+
129
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
130
+ QoS_NSLP_Aggregation_Level_4 = 37
131
+
132
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
133
+ QoS_NSLP_Aggregation_Level_5 = 38
134
+
135
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
136
+ QoS_NSLP_Aggregation_Level_6 = 39
137
+
138
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
139
+ QoS_NSLP_Aggregation_Level_7 = 40
140
+
141
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
142
+ QoS_NSLP_Aggregation_Level_8 = 41
143
+
144
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
145
+ QoS_NSLP_Aggregation_Level_9 = 42
146
+
147
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
148
+ QoS_NSLP_Aggregation_Level_10 = 43
149
+
150
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
151
+ QoS_NSLP_Aggregation_Level_11 = 44
152
+
153
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
154
+ QoS_NSLP_Aggregation_Level_12 = 45
155
+
156
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
157
+ QoS_NSLP_Aggregation_Level_13 = 46
158
+
159
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
160
+ QoS_NSLP_Aggregation_Level_14 = 47
161
+
162
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
163
+ QoS_NSLP_Aggregation_Level_15 = 48
164
+
165
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
166
+ QoS_NSLP_Aggregation_Level_16 = 49
167
+
168
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
169
+ QoS_NSLP_Aggregation_Level_17 = 50
170
+
171
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
172
+ QoS_NSLP_Aggregation_Level_18 = 51
173
+
174
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
175
+ QoS_NSLP_Aggregation_Level_19 = 52
176
+
177
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
178
+ QoS_NSLP_Aggregation_Level_20 = 53
179
+
180
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
181
+ QoS_NSLP_Aggregation_Level_21 = 54
182
+
183
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
184
+ QoS_NSLP_Aggregation_Level_22 = 55
185
+
186
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
187
+ QoS_NSLP_Aggregation_Level_23 = 56
188
+
189
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
190
+ QoS_NSLP_Aggregation_Level_24 = 57
191
+
192
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
193
+ QoS_NSLP_Aggregation_Level_25 = 58
194
+
195
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
196
+ QoS_NSLP_Aggregation_Level_26 = 59
197
+
198
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
199
+ QoS_NSLP_Aggregation_Level_27 = 60
200
+
201
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
202
+ QoS_NSLP_Aggregation_Level_28 = 61
203
+
204
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
205
+ QoS_NSLP_Aggregation_Level_29 = 62
206
+
207
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
208
+ QoS_NSLP_Aggregation_Level_30 = 63
209
+
210
+ #: QoS NSLP Aggregation Levels 0-31 [:rfc:`5974`]
211
+ QoS_NSLP_Aggregation_Level_31 = 64
212
+
213
+ #: NSIS NATFW NSLP [:rfc:`5973`]
214
+ NSIS_NATFW_NSLP = 65
215
+
216
+ #: Reserved [:rfc:`5350`]
217
+ Reserved_65535 = 65535
218
+
219
+ @staticmethod
220
+ def get(key: 'int | str', default: 'int' = -1) -> 'RouterAlert':
221
+ """Backport support for original codes.
222
+
223
+ Args:
224
+ key: Key to get enum item.
225
+ default: Default value if not found.
226
+
227
+ :meta private:
228
+ """
229
+ if isinstance(key, int):
230
+ return RouterAlert(key)
231
+ if key not in RouterAlert._member_map_: # pylint: disable=no-member
232
+ return extend_enum(RouterAlert, key, default)
233
+ return RouterAlert[key] # type: ignore[misc]
234
+
235
+ @classmethod
236
+ def _missing_(cls, value: 'int') -> 'RouterAlert':
237
+ """Lookup function used when value is not found.
238
+
239
+ Args:
240
+ value: Value to get enum item.
241
+
242
+ """
243
+ if not (isinstance(value, int) and 0 <= value <= 65535):
244
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
245
+ if 66 <= value <= 65502:
246
+ #: Unassigned
247
+ return extend_enum(cls, 'Unassigned_%d' % value, value)
248
+ if 65503 <= value <= 65534:
249
+ #: Reserved for experimental use [:rfc:`5350`]
250
+ return extend_enum(cls, 'Reserved for experimental use_%d' % value, value)
251
+ return super()._missing_(value)
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """ToS (DS Field) Delay
4
+ ==========================
5
+
6
+ .. module:: pcapkit.const.ipv4.tos_del
7
+
8
+ This module contains the constant enumeration for **ToS (DS Field) Delay**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.tos_del.ToSDelay`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['ToSDelay']
16
+
17
+
18
+ class ToSDelay(IntEnum):
19
+ """[ToSDelay] ToS (DS Field) Delay"""
20
+
21
+ NORMAL = 0
22
+
23
+ LOW = 1
24
+
25
+ @staticmethod
26
+ def get(key: 'int | str', default: 'int' = -1) -> 'ToSDelay':
27
+ """Backport support for original codes.
28
+
29
+ Args:
30
+ key: Key to get enum item.
31
+ default: Default value if not found.
32
+
33
+ :meta private:
34
+ """
35
+ if isinstance(key, int):
36
+ return ToSDelay(key)
37
+ if key not in ToSDelay._member_map_: # pylint: disable=no-member
38
+ return extend_enum(ToSDelay, key, default)
39
+ return ToSDelay[key] # type: ignore[misc]
40
+
41
+ @classmethod
42
+ def _missing_(cls, value: 'int') -> 'ToSDelay':
43
+ """Lookup function used when value is not found.
44
+
45
+ Args:
46
+ value: Value to get enum item.
47
+
48
+ """
49
+ if not (isinstance(value, int) and 0 <= value <= 1):
50
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
51
+ return extend_enum(cls, 'Unassigned_%d' % value, value)
@@ -0,0 +1,55 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """ToS ECN Field
4
+ ===================
5
+
6
+ .. module:: pcapkit.const.ipv4.tos_ecn
7
+
8
+ This module contains the constant enumeration for **ToS ECN Field**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.tos_ecn.ToSECN`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['ToSECN']
16
+
17
+
18
+ class ToSECN(IntEnum):
19
+ """[ToSECN] ToS ECN Field"""
20
+
21
+ Not_ECT = 0b00
22
+
23
+ ECT_0b01 = 0b01
24
+
25
+ ECT_0b10 = 0b10
26
+
27
+ CE = 0b11
28
+
29
+ @staticmethod
30
+ def get(key: 'int | str', default: 'int' = -1) -> 'ToSECN':
31
+ """Backport support for original codes.
32
+
33
+ Args:
34
+ key: Key to get enum item.
35
+ default: Default value if not found.
36
+
37
+ :meta private:
38
+ """
39
+ if isinstance(key, int):
40
+ return ToSECN(key)
41
+ if key not in ToSECN._member_map_: # pylint: disable=no-member
42
+ return extend_enum(ToSECN, key, default)
43
+ return ToSECN[key] # type: ignore[misc]
44
+
45
+ @classmethod
46
+ def _missing_(cls, value: 'int') -> 'ToSECN':
47
+ """Lookup function used when value is not found.
48
+
49
+ Args:
50
+ value: Value to get enum item.
51
+
52
+ """
53
+ if not (isinstance(value, int) and 0b00 <= value <= 0b11):
54
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
55
+ return extend_enum(cls, 'Unassigned_0b%s' % bin(value)[2:].zfill(2), value)
@@ -0,0 +1,63 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """ToS (DS Field) Precedence
4
+ ===============================
5
+
6
+ .. module:: pcapkit.const.ipv4.tos_pre
7
+
8
+ This module contains the constant enumeration for **ToS (DS Field) Precedence**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.tos_pre.ToSPrecedence`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['ToSPrecedence']
16
+
17
+
18
+ class ToSPrecedence(IntEnum):
19
+ """[ToSPrecedence] ToS (DS Field) Precedence"""
20
+
21
+ Network_Control = 7
22
+
23
+ Internetwork_Control = 6
24
+
25
+ CRITIC_ECP = 5
26
+
27
+ Flash_Override = 4
28
+
29
+ Flash = 3
30
+
31
+ Immediate = 2
32
+
33
+ Priority = 1
34
+
35
+ Routine = 0
36
+
37
+ @staticmethod
38
+ def get(key: 'int | str', default: 'int' = -1) -> 'ToSPrecedence':
39
+ """Backport support for original codes.
40
+
41
+ Args:
42
+ key: Key to get enum item.
43
+ default: Default value if not found.
44
+
45
+ :meta private:
46
+ """
47
+ if isinstance(key, int):
48
+ return ToSPrecedence(key)
49
+ if key not in ToSPrecedence._member_map_: # pylint: disable=no-member
50
+ return extend_enum(ToSPrecedence, key, default)
51
+ return ToSPrecedence[key] # type: ignore[misc]
52
+
53
+ @classmethod
54
+ def _missing_(cls, value: 'int') -> 'ToSPrecedence':
55
+ """Lookup function used when value is not found.
56
+
57
+ Args:
58
+ value: Value to get enum item.
59
+
60
+ """
61
+ if not (isinstance(value, int) and 0b000 <= value <= 0b111):
62
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
63
+ return extend_enum(cls, 'Unassigned_%d' % value, value)
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """ToS (DS Field) Reliability
4
+ ================================
5
+
6
+ .. module:: pcapkit.const.ipv4.tos_rel
7
+
8
+ This module contains the constant enumeration for **ToS (DS Field) Reliability**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.tos_rel.ToSReliability`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['ToSReliability']
16
+
17
+
18
+ class ToSReliability(IntEnum):
19
+ """[ToSReliability] ToS (DS Field) Reliability"""
20
+
21
+ NORMAL = 0
22
+
23
+ HIGH = 1
24
+
25
+ @staticmethod
26
+ def get(key: 'int | str', default: 'int' = -1) -> 'ToSReliability':
27
+ """Backport support for original codes.
28
+
29
+ Args:
30
+ key: Key to get enum item.
31
+ default: Default value if not found.
32
+
33
+ :meta private:
34
+ """
35
+ if isinstance(key, int):
36
+ return ToSReliability(key)
37
+ if key not in ToSReliability._member_map_: # pylint: disable=no-member
38
+ return extend_enum(ToSReliability, key, default)
39
+ return ToSReliability[key] # type: ignore[misc]
40
+
41
+ @classmethod
42
+ def _missing_(cls, value: 'int') -> 'ToSReliability':
43
+ """Lookup function used when value is not found.
44
+
45
+ Args:
46
+ value: Value to get enum item.
47
+
48
+ """
49
+ if not (isinstance(value, int) and 0 <= value <= 1):
50
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
51
+ return extend_enum(cls, 'Unassigned_%d' % value, value)
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """ToS (DS Field) Throughput
4
+ ===============================
5
+
6
+ .. module:: pcapkit.const.ipv4.tos_thr
7
+
8
+ This module contains the constant enumeration for **ToS (DS Field) Throughput**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.tos_thr.ToSThroughput`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['ToSThroughput']
16
+
17
+
18
+ class ToSThroughput(IntEnum):
19
+ """[ToSThroughput] ToS (DS Field) Throughput"""
20
+
21
+ NORMAL = 0
22
+
23
+ HIGH = 1
24
+
25
+ @staticmethod
26
+ def get(key: 'int | str', default: 'int' = -1) -> 'ToSThroughput':
27
+ """Backport support for original codes.
28
+
29
+ Args:
30
+ key: Key to get enum item.
31
+ default: Default value if not found.
32
+
33
+ :meta private:
34
+ """
35
+ if isinstance(key, int):
36
+ return ToSThroughput(key)
37
+ if key not in ToSThroughput._member_map_: # pylint: disable=no-member
38
+ return extend_enum(ToSThroughput, key, default)
39
+ return ToSThroughput[key] # type: ignore[misc]
40
+
41
+ @classmethod
42
+ def _missing_(cls, value: 'int') -> 'ToSThroughput':
43
+ """Lookup function used when value is not found.
44
+
45
+ Args:
46
+ value: Value to get enum item.
47
+
48
+ """
49
+ if not (isinstance(value, int) and 0 <= value <= 1):
50
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
51
+ return extend_enum(cls, 'Unassigned_%d' % value, value)
@@ -0,0 +1,53 @@
1
+ # -*- coding: utf-8 -*-
2
+ # pylint: disable=line-too-long,consider-using-f-string
3
+ """TS Flag
4
+ =============
5
+
6
+ .. module:: pcapkit.const.ipv4.ts_flag
7
+
8
+ This module contains the constant enumeration for **TS Flag**,
9
+ which is automatically generated from :class:`pcapkit.vendor.ipv4.ts_flag.TSFlag`.
10
+
11
+ """
12
+
13
+ from aenum import IntEnum, extend_enum
14
+
15
+ __all__ = ['TSFlag']
16
+
17
+
18
+ class TSFlag(IntEnum):
19
+ """[TSFlag] TS Flag"""
20
+
21
+ Timestamp_Only = 0
22
+
23
+ IP_with_Timestamp = 1
24
+
25
+ Prespecified_IP_with_Timestamp = 3
26
+
27
+ @staticmethod
28
+ def get(key: 'int | str', default: 'int' = -1) -> 'TSFlag':
29
+ """Backport support for original codes.
30
+
31
+ Args:
32
+ key: Key to get enum item.
33
+ default: Default value if not found.
34
+
35
+ :meta private:
36
+ """
37
+ if isinstance(key, int):
38
+ return TSFlag(key)
39
+ if key not in TSFlag._member_map_: # pylint: disable=no-member
40
+ return extend_enum(TSFlag, key, default)
41
+ return TSFlag[key] # type: ignore[misc]
42
+
43
+ @classmethod
44
+ def _missing_(cls, value: 'int') -> 'TSFlag':
45
+ """Lookup function used when value is not found.
46
+
47
+ Args:
48
+ value: Value to get enum item.
49
+
50
+ """
51
+ if not (isinstance(value, int) and 0b0000 <= value <= 0b1111):
52
+ raise ValueError('%r is not a valid %s' % (value, cls.__name__))
53
+ return extend_enum(cls, 'Unassigned_%d' % value, value)