@netkitty/codec 1.0.0

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 (463) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +352 -0
  4. package/README.zh-CN.md +342 -0
  5. package/dist/Codec.d.ts +133 -0
  6. package/dist/Codec.js +632 -0
  7. package/dist/PacketHeaders.d.ts +189 -0
  8. package/dist/PacketHeaders.js +384 -0
  9. package/dist/abstracts/BaseHeader.d.ts +325 -0
  10. package/dist/abstracts/BaseHeader.js +734 -0
  11. package/dist/errors/CodecSchemaValidateError.d.ts +4 -0
  12. package/dist/errors/CodecSchemaValidateError.js +11 -0
  13. package/dist/headers/ADSAMS.d.ts +33 -0
  14. package/dist/headers/ADSAMS.js +208 -0
  15. package/dist/headers/AH.d.ts +28 -0
  16. package/dist/headers/AH.js +137 -0
  17. package/dist/headers/AMQP.d.ts +31 -0
  18. package/dist/headers/AMQP.js +316 -0
  19. package/dist/headers/ARP.d.ts +26 -0
  20. package/dist/headers/ARP.js +243 -0
  21. package/dist/headers/BACnetIP.d.ts +27 -0
  22. package/dist/headers/BACnetIP.js +97 -0
  23. package/dist/headers/BFD.d.ts +28 -0
  24. package/dist/headers/BFD.js +155 -0
  25. package/dist/headers/BGP.d.ts +27 -0
  26. package/dist/headers/BGP.js +111 -0
  27. package/dist/headers/BSAPIP.d.ts +33 -0
  28. package/dist/headers/BSAPIP.js +78 -0
  29. package/dist/headers/Babel.d.ts +32 -0
  30. package/dist/headers/Babel.js +224 -0
  31. package/dist/headers/BitTorrent.d.ts +28 -0
  32. package/dist/headers/BitTorrent.js +72 -0
  33. package/dist/headers/C37118.d.ts +26 -0
  34. package/dist/headers/C37118.js +147 -0
  35. package/dist/headers/CAPWAP.d.ts +38 -0
  36. package/dist/headers/CAPWAP.js +275 -0
  37. package/dist/headers/CDP.d.ts +25 -0
  38. package/dist/headers/CDP.js +117 -0
  39. package/dist/headers/CMS.d.ts +33 -0
  40. package/dist/headers/CMS.js +238 -0
  41. package/dist/headers/COTP.d.ts +30 -0
  42. package/dist/headers/COTP.js +193 -0
  43. package/dist/headers/CassandraCQL.d.ts +28 -0
  44. package/dist/headers/CassandraCQL.js +117 -0
  45. package/dist/headers/CoAP.d.ts +29 -0
  46. package/dist/headers/CoAP.js +140 -0
  47. package/dist/headers/Codesys.d.ts +32 -0
  48. package/dist/headers/Codesys.js +119 -0
  49. package/dist/headers/Collectd.d.ts +29 -0
  50. package/dist/headers/Collectd.js +154 -0
  51. package/dist/headers/DCCP.d.ts +30 -0
  52. package/dist/headers/DCCP.js +204 -0
  53. package/dist/headers/DHCP.d.ts +26 -0
  54. package/dist/headers/DHCP.js +148 -0
  55. package/dist/headers/DHCPFailover.d.ts +30 -0
  56. package/dist/headers/DHCPFailover.js +104 -0
  57. package/dist/headers/DHCPv6.d.ts +25 -0
  58. package/dist/headers/DHCPv6.js +145 -0
  59. package/dist/headers/DNP3.d.ts +27 -0
  60. package/dist/headers/DNP3.js +150 -0
  61. package/dist/headers/DNS.d.ts +55 -0
  62. package/dist/headers/DNS.js +309 -0
  63. package/dist/headers/DTLS.d.ts +33 -0
  64. package/dist/headers/DTLS.js +142 -0
  65. package/dist/headers/Diameter.d.ts +34 -0
  66. package/dist/headers/Diameter.js +229 -0
  67. package/dist/headers/EAPOL.d.ts +32 -0
  68. package/dist/headers/EAPOL.js +135 -0
  69. package/dist/headers/EIGRP.d.ts +28 -0
  70. package/dist/headers/EIGRP.js +165 -0
  71. package/dist/headers/ENIP.d.ts +31 -0
  72. package/dist/headers/ENIP.js +164 -0
  73. package/dist/headers/ESP.d.ts +27 -0
  74. package/dist/headers/ESP.js +140 -0
  75. package/dist/headers/Elasticsearch.d.ts +30 -0
  76. package/dist/headers/Elasticsearch.js +125 -0
  77. package/dist/headers/EtherCAT.d.ts +35 -0
  78. package/dist/headers/EtherCAT.js +150 -0
  79. package/dist/headers/EthernetII.d.ts +28 -0
  80. package/dist/headers/EthernetII.js +117 -0
  81. package/dist/headers/FCoE.d.ts +38 -0
  82. package/dist/headers/FCoE.js +210 -0
  83. package/dist/headers/FTP.d.ts +34 -0
  84. package/dist/headers/FTP.js +158 -0
  85. package/dist/headers/Finger.d.ts +41 -0
  86. package/dist/headers/Finger.js +135 -0
  87. package/dist/headers/FoundationFieldbusHSE.d.ts +43 -0
  88. package/dist/headers/FoundationFieldbusHSE.js +163 -0
  89. package/dist/headers/GELF.d.ts +35 -0
  90. package/dist/headers/GELF.js +261 -0
  91. package/dist/headers/GENEVE.d.ts +26 -0
  92. package/dist/headers/GENEVE.js +209 -0
  93. package/dist/headers/GESRTP.d.ts +32 -0
  94. package/dist/headers/GESRTP.js +141 -0
  95. package/dist/headers/GLBP.d.ts +29 -0
  96. package/dist/headers/GLBP.js +159 -0
  97. package/dist/headers/GRE.d.ts +27 -0
  98. package/dist/headers/GRE.js +181 -0
  99. package/dist/headers/GTPU.d.ts +25 -0
  100. package/dist/headers/GTPU.js +203 -0
  101. package/dist/headers/GTPv2C.d.ts +30 -0
  102. package/dist/headers/GTPv2C.js +281 -0
  103. package/dist/headers/GitProtocol.d.ts +34 -0
  104. package/dist/headers/GitProtocol.js +141 -0
  105. package/dist/headers/Goose.d.ts +115 -0
  106. package/dist/headers/Goose.js +1067 -0
  107. package/dist/headers/Gopher.d.ts +43 -0
  108. package/dist/headers/Gopher.js +182 -0
  109. package/dist/headers/HARTIP.d.ts +30 -0
  110. package/dist/headers/HARTIP.js +145 -0
  111. package/dist/headers/HSR.d.ts +27 -0
  112. package/dist/headers/HSR.js +105 -0
  113. package/dist/headers/HSRP.d.ts +26 -0
  114. package/dist/headers/HSRP.js +173 -0
  115. package/dist/headers/HTTP.d.ts +32 -0
  116. package/dist/headers/HTTP.js +153 -0
  117. package/dist/headers/HTTP2.d.ts +34 -0
  118. package/dist/headers/HTTP2.js +190 -0
  119. package/dist/headers/IAX2.d.ts +33 -0
  120. package/dist/headers/IAX2.js +274 -0
  121. package/dist/headers/ICMP.d.ts +15 -0
  122. package/dist/headers/ICMP.js +148 -0
  123. package/dist/headers/ICMPv6.d.ts +15 -0
  124. package/dist/headers/ICMPv6.js +129 -0
  125. package/dist/headers/IEC104_I_Frame.d.ts +23 -0
  126. package/dist/headers/IEC104_I_Frame.js +6489 -0
  127. package/dist/headers/IEC104_S_Frame.d.ts +26 -0
  128. package/dist/headers/IEC104_S_Frame.js +135 -0
  129. package/dist/headers/IEC104_U_Frame.d.ts +27 -0
  130. package/dist/headers/IEC104_U_Frame.js +176 -0
  131. package/dist/headers/IEC61850SampledValues.d.ts +20 -0
  132. package/dist/headers/IEC61850SampledValues.js +420 -0
  133. package/dist/headers/IGMP.d.ts +31 -0
  134. package/dist/headers/IGMP.js +274 -0
  135. package/dist/headers/IMAP.d.ts +32 -0
  136. package/dist/headers/IMAP.js +185 -0
  137. package/dist/headers/IPFIX.d.ts +29 -0
  138. package/dist/headers/IPFIX.js +156 -0
  139. package/dist/headers/IPv4.d.ts +20 -0
  140. package/dist/headers/IPv4.js +370 -0
  141. package/dist/headers/IPv6.d.ts +29 -0
  142. package/dist/headers/IPv6.js +209 -0
  143. package/dist/headers/IPv6HopByHopOptions.d.ts +81 -0
  144. package/dist/headers/IPv6HopByHopOptions.js +495 -0
  145. package/dist/headers/IRC.d.ts +34 -0
  146. package/dist/headers/IRC.js +175 -0
  147. package/dist/headers/ISAKMP.d.ts +29 -0
  148. package/dist/headers/ISAKMP.js +197 -0
  149. package/dist/headers/ISCSI.d.ts +39 -0
  150. package/dist/headers/ISCSI.js +289 -0
  151. package/dist/headers/ISIS.d.ts +25 -0
  152. package/dist/headers/ISIS.js +79 -0
  153. package/dist/headers/ISOSession.d.ts +27 -0
  154. package/dist/headers/ISOSession.js +343 -0
  155. package/dist/headers/Ident.d.ts +42 -0
  156. package/dist/headers/Ident.js +184 -0
  157. package/dist/headers/KNXnetIP.d.ts +30 -0
  158. package/dist/headers/KNXnetIP.js +135 -0
  159. package/dist/headers/Kafka.d.ts +35 -0
  160. package/dist/headers/Kafka.js +128 -0
  161. package/dist/headers/Kerberos.d.ts +30 -0
  162. package/dist/headers/Kerberos.js +217 -0
  163. package/dist/headers/L2TP.d.ts +26 -0
  164. package/dist/headers/L2TP.js +297 -0
  165. package/dist/headers/LACP.d.ts +31 -0
  166. package/dist/headers/LACP.js +151 -0
  167. package/dist/headers/LDAP.d.ts +31 -0
  168. package/dist/headers/LDAP.js +226 -0
  169. package/dist/headers/LDP.d.ts +31 -0
  170. package/dist/headers/LDP.js +138 -0
  171. package/dist/headers/LISP.d.ts +30 -0
  172. package/dist/headers/LISP.js +103 -0
  173. package/dist/headers/LLC.d.ts +27 -0
  174. package/dist/headers/LLC.js +81 -0
  175. package/dist/headers/LLDP.d.ts +26 -0
  176. package/dist/headers/LLDP.js +126 -0
  177. package/dist/headers/LLMNR.d.ts +23 -0
  178. package/dist/headers/LLMNR.js +40 -0
  179. package/dist/headers/LPD.d.ts +31 -0
  180. package/dist/headers/LPD.js +159 -0
  181. package/dist/headers/MACsec.d.ts +34 -0
  182. package/dist/headers/MACsec.js +178 -0
  183. package/dist/headers/MDNS.d.ts +26 -0
  184. package/dist/headers/MDNS.js +45 -0
  185. package/dist/headers/MGCP.d.ts +30 -0
  186. package/dist/headers/MGCP.js +155 -0
  187. package/dist/headers/MMS.d.ts +29 -0
  188. package/dist/headers/MMS.js +243 -0
  189. package/dist/headers/MPLS.d.ts +31 -0
  190. package/dist/headers/MPLS.js +145 -0
  191. package/dist/headers/MQTT.d.ts +30 -0
  192. package/dist/headers/MQTT.js +173 -0
  193. package/dist/headers/MQTTSN.d.ts +34 -0
  194. package/dist/headers/MQTTSN.js +177 -0
  195. package/dist/headers/MarkerProtocol.d.ts +32 -0
  196. package/dist/headers/MarkerProtocol.js +153 -0
  197. package/dist/headers/Megaco.d.ts +32 -0
  198. package/dist/headers/Megaco.js +144 -0
  199. package/dist/headers/Memcached.d.ts +44 -0
  200. package/dist/headers/Memcached.js +285 -0
  201. package/dist/headers/ModbusTCP.d.ts +25 -0
  202. package/dist/headers/ModbusTCP.js +99 -0
  203. package/dist/headers/ModbusUDP.d.ts +26 -0
  204. package/dist/headers/ModbusUDP.js +100 -0
  205. package/dist/headers/MongoDB.d.ts +33 -0
  206. package/dist/headers/MongoDB.js +143 -0
  207. package/dist/headers/MySQL.d.ts +30 -0
  208. package/dist/headers/MySQL.js +114 -0
  209. package/dist/headers/NATS.d.ts +29 -0
  210. package/dist/headers/NATS.js +135 -0
  211. package/dist/headers/NBDS.d.ts +34 -0
  212. package/dist/headers/NBDS.js +176 -0
  213. package/dist/headers/NBNS.d.ts +34 -0
  214. package/dist/headers/NBNS.js +78 -0
  215. package/dist/headers/NBSS.d.ts +36 -0
  216. package/dist/headers/NBSS.js +137 -0
  217. package/dist/headers/NFS.d.ts +36 -0
  218. package/dist/headers/NFS.js +273 -0
  219. package/dist/headers/NHRP.d.ts +32 -0
  220. package/dist/headers/NHRP.js +154 -0
  221. package/dist/headers/NNTP.d.ts +35 -0
  222. package/dist/headers/NNTP.js +162 -0
  223. package/dist/headers/NTP.d.ts +18 -0
  224. package/dist/headers/NTP.js +73 -0
  225. package/dist/headers/NetFlowV5.d.ts +28 -0
  226. package/dist/headers/NetFlowV5.js +205 -0
  227. package/dist/headers/OLSR.d.ts +31 -0
  228. package/dist/headers/OLSR.js +213 -0
  229. package/dist/headers/OPCUA.d.ts +33 -0
  230. package/dist/headers/OPCUA.js +165 -0
  231. package/dist/headers/OPCUAPubSub.d.ts +33 -0
  232. package/dist/headers/OPCUAPubSub.js +144 -0
  233. package/dist/headers/OSPF.d.ts +31 -0
  234. package/dist/headers/OSPF.js +365 -0
  235. package/dist/headers/OmronFINS.d.ts +31 -0
  236. package/dist/headers/OmronFINS.js +90 -0
  237. package/dist/headers/OpenFlow.d.ts +30 -0
  238. package/dist/headers/OpenFlow.js +113 -0
  239. package/dist/headers/OpenVPN.d.ts +35 -0
  240. package/dist/headers/OpenVPN.js +214 -0
  241. package/dist/headers/PCWorx.d.ts +35 -0
  242. package/dist/headers/PCWorx.js +115 -0
  243. package/dist/headers/PIM.d.ts +27 -0
  244. package/dist/headers/PIM.js +129 -0
  245. package/dist/headers/POP3.d.ts +31 -0
  246. package/dist/headers/POP3.js +152 -0
  247. package/dist/headers/POWERLINK.d.ts +28 -0
  248. package/dist/headers/POWERLINK.js +116 -0
  249. package/dist/headers/PPPoEDiscovery.d.ts +29 -0
  250. package/dist/headers/PPPoEDiscovery.js +198 -0
  251. package/dist/headers/PPPoESession.d.ts +28 -0
  252. package/dist/headers/PPPoESession.js +125 -0
  253. package/dist/headers/PPTP.d.ts +30 -0
  254. package/dist/headers/PPTP.js +122 -0
  255. package/dist/headers/PROFINETRT.d.ts +28 -0
  256. package/dist/headers/PROFINETRT.js +74 -0
  257. package/dist/headers/PTP.d.ts +34 -0
  258. package/dist/headers/PTP.js +213 -0
  259. package/dist/headers/PostgreSQL.d.ts +40 -0
  260. package/dist/headers/PostgreSQL.js +236 -0
  261. package/dist/headers/QUIC.d.ts +34 -0
  262. package/dist/headers/QUIC.js +308 -0
  263. package/dist/headers/RADIUS.d.ts +24 -0
  264. package/dist/headers/RADIUS.js +138 -0
  265. package/dist/headers/RDP.d.ts +27 -0
  266. package/dist/headers/RDP.js +93 -0
  267. package/dist/headers/RFB.d.ts +39 -0
  268. package/dist/headers/RFB.js +151 -0
  269. package/dist/headers/RGoose.d.ts +72 -0
  270. package/dist/headers/RGoose.js +340 -0
  271. package/dist/headers/RIP.d.ts +29 -0
  272. package/dist/headers/RIP.js +133 -0
  273. package/dist/headers/RIPng.d.ts +26 -0
  274. package/dist/headers/RIPng.js +140 -0
  275. package/dist/headers/RMCP.d.ts +26 -0
  276. package/dist/headers/RMCP.js +155 -0
  277. package/dist/headers/RSVP.d.ts +31 -0
  278. package/dist/headers/RSVP.js +263 -0
  279. package/dist/headers/RTCP.d.ts +34 -0
  280. package/dist/headers/RTCP.js +217 -0
  281. package/dist/headers/RTP.d.ts +33 -0
  282. package/dist/headers/RTP.js +291 -0
  283. package/dist/headers/RTPS.d.ts +33 -0
  284. package/dist/headers/RTPS.js +182 -0
  285. package/dist/headers/RTSP.d.ts +36 -0
  286. package/dist/headers/RTSP.js +184 -0
  287. package/dist/headers/RawData.d.ts +17 -0
  288. package/dist/headers/RawData.js +43 -0
  289. package/dist/headers/Redis.d.ts +32 -0
  290. package/dist/headers/Redis.js +202 -0
  291. package/dist/headers/Rlogin.d.ts +42 -0
  292. package/dist/headers/Rlogin.js +139 -0
  293. package/dist/headers/Rsync.d.ts +28 -0
  294. package/dist/headers/Rsync.js +117 -0
  295. package/dist/headers/S7comm.d.ts +36 -0
  296. package/dist/headers/S7comm.js +244 -0
  297. package/dist/headers/SCTP.d.ts +35 -0
  298. package/dist/headers/SCTP.js +174 -0
  299. package/dist/headers/SFlow.d.ts +29 -0
  300. package/dist/headers/SFlow.js +242 -0
  301. package/dist/headers/SIP.d.ts +27 -0
  302. package/dist/headers/SIP.js +146 -0
  303. package/dist/headers/SLMP.d.ts +36 -0
  304. package/dist/headers/SLMP.js +154 -0
  305. package/dist/headers/SLP.d.ts +30 -0
  306. package/dist/headers/SLP.js +207 -0
  307. package/dist/headers/SLPv1.d.ts +32 -0
  308. package/dist/headers/SLPv1.js +138 -0
  309. package/dist/headers/SMB1.d.ts +37 -0
  310. package/dist/headers/SMB1.js +200 -0
  311. package/dist/headers/SMB2.d.ts +36 -0
  312. package/dist/headers/SMB2.js +203 -0
  313. package/dist/headers/SMPP.d.ts +33 -0
  314. package/dist/headers/SMPP.js +119 -0
  315. package/dist/headers/SMTP.d.ts +33 -0
  316. package/dist/headers/SMTP.js +157 -0
  317. package/dist/headers/SNAP.d.ts +22 -0
  318. package/dist/headers/SNAP.js +68 -0
  319. package/dist/headers/SNMP.d.ts +28 -0
  320. package/dist/headers/SNMP.js +302 -0
  321. package/dist/headers/SOCKS4.d.ts +42 -0
  322. package/dist/headers/SOCKS4.js +302 -0
  323. package/dist/headers/SOCKS5.d.ts +45 -0
  324. package/dist/headers/SOCKS5.js +223 -0
  325. package/dist/headers/SSDP.d.ts +27 -0
  326. package/dist/headers/SSDP.js +161 -0
  327. package/dist/headers/SSH.d.ts +44 -0
  328. package/dist/headers/SSH.js +274 -0
  329. package/dist/headers/STOMP.d.ts +48 -0
  330. package/dist/headers/STOMP.js +177 -0
  331. package/dist/headers/STP.d.ts +26 -0
  332. package/dist/headers/STP.js +150 -0
  333. package/dist/headers/STUN.d.ts +25 -0
  334. package/dist/headers/STUN.js +183 -0
  335. package/dist/headers/SercosIII.d.ts +43 -0
  336. package/dist/headers/SercosIII.js +199 -0
  337. package/dist/headers/Skinny.d.ts +32 -0
  338. package/dist/headers/Skinny.js +139 -0
  339. package/dist/headers/StatsD.d.ts +27 -0
  340. package/dist/headers/StatsD.js +134 -0
  341. package/dist/headers/SunRPC.d.ts +34 -0
  342. package/dist/headers/SunRPC.js +268 -0
  343. package/dist/headers/Syslog.d.ts +21 -0
  344. package/dist/headers/Syslog.js +91 -0
  345. package/dist/headers/TCP.d.ts +19 -0
  346. package/dist/headers/TCP.js +905 -0
  347. package/dist/headers/TFTP.d.ts +28 -0
  348. package/dist/headers/TFTP.js +224 -0
  349. package/dist/headers/TLS_Alert.d.ts +24 -0
  350. package/dist/headers/TLS_Alert.js +639 -0
  351. package/dist/headers/TLS_ApplicationData.d.ts +24 -0
  352. package/dist/headers/TLS_ApplicationData.js +170 -0
  353. package/dist/headers/TLS_ChangeCipherSpec.d.ts +23 -0
  354. package/dist/headers/TLS_ChangeCipherSpec.js +168 -0
  355. package/dist/headers/TLS_Handshake.d.ts +65 -0
  356. package/dist/headers/TLS_Handshake.js +860 -0
  357. package/dist/headers/TLS_Heartbeat.d.ts +27 -0
  358. package/dist/headers/TLS_Heartbeat.js +247 -0
  359. package/dist/headers/TPKT.d.ts +26 -0
  360. package/dist/headers/TPKT.js +99 -0
  361. package/dist/headers/TacacsPlus.d.ts +27 -0
  362. package/dist/headers/TacacsPlus.js +133 -0
  363. package/dist/headers/Telnet.d.ts +40 -0
  364. package/dist/headers/Telnet.js +193 -0
  365. package/dist/headers/Teredo.d.ts +40 -0
  366. package/dist/headers/Teredo.js +251 -0
  367. package/dist/headers/TimeProtocol.d.ts +25 -0
  368. package/dist/headers/TimeProtocol.js +53 -0
  369. package/dist/headers/UDP.d.ts +19 -0
  370. package/dist/headers/UDP.js +171 -0
  371. package/dist/headers/VLAN_802dot1Q.d.ts +24 -0
  372. package/dist/headers/VLAN_802dot1Q.js +96 -0
  373. package/dist/headers/VRRP.d.ts +26 -0
  374. package/dist/headers/VRRP.js +309 -0
  375. package/dist/headers/VXLAN.d.ts +24 -0
  376. package/dist/headers/VXLAN.js +75 -0
  377. package/dist/headers/WCCP.d.ts +29 -0
  378. package/dist/headers/WCCP.js +117 -0
  379. package/dist/headers/WHOIS.d.ts +37 -0
  380. package/dist/headers/WHOIS.js +126 -0
  381. package/dist/headers/WSDiscovery.d.ts +29 -0
  382. package/dist/headers/WSDiscovery.js +118 -0
  383. package/dist/headers/WakeOnLAN.d.ts +30 -0
  384. package/dist/headers/WakeOnLAN.js +126 -0
  385. package/dist/headers/WebSocket.d.ts +26 -0
  386. package/dist/headers/WebSocket.js +173 -0
  387. package/dist/headers/WireGuard.d.ts +38 -0
  388. package/dist/headers/WireGuard.js +216 -0
  389. package/dist/headers/XMPP.d.ts +37 -0
  390. package/dist/headers/XMPP.js +149 -0
  391. package/dist/headers/Zabbix.d.ts +35 -0
  392. package/dist/headers/Zabbix.js +153 -0
  393. package/dist/headers/cms/AcsiPdu.d.ts +45 -0
  394. package/dist/headers/cms/AcsiPdu.js +112 -0
  395. package/dist/headers/cms/PerDecoder.d.ts +68 -0
  396. package/dist/headers/cms/PerDecoder.js +211 -0
  397. package/dist/headers/cms/PerReader.d.ts +64 -0
  398. package/dist/headers/cms/PerReader.js +155 -0
  399. package/dist/helper/BufferToHex.d.ts +5 -0
  400. package/dist/helper/BufferToHex.js +10 -0
  401. package/dist/helper/BufferToIP.d.ts +12 -0
  402. package/dist/helper/BufferToIP.js +23 -0
  403. package/dist/helper/BufferToNumber.d.ts +18 -0
  404. package/dist/helper/BufferToNumber.js +47 -0
  405. package/dist/helper/HexToBuffer.d.ts +7 -0
  406. package/dist/helper/HexToBuffer.js +27 -0
  407. package/dist/helper/HexToNumber.d.ts +18 -0
  408. package/dist/helper/HexToNumber.js +48 -0
  409. package/dist/helper/IPToBuffer.d.ts +12 -0
  410. package/dist/helper/IPToBuffer.js +34 -0
  411. package/dist/helper/NumberToBERBuffer.d.ts +18 -0
  412. package/dist/helper/NumberToBERBuffer.js +31 -0
  413. package/dist/helper/NumberToBERHex.d.ts +18 -0
  414. package/dist/helper/NumberToBERHex.js +52 -0
  415. package/dist/helper/NumberToBuffer.d.ts +18 -0
  416. package/dist/helper/NumberToBuffer.js +38 -0
  417. package/dist/helper/NumberToHex.d.ts +18 -0
  418. package/dist/helper/NumberToHex.js +35 -0
  419. package/dist/index.d.ts +52 -0
  420. package/dist/index.js +113 -0
  421. package/dist/lib/FlexibleObject.d.ts +27 -0
  422. package/dist/lib/FlexibleObject.js +113 -0
  423. package/dist/lib/GetBERIntegerLengthFromBuffer.d.ts +6 -0
  424. package/dist/lib/GetBERIntegerLengthFromBuffer.js +16 -0
  425. package/dist/lib/ProcessPacketPostHandlers.d.ts +13 -0
  426. package/dist/lib/ProcessPacketPostHandlers.js +53 -0
  427. package/dist/lib/SortPostHandlers.d.ts +7 -0
  428. package/dist/lib/SortPostHandlers.js +11 -0
  429. package/dist/lib/StringContentEncodingEnum.d.ts +10 -0
  430. package/dist/lib/StringContentEncodingEnum.js +14 -0
  431. package/dist/schema/ProtocolFieldJSONSchema.d.ts +35 -0
  432. package/dist/schema/ProtocolFieldJSONSchema.js +2 -0
  433. package/dist/schema/ProtocolFieldJSONSchemaDefinition.d.ts +2 -0
  434. package/dist/schema/ProtocolFieldJSONSchemaDefinition.js +2 -0
  435. package/dist/schema/ProtocolJSONSchema.d.ts +32 -0
  436. package/dist/schema/ProtocolJSONSchema.js +2 -0
  437. package/dist/types/CodecData.d.ts +7 -0
  438. package/dist/types/CodecData.js +2 -0
  439. package/dist/types/CodecDecodeResult.d.ts +10 -0
  440. package/dist/types/CodecDecodeResult.js +2 -0
  441. package/dist/types/CodecEncodeInput.d.ts +2 -0
  442. package/dist/types/CodecEncodeInput.js +2 -0
  443. package/dist/types/CodecEncodeResult.d.ts +5 -0
  444. package/dist/types/CodecEncodeResult.js +2 -0
  445. package/dist/types/CodecErrorInfo.d.ts +5 -0
  446. package/dist/types/CodecErrorInfo.js +2 -0
  447. package/dist/types/CodecModule.d.ts +2 -0
  448. package/dist/types/CodecModule.js +2 -0
  449. package/dist/types/CodecModuleConstructor.d.ts +2 -0
  450. package/dist/types/CodecModuleConstructor.js +2 -0
  451. package/dist/types/CodecSchema.d.ts +6 -0
  452. package/dist/types/CodecSchema.js +2 -0
  453. package/dist/types/DemuxProducer.d.ts +23 -0
  454. package/dist/types/DemuxProducer.js +2 -0
  455. package/dist/types/Dissection.d.ts +23 -0
  456. package/dist/types/Dissection.js +2 -0
  457. package/dist/types/HeaderTreeNode.d.ts +4 -0
  458. package/dist/types/HeaderTreeNode.js +2 -0
  459. package/dist/types/LayerGraph.d.ts +32 -0
  460. package/dist/types/LayerGraph.js +2 -0
  461. package/dist/types/PostHandlerItem.d.ts +4 -0
  462. package/dist/types/PostHandlerItem.js +2 -0
  463. package/package.json +141 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ All notable changes to this package are documented here, following
4
+ [Semantic Versioning](https://semver.org/). From the next release onward, entries
5
+ are generated automatically from Conventional Commits.
6
+
7
+ ## 1.0.0 - 2026-07-22
8
+
9
+ First stable release.
10
+
11
+ - Schema-driven encode/decode of 188 protocol headers — from Ethernet/IP/TCP/UDP
12
+ and the mainstream application layer through a deep bench of industrial/OT
13
+ protocols (Modbus, DNP3, IEC 104, IEC 61850 GOOSE/SV/MMS, S7comm, OPC UA,
14
+ PROFINET, EtherCAT, EtherNet/IP, BACnet and more).
15
+ - One executable JSON Schema per header doubles as field tree, byte codec, Ajv
16
+ validator and UI form metadata. Decode never throws; errors accumulate on a
17
+ field-path-addressed list.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alex Ma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,352 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/myq1991/netkitty/main/assets/NetKittyLogo.webp" alt="NetKitty" width="180">
3
+ </p>
4
+
5
+ # @netkitty/codec
6
+
7
+ Schema-driven protocol codec for encoding and decoding packet headers — **189 protocols** across the
8
+ whole stack. Every header is one **executable JSON Schema** that
9
+ is at once the field tree, the byte-level codec, the input validator, and the form metadata a UI needs.
10
+ It is designed backwards from a GUI packet editor — a programmable Wireshark — rather than a
11
+ throughput dissector. Pure TypeScript, no native dependencies: it only ever touches an in-memory
12
+ `Buffer`, so it runs unchanged in **node and the browser**.
13
+
14
+ **Protocol coverage** spans link and network layers (Ethernet, VLAN/802.1Q, ARP, IPv4/IPv6,
15
+ ICMP/ICMPv6, MPLS, GRE, VXLAN, GENEVE), transport (TCP, UDP, SCTP, DCCP, QUIC), and the mainstream
16
+ application layer (HTTP, HTTP/2, TLS/DTLS, DNS/mDNS, DHCP/DHCPv6, MQTT/MQTT-SN, CoAP, AMQP, Kafka,
17
+ MongoDB, MySQL, PostgreSQL, Redis, SSH, LDAP, Kerberos, SNMP, NTP, PTP, SIP/RTP/RTCP, RTSP, SMB, NFS,
18
+ RADIUS, Diameter, WireGuard, GTP). Its main differentiator is a deep bench of **industrial / OT /
19
+ SCADA** protocols: Modbus (TCP/UDP), DNP3, IEC 104, IEC 61850 (GOOSE, Sampled Values, MMS, R-GOOSE),
20
+ S7comm, OPC UA (incl. PubSub), PROFINET RT, EtherCAT, EtherNet/IP, BACnet/IP, POWERLINK, HART-IP,
21
+ Omron FINS, SLMP, CODESYS, C37.118, SercosIII and GE-SRTP.
22
+
23
+ > 中文文档见 [README.zh-CN.md](./README.zh-CN.md)。
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ npm i @netkitty/codec
29
+ # or use the aggregate package: import {Codec} from 'netkitty/codec'
30
+ # protocol header classes and conversion helpers are all re-exported from netkitty/codec
31
+ ```
32
+
33
+ ## Quick start
34
+
35
+ Decode turns raw bytes into an ordered list of protocol layers; encode turns layers back into bytes.
36
+ A decoded result is itself a valid encode input, so the two are exact mirrors (read → edit → re-emit).
37
+
38
+ ```ts
39
+ import {Codec, HexToBuffer} from '@netkitty/codec'
40
+
41
+ const codec = new Codec()
42
+
43
+ // Decode: Buffer → layered result (outermost layer first)
44
+ const packet = HexToBuffer('ffffffffffff0011223344550806...')
45
+ const layers = await codec.decode(packet)
46
+
47
+ layers[0] // {id: 'eth', name: 'Ethernet II', nickname: 'ETH', protocol: true, errors: [], data: {...}}
48
+ layers[0].data // {dmac: 'ff:ff:ff:ff:ff:ff', smac: '00:11:22:33:44:55', etherType: '0806'}
49
+ layers[0].errors // [] — per-field errors accumulate here, decode never throws
50
+
51
+ // Encode: layers → Buffer. Feed the decoded layers straight back to re-emit the packet.
52
+ const {packet: rebuilt, errors} = await codec.encode(layers)
53
+ rebuilt.equals(packet) // true for a well-formed packet — decode/encode round-trip exactly
54
+ ```
55
+
56
+ Build a packet from scratch by handing `encode` an array of `{id, data}` inputs in outer-to-inner
57
+ order; any field you omit is filled from the schema's defaults, and form-string values are coerced:
58
+
59
+ ```ts
60
+ const {packet} = await codec.encode([
61
+ {id: 'eth', data: {dmac: 'ff:ff:ff:ff:ff:ff', smac: '00:11:22:33:44:55', etherType: '0800'}},
62
+ {id: 'ipv4', data: {sip: '192.168.0.1', dip: '192.168.0.2', protocol: 17}},
63
+ {id: 'udp', data: {srcport: 12345, dstport: 53}}
64
+ ])
65
+ ```
66
+
67
+ ### Signatures
68
+
69
+ ```ts
70
+ class Codec {
71
+ constructor(customCodecs?: CodecModuleConstructor[]) // override/extend built-in headers
72
+ decode(packet: Buffer): Promise<CodecDecodeResult[]>
73
+ encode(inputs: CodecEncodeInput[]): Promise<CodecEncodeResult>
74
+ }
75
+
76
+ type CodecDecodeResult = {
77
+ id: string // protocol id, e.g. 'eth', 'ipv4', 'tcp'
78
+ name: string // human-readable name, e.g. 'Ethernet II'
79
+ nickname: string // short tag, e.g. 'ETH'
80
+ protocol: boolean // whether this layer is a real protocol (false for raw payload)
81
+ errors: CodecErrorInfo[] // {id, path, message}[] — field-path-addressed decode errors
82
+ data: HeaderTreeNode // the decoded field tree
83
+ }
84
+
85
+ type CodecEncodeInput = Pick<CodecDecodeResult, 'id' | 'data'> & Partial<Omit<CodecDecodeResult, 'id' | 'data'>>
86
+ type CodecEncodeResult = {packet: Buffer, errors: CodecErrorInfo[]}
87
+ ```
88
+
89
+ ## Key concepts
90
+
91
+ ### One executable schema, four roles
92
+
93
+ Each header extends `BaseHeader` and declares a single `SCHEMA` (a `ProtocolJSONSchema`). That one
94
+ declaration plays four parts at once:
95
+
96
+ 1. **Field-tree structure** — the shape of the decoded/encoded data.
97
+ 2. **Codec logic** — every field embeds `decode`/`encode` closures that read and write the shared
98
+ packet buffer through `this.readBytes/writeBytes` and `this.readBits/writeBits` (offsets are
99
+ header-relative; the buffer auto-expands on write, so nothing needs a length pre-pass). Values live
100
+ on `this.instance`, a `FlexibleObject` — a path-tracking proxy whose deep access never throws and
101
+ yields exact dotted field paths (`options[3].kind`) for binding errors to UI inputs.
102
+ 3. **Input validation** — `encode` validates each input with Ajv against the schema. `useDefaults`
103
+ makes the schema double as a packet template (omitted fields are filled in); `coerceTypes` tolerates
104
+ form-string input.
105
+ 4. **UI form metadata** — custom keywords (`label`, `hidden`, `contentEncoding`) plus `enum`/`min`/`max`
106
+ and `anyOf` + `const` discriminators describe how a form should render each field.
107
+
108
+ ### Decode never fails; errors accumulate instead of throwing
109
+
110
+ Malformed packets are first-class input. A field whose bytes are truncated or invalid records an error
111
+ via `recordError()` (a `{id, path, message}` entry on the layer's `errors`) and clamps to a best-effort
112
+ value — it does not throw. Decode therefore always returns a full best-effort layer list plus a
113
+ field-path-addressed error list you can use to highlight problems in a UI. The only deliberate fast-fail
114
+ is the Ajv shape check at the `encode` entry point.
115
+
116
+ ### RawData is the catch-all
117
+
118
+ Decode walks the packet and, for each layer, selects the first header whose demux value or content
119
+ heuristic matches at the current offset, then advances and recurses until the packet is consumed.
120
+ `RawData` is the forced final fallback and always matches, so unknown or malformed trailing bytes simply
121
+ become a `raw` layer and decode can never dead-end.
122
+
123
+ ### The declarative shell vs. the imperative core
124
+
125
+ `PROTOCOL_SCHEMA` is the schema with its closures stripped (via a `JSON.parse(JSON.stringify())`
126
+ round-trip — JSON serialization dropping functions is the deliberate boundary). What remains is pure,
127
+ serializable JSON Schema you can ship to a frontend to drive a form; the byte offsets, bit fields and
128
+ TLV/BER parsing stay behind in the closures. When you add a field, keep that split: anything a form
129
+ needs must be serializable schema, anything procedural belongs in the closures.
130
+
131
+ ### Cross-layer fixups run as post-handlers
132
+
133
+ Length fields and checksums depend on bytes another layer only finalizes later. Headers register
134
+ post-encode/decode handlers with priorities for these fixups; packet-level post-encode handlers run
135
+ last-in-first-out (outer layers depend on inner layers' final bytes), post-decode handlers run
136
+ first-in-first-out (inner semantics depend on outer context, e.g. TCP's checksum needs the IPv4
137
+ addresses).
138
+
139
+ ### Custom and additional headers
140
+
141
+ `new Codec(customCodecs)` takes an array of header classes. A custom class replaces the built-in with
142
+ the same `PROTOCOL_ID`; a class with a new id is appended. To add a brand-new built-in protocol,
143
+ implement a `BaseHeader` subclass and register it in `PacketHeaders.ts` (and re-export it from the
144
+ package's entry point).
145
+
146
+ ### Editor helpers
147
+
148
+ Alongside `decode`/`encode`, `Codec` exposes read-only projections over the same decode for building an
149
+ editor UI: `dissect(packet)` returns a field tree annotated with each field's exact byte span, label and
150
+ error/ok severity (a Wireshark-style hex-to-field view); `summary(decoded)` renders a one-line
151
+ description (Wireshark's Info column); `allowedNextLayers`, `childDiscriminator` and `checkConsistency`
152
+ describe and validate which layer may follow which.
153
+
154
+ ## Built-in headers
155
+
156
+ 189 protocol headers are registered by default; `raw` is the forced catch-all. Pass custom classes to `new Codec(customCodecs)` to override a built-in with the same id or add new ones.
157
+
158
+ | id | name |
159
+ | ---------------- | --------------------------------------------------- |
160
+ | `adsams` | Beckhoff ADS/AMS |
161
+ | `ah` | IP Authentication Header |
162
+ | `amqp` | AMQP 0-9-1 |
163
+ | `arp` | Address Resolution Protocol |
164
+ | `babel` | Babel Routing Protocol |
165
+ | `bacnet` | BACnet/IP |
166
+ | `bfd` | Bidirectional Forwarding Detection |
167
+ | `bgp` | Border Gateway Protocol |
168
+ | `bittorrent` | BitTorrent Peer Wire Protocol |
169
+ | `bsap` | Bristol/Emerson BSAP over IP |
170
+ | `c37118` | IEEE C37.118 Synchrophasor |
171
+ | `capwap` | Control And Provisioning of Wireless Access Points |
172
+ | `cdp` | Cisco Discovery Protocol |
173
+ | `cms` | CMS (China Substation Communication, DL/T 2811) |
174
+ | `coap` | Constrained Application Protocol |
175
+ | `codesys` | CODESYS V3 |
176
+ | `collectd` | collectd Network Protocol |
177
+ | `cotp` | COTP |
178
+ | `cql` | Cassandra CQL |
179
+ | `dccp` | Datagram Congestion Control Protocol |
180
+ | `dhcp` | Dynamic Host Configuration Protocol |
181
+ | `dhcpfo` | DHCP Failover |
182
+ | `dhcpv6` | Dynamic Host Configuration Protocol for IPv6 |
183
+ | `diameter` | Diameter |
184
+ | `dnp3` | Distributed Network Protocol 3 |
185
+ | `dns` | Domain Name System |
186
+ | `dtls` | Datagram Transport Layer Security |
187
+ | `eapol` | EAP over LAN |
188
+ | `ecat` | EtherCAT |
189
+ | `eigrp` | Enhanced Interior Gateway Routing Protocol |
190
+ | `elasticsearch` | Elasticsearch Transport |
191
+ | `enip` | EtherNet/IP |
192
+ | `esp` | IP Encapsulating Security Payload |
193
+ | `eth` | Ethernet II |
194
+ | `fcoe` | Fibre Channel over Ethernet |
195
+ | `ffhse` | FOUNDATION Fieldbus HSE |
196
+ | `finger` | Finger |
197
+ | `fins` | OMRON FINS |
198
+ | `ftp` | File Transfer Protocol |
199
+ | `gelf` | Graylog Extended Log Format |
200
+ | `geneve` | Generic Network Virtualization Encapsulation |
201
+ | `gesrtp` | GE-SRTP |
202
+ | `git` | Git Smart Protocol |
203
+ | `glbp` | Gateway Load Balancing Protocol |
204
+ | `goose` | IEC61850 GOOSE |
205
+ | `gopher` | Internet Gopher Protocol |
206
+ | `gre` | Generic Routing Encapsulation |
207
+ | `gtp` | GPRS Tunnelling Protocol, User plane |
208
+ | `gtpv2` | GPRS Tunnelling Protocol version 2, Control plane |
209
+ | `hartip` | HART-IP |
210
+ | `hsr` | High-availability Seamless Redundancy |
211
+ | `hsrp` | Hot Standby Router Protocol |
212
+ | `http` | Hypertext Transfer Protocol |
213
+ | `http2` | Hypertext Transfer Protocol 2 |
214
+ | `iax2` | Inter-Asterisk eXchange v2 |
215
+ | `icmp` | Internet Control Message Protocol |
216
+ | `icmpv6` | Internet Control Message Protocol v6 |
217
+ | `ident` | Identification Protocol |
218
+ | `IEC104_I_Frame` | IEC 60870-5-104 |
219
+ | `IEC104_S_Frame` | IEC 60870-5-104 |
220
+ | `IEC104_U_Frame` | IEC 60870-5-104 |
221
+ | `igmp` | Internet Group Management Protocol |
222
+ | `imap` | Internet Message Access Protocol |
223
+ | `ipfix` | IP Flow Information Export |
224
+ | `ipv4` | Internet Protocol Version 4 |
225
+ | `ipv6` | Internet Protocol Version 6 |
226
+ | `ipv6-hopopt` | IPv6 Hop-by-Hop Option |
227
+ | `irc` | Internet Relay Chat |
228
+ | `isakmp` | ISAKMP/IKE |
229
+ | `iscsi` | Internet Small Computer Systems Interface |
230
+ | `isis` | Intermediate System to Intermediate System |
231
+ | `iso-session` | ISO Session |
232
+ | `kafka` | Kafka |
233
+ | `kerberos` | Kerberos |
234
+ | `knxnetip` | KNXnet/IP |
235
+ | `l2tp` | Layer Two Tunneling Protocol |
236
+ | `lacp` | Link Aggregation Control Protocol |
237
+ | `ldap` | LDAP |
238
+ | `ldp` | Label Distribution Protocol |
239
+ | `lisp` | Locator/ID Separation Protocol |
240
+ | `llc` | Logical Link Control |
241
+ | `lldp` | Link Layer Discovery Protocol |
242
+ | `llmnr` | Link-Local Multicast Name Resolution |
243
+ | `lpd` | Line Printer Daemon Protocol |
244
+ | `macsec` | MAC Security |
245
+ | `marker` | Link Aggregation Marker Protocol |
246
+ | `mdns` | Multicast DNS |
247
+ | `megaco` | Media Gateway Control Protocol (H.248/Megaco) |
248
+ | `memcached` | Memcached |
249
+ | `mgcp` | Media Gateway Control Protocol |
250
+ | `mms` | Manufacturing Message Specification |
251
+ | `modbus` | Modbus/TCP |
252
+ | `modbusudp` | Modbus/UDP |
253
+ | `mongodb` | MongoDB Wire Protocol |
254
+ | `mpls` | Multiprotocol Label Switching |
255
+ | `mqtt` | MQTT |
256
+ | `mqttsn` | MQTT for Sensor Networks |
257
+ | `mysql` | MySQL Protocol |
258
+ | `nats` | NATS Client Protocol |
259
+ | `nbds` | NetBIOS Datagram Service |
260
+ | `nbns` | NetBIOS Name Service |
261
+ | `nbss` | NetBIOS Session Service |
262
+ | `netflow5` | NetFlow v5 |
263
+ | `nfs` | Network File System |
264
+ | `nhrp` | NBMA Next Hop Resolution Protocol |
265
+ | `nntp` | Network News Transfer Protocol |
266
+ | `ntp` | Network Time Protocol |
267
+ | `olsr` | Optimized Link State Routing |
268
+ | `opcua` | OPC UA Connection Protocol |
269
+ | `opcua-pubsub` | OPC UA PubSub |
270
+ | `openflow` | OpenFlow |
271
+ | `openvpn` | OpenVPN Protocol |
272
+ | `ospf` | Open Shortest Path First |
273
+ | `pcworx` | PCWorx |
274
+ | `pgsql` | PostgreSQL Protocol |
275
+ | `pim` | Protocol Independent Multicast |
276
+ | `pnio` | PROFINET Real-Time |
277
+ | `pop3` | Post Office Protocol v3 |
278
+ | `powerlink` | Ethernet POWERLINK |
279
+ | `pppoe-disc` | PPP-over-Ethernet Discovery |
280
+ | `pppoe-sess` | PPP-over-Ethernet Session |
281
+ | `pptp` | Point-to-Point Tunnelling Protocol |
282
+ | `ptp` | Precision Time Protocol |
283
+ | `quic` | QUIC Transport |
284
+ | `r-session` | IEC 61850-90-5 Session |
285
+ | `radius` | Remote Authentication Dial-In User Service |
286
+ | `raw` | Raw Data |
287
+ | `rdp` | Remote Desktop Protocol |
288
+ | `redis` | Redis Serialization Protocol |
289
+ | `rfb` | RFB (VNC) |
290
+ | `rip` | Routing Information Protocol |
291
+ | `ripng` | RIP for IPv6 |
292
+ | `rlogin` | Rlogin |
293
+ | `rmcp` | Remote Management Control Protocol |
294
+ | `rsvp` | Resource ReSerVation Protocol |
295
+ | `rsync` | Rsync Daemon Protocol |
296
+ | `rtcp` | RTP Control Protocol |
297
+ | `rtp` | Real-time Transport Protocol |
298
+ | `rtps` | Real-Time Publish-Subscribe Wire Protocol |
299
+ | `rtsp` | Real Time Streaming Protocol |
300
+ | `s7comm` | S7 Communication |
301
+ | `sctp` | Stream Control Transmission Protocol |
302
+ | `sercos3` | Sercos III |
303
+ | `sflow` | sFlow v5 |
304
+ | `sip` | Session Initiation Protocol |
305
+ | `skinny` | Skinny Client Control Protocol |
306
+ | `slmp` | SeamLess Message Protocol |
307
+ | `slp` | Service Location Protocol |
308
+ | `slpv1` | Service Location Protocol Version 1 |
309
+ | `smb1` | SMB1 |
310
+ | `smb2` | SMB2 |
311
+ | `smpp` | Short Message Peer-to-Peer |
312
+ | `smtp` | Simple Mail Transfer Protocol |
313
+ | `snap` | Sub-Network Access Protocol |
314
+ | `snmp` | Simple Network Management Protocol |
315
+ | `socks4` | SOCKS4 |
316
+ | `socks5` | SOCKS5 |
317
+ | `ssdp` | Simple Service Discovery Protocol |
318
+ | `ssh` | SSH |
319
+ | `statsd` | StatsD Metrics Protocol |
320
+ | `stomp` | Simple Text Oriented Messaging Protocol |
321
+ | `stp` | Spanning Tree Protocol |
322
+ | `stun` | Session Traversal Utilities for NAT |
323
+ | `sunrpc` | ONC RPC |
324
+ | `sv` | IEC61850 Sampled Values |
325
+ | `syslog` | Syslog |
326
+ | `tacacs` | TACACS+ |
327
+ | `tcp` | Transmission Control Protocol |
328
+ | `telnet` | Telnet |
329
+ | `teredo` | Teredo IPv6 over UDP tunneling |
330
+ | `tftp` | Trivial File Transfer Protocol |
331
+ | `timeproto` | Time Protocol |
332
+ | `tls-alert` | Transport Layer Security(Alert Protocol) |
333
+ | `tls-appdata` | Transport Layer Security(Application Data Protocol) |
334
+ | `tls-ccsp` | Transport Layer Security(ChangeCipherSpec Protocol) |
335
+ | `tls-handshake` | Transport Layer Security(Handshake Protocol) |
336
+ | `tls-heartbeat` | Transport Layer Security(Heartbeat Protocol) |
337
+ | `tpkt` | TPKT |
338
+ | `udp` | User Datagram Protocol |
339
+ | `vlan` | 802.1Q Virtual LAN |
340
+ | `vrrp` | Virtual Router Redundancy Protocol |
341
+ | `vxlan` | Virtual eXtensible Local Area Network |
342
+ | `wccp` | Web Cache Communication Protocol |
343
+ | `whois` | WHOIS |
344
+ | `wireguard` | WireGuard |
345
+ | `wol` | Wake-on-LAN |
346
+ | `wsdiscovery` | Web Services Dynamic Discovery |
347
+ | `xmpp` | Extensible Messaging and Presence Protocol |
348
+ | `zabbix` | Zabbix Protocol |
349
+
350
+ ## License
351
+
352
+ MIT