C# Class IcmpHeader, Hermod

Inheritance: AProtocolHeader
ファイルを表示 Open project: Vanaheimr/Hermod Class Usage Examples

Public Properties

Property Type Description
EchoReplyCode byte
EchoReplyType byte
EchoRequestCode byte
EchoRequestType byte
IcmpHeaderLength int

Public Methods

Method Description
Create ( byte icmpPacket, int &bytesCopied ) : IcmpHeader,

This routine creates an instance of the IcmpHeader 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 ICMP packet suitable for sending on a raw socket. It builds the ICMP packet and payload into a byte array and computes the checksum.

IcmpHeader ( ) : System

Default constructor for ICMP packet

Method Details

Create() public static method

This routine creates an instance of the IcmpHeader 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 icmpPacket, int &bytesCopied ) : IcmpHeader,
icmpPacket byte Byte array containing the binary ICMP header
bytesCopied int Number of bytes used in header
return IcmpHeader,

GetProtocolPacketBytes() public method

This routine builds the ICMP packet suitable for sending on a raw socket. It builds the ICMP packet and payload into a byte array and computes the checksum.
public GetProtocolPacketBytes ( byte payLoad ) : byte[]
payLoad byte Data payload of the ICMP packet
return byte[]

IcmpHeader() public method

Default constructor for ICMP packet
public IcmpHeader ( ) : System
return System

Property Details

EchoReplyCode public_oe static_oe property

public static byte EchoReplyCode
return byte

EchoReplyType public_oe static_oe property

public static byte EchoReplyType
return byte

EchoRequestCode public_oe static_oe property

public static byte EchoRequestCode
return byte

EchoRequestType public_oe static_oe property

public static byte EchoRequestType
return byte

IcmpHeaderLength public_oe static_oe property

public static int IcmpHeaderLength
return int