Members
(readonly) ETHERTYPE :number
Enum for Ethernet child protocols.
Type:
Properties- number
Name | Type | Description |
---|---|---|
IP | number | Internet protocol |
ARP | number | Address resolution |
ETHBRIDGE | number | Transparent Ethernet Bridging |
REVARP | number | Reverse ARP |
AT | number | AppleTalk protocol |
AARP | number | AppleTalk ARP |
VLAN | number | IEEE 802.1Q VLAN tagging |
IPX | number | IPX |
IPV6 | number | IP protocol version 6 |
LOOPBACK | number | used to test interfaces |
PPPOED | number | PPPoE discovery |
PPPOES | number | PPPoE session |
MPLS | number | MPLS |
PPP | number | Point-to-point protocol (PPP) |
ROCEV1 | number | RDMA over Converged Ethernet (RoCEv1) |
IEEE_802_1AD | number | IEEE 802.1ad Provider Bridge, Q-in-Q |
WAKE_ON_LAN | number | Wake on LAN |
- Source
(readonly) IPProtocolTypes :number
Enum for IPv4 child protocols.
Type:
Properties- number
Name | Type | Description |
---|---|---|
IP | number | Dummy protocol for TCP |
HOPOPTS | number | IPv6 Hop-by-Hop options |
ICMP | number | Internet Control Message Protocol |
IGMP | number | Internet Gateway Management Protocol |
IPIP | number | IPIP tunnels (older KA9Q tunnels use 94) |
TCP | number | Transmission Control Protocol |
EGP | number | Exterior Gateway Protocol |
PUP | number | PUP protocol |
UDP | number | User Datagram Protocol |
IDP | number | XNS IDP protocol |
IPV6 | number | IPv6 header |
ROUTING | number | IPv6 Routing header |
FRAGMENT | number | IPv6 fragmentation header |
GRE | number | GRE protocol |
ESP | number | encapsulating security payload |
AH | number | authentication header |
ICMPV6 | number | ICMPv6 |
NONE | number | IPv6 no next header |
DSTOPTS | number | IPv6 Destination options |
VRRP | number | VRRP protocol |
RAW | number | Raw IP packets |
MAX | number | Maximum value |
- Source
(readonly) IPv4OptionTypes :number
Enum for IPv4 options.
Type:
Properties- number
Name | Type | Description |
---|---|---|
EndOfOptionsList | number | End of Options List |
NOP | number | No Operation |
RecordRoute | number | Record Route |
MTUProbe | number | MTU Probe |
MTUReply | number | MTU Reply |
QuickStart | number | Quick-Start |
Timestamp | number | Timestamp |
Traceroute | number | Traceroute |
Security | number | Security |
LooseSourceRoute | number | Loose Source Route |
ExtendedSecurity | number | Extended Security |
CommercialSecurity | number | Commercial Security |
StreamID | number | Stream ID |
StrictSourceRoute | number | Strict Source Route |
ExtendedInternetProtocol | number | Extended Internet Protocol |
AddressExtension | number | Address Extension |
RouterAlert | number | Router Alert |
SelectiveDirectedBroadcast | number | Selective Directed Broadcast |
DynamicPacketState | number | Dynamic Packet State |
UpstreamMulticastPkt | number | Upstream Multicast Pkt. |
Unknown | number | Unknown IPv4 option |
- Source
(constant) OsiModelLayers :number
Enum for OSI model layers.
Type:
Properties- number
Name | Type | Description |
---|---|---|
Physical | number | Physical layer (layer 1) |
DataLink | number | Data link layer (layer 2) |
Network | number | Network layer (layer 3) |
Transport | number | Transport layer (layer 4) |
Sesion | number | Session layer (layer 5) |
Presentation | number | Presentation layer (layer 6) |
Application | number | Application layer (layer 7) |
Unknown | number | Unknown / null layer |
- Source
Methods
(async) getArpTable() → {Promise.<Object>}
Retrieves the ARP (Address Resolution Protocol) table for all interfaces.
Returns:
An object where the keys are interface names and the values are arrays of ARP records. Each ARP record is represented by an object with `ipAddr` (IP address) and `hwAddr` (hardware address) properties.
- Type:
- Promise.<Object>
Example
const arpTable = await getArpTable();
// arpTable = {
// eth0: [
// { ipAddr: '192.168.1.1', hwAddr: '00:1A:2B:3C:4D:5E' },
// { ipAddr: '192.168.1.2', hwAddr: '00:1A:2B:3C:4D:5F' }
// ],
// wlan0: [
// { ipAddr: '192.168.1.3', hwAddr: '00:1A:2B:3C:4D:60' }
// ]
// }
(async) getRoutingTable() → {Promise.<Object>}
Retrieves the routing table for all interfaces.
- Source
Returns:
An object where the keys are interface names and the values are arrays of routing table records. Each routing table record is represented by an object with `destination`, `gateway`, and `mask` properties.
- Type:
- Promise.<Object>
Example
const routingTable = await getRoutingTable();
// routingTable = {
// eth0: [
// { destination: '0.0.0.0', gateway: '192.168.1.1', mask: '0.0.0.0' },
// { destination: '192.168.1.0', gateway: '0.0.0.0', mask: '255.255.255.0' }
// ],
// wlan0: [
// { destination: '10.0.0.0', gateway: '10.0.0.1', mask: '255.255.255.0' }
// ]
// }
Type Definitions
DeviceStats
Type:
Properties- Object
Name | Type | Description |
---|---|---|
packetsDrop | number | The number of packets dropped. |
packetsDropByInterface | number | The number of packets dropped by the interface. |
packetsRecv | number | The number of packets received. |
- Source
InterfaceInfo
Type:
Properties- Object
Name | Type | Description |
---|---|---|
name | string | The name of the network interface. |
description | string | The description of the network interface. |
mac | string | The MAC address of the network interface. |
gateway | string | The gateway address of the network interface. |
mtu | number | The Maximum Transmission Unit size. |
linktype | string | The link type of the network interface. |
dnsServers | Array.<string> | The DNS servers associated with the network interface. |
addresses | Array.<string> | The IP addresses associated with the network interface. |
- Source
LiveDeviceOptions
Type:
Properties- Object
Name | Type | Attributes | Description |
---|---|---|---|
mode | string | <optional> | The mode of the device, either "promiscuous" or "normal". |
direction | string | <optional> | The direction of packet capture, either "inout", "in", or "out". |
packetBufferTimeoutMs | number | <optional> | The packet buffer timeout in milliseconds. |
packetBufferSize | number | <optional> | The size of the packet buffer. |
snapshotLength | number | <optional> | The snapshot length for packet capture. |
nflogGroup | number | <optional> | The NFLOG group. |
iface | string | <optional> | The network interface name. |
filter | string | <optional> | The filter string for packet capture. |
- Source
TCPFlags
Type:
Properties- Object
Name | Type | Description |
---|---|---|
reserved | number | Reserved flag (0 or 1). |
cwr | number | Congestion Window Reduced (0 or 1). |
ece | number | ECN-Echo (0 или 1). |
urg | number | Urgent pointer field significant (0 или 1). |
ack | number | Acknowledgment field significant (0 или 1). |
psh | number | Push Function (0 или 1). |
rst | number | Reset the connection (0 или 1). |
syn | number | Synchronize sequence numbers (0 или 1). |
fin | number | No more data from sender (0 или 1). |
- Source
TLVOption
Type:
Properties- Object
Name | Type | Description |
---|---|---|
type | number | The TLV option type. |
length | number | The length of the TLV option value. |
value | Buffer | The TLV option value. |
- Source