72 QList<Header> m_headers{};
75 QString m_info{
"Basic Description"};
Represents an IPv4 address.
Definition ipaddress.h:27
Represents a Media Access Control (MAC) address.
Definition macaddress.h:26
Represents a network package.
Definition package.h:28
void changeEthernetHeader(const MACAddress &srcAddress, const MACAddress &destAddress)
Modifies the Ethernet header.
Definition package.cpp:90
QList< Header > headers() const
Returns the list of headers.
Definition package.cpp:13
QString info() const
Returns the package's information.
Definition package.cpp:17
Header & operator[](const NetSim::HeaderType &type)
Returns a reference to a specific header.
Definition package.cpp:114
void setContent(const QString &content)
Sets the package's content.
Definition package.cpp:19
Package()=default
Default constructor.
void changePortAndIP(const Port &number, const IPAddress &address, bool src)
Modifies the IP and port headers.
Definition package.cpp:31
QString content() const
Returns the package's content.
Definition package.cpp:11
void addHeader(const Header &header)
Adds a new header to the package.
Definition package.cpp:15
quint16 size() const
Returns the total size of the package.
Definition package.cpp:22
Represents a network port.
Definition port.h:24
Contains the IPAddress class definition.
Contains the MACAddress class definition.
HeaderType
Definition header.h:23
Contains the Port class definition.