C# Class NetworkPackets.EthernetPacket

Encapsulates an EthernetPacket and provides the mechanisms to generate new Ethernet Packets. This is immutable.
The Header is of the format: Field Position Destination Address6 bytes Source Address6 bytes Type2 bytes DataThe rest
Inheritance: NetworkPacket
Afficher le fichier Open project: pstjuste/brunet Class Usage Examples

Méthodes publiques

Свойство Type Description
BroadcastAddress MemBlock
DestinationAddress MemBlock
SourceAddress MemBlock
Type Types
UnicastAddress MemBlock

Méthodes publiques

Méthode Description
EthernetPacket ( MemBlock Packet ) : Brunet

This parses a MemBlock into the Ethernet fields

EthernetPacket ( MemBlock DestinationAddress, MemBlock SourceAddress, Types Type, ICopyable Payload ) : Brunet

Creates an Ethernet Packet from Ethernet fields and the payload

GetMulticastEthernetAddress ( MemBlock mcast_ip ) : MemBlock

Generates a multicast mac address based upon the multicast IP address.

Private Methods

Méthode Description
EthernetPacket ( ) : Brunet

Method Details

EthernetPacket() public méthode

This parses a MemBlock into the Ethernet fields
public EthernetPacket ( MemBlock Packet ) : Brunet
Packet MemBlock The Ethernet packet
Résultat Brunet

EthernetPacket() public méthode

Creates an Ethernet Packet from Ethernet fields and the payload
public EthernetPacket ( MemBlock DestinationAddress, MemBlock SourceAddress, Types Type, ICopyable Payload ) : Brunet
DestinationAddress MemBlock Where the Ethernet packet is going.
SourceAddress MemBlock Where the Ethernet packet originated.
Type Types Type of Ethernet payload.
Payload ICopyable Payload as an ICopyable
Résultat Brunet

GetMulticastEthernetAddress() public static méthode

Generates a multicast mac address based upon the multicast IP address.
public static GetMulticastEthernetAddress ( MemBlock mcast_ip ) : MemBlock
mcast_ip MemBlock The multicast ip address
Résultat MemBlock

Property Details

BroadcastAddress public_oe static_oe property

The default broadcast (multicast) address
public static MemBlock BroadcastAddress
Résultat MemBlock

DestinationAddress public_oe property

The address where the Ethernet packet is going
public MemBlock DestinationAddress
Résultat MemBlock

SourceAddress public_oe property

The address where the Ethernet packet originated
public MemBlock SourceAddress
Résultat MemBlock

Type public_oe property

The type for the Ethernet payload
public Types Type
Résultat Types

UnicastAddress public_oe static_oe property

The default unicast address
public static MemBlock UnicastAddress
Résultat MemBlock