EthernetMacAddressFields

Namespace: inet

class EthernetMacAddressFields

This class represents the source and destination address fields of an IEEE 802.3 Ethernet MAC header as defined in the sections 3.2.3 Address fields, 3.2.4 Destination Address field, 3.2.5 Source Address field of the IEEE Std 802.3-2018, IEEE Standard for Ethernet.

0 1 2 3 4

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7

| Destination Address | +———————————————————————————————–+ | Source Address | +——————————-+—————————————————————+

Usage diagram

Inheritance diagram

Extends

Name

Type

Description

FieldsChunk

class

(no description)

Known subclasses

Name

Type

Description

EthernetMacHeader

class

This class represents an IEEE 802.3 Ethernet MAC header as defined in the section 3.2 Elements of the MAC frame and packet of the IEEE Std 802.3-2018, IEEE Standard for Ethernet.

Fields

Name

Type

Description

id

int

mutable

bool

complete

bool

correct

bool

properlyRepresented

bool

chunkLength

b

rawBin

string[]

rawHex

string[]

regionTags

SharingRegionTagSet::TagBaseRegionTag[]

chunkLength

B(6) + B(6) TODO rename to destinationAddress

dest

MacAddress

The Destination Address field specifies the station(s) for which the MAC frame is intended. It may be an individual or multicast (including broadcast) address. TODO rename to sourceAddress

src

MacAddress

The Source Address field specifies the station sending the MAC frame.

Properties

Name

Value

Description

beforeChange

handleChange()

descriptor

readonly

existingClass

packetData

Source code

//
// This class represents the source and destination address fields of an IEEE
// 802.3 Ethernet MAC header as defined in the sections 3.2.3 Address fields,
// 3.2.4 Destination Address field, 3.2.5 Source Address field of the IEEE Std
// 802.3-2018, IEEE Standard for Ethernet.
//
//  0                   1                   2                   3                   4
//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7
// +-----------------------------------------------------------------------------------------------+
// |                                      Destination Address                                      |
// +-----------------------------------------------------------------------------------------------+
// |                                        Source Address                                         |
// +-------------------------------+---------------------------------------------------------------+
//
class EthernetMacAddressFields extends FieldsChunk
{
    chunkLength = B(12); // B(6) + B(6)
    // TODO rename to destinationAddress
    MacAddress dest; // The Destination Address field specifies the station(s) for which the MAC frame is intended. It may be an individual or multicast (including broadcast) address.
    // TODO rename to sourceAddress
    MacAddress src; // The Source Address field specifies the station sending the MAC frame.
}

File: src/inet/linklayer/ethernet/common/EthernetMacHeader.msg