34#include <tins/macros.h>
36#include <tins/config.h>
37#include <tins/endianness.h>
38#include <tins/hw_address.h>
103 return header_.dst_mac;
112 return header_.src_mac;
120 return Endian::be_to_host(header_.length);
130 void dst_addr(
const address_type& address);
137 void src_addr(
const address_type& address);
156 #if !defined(_WIN32) || defined(TINS_HAVE_PACKET_SENDER_PCAP_SENDPACKET)
189 return new Dot3(*
this);
197 uint8_t dst_mac[address_type::address_size];
198 uint8_t src_mac[address_type::address_size];
202 void write_serialization(uint8_t* buffer, uint32_t total_sz);
Represents a range of addresses.
Definition address_range.h:167
Class representing an IEEE 802.3 PDU.
Definition dot3.h:46
uint16_t length() const
Getter for the length field.
Definition dot3.h:119
address_type src_addr() const
Getter for the source hardware address.
Definition dot3.h:111
static const address_type BROADCAST
Represents the Dot3 broadcast address.
Definition dot3.h:61
Dot3 * clone() const
Definition dot3.h:188
PDUType pdu_type() const
Getter for the PDU's type.
Definition dot3.h:183
HWAddress< 6 > address_type
The address type.
Definition dot3.h:51
address_type dst_addr() const
Getter for the destination hardware address.
Definition dot3.h:102
Abstraction of a network interface.
Definition network_interface.h:47
Base class for protocol data units.
Definition pdu.h:107
PDUType
Enum which identifies each type of PDU.
Definition pdu.h:127
Sends packets through a network interface.
Definition packet_sender.h:118
The Tins namespace.
Definition address_range.h:38