Class EthernetPacket
Represents an Ethernet packet.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Cosmos.System.Network
Assembly: Cosmos.System2.dll
Syntax
public class EthernetPacket
Constructors
| Improve this Doc View SourceEthernetPacket()
Initializes a new instance of the EthernetPacket class.
Declaration
protected EthernetPacket()
EthernetPacket(MACAddress, MACAddress, UInt16, Int32)
Initializes a new instance of the EthernetPacket class, with specified dsetination, source, type and size.
Declaration
protected EthernetPacket(MACAddress dest, MACAddress src, ushort type, int packetSize)
Parameters
Type | Name | Description |
---|---|---|
MACAddress | dest | |
MACAddress | src | |
System.UInt16 | type | |
System.Int32 | packetSize |
EthernetPacket(Byte[])
Initializes a new instance of the EthernetPacket class, with specified raw data.
Declaration
public EthernetPacket(byte[] rawData)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | rawData | The raw data of the packet. |
EthernetPacket(UInt16, Int32)
Initializes a new instance of the EthernetPacket class, with specified type and size.
Declaration
protected EthernetPacket(ushort type, int packetSize)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | type | |
System.Int32 | packetSize |
Fields
| Improve this Doc View SourcedestMAC
Declaration
protected MACAddress destMAC
Field Value
Type | Description |
---|---|
MACAddress |
srcMAC
Declaration
protected MACAddress srcMAC
Field Value
Type | Description |
---|---|
MACAddress |
Properties
| Improve this Doc View SourceRawData
Gets the raw data of the packet in the form of a byte array.
Declaration
public byte[] RawData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
| Improve this Doc View SourceInitializeFields()
Initializes all internal fields.
Declaration
protected virtual void InitializeFields()
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()