-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPacketAnalyzer.h
More file actions
43 lines (33 loc) · 924 Bytes
/
Copy pathPacketAnalyzer.h
File metadata and controls
43 lines (33 loc) · 924 Bytes
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
41
42
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: PacketAnalyzer.h
* Author: stephenaaskov
*
* Created on 27. november 2016, 22:04
*/
#ifndef PACKETANALYZER_H
#define PACKETANALYZER_H
#include <sys/types.h>
#include <memory>
#include "PacketAnalyzer.h"
#include "PacketObject.h"
enum class PACKET_TYPES : unsigned int {
IPV4 = 0x0800,
ARP = 0x0806,
IPV6 = 0x86dd,
};
class PacketAnalyzer {
public:
PacketAnalyzer(const PacketAnalyzer& orig) = delete;
static PacketAnalyzer* getInstance();
std::unique_ptr<PacketObject> getObject(const struct pcap_pkthdr* pkthdr, const u_char* packet);
private:
static PacketAnalyzer* m_instance;
PacketAnalyzer();
virtual ~PacketAnalyzer();
};
#endif /* PACKETANALYZER_H */