NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
udp.h
Go to the documentation of this file.
1#ifndef UDP_H
2#define UDP_H
3
5#include "src/models/port.h"
6#include <QString>
7
11
12namespace NetSim {
13
16
25class UDP {
26public:
34 static void initHeader(const Port &sourcePort, const Port &destinationPort,
35 Package &data);
36
37private:
47 static quint16 getChecksum(const char *data, quint16 length,
48 quint16 sourcePort, quint16 destinationPort);
49
56 static quint16 overflowHandling(quint16 checksum);
57};
58
59} // namespace NetSim
60
61#endif // UDP_H
Represents a network package.
Definition package.h:28
Represents a network port.
Definition port.h:24
A static class providing methods for initializing UDP headers.
Definition udp.h:25
static void initHeader(const Port &sourcePort, const Port &destinationPort, Package &data)
Initializes a UDP header.
Definition udp.cpp:8
Definition logger.h:12
Contains the Package class definition.
Contains the Port class definition.