ICMPv6

ICMPv6 protocol layer

Constructor

new ICMPv6(data, opts)

Parameters:
NameTypeDescription
dataBuffer | ObjectInput buffer or object with protocol fields
optsObjectOptions for the layer
Properties
NameTypeDescription
typenumberICMPv6 message type (see ICMPv6Types)
codenumberICMPv6 message code
checksumnumberICMPv6 checksum
Implements

Members

isDestinationUnreachable

Check if this is a Destination Unreachable message

isEchoReply

Check if this is an Echo Reply message

isEchoRequest

Check if this is an Echo Request message

isParameterProblem

Check if this is a Parameter Problem message

isTimeExceeded

Check if this is a Time Exceeded message

length :number

Number of bytes occupied by the layer.
Type:
  • number
Implements

osi :OsiModelLayers

Respective protocol OSI layer.
Implements

typeName

Get the name of the ICMPv6 message type

Methods

toObject() → {Object}

Returns an object with all protcol fields without owning the underlying buffer. Useful to read all the data and use it without having to deal with binary representation.
Implements
Returns:
- All protocol fields
Type: 
Object

(static) toAlloc(data) → {number}

Get the required allocation size based on ICMPv6 message type
Parameters:
NameTypeDescription
dataObjectThe data object containing type and other fields
Returns:
Required allocation size
Type: 
number