Class EthernetPacket
EthernetPacket class.
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()
Create new instance of the EthernetPacket class.
Declaration
protected EthernetPacket()
EthernetPacket(MACAddress, MACAddress, UInt16, Int32)
Create new instance of the EthernetPacket class, with specified dsetination, source, type and size.
Declaration
protected EthernetPacket(MACAddress dest, MACAddress src, ushort type, int packet_size)
Parameters
Type | Name | Description |
---|---|---|
MACAddress | dest | Destination. |
MACAddress | src | Source. |
System.UInt16 | type | Type. |
System.Int32 | packet_size | Size. |
EthernetPacket(Byte[])
Create new instance of the EthernetPacket class, with specified raw data.
Declaration
public EthernetPacket(byte[] rawData)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | rawData | Raw data. |
EthernetPacket(UInt16, Int32)
Create new instance of the EthernetPacket class, with specified type and size.
Declaration
protected EthernetPacket(ushort type, int packet_size)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | type | Type. |
System.Int32 | packet_size | Size. |
Fields
| Improve this Doc View SourcedestMAC
Destination MAC address.
Declaration
protected MACAddress destMAC
Field Value
Type | Description |
---|---|
MACAddress |
srcMAC
Source MAC address.
Declaration
protected MACAddress srcMAC
Field Value
Type | Description |
---|---|
MACAddress |
Properties
| Improve this Doc View SourceRawData
Get raw data byte array.
Declaration
public byte[] RawData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
| Improve this Doc View SourceInitFields()
Init EthernetPacket fields.
Declaration
protected virtual void InitFields()
ToString()
To string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | string value. |
Overrides
System.Object.ToString()