-
Notifications
You must be signed in to change notification settings - Fork 2
/
database.hpp
47 lines (42 loc) · 1.51 KB
/
database.hpp
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
43
44
45
46
47
#pragma once
namespace DB {
typedef QByteArray Word;
typedef quint32 Index;
typedef QList<Word> Row;
typedef QList<Row> RowList;
typedef QPair<Index, Row> IndexedRow;
typedef QList<IndexedRow> IndexedRowList;
enum Protocol_Names {TCP, DB_LSP_DISC, SSDP, SNMP};
enum Columns {SourceIP, DestinationIP, Protocol, Length, EndColumns};
const static QList<Columns> ComputableColumns = {
Length
};
const static QList<QList<quint32> > database = {
{0x6FDD4D9E, 0x81A14B33, TCP, 57},
{0x81A14B9E, 0xEFFFFFFA, SSDP, 175},
{0x81A14B9E, 0xEFFFFFFA, SSDP, 175},
{0xAE892A4B, 0x81A14B33, TCP, 66},
{0xAE892A4B, 0x81A14B33, TCP, 66},
{0x6FDD4D9E, 0x81A14BFF, DB_LSP_DISC, 195},
{0x8D657494, 0x81A14B33, TCP, 54},
{0x6FDD4D9E, 0x81A14B33, TCP, 57},
{0x81A14B33, 0xC0A80167, SSDP, 175},
{0x81A14B33, 0xC0A80167, SNMP, 121},
{0x81A14B33, 0x81A14BFF, DB_LSP_DISC, 195},
{0xAE892A4B, 0x81A14B33, TCP, 54},
{0xAE892A4B, 0x81A14B33, SSDP, 175},
{0xA29FF2A5, 0x81A14B33, TCP, 54},
{0xAE892A4B, 0xC0A80167, TCP, 54},
{0x6FDD4D9E, 0xC0A80167, SNMP, 121},
{0x81A14B33, 0xFFFFFFFF, DB_LSP_DISC, 195},
{0x81A14B33, 0xFFFFFFFF, DB_LSP_DISC, 195},
{0x81A14B9E, 0xEFFFFFFA, SSDP, 175},
{0xAE892A4B, 0xEFFFFFFA, SSDP, 175},
{0xA29FF2A5, 0x81A14B33, TCP, 66},
{0xA29FF2A5, 0x81A14B33, TCP, 66},
{0x8D657494, 0x81A14B33, TCP, 54},
{0x8D657494, 0x81A14B33, TCP, 66}
};
void dumpDB(RowList db);
IndexedRowList RowListToIndexedRowList(RowList rows, quint8 startingIndex = 0);
}