-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipv6packet.h
40 lines (34 loc) · 1.28 KB
/
ipv6packet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef IPV6PACKET_H
#define IPV6PACKET_H
#include <QByteArray>
#include <QDebug>
#include <QMap>
#include <QRegularExpression>
#include "pktf.h"
#include "packet.h"
class IPv6Packet : public Packet {
public:
IPv6Packet(Packet *, quint16);
quint8 getVersion();
quint8 getDiffServices();
quint32 getFlowLabel();
quint16 getPayloadLen();
quint8 getNextHeader();
quint8 getHopLimit();
QString getSrc();
QString getDst();
quint32 getPktLen() override;
private:
QString getUnifiedString(quint8 *);
const quint8 fixedLen = 40; // bytes
quint8 version; // ip version
quint8 diffServices; //
quint32 flowLabel; //
quint16 payloadlen;
quint8 nexthdr; //
quint8 hoplimit; // packet living, decrementing on each hop
quint8 *src;
quint8 *dst;
quint32 pktlen;
};
#endif // IPV6PACKET_H