@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.
- package/CHANGELOG.md +17 -0
- package/LICENSE +21 -0
- package/README.md +352 -0
- package/README.zh-CN.md +342 -0
- package/dist/Codec.d.ts +133 -0
- package/dist/Codec.js +632 -0
- package/dist/PacketHeaders.d.ts +189 -0
- package/dist/PacketHeaders.js +384 -0
- package/dist/abstracts/BaseHeader.d.ts +325 -0
- package/dist/abstracts/BaseHeader.js +734 -0
- package/dist/errors/CodecSchemaValidateError.d.ts +4 -0
- package/dist/errors/CodecSchemaValidateError.js +11 -0
- package/dist/headers/ADSAMS.d.ts +33 -0
- package/dist/headers/ADSAMS.js +208 -0
- package/dist/headers/AH.d.ts +28 -0
- package/dist/headers/AH.js +137 -0
- package/dist/headers/AMQP.d.ts +31 -0
- package/dist/headers/AMQP.js +316 -0
- package/dist/headers/ARP.d.ts +26 -0
- package/dist/headers/ARP.js +243 -0
- package/dist/headers/BACnetIP.d.ts +27 -0
- package/dist/headers/BACnetIP.js +97 -0
- package/dist/headers/BFD.d.ts +28 -0
- package/dist/headers/BFD.js +155 -0
- package/dist/headers/BGP.d.ts +27 -0
- package/dist/headers/BGP.js +111 -0
- package/dist/headers/BSAPIP.d.ts +33 -0
- package/dist/headers/BSAPIP.js +78 -0
- package/dist/headers/Babel.d.ts +32 -0
- package/dist/headers/Babel.js +224 -0
- package/dist/headers/BitTorrent.d.ts +28 -0
- package/dist/headers/BitTorrent.js +72 -0
- package/dist/headers/C37118.d.ts +26 -0
- package/dist/headers/C37118.js +147 -0
- package/dist/headers/CAPWAP.d.ts +38 -0
- package/dist/headers/CAPWAP.js +275 -0
- package/dist/headers/CDP.d.ts +25 -0
- package/dist/headers/CDP.js +117 -0
- package/dist/headers/CMS.d.ts +33 -0
- package/dist/headers/CMS.js +238 -0
- package/dist/headers/COTP.d.ts +30 -0
- package/dist/headers/COTP.js +193 -0
- package/dist/headers/CassandraCQL.d.ts +28 -0
- package/dist/headers/CassandraCQL.js +117 -0
- package/dist/headers/CoAP.d.ts +29 -0
- package/dist/headers/CoAP.js +140 -0
- package/dist/headers/Codesys.d.ts +32 -0
- package/dist/headers/Codesys.js +119 -0
- package/dist/headers/Collectd.d.ts +29 -0
- package/dist/headers/Collectd.js +154 -0
- package/dist/headers/DCCP.d.ts +30 -0
- package/dist/headers/DCCP.js +204 -0
- package/dist/headers/DHCP.d.ts +26 -0
- package/dist/headers/DHCP.js +148 -0
- package/dist/headers/DHCPFailover.d.ts +30 -0
- package/dist/headers/DHCPFailover.js +104 -0
- package/dist/headers/DHCPv6.d.ts +25 -0
- package/dist/headers/DHCPv6.js +145 -0
- package/dist/headers/DNP3.d.ts +27 -0
- package/dist/headers/DNP3.js +150 -0
- package/dist/headers/DNS.d.ts +55 -0
- package/dist/headers/DNS.js +309 -0
- package/dist/headers/DTLS.d.ts +33 -0
- package/dist/headers/DTLS.js +142 -0
- package/dist/headers/Diameter.d.ts +34 -0
- package/dist/headers/Diameter.js +229 -0
- package/dist/headers/EAPOL.d.ts +32 -0
- package/dist/headers/EAPOL.js +135 -0
- package/dist/headers/EIGRP.d.ts +28 -0
- package/dist/headers/EIGRP.js +165 -0
- package/dist/headers/ENIP.d.ts +31 -0
- package/dist/headers/ENIP.js +164 -0
- package/dist/headers/ESP.d.ts +27 -0
- package/dist/headers/ESP.js +140 -0
- package/dist/headers/Elasticsearch.d.ts +30 -0
- package/dist/headers/Elasticsearch.js +125 -0
- package/dist/headers/EtherCAT.d.ts +35 -0
- package/dist/headers/EtherCAT.js +150 -0
- package/dist/headers/EthernetII.d.ts +28 -0
- package/dist/headers/EthernetII.js +117 -0
- package/dist/headers/FCoE.d.ts +38 -0
- package/dist/headers/FCoE.js +210 -0
- package/dist/headers/FTP.d.ts +34 -0
- package/dist/headers/FTP.js +158 -0
- package/dist/headers/Finger.d.ts +41 -0
- package/dist/headers/Finger.js +135 -0
- package/dist/headers/FoundationFieldbusHSE.d.ts +43 -0
- package/dist/headers/FoundationFieldbusHSE.js +163 -0
- package/dist/headers/GELF.d.ts +35 -0
- package/dist/headers/GELF.js +261 -0
- package/dist/headers/GENEVE.d.ts +26 -0
- package/dist/headers/GENEVE.js +209 -0
- package/dist/headers/GESRTP.d.ts +32 -0
- package/dist/headers/GESRTP.js +141 -0
- package/dist/headers/GLBP.d.ts +29 -0
- package/dist/headers/GLBP.js +159 -0
- package/dist/headers/GRE.d.ts +27 -0
- package/dist/headers/GRE.js +181 -0
- package/dist/headers/GTPU.d.ts +25 -0
- package/dist/headers/GTPU.js +203 -0
- package/dist/headers/GTPv2C.d.ts +30 -0
- package/dist/headers/GTPv2C.js +281 -0
- package/dist/headers/GitProtocol.d.ts +34 -0
- package/dist/headers/GitProtocol.js +141 -0
- package/dist/headers/Goose.d.ts +115 -0
- package/dist/headers/Goose.js +1067 -0
- package/dist/headers/Gopher.d.ts +43 -0
- package/dist/headers/Gopher.js +182 -0
- package/dist/headers/HARTIP.d.ts +30 -0
- package/dist/headers/HARTIP.js +145 -0
- package/dist/headers/HSR.d.ts +27 -0
- package/dist/headers/HSR.js +105 -0
- package/dist/headers/HSRP.d.ts +26 -0
- package/dist/headers/HSRP.js +173 -0
- package/dist/headers/HTTP.d.ts +32 -0
- package/dist/headers/HTTP.js +153 -0
- package/dist/headers/HTTP2.d.ts +34 -0
- package/dist/headers/HTTP2.js +190 -0
- package/dist/headers/IAX2.d.ts +33 -0
- package/dist/headers/IAX2.js +274 -0
- package/dist/headers/ICMP.d.ts +15 -0
- package/dist/headers/ICMP.js +148 -0
- package/dist/headers/ICMPv6.d.ts +15 -0
- package/dist/headers/ICMPv6.js +129 -0
- package/dist/headers/IEC104_I_Frame.d.ts +23 -0
- package/dist/headers/IEC104_I_Frame.js +6489 -0
- package/dist/headers/IEC104_S_Frame.d.ts +26 -0
- package/dist/headers/IEC104_S_Frame.js +135 -0
- package/dist/headers/IEC104_U_Frame.d.ts +27 -0
- package/dist/headers/IEC104_U_Frame.js +176 -0
- package/dist/headers/IEC61850SampledValues.d.ts +20 -0
- package/dist/headers/IEC61850SampledValues.js +420 -0
- package/dist/headers/IGMP.d.ts +31 -0
- package/dist/headers/IGMP.js +274 -0
- package/dist/headers/IMAP.d.ts +32 -0
- package/dist/headers/IMAP.js +185 -0
- package/dist/headers/IPFIX.d.ts +29 -0
- package/dist/headers/IPFIX.js +156 -0
- package/dist/headers/IPv4.d.ts +20 -0
- package/dist/headers/IPv4.js +370 -0
- package/dist/headers/IPv6.d.ts +29 -0
- package/dist/headers/IPv6.js +209 -0
- package/dist/headers/IPv6HopByHopOptions.d.ts +81 -0
- package/dist/headers/IPv6HopByHopOptions.js +495 -0
- package/dist/headers/IRC.d.ts +34 -0
- package/dist/headers/IRC.js +175 -0
- package/dist/headers/ISAKMP.d.ts +29 -0
- package/dist/headers/ISAKMP.js +197 -0
- package/dist/headers/ISCSI.d.ts +39 -0
- package/dist/headers/ISCSI.js +289 -0
- package/dist/headers/ISIS.d.ts +25 -0
- package/dist/headers/ISIS.js +79 -0
- package/dist/headers/ISOSession.d.ts +27 -0
- package/dist/headers/ISOSession.js +343 -0
- package/dist/headers/Ident.d.ts +42 -0
- package/dist/headers/Ident.js +184 -0
- package/dist/headers/KNXnetIP.d.ts +30 -0
- package/dist/headers/KNXnetIP.js +135 -0
- package/dist/headers/Kafka.d.ts +35 -0
- package/dist/headers/Kafka.js +128 -0
- package/dist/headers/Kerberos.d.ts +30 -0
- package/dist/headers/Kerberos.js +217 -0
- package/dist/headers/L2TP.d.ts +26 -0
- package/dist/headers/L2TP.js +297 -0
- package/dist/headers/LACP.d.ts +31 -0
- package/dist/headers/LACP.js +151 -0
- package/dist/headers/LDAP.d.ts +31 -0
- package/dist/headers/LDAP.js +226 -0
- package/dist/headers/LDP.d.ts +31 -0
- package/dist/headers/LDP.js +138 -0
- package/dist/headers/LISP.d.ts +30 -0
- package/dist/headers/LISP.js +103 -0
- package/dist/headers/LLC.d.ts +27 -0
- package/dist/headers/LLC.js +81 -0
- package/dist/headers/LLDP.d.ts +26 -0
- package/dist/headers/LLDP.js +126 -0
- package/dist/headers/LLMNR.d.ts +23 -0
- package/dist/headers/LLMNR.js +40 -0
- package/dist/headers/LPD.d.ts +31 -0
- package/dist/headers/LPD.js +159 -0
- package/dist/headers/MACsec.d.ts +34 -0
- package/dist/headers/MACsec.js +178 -0
- package/dist/headers/MDNS.d.ts +26 -0
- package/dist/headers/MDNS.js +45 -0
- package/dist/headers/MGCP.d.ts +30 -0
- package/dist/headers/MGCP.js +155 -0
- package/dist/headers/MMS.d.ts +29 -0
- package/dist/headers/MMS.js +243 -0
- package/dist/headers/MPLS.d.ts +31 -0
- package/dist/headers/MPLS.js +145 -0
- package/dist/headers/MQTT.d.ts +30 -0
- package/dist/headers/MQTT.js +173 -0
- package/dist/headers/MQTTSN.d.ts +34 -0
- package/dist/headers/MQTTSN.js +177 -0
- package/dist/headers/MarkerProtocol.d.ts +32 -0
- package/dist/headers/MarkerProtocol.js +153 -0
- package/dist/headers/Megaco.d.ts +32 -0
- package/dist/headers/Megaco.js +144 -0
- package/dist/headers/Memcached.d.ts +44 -0
- package/dist/headers/Memcached.js +285 -0
- package/dist/headers/ModbusTCP.d.ts +25 -0
- package/dist/headers/ModbusTCP.js +99 -0
- package/dist/headers/ModbusUDP.d.ts +26 -0
- package/dist/headers/ModbusUDP.js +100 -0
- package/dist/headers/MongoDB.d.ts +33 -0
- package/dist/headers/MongoDB.js +143 -0
- package/dist/headers/MySQL.d.ts +30 -0
- package/dist/headers/MySQL.js +114 -0
- package/dist/headers/NATS.d.ts +29 -0
- package/dist/headers/NATS.js +135 -0
- package/dist/headers/NBDS.d.ts +34 -0
- package/dist/headers/NBDS.js +176 -0
- package/dist/headers/NBNS.d.ts +34 -0
- package/dist/headers/NBNS.js +78 -0
- package/dist/headers/NBSS.d.ts +36 -0
- package/dist/headers/NBSS.js +137 -0
- package/dist/headers/NFS.d.ts +36 -0
- package/dist/headers/NFS.js +273 -0
- package/dist/headers/NHRP.d.ts +32 -0
- package/dist/headers/NHRP.js +154 -0
- package/dist/headers/NNTP.d.ts +35 -0
- package/dist/headers/NNTP.js +162 -0
- package/dist/headers/NTP.d.ts +18 -0
- package/dist/headers/NTP.js +73 -0
- package/dist/headers/NetFlowV5.d.ts +28 -0
- package/dist/headers/NetFlowV5.js +205 -0
- package/dist/headers/OLSR.d.ts +31 -0
- package/dist/headers/OLSR.js +213 -0
- package/dist/headers/OPCUA.d.ts +33 -0
- package/dist/headers/OPCUA.js +165 -0
- package/dist/headers/OPCUAPubSub.d.ts +33 -0
- package/dist/headers/OPCUAPubSub.js +144 -0
- package/dist/headers/OSPF.d.ts +31 -0
- package/dist/headers/OSPF.js +365 -0
- package/dist/headers/OmronFINS.d.ts +31 -0
- package/dist/headers/OmronFINS.js +90 -0
- package/dist/headers/OpenFlow.d.ts +30 -0
- package/dist/headers/OpenFlow.js +113 -0
- package/dist/headers/OpenVPN.d.ts +35 -0
- package/dist/headers/OpenVPN.js +214 -0
- package/dist/headers/PCWorx.d.ts +35 -0
- package/dist/headers/PCWorx.js +115 -0
- package/dist/headers/PIM.d.ts +27 -0
- package/dist/headers/PIM.js +129 -0
- package/dist/headers/POP3.d.ts +31 -0
- package/dist/headers/POP3.js +152 -0
- package/dist/headers/POWERLINK.d.ts +28 -0
- package/dist/headers/POWERLINK.js +116 -0
- package/dist/headers/PPPoEDiscovery.d.ts +29 -0
- package/dist/headers/PPPoEDiscovery.js +198 -0
- package/dist/headers/PPPoESession.d.ts +28 -0
- package/dist/headers/PPPoESession.js +125 -0
- package/dist/headers/PPTP.d.ts +30 -0
- package/dist/headers/PPTP.js +122 -0
- package/dist/headers/PROFINETRT.d.ts +28 -0
- package/dist/headers/PROFINETRT.js +74 -0
- package/dist/headers/PTP.d.ts +34 -0
- package/dist/headers/PTP.js +213 -0
- package/dist/headers/PostgreSQL.d.ts +40 -0
- package/dist/headers/PostgreSQL.js +236 -0
- package/dist/headers/QUIC.d.ts +34 -0
- package/dist/headers/QUIC.js +308 -0
- package/dist/headers/RADIUS.d.ts +24 -0
- package/dist/headers/RADIUS.js +138 -0
- package/dist/headers/RDP.d.ts +27 -0
- package/dist/headers/RDP.js +93 -0
- package/dist/headers/RFB.d.ts +39 -0
- package/dist/headers/RFB.js +151 -0
- package/dist/headers/RGoose.d.ts +72 -0
- package/dist/headers/RGoose.js +340 -0
- package/dist/headers/RIP.d.ts +29 -0
- package/dist/headers/RIP.js +133 -0
- package/dist/headers/RIPng.d.ts +26 -0
- package/dist/headers/RIPng.js +140 -0
- package/dist/headers/RMCP.d.ts +26 -0
- package/dist/headers/RMCP.js +155 -0
- package/dist/headers/RSVP.d.ts +31 -0
- package/dist/headers/RSVP.js +263 -0
- package/dist/headers/RTCP.d.ts +34 -0
- package/dist/headers/RTCP.js +217 -0
- package/dist/headers/RTP.d.ts +33 -0
- package/dist/headers/RTP.js +291 -0
- package/dist/headers/RTPS.d.ts +33 -0
- package/dist/headers/RTPS.js +182 -0
- package/dist/headers/RTSP.d.ts +36 -0
- package/dist/headers/RTSP.js +184 -0
- package/dist/headers/RawData.d.ts +17 -0
- package/dist/headers/RawData.js +43 -0
- package/dist/headers/Redis.d.ts +32 -0
- package/dist/headers/Redis.js +202 -0
- package/dist/headers/Rlogin.d.ts +42 -0
- package/dist/headers/Rlogin.js +139 -0
- package/dist/headers/Rsync.d.ts +28 -0
- package/dist/headers/Rsync.js +117 -0
- package/dist/headers/S7comm.d.ts +36 -0
- package/dist/headers/S7comm.js +244 -0
- package/dist/headers/SCTP.d.ts +35 -0
- package/dist/headers/SCTP.js +174 -0
- package/dist/headers/SFlow.d.ts +29 -0
- package/dist/headers/SFlow.js +242 -0
- package/dist/headers/SIP.d.ts +27 -0
- package/dist/headers/SIP.js +146 -0
- package/dist/headers/SLMP.d.ts +36 -0
- package/dist/headers/SLMP.js +154 -0
- package/dist/headers/SLP.d.ts +30 -0
- package/dist/headers/SLP.js +207 -0
- package/dist/headers/SLPv1.d.ts +32 -0
- package/dist/headers/SLPv1.js +138 -0
- package/dist/headers/SMB1.d.ts +37 -0
- package/dist/headers/SMB1.js +200 -0
- package/dist/headers/SMB2.d.ts +36 -0
- package/dist/headers/SMB2.js +203 -0
- package/dist/headers/SMPP.d.ts +33 -0
- package/dist/headers/SMPP.js +119 -0
- package/dist/headers/SMTP.d.ts +33 -0
- package/dist/headers/SMTP.js +157 -0
- package/dist/headers/SNAP.d.ts +22 -0
- package/dist/headers/SNAP.js +68 -0
- package/dist/headers/SNMP.d.ts +28 -0
- package/dist/headers/SNMP.js +302 -0
- package/dist/headers/SOCKS4.d.ts +42 -0
- package/dist/headers/SOCKS4.js +302 -0
- package/dist/headers/SOCKS5.d.ts +45 -0
- package/dist/headers/SOCKS5.js +223 -0
- package/dist/headers/SSDP.d.ts +27 -0
- package/dist/headers/SSDP.js +161 -0
- package/dist/headers/SSH.d.ts +44 -0
- package/dist/headers/SSH.js +274 -0
- package/dist/headers/STOMP.d.ts +48 -0
- package/dist/headers/STOMP.js +177 -0
- package/dist/headers/STP.d.ts +26 -0
- package/dist/headers/STP.js +150 -0
- package/dist/headers/STUN.d.ts +25 -0
- package/dist/headers/STUN.js +183 -0
- package/dist/headers/SercosIII.d.ts +43 -0
- package/dist/headers/SercosIII.js +199 -0
- package/dist/headers/Skinny.d.ts +32 -0
- package/dist/headers/Skinny.js +139 -0
- package/dist/headers/StatsD.d.ts +27 -0
- package/dist/headers/StatsD.js +134 -0
- package/dist/headers/SunRPC.d.ts +34 -0
- package/dist/headers/SunRPC.js +268 -0
- package/dist/headers/Syslog.d.ts +21 -0
- package/dist/headers/Syslog.js +91 -0
- package/dist/headers/TCP.d.ts +19 -0
- package/dist/headers/TCP.js +905 -0
- package/dist/headers/TFTP.d.ts +28 -0
- package/dist/headers/TFTP.js +224 -0
- package/dist/headers/TLS_Alert.d.ts +24 -0
- package/dist/headers/TLS_Alert.js +639 -0
- package/dist/headers/TLS_ApplicationData.d.ts +24 -0
- package/dist/headers/TLS_ApplicationData.js +170 -0
- package/dist/headers/TLS_ChangeCipherSpec.d.ts +23 -0
- package/dist/headers/TLS_ChangeCipherSpec.js +168 -0
- package/dist/headers/TLS_Handshake.d.ts +65 -0
- package/dist/headers/TLS_Handshake.js +860 -0
- package/dist/headers/TLS_Heartbeat.d.ts +27 -0
- package/dist/headers/TLS_Heartbeat.js +247 -0
- package/dist/headers/TPKT.d.ts +26 -0
- package/dist/headers/TPKT.js +99 -0
- package/dist/headers/TacacsPlus.d.ts +27 -0
- package/dist/headers/TacacsPlus.js +133 -0
- package/dist/headers/Telnet.d.ts +40 -0
- package/dist/headers/Telnet.js +193 -0
- package/dist/headers/Teredo.d.ts +40 -0
- package/dist/headers/Teredo.js +251 -0
- package/dist/headers/TimeProtocol.d.ts +25 -0
- package/dist/headers/TimeProtocol.js +53 -0
- package/dist/headers/UDP.d.ts +19 -0
- package/dist/headers/UDP.js +171 -0
- package/dist/headers/VLAN_802dot1Q.d.ts +24 -0
- package/dist/headers/VLAN_802dot1Q.js +96 -0
- package/dist/headers/VRRP.d.ts +26 -0
- package/dist/headers/VRRP.js +309 -0
- package/dist/headers/VXLAN.d.ts +24 -0
- package/dist/headers/VXLAN.js +75 -0
- package/dist/headers/WCCP.d.ts +29 -0
- package/dist/headers/WCCP.js +117 -0
- package/dist/headers/WHOIS.d.ts +37 -0
- package/dist/headers/WHOIS.js +126 -0
- package/dist/headers/WSDiscovery.d.ts +29 -0
- package/dist/headers/WSDiscovery.js +118 -0
- package/dist/headers/WakeOnLAN.d.ts +30 -0
- package/dist/headers/WakeOnLAN.js +126 -0
- package/dist/headers/WebSocket.d.ts +26 -0
- package/dist/headers/WebSocket.js +173 -0
- package/dist/headers/WireGuard.d.ts +38 -0
- package/dist/headers/WireGuard.js +216 -0
- package/dist/headers/XMPP.d.ts +37 -0
- package/dist/headers/XMPP.js +149 -0
- package/dist/headers/Zabbix.d.ts +35 -0
- package/dist/headers/Zabbix.js +153 -0
- package/dist/headers/cms/AcsiPdu.d.ts +45 -0
- package/dist/headers/cms/AcsiPdu.js +112 -0
- package/dist/headers/cms/PerDecoder.d.ts +68 -0
- package/dist/headers/cms/PerDecoder.js +211 -0
- package/dist/headers/cms/PerReader.d.ts +64 -0
- package/dist/headers/cms/PerReader.js +155 -0
- package/dist/helper/BufferToHex.d.ts +5 -0
- package/dist/helper/BufferToHex.js +10 -0
- package/dist/helper/BufferToIP.d.ts +12 -0
- package/dist/helper/BufferToIP.js +23 -0
- package/dist/helper/BufferToNumber.d.ts +18 -0
- package/dist/helper/BufferToNumber.js +47 -0
- package/dist/helper/HexToBuffer.d.ts +7 -0
- package/dist/helper/HexToBuffer.js +27 -0
- package/dist/helper/HexToNumber.d.ts +18 -0
- package/dist/helper/HexToNumber.js +48 -0
- package/dist/helper/IPToBuffer.d.ts +12 -0
- package/dist/helper/IPToBuffer.js +34 -0
- package/dist/helper/NumberToBERBuffer.d.ts +18 -0
- package/dist/helper/NumberToBERBuffer.js +31 -0
- package/dist/helper/NumberToBERHex.d.ts +18 -0
- package/dist/helper/NumberToBERHex.js +52 -0
- package/dist/helper/NumberToBuffer.d.ts +18 -0
- package/dist/helper/NumberToBuffer.js +38 -0
- package/dist/helper/NumberToHex.d.ts +18 -0
- package/dist/helper/NumberToHex.js +35 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +113 -0
- package/dist/lib/FlexibleObject.d.ts +27 -0
- package/dist/lib/FlexibleObject.js +113 -0
- package/dist/lib/GetBERIntegerLengthFromBuffer.d.ts +6 -0
- package/dist/lib/GetBERIntegerLengthFromBuffer.js +16 -0
- package/dist/lib/ProcessPacketPostHandlers.d.ts +13 -0
- package/dist/lib/ProcessPacketPostHandlers.js +53 -0
- package/dist/lib/SortPostHandlers.d.ts +7 -0
- package/dist/lib/SortPostHandlers.js +11 -0
- package/dist/lib/StringContentEncodingEnum.d.ts +10 -0
- package/dist/lib/StringContentEncodingEnum.js +14 -0
- package/dist/schema/ProtocolFieldJSONSchema.d.ts +35 -0
- package/dist/schema/ProtocolFieldJSONSchema.js +2 -0
- package/dist/schema/ProtocolFieldJSONSchemaDefinition.d.ts +2 -0
- package/dist/schema/ProtocolFieldJSONSchemaDefinition.js +2 -0
- package/dist/schema/ProtocolJSONSchema.d.ts +32 -0
- package/dist/schema/ProtocolJSONSchema.js +2 -0
- package/dist/types/CodecData.d.ts +7 -0
- package/dist/types/CodecData.js +2 -0
- package/dist/types/CodecDecodeResult.d.ts +10 -0
- package/dist/types/CodecDecodeResult.js +2 -0
- package/dist/types/CodecEncodeInput.d.ts +2 -0
- package/dist/types/CodecEncodeInput.js +2 -0
- package/dist/types/CodecEncodeResult.d.ts +5 -0
- package/dist/types/CodecEncodeResult.js +2 -0
- package/dist/types/CodecErrorInfo.d.ts +5 -0
- package/dist/types/CodecErrorInfo.js +2 -0
- package/dist/types/CodecModule.d.ts +2 -0
- package/dist/types/CodecModule.js +2 -0
- package/dist/types/CodecModuleConstructor.d.ts +2 -0
- package/dist/types/CodecModuleConstructor.js +2 -0
- package/dist/types/CodecSchema.d.ts +6 -0
- package/dist/types/CodecSchema.js +2 -0
- package/dist/types/DemuxProducer.d.ts +23 -0
- package/dist/types/DemuxProducer.js +2 -0
- package/dist/types/Dissection.d.ts +23 -0
- package/dist/types/Dissection.js +2 -0
- package/dist/types/HeaderTreeNode.d.ts +4 -0
- package/dist/types/HeaderTreeNode.js +2 -0
- package/dist/types/LayerGraph.d.ts +32 -0
- package/dist/types/LayerGraph.js +2 -0
- package/dist/types/PostHandlerItem.d.ts +4 -0
- package/dist/types/PostHandlerItem.js +2 -0
- package/package.json +141 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ProtocolJSONSchema } from '../schema/ProtocolJSONSchema';
|
|
2
|
+
import { BaseHeader } from '../abstracts/BaseHeader';
|
|
3
|
+
/**
|
|
4
|
+
* IEC 60870-5-104 S-format APCI — the "Supervisory" frame of IEC 104, which rides on TCP port 2404. Every
|
|
5
|
+
* IEC 104 APDU begins with a 6-octet APCI: an 8-bit Start byte (`startByte`, offset 0, always 0x68 / 104),
|
|
6
|
+
* an 8-bit APDU Length (`apduLength`, offset 1, the octet count that follows), and a 4-octet Control Field
|
|
7
|
+
* (`controlField`, offset 2, kept verbatim as hex — the authoritative bytes). This codec covers the
|
|
8
|
+
* S-format APDU, which carries no ASDU and exists only to acknowledge received I-frames: it additionally
|
|
9
|
+
* exposes, read-only, the 15-bit Receive Sequence Number N(R) (`rxSequence`, decoded from control octets
|
|
10
|
+
* 3-4 as a little-endian value right-shifted by 1) and an `apciType` label derived from the control-format
|
|
11
|
+
* bits (set to "S-Format").
|
|
12
|
+
*
|
|
13
|
+
* `rxSequence` and `apciType` are display projections over the same bytes; `controlField` stays the encode
|
|
14
|
+
* authority, so a captured frame round-trips byte-for-byte. In the heuristic chain (`heuristicFallback`),
|
|
15
|
+
* match() requires a TCP peer on port 2404, a Start byte of 104, and the control format bits to select
|
|
16
|
+
* S-format.
|
|
17
|
+
*/
|
|
18
|
+
export declare class IEC104_S_Frame extends BaseHeader {
|
|
19
|
+
SCHEMA: ProtocolJSONSchema;
|
|
20
|
+
id: string;
|
|
21
|
+
readonly matchKeys: string[];
|
|
22
|
+
readonly heuristicFallback: boolean;
|
|
23
|
+
name: string;
|
|
24
|
+
nickname: string;
|
|
25
|
+
match(): boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IEC104_S_Frame = void 0;
|
|
4
|
+
const BufferToNumber_1 = require("../helper/BufferToNumber");
|
|
5
|
+
const BufferToHex_1 = require("../helper/BufferToHex");
|
|
6
|
+
const HexToBuffer_1 = require("../helper/HexToBuffer");
|
|
7
|
+
const BaseHeader_1 = require("../abstracts/BaseHeader");
|
|
8
|
+
const NumberToBuffer_1 = require("../helper/NumberToBuffer");
|
|
9
|
+
/**
|
|
10
|
+
* IEC 60870-5-104 S-format APCI — the "Supervisory" frame of IEC 104, which rides on TCP port 2404. Every
|
|
11
|
+
* IEC 104 APDU begins with a 6-octet APCI: an 8-bit Start byte (`startByte`, offset 0, always 0x68 / 104),
|
|
12
|
+
* an 8-bit APDU Length (`apduLength`, offset 1, the octet count that follows), and a 4-octet Control Field
|
|
13
|
+
* (`controlField`, offset 2, kept verbatim as hex — the authoritative bytes). This codec covers the
|
|
14
|
+
* S-format APDU, which carries no ASDU and exists only to acknowledge received I-frames: it additionally
|
|
15
|
+
* exposes, read-only, the 15-bit Receive Sequence Number N(R) (`rxSequence`, decoded from control octets
|
|
16
|
+
* 3-4 as a little-endian value right-shifted by 1) and an `apciType` label derived from the control-format
|
|
17
|
+
* bits (set to "S-Format").
|
|
18
|
+
*
|
|
19
|
+
* `rxSequence` and `apciType` are display projections over the same bytes; `controlField` stays the encode
|
|
20
|
+
* authority, so a captured frame round-trips byte-for-byte. In the heuristic chain (`heuristicFallback`),
|
|
21
|
+
* match() requires a TCP peer on port 2404, a Start byte of 104, and the control format bits to select
|
|
22
|
+
* S-format.
|
|
23
|
+
*/
|
|
24
|
+
class IEC104_S_Frame extends BaseHeader_1.BaseHeader {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.SCHEMA = {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
startByte: {
|
|
31
|
+
type: 'integer',
|
|
32
|
+
label: 'Start Byte',
|
|
33
|
+
minimum: 0,
|
|
34
|
+
maximum: 255,
|
|
35
|
+
decode: () => {
|
|
36
|
+
this.instance.startByte.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(0, 1)));
|
|
37
|
+
},
|
|
38
|
+
encode: () => {
|
|
39
|
+
this.writeBytes(0, (0, NumberToBuffer_1.UInt8ToBuffer)(this.instance.startByte.getValue(0, (nodePath) => this.recordError(nodePath, 'Not Found'))));
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
apduLength: {
|
|
43
|
+
type: 'integer',
|
|
44
|
+
label: 'APDU Length',
|
|
45
|
+
minimum: 0,
|
|
46
|
+
maximum: 255,
|
|
47
|
+
decode: () => {
|
|
48
|
+
this.instance.apduLength.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(1, 1)));
|
|
49
|
+
},
|
|
50
|
+
encode: () => {
|
|
51
|
+
this.writeBytes(1, (0, NumberToBuffer_1.UInt8ToBuffer)(this.instance.apduLength.getValue(0, (nodePath) => this.recordError(nodePath, 'Not Found'))));
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
controlField: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
label: 'Control Field',
|
|
57
|
+
decode: () => {
|
|
58
|
+
this.instance.controlField.setValue((0, BufferToHex_1.BufferToHex)(this.readBytes(2, 4)));
|
|
59
|
+
},
|
|
60
|
+
encode: () => {
|
|
61
|
+
this.writeBytes(2, (0, HexToBuffer_1.HexToBuffer)(this.instance.controlField.getValue('0', (nodePath) => this.recordError(nodePath, 'Not Found'))));
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
//Receive sequence number N(R): a 15-bit value in control octets 3-4, stored
|
|
65
|
+
//little-endian and left-shifted by 1. Exposed read-only for analysis (S-frames exist
|
|
66
|
+
//precisely to acknowledge this sequence number); controlField holds the authoritative bytes.
|
|
67
|
+
rxSequence: {
|
|
68
|
+
type: 'integer',
|
|
69
|
+
label: 'Rx Sequence Number N(R)',
|
|
70
|
+
decode: () => {
|
|
71
|
+
this.instance.rxSequence.setValue(this.readBytes(4, 2).readUInt16LE() >> 1);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
apciType: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
label: 'APCI Type',
|
|
77
|
+
minimum: 0,
|
|
78
|
+
maximum: 3,
|
|
79
|
+
decode: () => {
|
|
80
|
+
const controlType = this.readBits(2, 1, 7, 1);
|
|
81
|
+
switch (controlType) {
|
|
82
|
+
case 1:
|
|
83
|
+
{
|
|
84
|
+
this.instance.apciType.setValue('S-Format');
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
default: {
|
|
88
|
+
this.recordError(this.instance.apciType.getPath(), 'Illegal acpiType!');
|
|
89
|
+
this.instance.apciType.setValue(controlType);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
encode: () => {
|
|
94
|
+
const controlType = this.instance.apciType.getValue('0', (nodePath) => this.recordError(nodePath, 'Not Found'));
|
|
95
|
+
switch (controlType) {
|
|
96
|
+
case 'S-Format':
|
|
97
|
+
{
|
|
98
|
+
this.writeBits(2, 1, 7, 1, 1);
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
default: {
|
|
102
|
+
this.writeBits(2, 1, 7, 1, this.instance.apciType.getValue(0, (nodePath) => this.recordError(nodePath, 'Not Found')));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
this.id = 'IEC104_S_Frame';
|
|
110
|
+
this.matchKeys = ['tcpport:2404'];
|
|
111
|
+
this.heuristicFallback = true;
|
|
112
|
+
this.name = 'IEC 60870-5-104';
|
|
113
|
+
this.nickname = 'iec60870_104';
|
|
114
|
+
}
|
|
115
|
+
match() {
|
|
116
|
+
if (!this.prevCodecModules)
|
|
117
|
+
return false;
|
|
118
|
+
//IEC 104 always rides on TCP port 2404 (see IEC104_I_Frame.match for rationale).
|
|
119
|
+
if (!this.prevCodecModules.some((module) => module.id === 'tcp' && (module.instance.srcport.getValue() === 2404 || module.instance.dstport.getValue() === 2404)))
|
|
120
|
+
return false;
|
|
121
|
+
if ((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(0, 1)) != 104)
|
|
122
|
+
return false;
|
|
123
|
+
const type = this.readBits(2, 1, 6, 2);
|
|
124
|
+
switch (type) {
|
|
125
|
+
case 1: {
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
default: {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
;
|
|
134
|
+
}
|
|
135
|
+
exports.IEC104_S_Frame = IEC104_S_Frame;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProtocolJSONSchema } from '../schema/ProtocolJSONSchema';
|
|
2
|
+
import { BaseHeader } from '../abstracts/BaseHeader';
|
|
3
|
+
/**
|
|
4
|
+
* IEC 60870-5-104 U-format APCI — the "Unnumbered" control frame of IEC 104, which rides on TCP port 2404.
|
|
5
|
+
* Like every IEC 104 APDU it begins with a 6-octet APCI: an 8-bit Start byte (`startByte`, offset 0,
|
|
6
|
+
* always 0x68 / 104), an 8-bit APDU Length (`apduLength`, offset 1), and a 4-octet Control Field
|
|
7
|
+
* (`controlField`, offset 2, kept verbatim as hex — the encode authority). U-format frames carry no ASDU
|
|
8
|
+
* and no sequence numbers; they signal link control. This codec decodes an `apciType` label by matching
|
|
9
|
+
* the whole 4-octet control field to one of the six defined U functions — Test Frame Activation
|
|
10
|
+
* (43000000) / Confirmation (83000000), Stop Data Transfer Activation (13000000) / Confirmation
|
|
11
|
+
* (23000000), and Start Data Transfer Activation (07000000) / Confirmation (0b000000) — and records an
|
|
12
|
+
* error while keeping the raw hex for any other value.
|
|
13
|
+
*
|
|
14
|
+
* On encode a recognized `apciType` label writes back its fixed 4-octet control word, else the verbatim
|
|
15
|
+
* hex is re-emitted, so a captured frame round-trips byte-for-byte. In the heuristic chain
|
|
16
|
+
* (`heuristicFallback`), match() requires a TCP peer on port 2404, a Start byte of 104, and the control
|
|
17
|
+
* format bits to select U-format.
|
|
18
|
+
*/
|
|
19
|
+
export declare class IEC104_U_Frame extends BaseHeader {
|
|
20
|
+
SCHEMA: ProtocolJSONSchema;
|
|
21
|
+
id: string;
|
|
22
|
+
readonly matchKeys: string[];
|
|
23
|
+
readonly heuristicFallback: boolean;
|
|
24
|
+
name: string;
|
|
25
|
+
nickname: string;
|
|
26
|
+
match(): boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IEC104_U_Frame = void 0;
|
|
4
|
+
const BufferToNumber_1 = require("../helper/BufferToNumber");
|
|
5
|
+
const BufferToHex_1 = require("../helper/BufferToHex");
|
|
6
|
+
const HexToBuffer_1 = require("../helper/HexToBuffer");
|
|
7
|
+
const BaseHeader_1 = require("../abstracts/BaseHeader");
|
|
8
|
+
const NumberToBuffer_1 = require("../helper/NumberToBuffer");
|
|
9
|
+
/**
|
|
10
|
+
* IEC 60870-5-104 U-format APCI — the "Unnumbered" control frame of IEC 104, which rides on TCP port 2404.
|
|
11
|
+
* Like every IEC 104 APDU it begins with a 6-octet APCI: an 8-bit Start byte (`startByte`, offset 0,
|
|
12
|
+
* always 0x68 / 104), an 8-bit APDU Length (`apduLength`, offset 1), and a 4-octet Control Field
|
|
13
|
+
* (`controlField`, offset 2, kept verbatim as hex — the encode authority). U-format frames carry no ASDU
|
|
14
|
+
* and no sequence numbers; they signal link control. This codec decodes an `apciType` label by matching
|
|
15
|
+
* the whole 4-octet control field to one of the six defined U functions — Test Frame Activation
|
|
16
|
+
* (43000000) / Confirmation (83000000), Stop Data Transfer Activation (13000000) / Confirmation
|
|
17
|
+
* (23000000), and Start Data Transfer Activation (07000000) / Confirmation (0b000000) — and records an
|
|
18
|
+
* error while keeping the raw hex for any other value.
|
|
19
|
+
*
|
|
20
|
+
* On encode a recognized `apciType` label writes back its fixed 4-octet control word, else the verbatim
|
|
21
|
+
* hex is re-emitted, so a captured frame round-trips byte-for-byte. In the heuristic chain
|
|
22
|
+
* (`heuristicFallback`), match() requires a TCP peer on port 2404, a Start byte of 104, and the control
|
|
23
|
+
* format bits to select U-format.
|
|
24
|
+
*/
|
|
25
|
+
class IEC104_U_Frame extends BaseHeader_1.BaseHeader {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.SCHEMA = {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
startByte: {
|
|
32
|
+
type: 'integer',
|
|
33
|
+
label: 'Start Byte',
|
|
34
|
+
minimum: 0,
|
|
35
|
+
maximum: 255,
|
|
36
|
+
decode: () => {
|
|
37
|
+
this.instance.startByte.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(0, 1)));
|
|
38
|
+
},
|
|
39
|
+
encode: () => {
|
|
40
|
+
this.writeBytes(0, (0, NumberToBuffer_1.UInt8ToBuffer)(this.instance.startByte.getValue(0, (nodePath) => this.recordError(nodePath, 'Not Found'))));
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
apduLength: {
|
|
44
|
+
type: 'integer',
|
|
45
|
+
label: 'APDU Length',
|
|
46
|
+
minimum: 0,
|
|
47
|
+
maximum: 255,
|
|
48
|
+
decode: () => {
|
|
49
|
+
this.instance.apduLength.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(1, 1)));
|
|
50
|
+
},
|
|
51
|
+
encode: () => {
|
|
52
|
+
this.writeBytes(1, (0, NumberToBuffer_1.UInt8ToBuffer)(this.instance.apduLength.getValue(0, (nodePath) => this.recordError(nodePath, 'Not Found'))));
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
controlField: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
label: 'Control Field',
|
|
58
|
+
decode: () => {
|
|
59
|
+
this.instance.controlField.setValue((0, BufferToHex_1.BufferToHex)(this.readBytes(2, 4)));
|
|
60
|
+
},
|
|
61
|
+
encode: () => {
|
|
62
|
+
this.writeBytes(2, (0, HexToBuffer_1.HexToBuffer)(this.instance.controlField.getValue('0', (nodePath) => this.recordError(nodePath, 'Not Found'))));
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
apciType: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
label: 'APCI Type',
|
|
68
|
+
minimum: 0,
|
|
69
|
+
maximum: 3,
|
|
70
|
+
decode: () => {
|
|
71
|
+
const uframeType = (0, BufferToHex_1.BufferToHex)(this.readBytes(2, 4));
|
|
72
|
+
switch (uframeType) {
|
|
73
|
+
case '43000000':
|
|
74
|
+
{
|
|
75
|
+
this.instance.apciType.setValue('U-Format Type:Test Frame Activation');
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
case '83000000':
|
|
79
|
+
{
|
|
80
|
+
this.instance.apciType.setValue('U-Format Type:Test Frame Confirmation');
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
case '13000000':
|
|
84
|
+
{
|
|
85
|
+
this.instance.apciType.setValue('U-Format Type:Stop Data Transfer Activation');
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case '23000000':
|
|
89
|
+
{
|
|
90
|
+
this.instance.apciType.setValue('U-Format Type:Stop Data Transfer Confirmation');
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
case '07000000':
|
|
94
|
+
{
|
|
95
|
+
this.instance.apciType.setValue('U-Format Type:Start Data Transfer Activation');
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case '0b000000':
|
|
99
|
+
{
|
|
100
|
+
this.instance.apciType.setValue('U-Format Type:Start Data Transfer Confirmation');
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
default: {
|
|
104
|
+
this.recordError(this.instance.apciType.getPath(), 'Illegal acpiType!');
|
|
105
|
+
this.instance.apciType.setValue(uframeType);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
encode: () => {
|
|
110
|
+
const controlType = this.instance.apciType.getValue('0', (nodePath) => this.recordError(nodePath, 'Not Found'));
|
|
111
|
+
switch (controlType) {
|
|
112
|
+
case 'U-Format Type:Test Frame Activation':
|
|
113
|
+
{
|
|
114
|
+
this.writeBytes(2, (0, NumberToBuffer_1.UInt32ToBuffer)(1124073472));
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
case 'U-Format Type:Test Frame Confirmation':
|
|
118
|
+
{
|
|
119
|
+
this.writeBytes(2, (0, NumberToBuffer_1.UInt32ToBuffer)(2197815296));
|
|
120
|
+
}
|
|
121
|
+
break;
|
|
122
|
+
case 'U-Format Type:Stop Data Transfer Activation':
|
|
123
|
+
{
|
|
124
|
+
this.writeBytes(2, (0, NumberToBuffer_1.UInt32ToBuffer)(318767104));
|
|
125
|
+
}
|
|
126
|
+
break;
|
|
127
|
+
case 'U-Format Type:Stop Data Transfer Confirmation':
|
|
128
|
+
{
|
|
129
|
+
this.writeBytes(2, (0, NumberToBuffer_1.UInt32ToBuffer)(587202560));
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
case 'U-Format Type:Start Data Transfer Activation':
|
|
133
|
+
{
|
|
134
|
+
this.writeBytes(2, (0, NumberToBuffer_1.UInt32ToBuffer)(117440512));
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
case 'U-Format Type:Start Data Transfer Confirmation':
|
|
138
|
+
{
|
|
139
|
+
this.writeBytes(2, (0, NumberToBuffer_1.UInt32ToBuffer)(184549376));
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
default: {
|
|
143
|
+
this.writeBytes(2, (0, HexToBuffer_1.HexToBuffer)(this.instance.apciType.getValue('0', (nodePath) => this.recordError(nodePath, 'Not Found'))));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
this.id = 'IEC104_U_Frame';
|
|
151
|
+
this.matchKeys = ['tcpport:2404'];
|
|
152
|
+
this.heuristicFallback = true;
|
|
153
|
+
this.name = 'IEC 60870-5-104';
|
|
154
|
+
this.nickname = 'iec60870_104';
|
|
155
|
+
}
|
|
156
|
+
match() {
|
|
157
|
+
if (!this.prevCodecModules)
|
|
158
|
+
return false;
|
|
159
|
+
//IEC 104 always rides on TCP port 2404 (see IEC104_I_Frame.match for rationale).
|
|
160
|
+
if (!this.prevCodecModules.some((module) => module.id === 'tcp' && (module.instance.srcport.getValue() === 2404 || module.instance.dstport.getValue() === 2404)))
|
|
161
|
+
return false;
|
|
162
|
+
if ((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(0, 1)) != 104)
|
|
163
|
+
return false;
|
|
164
|
+
const type = this.readBits(2, 1, 6, 2);
|
|
165
|
+
switch (type) {
|
|
166
|
+
case 3: {
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
default: {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
;
|
|
175
|
+
}
|
|
176
|
+
exports.IEC104_U_Frame = IEC104_U_Frame;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ProtocolJSONSchema } from '../schema/ProtocolJSONSchema';
|
|
2
|
+
import { BaseHeader } from '../abstracts/BaseHeader';
|
|
3
|
+
import TLV from 'node-tlv';
|
|
4
|
+
export declare class IEC61850SampledValues extends BaseHeader {
|
|
5
|
+
protected TLVInstance: TLV;
|
|
6
|
+
protected TLVChild: TLV[];
|
|
7
|
+
/**
|
|
8
|
+
* True when decode preserved an unparsed raw svPdu region and the caller has not
|
|
9
|
+
* supplied any structured PDU content. In that state encode re-emits the raw bytes
|
|
10
|
+
* verbatim (faithful passthrough of a malformed capture); the moment a structured
|
|
11
|
+
* field is set, this turns false and encode rebuilds the PDU from fields instead.
|
|
12
|
+
*/
|
|
13
|
+
protected svPduRawFallbackActive(): boolean;
|
|
14
|
+
SCHEMA: ProtocolJSONSchema;
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly matchKeys: string[];
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly nickname: string;
|
|
19
|
+
match(): boolean;
|
|
20
|
+
}
|