C# Class SharpPcap.Packets.EthernetPacket

Inheritance: Packet, EthernetFields
ファイルを表示 Open project: Zepheus/Fiesta_Utils Class Usage Examples

Protected Properties

Property Type Description
_ethOffset int
_timeval SharpPcap.Packets.Util.Timeval

Public Methods

Method Description
EthernetPacket ( int lLen, byte bytes ) : System

Construct a new ethernet packet.

For the purpose of jpcap, when the type of ethernet packet is recognized as a protocol for which a class exists network library, then a more specific class like IPPacket or ARPPacket is instantiated. The subclass can always be cast into a more generic form.

EthernetPacket ( int lLen, byte bytes, Timeval tv ) : System

Construct a new ethernet packet, including the capture time.

OnOffsetChanged ( ) : void

should be overriden by upper classes

ToColoredString ( bool colored ) : System.String

Generate string with contents describing this ethernet packet.

ToColoredVerboseString ( bool colored ) : System.String

Convert this IP packet to a more verbose string.

ToString ( ) : System.String

Convert this ethernet packet to a readable string.

extractProtocol ( byte packetBytes ) : int

Extract the protocol type field from packet data.

The type field indicates what type of data is contained in the packet's data block.

Method Details

EthernetPacket() public method

Construct a new ethernet packet.

For the purpose of jpcap, when the type of ethernet packet is recognized as a protocol for which a class exists network library, then a more specific class like IPPacket or ARPPacket is instantiated. The subclass can always be cast into a more generic form.

public EthernetPacket ( int lLen, byte bytes ) : System
lLen int
bytes byte
return System

EthernetPacket() public method

Construct a new ethernet packet, including the capture time.
public EthernetPacket ( int lLen, byte bytes, Timeval tv ) : System
lLen int
bytes byte
tv SharpPcap.Packets.Util.Timeval
return System

OnOffsetChanged() public method

should be overriden by upper classes
public OnOffsetChanged ( ) : void
return void

ToColoredString() public method

Generate string with contents describing this ethernet packet.
public ToColoredString ( bool colored ) : System.String
colored bool whether or not the string should contain ansi /// color escape sequences. ///
return System.String

ToColoredVerboseString() public method

Convert this IP packet to a more verbose string.
public ToColoredVerboseString ( bool colored ) : System.String
colored bool
return System.String

ToString() public method

Convert this ethernet packet to a readable string.
public ToString ( ) : System.String
return System.String

extractProtocol() public static method

Extract the protocol type field from packet data.

The type field indicates what type of data is contained in the packet's data block.

public static extractProtocol ( byte packetBytes ) : int
packetBytes byte packet bytes. ///
return int

Property Details

_ethOffset protected_oe property

protected int _ethOffset
return int

_timeval protected_oe property

protected Timeval,SharpPcap.Packets.Util _timeval
return SharpPcap.Packets.Util.Timeval