Class EthernetPacket
EthernetPacket class.
Namespace: Cosmos.System.Network
Assembly: Cosmos.System2.dll
Syntax
public class EthernetPacket : object
Constructors
| Improve this Doc View SourceEthernetPacket()
Create new inctanse of the EthernetPacket class.
Declaration
protected EthernetPacket()
EthernetPacket(MACAddress, MACAddress, UInt16, Int32)
Create new inctanse 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 inctanse of the EthernetPacket class, with specified raw data.
Declaration
protected EthernetPacket(byte[] rawData)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | rawData | Raw data. |
EthernetPacket(UInt16, Int32)
Create new inctanse 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 |
Methods
| Improve this Doc View SourceinitFields()
Init EthernetPacket fields.
Declaration
protected virtual void initFields()
PrepareForSending()
Prepare packet for sending. Not implemented.
Declaration
public virtual void PrepareForSending()
ToString()
To string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | string value. |