C# Class Icmpv6Header, Hermod

Inheritance: AProtocolHeader
显示文件 Open project: Vanaheimr/Hermod Class Usage Examples

Public Properties

Property Type Description
Icmpv6EchoReplyCode byte
Icmpv6EchoReplyType byte
Icmpv6EchoRequestCode byte
Icmpv6EchoRequestType byte
Icmpv6HeaderLength int
ipv6Header Ipv6Header,

Public Methods

Method Description
Create ( byte icmpv6Packet, int &bytesCopied ) : Icmpv6Header,

This routine creates an instance of the Icmpv6Header class from a byte array that is a received IGMP packet. This is useful when a packet is received from the network and the header object needs to be constructed from those values.

GetProtocolPacketBytes ( byte payLoad ) : byte[]

This routine builds the ICMPv6 packet and payload into a byte array. It also computes the IPv6 pseudo header checksum that appears in the ICMPv6 packet.

Icmpv6Header ( ) : System

Simple constructor for the ICMPv6 protocol header.

Icmpv6Header ( Ipv6Header, packetHeader ) : System

Constructor for the ICMPv6 header which also takes a reference to the encompassing IPv6 header. This is necessary since the IPv6 protocol defines a pseudo header checksum which requires the checksum to be calculated over fields in the ICMPv6 header and payload as well as fields from the IPv6 packet.

Method Details

Create() public static method

This routine creates an instance of the Icmpv6Header class from a byte array that is a received IGMP packet. This is useful when a packet is received from the network and the header object needs to be constructed from those values.
public static Create ( byte icmpv6Packet, int &bytesCopied ) : Icmpv6Header,
icmpv6Packet byte Byte array containing the binary ICMPv6 header
bytesCopied int Number of bytes used in header
return Icmpv6Header,

GetProtocolPacketBytes() public method

This routine builds the ICMPv6 packet and payload into a byte array. It also computes the IPv6 pseudo header checksum that appears in the ICMPv6 packet.
public GetProtocolPacketBytes ( byte payLoad ) : byte[]
payLoad byte A byte array representing the ICMPv6 payload
return byte[]

Icmpv6Header() public method

Simple constructor for the ICMPv6 protocol header.
public Icmpv6Header ( ) : System
return System

Icmpv6Header() public method

Constructor for the ICMPv6 header which also takes a reference to the encompassing IPv6 header. This is necessary since the IPv6 protocol defines a pseudo header checksum which requires the checksum to be calculated over fields in the ICMPv6 header and payload as well as fields from the IPv6 packet.
public Icmpv6Header ( Ipv6Header, packetHeader ) : System
packetHeader Ipv6Header, Reference to the Ipv6Header object encompassing the ICMPv6 packet
return System

Property Details

Icmpv6EchoReplyCode public_oe static_oe property

public static byte Icmpv6EchoReplyCode
return byte

Icmpv6EchoReplyType public_oe static_oe property

public static byte Icmpv6EchoReplyType
return byte

Icmpv6EchoRequestCode public_oe static_oe property

public static byte Icmpv6EchoRequestCode
return byte

Icmpv6EchoRequestType public_oe static_oe property

public static byte Icmpv6EchoRequestType
return byte

Icmpv6HeaderLength public_oe static_oe property

public static int Icmpv6HeaderLength
return int

ipv6Header public_oe property

public Ipv6Header, ipv6Header
return Ipv6Header,