NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
mac.h
Go to the documentation of this file.
1#ifndef MAC_H
2#define MAC_H
3
6#include <QString>
7
11
12namespace NetSim {
13
16
27class MAC {
28public:
37 static void initHeader(Package &data, const MACAddress &destMACAdress,
38 const MACAddress &srcMACAdress, quint16 etherType);
39
40private:
50 static quint32 getFCS(const MACAddress &destMACAdress,
51 const MACAddress &srcMACAdress, quint16 etherType,
52 const Package &data);
53
60 static quint32 calculateCRC32(const QByteArray &data);
61};
62
63} // namespace NetSim
64
65#endif // MAC_H
Represents a Media Access Control (MAC) address.
Definition macaddress.h:26
A static class that provides methods to handle MAC headers and their Frame Check Sequence (FCS).
Definition mac.h:27
static void initHeader(Package &data, const MACAddress &destMACAdress, const MACAddress &srcMACAdress, quint16 etherType)
Initializes a MAC header.
Definition mac.cpp:7
Represents a network package.
Definition package.h:28
Contains the MACAddress class definition.
Definition logger.h:12
Contains the Package class definition.