Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b5c6af71b | ||
|
|
03cb8efad6 | ||
|
|
5bb5bec477 | ||
|
|
1fdcddb33d | ||
|
|
5f745ee425 | ||
|
|
f455421870 | ||
|
|
513e386959 | ||
|
|
9b8679a320 | ||
|
|
0c70411b1b | ||
|
|
86b97ffb73 | ||
|
|
7a3aa41afc | ||
|
|
c53c82d482 | ||
|
|
9dcc4a2334 | ||
|
|
011ee3ecbd | ||
|
|
6d185c052e | ||
|
|
2cd0479204 | ||
|
|
81b33f0d06 | ||
|
|
58a9aff17c | ||
|
|
14e8808f03 | ||
|
|
bbb3b8349f | ||
|
|
b6b4967aa6 | ||
|
|
a8fe74e502 | ||
|
|
20b9f01f12 | ||
|
|
a0bb0ab0ca | ||
|
|
e16b6a18be | ||
|
|
6f336f8307 | ||
|
|
d91477b18d | ||
|
|
771b6606c8 | ||
|
|
9eee257be0 | ||
|
|
9f050fa0a6 | ||
|
|
bd036f96f9 | ||
|
|
c2b7d77784 | ||
|
|
e4a7990a4e | ||
|
|
d19bd96555 | ||
|
|
6877e46273 | ||
|
|
6679453d86 | ||
|
|
1ff308af09 | ||
|
|
05734f3d31 | ||
|
|
611c753da5 | ||
|
|
f3af39ee42 | ||
|
|
42d74171b2 | ||
|
|
dd325248f1 | ||
|
|
e46b508a36 | ||
|
|
eb5d7b07af | ||
|
|
63c44a24b6 | ||
|
|
20b5f6d7cc | ||
|
|
7f69de0b51 | ||
|
|
533b3ab0e3 | ||
|
|
406ac7e8c8 | ||
|
|
dc60cd09c4 | ||
|
|
d59fefd06e | ||
|
|
1e1cfb89d2 | ||
|
|
d4da3b6516 | ||
|
|
f30fbc3212 | ||
|
|
b080a1c136 | ||
|
|
552d199d2e | ||
|
|
f5545a80f9 | ||
|
|
06f3b07909 | ||
|
|
3a087e951d | ||
|
|
a2916d2e4c | ||
|
|
c02574807e | ||
|
|
708d4ea33a | ||
|
|
bf69321a29 | ||
|
|
4d27001d1d | ||
|
|
eac3ae9ded | ||
|
|
f24f68f59d | ||
|
|
8f805a8163 | ||
|
|
948c0367f9 | ||
|
|
23a4761276 | ||
|
|
d72a40a0fc | ||
|
|
c4ac53a03f | ||
|
|
fdb6481cd6 | ||
|
|
91bb77a880 | ||
|
|
02da143e45 | ||
|
|
4c02c81bf4 | ||
|
|
a16b4aa564 | ||
|
|
7aad97fffb | ||
|
|
7153b8933c | ||
|
|
58b33dcb2d | ||
|
|
ec6eea0c23 | ||
|
|
74519f6e10 | ||
|
|
f11b215cfb | ||
|
|
8e512ff503 | ||
|
|
519d70fa04 | ||
|
|
85b396ca43 | ||
|
|
cefcc25b13 | ||
|
|
947896ad7d | ||
|
|
7cba34a1e3 | ||
|
|
6e86e6d924 | ||
|
|
4d60c70c8b | ||
|
|
fb85dac905 | ||
|
|
fe2822c6a8 | ||
|
|
6ab1367846 | ||
|
|
8c4ae7527b | ||
|
|
1b077ba65f | ||
|
|
3dd9b5176e | ||
|
|
1d3428d538 | ||
|
|
33557c5fbc | ||
|
|
5e0befd56c | ||
|
|
4f81cdc103 | ||
|
|
b1e9245d94 | ||
|
|
320bcfafa2 | ||
|
|
a7b5e09195 | ||
|
|
9d59b8b1a9 | ||
|
|
ea435c46f5 | ||
|
|
772957349b | ||
|
|
40ff2c54c1 | ||
|
|
a8ffcd8bb0 | ||
|
|
fd02e1b304 | ||
|
|
4c39ed293e | ||
|
|
2e2d4c911a | ||
|
|
2a6e5c6341 | ||
|
|
a6545ea095 | ||
|
|
f2a279e441 | ||
|
|
afc2b641eb | ||
|
|
da47357762 | ||
|
|
acb1de69aa | ||
|
|
3e5491fa10 | ||
|
|
0f168d9150 | ||
|
|
9abf528c8e | ||
|
|
5464bad6db | ||
|
|
4173775b60 | ||
|
|
a8a3c6f7c2 | ||
|
|
55880e4ae4 | ||
|
|
1f6c94e663 | ||
|
|
b11065b2e3 | ||
|
|
9f8c1e8630 | ||
|
|
a9aa46287d | ||
|
|
a25d9d871e | ||
|
|
5283755afa | ||
|
|
aaa474a37d | ||
|
|
6edb7bedd7 | ||
|
|
c4eebaaf5e | ||
|
|
f41d8ac106 | ||
|
|
41765efcf8 | ||
|
|
5ccc61d1cb | ||
|
|
b6d9536533 | ||
|
|
333a6d60e8 | ||
|
|
c3d1c69722 | ||
|
|
8db8c8ae34 | ||
|
|
fea3991ad1 | ||
|
|
06f13fd2de | ||
|
|
ed51987e3a | ||
|
|
7d3c3b23f8 | ||
|
|
9e97d20c25 | ||
|
|
b08b6a6a28 | ||
|
|
c2e7fbce94 | ||
|
|
1b3c41a752 | ||
|
|
b97dc6baa4 | ||
|
|
e696f31487 | ||
|
|
b1a43cbcff | ||
|
|
6e649e0cb6 | ||
|
|
09668496c3 | ||
|
|
a2e9730b23 | ||
|
|
937357e4bc | ||
|
|
d947437233 | ||
|
|
d13bc0e01a | ||
|
|
550e6fe6fc | ||
|
|
a8f938f7ac | ||
|
|
960e8ab22a | ||
|
|
ca827ae548 | ||
|
|
7e0724d576 | ||
|
|
246d115d7b | ||
|
|
60eca79fdf | ||
|
|
549134ef10 | ||
|
|
cf931fda6b | ||
|
|
6ff67b5043 | ||
|
|
3ffb65a81c | ||
|
|
2dfc478ad4 | ||
|
|
944e8ed105 | ||
|
|
2b4821a97b | ||
|
|
d9c72999ee | ||
|
|
181a03c5ad | ||
|
|
8957c52a48 | ||
|
|
408d78e628 | ||
|
|
10576eab0a | ||
|
|
730c2360bd | ||
|
|
f3fcf1e7c0 | ||
|
|
da8eed5a32 | ||
|
|
c1e794366f | ||
|
|
bb7aff6526 | ||
|
|
fd0e65cb57 | ||
|
|
bc5be1e76c | ||
|
|
e84da386c7 | ||
|
|
06f763e6c3 | ||
|
|
a9d4f5d8d0 | ||
|
|
8e6de00ce3 | ||
|
|
5cf3fef8f7 | ||
|
|
721031210b | ||
|
|
af35d6b963 | ||
|
|
b9ccff0761 | ||
|
|
241ee32cbc | ||
|
|
519c69c5cc | ||
|
|
72df138a7d | ||
|
|
eac7024489 | ||
|
|
5ed1930a93 | ||
|
|
1efabef4cf | ||
|
|
c40cf4e0ec | ||
|
|
7eb73bc92a | ||
|
|
0994771974 | ||
|
|
9717afb2da | ||
|
|
017c1a4239 | ||
|
|
bb52f1362c | ||
|
|
d74c2739d5 | ||
|
|
95ac8fd41a | ||
|
|
03d3e1bafc | ||
|
|
994bd0696b | ||
|
|
227e586e63 | ||
|
|
4539e96ce2 | ||
|
|
3303dac7cf | ||
|
|
119a14c6e3 | ||
|
|
8f113c1d37 | ||
|
|
6325aebda6 | ||
|
|
978c9cfda3 | ||
|
|
0eb7a0388c | ||
|
|
3e06e6f5b8 | ||
|
|
31404f4865 | ||
|
|
17774bf09c | ||
|
|
22241a1d36 | ||
|
|
951bcb0c39 | ||
|
|
083e464929 | ||
|
|
00857abf2c | ||
|
|
1fadf4754a | ||
|
|
36f08b8d2e | ||
|
|
57fce4e350 | ||
|
|
89af9b7e3c | ||
|
|
a6b10cf73f | ||
|
|
90c6fd99a7 | ||
|
|
88040f0449 | ||
|
|
9e0f0ce3df | ||
|
|
8fdffbf3a1 | ||
|
|
55eec29c08 | ||
|
|
8d0c7b1fae | ||
|
|
677b513f70 | ||
|
|
821f4c9249 | ||
|
|
a2ea67152c | ||
|
|
5c33fbf19b | ||
|
|
846b546dbc | ||
|
|
c1acb6d801 | ||
|
|
0fbe895103 | ||
|
|
05492ec8e8 | ||
|
|
58ca7b5a7f | ||
|
|
0df8aa19ec | ||
|
|
259b60f574 | ||
|
|
4e856a41d6 | ||
|
|
8e996f7f7c | ||
|
|
3706267d68 | ||
|
|
0522e562e8 | ||
|
|
4183718952 | ||
|
|
e8455236bd | ||
|
|
a13f1fe52f | ||
|
|
46ebd7128f | ||
|
|
dc841574af | ||
|
|
6b7e5fa8d2 | ||
|
|
ad57af9f79 | ||
|
|
ce597b4806 | ||
|
|
13c5d6801e | ||
|
|
cb26a8c82d | ||
|
|
4cafa7cb1e | ||
|
|
29ec34f66d | ||
|
|
a482e1c0be | ||
|
|
1d9a830b2f | ||
|
|
51e4888442 | ||
|
|
526568fcd5 | ||
|
|
c73501f859 | ||
|
|
d5a60880d0 | ||
|
|
61fc5be202 | ||
|
|
4ffe1eb3c0 | ||
|
|
6ad0d6666c | ||
|
|
8ea8ba8e9b | ||
|
|
b01b60a2b5 | ||
|
|
fc9901292d | ||
|
|
32275543c4 | ||
|
|
57b8969a3d | ||
|
|
0adcd28450 | ||
|
|
295cb3ee6a | ||
|
|
488166833e | ||
|
|
daf1fbfc7b | ||
|
|
a6de94a930 | ||
|
|
3eba8cc5b5 | ||
|
|
b95bd0358f | ||
|
|
19a29e1e22 | ||
|
|
c411df523e | ||
|
|
62bae30a4a | ||
|
|
e4453938d5 | ||
|
|
cccf794265 | ||
|
|
96b71def49 | ||
|
|
c418b7110b | ||
|
|
78b1295dc1 | ||
|
|
bec8361638 | ||
|
|
398ad8e5ff | ||
|
|
34d0718bca | ||
|
|
c408710c52 | ||
|
|
6f29733262 | ||
|
|
58665e93a9 | ||
|
|
1ee7355b91 | ||
|
|
e5dacc28e7 | ||
|
|
48db44a567 | ||
|
|
8e7b063804 | ||
|
|
6f7acfcab5 | ||
|
|
46c32d2433 | ||
|
|
1116d0e4b1 | ||
|
|
21b2cce715 | ||
|
|
ced6fca184 | ||
|
|
8222ac5bdc | ||
|
|
1c2a0c36f1 | ||
|
|
e5fd86393e | ||
|
|
f8fe3ee520 | ||
|
|
6a1fd9ad97 | ||
|
|
2234b97149 | ||
|
|
35fc6a6de5 | ||
|
|
f19937c8c9 | ||
|
|
0cbb4b2ffa | ||
|
|
613e21002a | ||
|
|
0afc8ace3d | ||
|
|
0b9b6a683d | ||
|
|
b0b3e1bc6c | ||
|
|
e89c06256e | ||
|
|
2eba77e3b0 | ||
|
|
be808c30f3 | ||
|
|
09293fabd9 | ||
|
|
43ccaef2f5 | ||
|
|
4aefbe0c7a | ||
|
|
380286c069 | ||
|
|
a79b8ee834 | ||
|
|
dee6f90d6c | ||
|
|
c9f582805b | ||
|
|
a01a2b7443 | ||
|
|
6704649a75 | ||
|
|
1a8ae710cf | ||
|
|
65e67a2f88 | ||
|
|
77710ed8b4 | ||
|
|
177f9456bd | ||
|
|
d3aa3df975 | ||
|
|
41ec807d79 | ||
|
|
2f8d3ac0b0 | ||
|
|
2af7b33de0 | ||
|
|
65678dbeea | ||
|
|
2fcf641e87 | ||
|
|
b241dd5e6b | ||
|
|
03ae090d39 | ||
|
|
8761ac1887 | ||
|
|
654e84ff02 | ||
|
|
06c6941f03 | ||
|
|
9d427faafe | ||
|
|
f4dbeecba9 | ||
|
|
c620858671 | ||
|
|
c4084ca3c7 | ||
|
|
eb0115d4e0 | ||
|
|
d485c1cecb | ||
|
|
71b81d3799 | ||
|
|
732bcecd17 | ||
|
|
86f3c29d03 | ||
|
|
ca15e3295e | ||
|
|
0b3d627185 | ||
|
|
43a8576efb | ||
|
|
1ec621c85b | ||
|
|
9c5ba9c060 | ||
|
|
5646ffa725 | ||
|
|
abd6bce6f9 | ||
|
|
ca92660d98 | ||
|
|
ac1eaca8a6 | ||
|
|
a62be9b8ec | ||
|
|
87076dcd5b | ||
|
|
5918a6542d | ||
|
|
a5ecdf9df8 | ||
|
|
5079bb1106 | ||
|
|
4297a65ce8 | ||
|
|
fff60ec317 | ||
|
|
66ebe444ae | ||
|
|
1deae1132b | ||
|
|
2ca37ff8be | ||
|
|
12c6ab768d | ||
|
|
8c28613eb2 | ||
|
|
0663544be8 | ||
|
|
ae2470fad4 | ||
|
|
808050e635 | ||
|
|
ce54a6ab57 | ||
|
|
153d11c920 | ||
|
|
dd65142020 | ||
|
|
70686249c9 | ||
|
|
7b62db81c3 | ||
|
|
da3e6bd61b | ||
|
|
d5b395f35a | ||
|
|
87ad2b58dc | ||
|
|
4a09707e48 | ||
|
|
a04efb7ce7 | ||
|
|
fad246289f | ||
|
|
b586c223dd | ||
|
|
0ef7998348 | ||
|
|
b4a8c8c63f | ||
|
|
d95cd9912c | ||
|
|
9377991263 | ||
|
|
c6a835746e | ||
|
|
8c3674e9a3 | ||
|
|
9ca62ed7ac | ||
|
|
d9278d55c3 | ||
|
|
9fcf98c067 | ||
|
|
18c6c1c2d6 | ||
|
|
bf318e0b86 | ||
|
|
ceb98a3f9c | ||
|
|
0bfe444362 | ||
|
|
fb74785282 | ||
|
|
a1dba74346 | ||
|
|
4f8ca9485a | ||
|
|
db5aeb0cb1 | ||
|
|
28879c570e | ||
|
|
1290c40968 | ||
|
|
48726301e1 | ||
|
|
2b84f28df5 | ||
|
|
c1d6e3f145 | ||
|
|
637b2063ed | ||
|
|
fcbc16da00 | ||
|
|
ffbce931b9 | ||
|
|
a6029d250d | ||
|
|
b040407683 | ||
|
|
0cae9bf4a4 | ||
|
|
627299e4dd | ||
|
|
6333bb1702 | ||
|
|
d96f4ca736 | ||
|
|
fa238bbe42 | ||
|
|
e2c3445a20 | ||
|
|
61f7ec1696 | ||
|
|
9eed0a60d3 | ||
|
|
b22cb70a68 | ||
|
|
1b6275005e | ||
|
|
3b02cfab69 | ||
|
|
565a7bfce3 | ||
|
|
e58527536d | ||
|
|
9419015711 | ||
|
|
7f9a18fd05 | ||
|
|
efc5630378 | ||
|
|
192fad4402 | ||
|
|
6833ee2bbe | ||
|
|
5b7fe1360a | ||
|
|
5c6f070097 | ||
|
|
f6ad16d8f8 | ||
|
|
8074bc8201 | ||
|
|
574fc4f09e | ||
|
|
3032864ec9 | ||
|
|
db716d0ab0 | ||
|
|
477e4db650 | ||
|
|
bb6423a79f | ||
|
|
c3490e80a7 | ||
|
|
c50a8d4808 | ||
|
|
73e4348570 | ||
|
|
0f8a994841 | ||
|
|
49843509e5 | ||
|
|
1a37595de0 | ||
|
|
56bfb439f8 | ||
|
|
4c00ff89df | ||
|
|
2b71a329c1 | ||
|
|
c12a697f2d | ||
|
|
2d558afb54 | ||
|
|
2724a14bf7 | ||
|
|
4bff595733 | ||
|
|
16890a6632 | ||
|
|
fba61adf5e | ||
|
|
28330edb7a | ||
|
|
70c35addcb | ||
|
|
d898fddea0 | ||
|
|
545f270132 | ||
|
|
4bd175b07e | ||
|
|
566d5db402 | ||
|
|
888ddfcd17 | ||
|
|
f8e83f7e35 | ||
|
|
b757cf606b | ||
|
|
f1b22b199f | ||
|
|
fc3db8f169 | ||
|
|
a21ad2fbe4 | ||
|
|
5ad056e99b | ||
|
|
fc16c9368e | ||
|
|
6db20b3ba9 | ||
|
|
09559611cc | ||
|
|
dee24f7acf | ||
|
|
e9350d8fc7 | ||
|
|
92e8d95f38 | ||
|
|
bdf95a5c22 | ||
|
|
393a844c9a | ||
|
|
bce54079d8 | ||
|
|
a2c5adc374 | ||
|
|
fb4cdecb68 | ||
|
|
413dc287b4 | ||
|
|
4609e2084b | ||
|
|
177f1785da | ||
|
|
813df77d07 | ||
|
|
d99d636696 | ||
|
|
fffff3760b | ||
|
|
ea0309d21b | ||
|
|
76ac551ed3 | ||
|
|
79102ef4f2 | ||
|
|
421609475e | ||
|
|
1e12c90c66 | ||
|
|
c408df1b0e | ||
|
|
e2f6569adb | ||
|
|
0de3d4c37a | ||
|
|
512f73f381 | ||
|
|
1a557d0918 | ||
|
|
1331e0aec9 | ||
|
|
b960809d3e | ||
|
|
4abaf3e279 | ||
|
|
732579b72b | ||
|
|
d9da752aa8 | ||
|
|
3ecda45bc4 | ||
|
|
8297dacfe5 | ||
|
|
be58d78417 | ||
|
|
45e9c3c438 | ||
|
|
95a6a2072b | ||
|
|
8dd7716ae5 | ||
|
|
60b58dbd67 | ||
|
|
1eedf734be | ||
|
|
54636a3213 | ||
|
|
679c317c57 | ||
|
|
2a65321884 | ||
|
|
7255dbe4b7 | ||
|
|
c68c8c79c9 | ||
|
|
6c366d73e2 | ||
|
|
6289413fea | ||
|
|
a772e18977 | ||
|
|
d6684f4b4c | ||
|
|
8c0ea694f8 | ||
|
|
8cee718e8b | ||
|
|
155b1aaa68 | ||
|
|
6e87daab69 | ||
|
|
1f3ade5923 | ||
|
|
4b181be58e | ||
|
|
d19bad1581 | ||
|
|
01f4a57118 | ||
|
|
b70ad0e2f1 | ||
|
|
ee94534906 | ||
|
|
50f4049b58 | ||
|
|
bb74b903d0 | ||
|
|
aeeccee106 | ||
|
|
aa5486f5f8 | ||
|
|
288ccd6215 | ||
|
|
a31bd5ac3c | ||
|
|
15295ef4c5 | ||
|
|
399755607d | ||
|
|
53415c8855 | ||
|
|
3e5e9569ff | ||
|
|
d964c3e081 | ||
|
|
0809956e5f | ||
|
|
e9f43516ec | ||
|
|
68b6ac7da8 | ||
|
|
367184628e | ||
|
|
5f7b9d8024 | ||
|
|
ec2735694b | ||
|
|
1e2b57bed4 | ||
|
|
2080cc7365 | ||
|
|
00dabce65e | ||
|
|
b8a5358e80 | ||
|
|
eb37f8f1fb | ||
|
|
cd21f0d316 | ||
|
|
1b524f5538 | ||
|
|
3aa16b63e8 | ||
|
|
23b84cd3ee | ||
|
|
53ee6db795 | ||
|
|
3bb12fde63 | ||
|
|
4ddb5f4245 | ||
|
|
a91e6179c5 | ||
|
|
05d76525b0 | ||
|
|
32f0446c9c | ||
|
|
b7376cc690 | ||
|
|
dc401f8a74 | ||
|
|
ab037e2c82 | ||
|
|
84132c6735 | ||
|
|
7f944cc43b | ||
|
|
0fceb6576a | ||
|
|
9c1827a77b | ||
|
|
cf00ffed32 | ||
|
|
e1be363037 | ||
|
|
34fc9d5d50 | ||
|
|
6462f4671c | ||
|
|
b231982286 | ||
|
|
df1b3367a9 | ||
|
|
2768da0637 | ||
|
|
a89642ad04 | ||
|
|
5bd5461f96 | ||
|
|
74a77e7b3d | ||
|
|
edf3a57a6a | ||
|
|
5587010cfb | ||
|
|
5cb6ddfd22 | ||
|
|
21ad3a1775 | ||
|
|
499897219e | ||
|
|
9c5fbb5208 | ||
|
|
4cb8712a35 | ||
|
|
62cd852c6f | ||
|
|
1ecc6d323e | ||
|
|
860ef58ace | ||
|
|
1fb1848586 | ||
|
|
eb689b2069 | ||
|
|
b77a4276f9 | ||
|
|
d4a42ed733 | ||
|
|
6b9155589a | ||
|
|
23a15bae5f | ||
|
|
6c119c0b06 | ||
|
|
daa1c8ef8c | ||
|
|
7437ecaab0 | ||
|
|
38984af03e | ||
|
|
78f762bd36 | ||
|
|
21a6112b91 | ||
|
|
53a5c354d8 | ||
|
|
fb2027cc8e | ||
|
|
fe3d926741 | ||
|
|
e45f0a4b64 | ||
|
|
d670850f55 | ||
|
|
acffd7bd1e | ||
|
|
bfabb0ddf4 | ||
|
|
5c8e125f06 | ||
|
|
3d8fd42307 | ||
|
|
76bb83085b | ||
|
|
3529268df8 | ||
|
|
22780da8d5 | ||
|
|
13dab51cc7 | ||
|
|
f35fad13c3 | ||
|
|
419483f128 | ||
|
|
328ff24657 | ||
|
|
6b5bdf773d | ||
|
|
af02ffb60f | ||
|
|
ac18d5a084 | ||
|
|
bbf42c3610 | ||
|
|
89a363aff6 | ||
|
|
f6cb869c63 | ||
|
|
044a11faca | ||
|
|
017e395ed1 | ||
|
|
0576dc2a49 | ||
|
|
fc58e564f0 | ||
|
|
8e84abfa0e | ||
|
|
a9547da138 | ||
|
|
92b80e2468 | ||
|
|
b502bb08e0 | ||
|
|
50ab34bfe6 | ||
|
|
53f133f669 | ||
|
|
29dbf78c4e | ||
|
|
efbfb7cbd6 | ||
|
|
1c4ce8b0f4 | ||
|
|
10506b5173 | ||
|
|
94471193c2 | ||
|
|
ba6a48c9fe | ||
|
|
48d640583a | ||
|
|
948a906037 | ||
|
|
9873972acb | ||
|
|
9b85669a64 | ||
|
|
833d0eee53 | ||
|
|
6027a7c799 | ||
|
|
9dac9945c9 | ||
|
|
efb712c2c0 | ||
|
|
43c1f6a3fd | ||
|
|
822c8e56f7 | ||
|
|
bb33d57971 | ||
|
|
13d99a9390 | ||
|
|
6c0a809de8 | ||
|
|
64929a75e0 | ||
|
|
02de8e10ca | ||
|
|
c2d8955c18 | ||
|
|
e9721eb4ce | ||
|
|
88f3519ab3 | ||
|
|
031cd04b7c | ||
|
|
d5d2a7e3f3 | ||
|
|
2051e51380 | ||
|
|
c92e0d13fd | ||
|
|
05d93790e4 | ||
|
|
32e4922c5a | ||
|
|
d4d82c27a5 | ||
|
|
addc775811 | ||
|
|
b68a3707f6 | ||
|
|
b0c4d01734 | ||
|
|
2c1b7cf1bd | ||
|
|
656323c334 | ||
|
|
8e1a3f5cdc | ||
|
|
58538b7d19 | ||
|
|
d0dbcf6dd6 | ||
|
|
8413faf2ef | ||
|
|
204f3ddff5 | ||
|
|
044ed14b4f | ||
|
|
51e86346d3 | ||
|
|
8e7a707be1 | ||
|
|
837ce7306b | ||
|
|
05dfae6430 | ||
|
|
d29a0241ee | ||
|
|
cbf1be5789 | ||
|
|
5f99433ee7 | ||
|
|
27bad14738 | ||
|
|
362baa6321 | ||
|
|
60a9f6610d | ||
|
|
0259ff58e1 | ||
|
|
d700ab3994 | ||
|
|
e6d206fd15 | ||
|
|
a263ac9024 | ||
|
|
87c43450f3 | ||
|
|
8ba1baace1 | ||
|
|
ff1cc1fa41 | ||
|
|
ea9177cc93 | ||
|
|
1385f05713 | ||
|
|
dcac633878 | ||
|
|
fdef6f3545 | ||
|
|
d0052fd5b2 | ||
|
|
bcce122665 | ||
|
|
6a7139bb24 | ||
|
|
b5b4512022 | ||
|
|
d81bc1add6 | ||
|
|
753b5dde16 | ||
|
|
9189aee83b | ||
|
|
4cc4efa228 | ||
|
|
ad8318e247 | ||
|
|
91e3292e6b | ||
|
|
98a81cb163 | ||
|
|
3a6ba7fa12 | ||
|
|
37abe0daea | ||
|
|
1c0e617d80 | ||
|
|
8db084ab06 | ||
|
|
ea4240055d | ||
|
|
5ac870074b | ||
|
|
7086197047 | ||
|
|
8ca13bc46a | ||
|
|
842c00e681 | ||
|
|
4c776501a6 | ||
|
|
7d5a0e1f04 | ||
|
|
a1014e8895 | ||
|
|
601928cc8e | ||
|
|
5a3956fe27 | ||
|
|
df14d225f6 | ||
|
|
fe5aa7ebca | ||
|
|
41d35fc7d0 | ||
|
|
799a6abfe6 | ||
|
|
8ed6409b35 | ||
|
|
3f49062db9 | ||
|
|
3cca5af8c3 | ||
|
|
7051acc0b5 | ||
|
|
580859a47d | ||
|
|
5d2551ff3e | ||
|
|
cefb667d8b | ||
|
|
8575a07113 | ||
|
|
460ff3c7ab | ||
|
|
029448759b | ||
|
|
448265a151 | ||
|
|
7da4abe6ad | ||
|
|
638624869a | ||
|
|
647c7d59bb | ||
|
|
f597086386 | ||
|
|
dd75060932 | ||
|
|
8bf95b6198 | ||
|
|
adab0139c2 | ||
|
|
bf9dbd6ccf | ||
|
|
e998fc28d1 | ||
|
|
1810281d7f | ||
|
|
f0325f713a | ||
|
|
5b27dfdd0c | ||
|
|
c17463539f | ||
|
|
2e8aa9f08e | ||
|
|
487d915262 | ||
|
|
5e1bb0dbc1 | ||
|
|
363ab2259c | ||
|
|
b94e13da43 | ||
|
|
97b80a8838 | ||
|
|
b8307eb855 | ||
|
|
46ba657562 | ||
|
|
4570dbfece | ||
|
|
35fd4ddb27 | ||
|
|
fe1e2c241f | ||
|
|
af3ce74e02 | ||
|
|
93003d0523 | ||
|
|
519ba7a9d5 | ||
|
|
b23cfd6b84 | ||
|
|
7a1147d733 | ||
|
|
d62ae567d1 | ||
|
|
23ec82b59d | ||
|
|
fef199ad45 | ||
|
|
b23781e807 | ||
|
|
da2684dbe1 | ||
|
|
7e9354ef23 | ||
|
|
f4421314b0 | ||
|
|
59ac73b37f | ||
|
|
115888ef7a | ||
|
|
248d756e99 | ||
|
|
9f431f9218 | ||
|
|
d87bdf9302 | ||
|
|
3a76786121 | ||
|
|
8e93f48c43 | ||
|
|
673d8b7fac | ||
|
|
1f921562d1 | ||
|
|
34a98abcc0 | ||
|
|
b501239d3f | ||
|
|
ebf89f46e3 | ||
|
|
019a64630b | ||
|
|
98a9afc40c | ||
|
|
13cbd1e4ae | ||
|
|
b31fde4bbb | ||
|
|
46ec91ca4b | ||
|
|
8090765a64 | ||
|
|
aa856735c0 | ||
|
|
9edddee0b7 | ||
|
|
d5cac570d6 | ||
|
|
0e363d0ca6 | ||
|
|
8c2c388d54 | ||
|
|
8fcb49af25 | ||
|
|
dfa9dd66c0 | ||
|
|
56a3a33bc0 | ||
|
|
8f74d5733d | ||
|
|
4ead6d6594 | ||
|
|
8da5f42fa0 | ||
|
|
2722861d6e | ||
|
|
95dfbdc64a | ||
|
|
c2156a5161 | ||
|
|
5b6ffad278 | ||
|
|
d3fb1fb25a | ||
|
|
79b89d2866 | ||
|
|
07d9fa7f96 | ||
|
|
00b2763399 | ||
|
|
e16675b700 | ||
|
|
ea10b8e757 | ||
|
|
57e28e03ee | ||
|
|
2ae4c6675d | ||
|
|
e71df49b3e | ||
|
|
6904935934 | ||
|
|
a828ac0191 | ||
|
|
c4b19fd6c5 | ||
|
|
02dc8d5feb | ||
|
|
32bd3d7a59 | ||
|
|
da87cc3157 | ||
|
|
69f140878c | ||
|
|
4b1cae2c2b | ||
|
|
7d843f4d17 | ||
|
|
95263fc32e | ||
|
|
1c405e382a | ||
|
|
b26539d65a | ||
|
|
6719fa30f9 | ||
|
|
21e2e57614 | ||
|
|
439558f6a3 | ||
|
|
0956badd11 | ||
|
|
a9ca47fcdb | ||
|
|
1c1be5a0d1 | ||
|
|
2723ac70ce | ||
|
|
3cd1ec5c9a | ||
|
|
a279423bff | ||
|
|
a3ba9253ef | ||
|
|
c450caae94 | ||
|
|
36af97a14c | ||
|
|
af5d792c08 | ||
|
|
8e2cd9ff43 | ||
|
|
88dd3ebd62 | ||
|
|
d9fc4d52e9 | ||
|
|
a688e36b51 | ||
|
|
f83d0b18c6 | ||
|
|
66178e37cc | ||
|
|
1740042cbb | ||
|
|
f6242f0e46 | ||
|
|
0a182c6d18 | ||
|
|
53b2b08aeb | ||
|
|
9c521c5ddd | ||
|
|
847eb7b180 | ||
|
|
d90b333363 | ||
|
|
f66cd5aabc | ||
|
|
4b4dcabeda | ||
|
|
879cec94b2 | ||
|
|
9f4f228832 | ||
|
|
b568c26989 | ||
|
|
29315cee6d | ||
|
|
f452dabd92 | ||
|
|
64fb40d21e | ||
|
|
6e1dcba9dd | ||
|
|
ebf18a0c61 | ||
|
|
a268952068 | ||
|
|
acd05b171e | ||
|
|
69ca98ca35 | ||
|
|
46e97d5da3 | ||
|
|
9f3e3e8456 | ||
|
|
91d132ea3d | ||
|
|
3fd3153089 | ||
|
|
a8ad99aca5 | ||
|
|
7744c225f9 | ||
|
|
e2e0303099 | ||
|
|
802254327a | ||
|
|
9d8717a0c7 | ||
|
|
9d35364ef1 | ||
|
|
051bdb1957 | ||
|
|
96c193cf79 | ||
|
|
23c0721538 | ||
|
|
35f1c362b9 | ||
|
|
12abcd516b | ||
|
|
014fdd9a02 | ||
|
|
9d8967236e | ||
|
|
6511db8941 | ||
|
|
b8d406b1f8 | ||
|
|
ce02359953 | ||
|
|
24fea66a26 | ||
|
|
d658ac9e61 | ||
|
|
f75984633b | ||
|
|
20fed83e0f | ||
|
|
f72b402aa2 | ||
|
|
4f794aec22 | ||
|
|
fd6a5bc1cd | ||
|
|
5be9370cd2 | ||
|
|
ccb30a04ad | ||
|
|
fb04dbbc47 | ||
|
|
f1dd8bc8c5 | ||
|
|
0c80e6ee3b | ||
|
|
e308e59002 | ||
|
|
1c60c22893 | ||
|
|
db707e0829 | ||
|
|
540326f3ff | ||
|
|
94bf7b0130 | ||
|
|
030f3f3d48 | ||
|
|
de25ba7d0b | ||
|
|
9bbcc2548e | ||
|
|
055422503c | ||
|
|
c0b34555c2 | ||
|
|
b4edb75824 | ||
|
|
dfb9e8ec1f | ||
|
|
c17a21359b | ||
|
|
6e8f268873 | ||
|
|
4b8c8608d1 | ||
|
|
503e3bb495 | ||
|
|
513c857631 | ||
|
|
f7b91b46fa | ||
|
|
143fcf0b0e | ||
|
|
ae89831055 | ||
|
|
8f53c231df | ||
|
|
974c1cc681 | ||
|
|
c08693fda5 | ||
|
|
08698c65e5 | ||
|
|
2d68f8f635 | ||
|
|
2860e3af15 | ||
|
|
be35d423b4 | ||
|
|
cf9c0b96b8 | ||
|
|
ea6332e004 | ||
|
|
392ce44573 | ||
|
|
05d7400563 | ||
|
|
ea30fcb5de | ||
|
|
3068306b60 | ||
|
|
0d2d44f1b6 | ||
|
|
07615903e2 | ||
|
|
2c263bc726 | ||
|
|
4a6c525db8 | ||
|
|
93a4a4387a | ||
|
|
f39e3c98f0 | ||
|
|
317d3ffd3e | ||
|
|
b24f5c4c0a | ||
|
|
d6a97219ea | ||
|
|
3669c14afd | ||
|
|
ece5d3e199 | ||
|
|
2cdf7ce806 | ||
|
|
2effa57d8a | ||
|
|
b68b45f3bb | ||
|
|
b2e89e6736 | ||
|
|
1010520cc4 | ||
|
|
f028cce209 | ||
|
|
fbfa54eee6 | ||
|
|
ff67e09101 | ||
|
|
76e6c38459 | ||
|
|
243104a8c2 | ||
|
|
1f4523e331 | ||
|
|
b5f3facf7c | ||
|
|
8566288e43 | ||
|
|
8de62c6d34 | ||
|
|
0cd0905400 | ||
|
|
56d87186f7 | ||
|
|
ebfb5e7f01 | ||
|
|
d805611fcb | ||
|
|
9742dcc45c | ||
|
|
f38a8bd7a5 | ||
|
|
3c66ca236b | ||
|
|
70a926088f | ||
|
|
6b69e7ebbc | ||
|
|
0b53bc2aab | ||
|
|
ecdf7df454 | ||
|
|
3034e53d00 | ||
|
|
2350daa2dc | ||
|
|
d710b8291d | ||
|
|
485e56d855 | ||
|
|
38c0d927a9 | ||
|
|
94a68451df | ||
|
|
17c26911fb | ||
|
|
ca68beda85 | ||
|
|
2f5766d2f5 | ||
|
|
39800c88fa | ||
|
|
678fbcdfd6 | ||
|
|
d9af1562f0 | ||
|
|
e29e14b7aa | ||
|
|
c9d8efc2a4 | ||
|
|
1a62f4c799 | ||
|
|
2a137100da | ||
|
|
6a9f5e4f7c | ||
|
|
fd0591b4fc | ||
|
|
48758d28ea | ||
|
|
14f514134d | ||
|
|
63670927e7 | ||
|
|
23594f0365 | ||
|
|
b2c24558c5 | ||
|
|
46d96e7f32 | ||
|
|
ffd20ebdf9 | ||
|
|
da37f2444f | ||
|
|
073e3a027b | ||
|
|
0ddc3a0052 | ||
|
|
38e4910636 | ||
|
|
4247dd8322 | ||
|
|
55364ef0b4 | ||
|
|
60aaa80570 | ||
|
|
0b9e46e65a | ||
|
|
64fab4a478 | ||
|
|
3506a07864 | ||
|
|
d318285cae | ||
|
|
1479c0a278 | ||
|
|
43ddbfdfba | ||
|
|
801c9481cb | ||
|
|
2beecdc8af | ||
|
|
605d548d4a | ||
|
|
0da76fdac6 | ||
|
|
597d6e5d60 | ||
|
|
67c72a8cb5 | ||
|
|
07c54f9992 | ||
|
|
16ca69733a | ||
|
|
40550073ef | ||
|
|
52893d99f6 | ||
|
|
86a3dc5bea | ||
|
|
5afa3ad818 | ||
|
|
af2a44ae5f | ||
|
|
241af016e9 | ||
|
|
16dc0ec29e | ||
|
|
29d9c2d2c8 | ||
|
|
669b7579ff | ||
|
|
a4f8d913ea | ||
|
|
dc5b4cbde0 | ||
|
|
b0bf66c436 | ||
|
|
c793e16050 | ||
|
|
b6eef17e54 | ||
|
|
374a24a1fb | ||
|
|
cbb0b864a2 | ||
|
|
61066fb106 | ||
|
|
4ceff1dc77 | ||
|
|
0271e29097 | ||
|
|
fcb50dec70 | ||
|
|
db5cd92fe1 | ||
|
|
3085d8e4ff | ||
|
|
9c3bfeca80 | ||
|
|
f6038c358a | ||
|
|
3108c75059 | ||
|
|
811d7a39b5 | ||
|
|
030e9dddb7 | ||
|
|
2dce6cd525 | ||
|
|
8fa5c31996 | ||
|
|
ee35834be6 | ||
|
|
e5c2c400ef | ||
|
|
bbbc5fdbae | ||
|
|
3874f0e0e0 | ||
|
|
83ae5b7256 | ||
|
|
c02b00e0ce | ||
|
|
07d9e4f9ba | ||
|
|
e9519c9aca | ||
|
|
329eff069e | ||
|
|
246ec53bcf | ||
|
|
cd65da69d3 | ||
|
|
068c1b1f22 | ||
|
|
b7e666e465 | ||
|
|
c5e16b4ff7 | ||
|
|
3d9285f1be | ||
|
|
c375782b96 | ||
|
|
8e7b1ea7a1 | ||
|
|
e90c5c7c32 | ||
|
|
7dfbfff743 | ||
|
|
da22aa5fc7 | ||
|
|
a183b2ab9b | ||
|
|
adfe6b763c | ||
|
|
9ed94a722c | ||
|
|
7037e79604 | ||
|
|
1edf5c49d6 | ||
|
|
baddfbb6c3 | ||
|
|
fb64346e28 | ||
|
|
50be0b0049 | ||
|
|
08f32f2e0e | ||
|
|
0a4fbb8cfb | ||
|
|
9dfd0d0071 | ||
|
|
17235d234e | ||
|
|
db16a987c5 | ||
|
|
f7f705406f | ||
|
|
cd765c08d6 | ||
|
|
ee15c6149d | ||
|
|
ae803c8b51 | ||
|
|
e5e69d0f7a | ||
|
|
b69177be2f | ||
|
|
f8503da9e9 | ||
|
|
39ae57e6a3 | ||
|
|
c9b37b92f5 | ||
|
|
4a09b4efa0 | ||
|
|
fd646bd05f | ||
|
|
6a1b8baa00 | ||
|
|
2ccd2c204b | ||
|
|
263547e77d | ||
|
|
86e34fbf6d | ||
|
|
84f66b4d6b | ||
|
|
7855e0318d | ||
|
|
48282369e2 | ||
|
|
7d63149ced | ||
|
|
427002d14f | ||
|
|
4148c5e065 | ||
|
|
c120cca662 | ||
|
|
7344bf65bc | ||
|
|
6f79b78f71 | ||
|
|
a70fd6ed3b | ||
|
|
bd0fd6cf8d | ||
|
|
0bf809f8e5 | ||
|
|
44259ab2b9 | ||
|
|
328016895f | ||
|
|
780dc8d1e7 | ||
|
|
4d746dabe9 | ||
|
|
097127c31d | ||
|
|
c2ebbb15ad | ||
|
|
f965983c23 | ||
|
|
8d8e61b256 | ||
|
|
0b702c20d3 | ||
|
|
473a5d1d0b | ||
|
|
65b428899d | ||
|
|
6769168d89 | ||
|
|
4d5ca2c473 | ||
|
|
e8cae3cff9 | ||
|
|
019b51bb17 | ||
|
|
e2be7daed6 | ||
|
|
1b73f7372e | ||
|
|
b1a6c6b895 | ||
|
|
e603549967 | ||
|
|
3bdec5ae5f | ||
|
|
25cd2a23a6 | ||
|
|
97badc574b | ||
|
|
493bffb3e0 | ||
|
|
c2b2692e65 | ||
|
|
db5f3b38b7 | ||
|
|
da0889d3ba | ||
|
|
94eee66a7b | ||
|
|
748df7972a | ||
|
|
a766de7b94 | ||
|
|
711ba99eaa | ||
|
|
32d25bfdaf | ||
|
|
287015ffdc | ||
|
|
f4c24663fc | ||
|
|
9f2dabbda4 | ||
|
|
4f370fe7c4 | ||
|
|
9483c842b5 | ||
|
|
c1f9f05d33 | ||
|
|
cf47ba234a | ||
|
|
98f2d3a73c | ||
|
|
c1baf1516d | ||
|
|
369dc65c1a | ||
|
|
4ec3e6c064 | ||
|
|
81e97d7515 | ||
|
|
32ab88a26e | ||
|
|
afdae85b30 | ||
|
|
63c4eaae9b | ||
|
|
4e876a4543 | ||
|
|
7b54d028a3 | ||
|
|
9cba06a080 | ||
|
|
794f7fa124 | ||
|
|
d3b4b81d6f | ||
|
|
1bee9d85a4 | ||
|
|
fa15e170b4 | ||
|
|
b75838b771 | ||
|
|
d665df64e2 | ||
|
|
e84563f971 | ||
|
|
a60854bae6 | ||
|
|
7b690d8b2d | ||
|
|
0c1322a718 | ||
|
|
b40732d8a5 | ||
|
|
db8497778d | ||
|
|
dea883a25d | ||
|
|
81a2f54dd7 | ||
|
|
c2c01b618b | ||
|
|
fb863c6bfb | ||
|
|
7ce478a58b | ||
|
|
3bbb0cd329 | ||
|
|
56ca71bda9 | ||
|
|
498571354d | ||
|
|
3924257f32 | ||
|
|
817aa54214 | ||
|
|
97fc94c7e8 | ||
|
|
9ec711aa90 | ||
|
|
9c2c04d8ce | ||
|
|
4f399356a6 | ||
|
|
45ff2a3f5a | ||
|
|
58f0f29113 | ||
|
|
da5e5a3e2a | ||
|
|
17d531e3db | ||
|
|
0d223ada3f | ||
|
|
890e8644ac | ||
|
|
1bab8a1c22 | ||
|
|
24bb0b7f53 | ||
|
|
803b13a7a8 | ||
|
|
7841145d9c | ||
|
|
efdac78ddc | ||
|
|
74825ffc6e | ||
|
|
1b8f7ed101 | ||
|
|
9cf016c5f1 | ||
|
|
47a4507d9e | ||
|
|
779d9a6e51 | ||
|
|
ac17e0bea7 | ||
|
|
4d95dae2ae | ||
|
|
6c3cbe50e2 | ||
|
|
a2b163beca | ||
|
|
c8a1767465 | ||
|
|
40be74c629 | ||
|
|
df5cf59787 | ||
|
|
d26349e082 | ||
|
|
7add3acc53 | ||
|
|
1c1a18d12f | ||
|
|
92bd223c34 | ||
|
|
9d53c3c3b8 | ||
|
|
906d7fe0c1 | ||
|
|
cd78740caf | ||
|
|
626ee52049 | ||
|
|
7a93994802 | ||
|
|
1bb10863e4 | ||
|
|
924bc9698b | ||
|
|
9aba94713c | ||
|
|
00beac6b1a | ||
|
|
8c2ffc5b37 | ||
|
|
a845e99720 | ||
|
|
8cda02bb14 | ||
|
|
3e259aac98 | ||
|
|
2aec630202 | ||
|
|
c6acf97bfb | ||
|
|
e9195589d2 | ||
|
|
b2cbe76e71 | ||
|
|
4227be7989 | ||
|
|
e282e43279 | ||
|
|
2f15ce706f | ||
|
|
70ee793ff3 | ||
|
|
7806eb5f5b | ||
|
|
9d1340a8e7 | ||
|
|
7a2bcd9c39 | ||
|
|
fe513014a8 | ||
|
|
3c05d4551d | ||
|
|
4976d93d4e | ||
|
|
1e933e8b02 | ||
|
|
942a71c7eb | ||
|
|
7fd135a8c9 | ||
|
|
34ad06fef5 | ||
|
|
8f45f51e6c | ||
|
|
9f72b15fff | ||
|
|
6fe9535881 | ||
|
|
5fc9d41eb0 | ||
|
|
933351840d | ||
|
|
83fdfe24d0 | ||
|
|
d4c093e828 | ||
|
|
c0ec78885d | ||
|
|
a55c410202 | ||
|
|
e675be1a83 | ||
|
|
f07a329447 | ||
|
|
2ceff3e214 | ||
|
|
dcb6fde0c9 | ||
|
|
e67604a583 | ||
|
|
40896d3d44 | ||
|
|
5a0f609086 | ||
|
|
2972e29097 | ||
|
|
dd80ec869a | ||
|
|
1714d7aa52 | ||
|
|
90e08b3568 | ||
|
|
080e23e30e | ||
|
|
edce5a8c1f | ||
|
|
c8ccf33f07 | ||
|
|
ee979ac14a | ||
|
|
3eb9907dd7 | ||
|
|
fdf8dd724f | ||
|
|
37121a9b58 | ||
|
|
bbaf9147b6 | ||
|
|
9796fdc0e9 | ||
|
|
e0a058af67 | ||
|
|
80e9826040 | ||
|
|
bf7dcd63c3 | ||
|
|
b287dccecf | ||
|
|
cb34c6b233 | ||
|
|
fd94270507 | ||
|
|
03cf975c07 | ||
|
|
428661c00b | ||
|
|
5c52c00ea4 | ||
|
|
f89f25c118 | ||
|
|
d4ae8a5f16 | ||
|
|
7234f36949 | ||
|
|
2efc09a20e | ||
|
|
3fa61a394b | ||
|
|
582a01303f | ||
|
|
97fb50e837 | ||
|
|
a3da5604a3 | ||
|
|
af6c86de28 | ||
|
|
34984f1aec | ||
|
|
83bbb4cb69 | ||
|
|
ff4f32ff48 | ||
|
|
33d761a55a | ||
|
|
2bd89be3e2 | ||
|
|
5cad39f0e8 | ||
|
|
3be263aafc | ||
|
|
452ba1f339 | ||
|
|
ec15089208 | ||
|
|
af661bd652 | ||
|
|
4613515635 | ||
|
|
2009361b89 | ||
|
|
f027ab1ae7 | ||
|
|
fa26c62b0c | ||
|
|
0faba29351 | ||
|
|
2701cc9491 | ||
|
|
88fc9232ff | ||
|
|
0703ab5ac5 | ||
|
|
418ea234ae | ||
|
|
3e99b73635 | ||
|
|
6dbe81588f | ||
|
|
2b6a639192 | ||
|
|
9e87645022 | ||
|
|
626fcf1418 | ||
|
|
5b11c2ffc5 | ||
|
|
8486eb08ea | ||
|
|
ce4f4fbe2f | ||
|
|
3422574c17 | ||
|
|
b3138d5e3e | ||
|
|
0bf2ca56a8 | ||
|
|
b97360d931 | ||
|
|
579dd7dff9 | ||
|
|
ff89a14b49 | ||
|
|
b5b2260f2e | ||
|
|
39b1ad3087 | ||
|
|
c68ea3067b | ||
|
|
4e538b1e4d | ||
|
|
5c8c2d843a | ||
|
|
ea957687e1 | ||
|
|
c84ed5a712 | ||
|
|
ab2a011cf9 | ||
|
|
d86d632fe6 | ||
|
|
87d228f78e | ||
|
|
a7a4bf32d3 | ||
|
|
e20c4acbde | ||
|
|
daf15e70bf | ||
|
|
daa1171593 | ||
|
|
dc5fecfc92 | ||
|
|
79e1ec9f50 | ||
|
|
902a1c7b4c | ||
|
|
5b88867084 | ||
|
|
4749e61bdb | ||
|
|
4f230943cf | ||
|
|
6186e1ab01 | ||
|
|
9fe8bf018a | ||
|
|
e082134a0d | ||
|
|
cedbf3b636 | ||
|
|
5f6fd8d2a5 | ||
|
|
cbb755666e | ||
|
|
1d024ece7a | ||
|
|
77db14fd7a | ||
|
|
5a40f9b7fd | ||
|
|
931f51bd77 | ||
|
|
283588a37b | ||
|
|
812505b56b | ||
|
|
98d9f524f9 | ||
|
|
0023a96f80 | ||
|
|
9f7b1c84f2 | ||
|
|
e1047b324b | ||
|
|
10738a0ca3 | ||
|
|
fe312ffbe1 | ||
|
|
24f2cd6fc1 | ||
|
|
cbabbd5865 | ||
|
|
da5208ee68 | ||
|
|
bccf1c433a | ||
|
|
cc7593fe5a | ||
|
|
5571ce114d | ||
|
|
4dd887e516 | ||
|
|
a3e06da2a8 | ||
|
|
dc21079851 | ||
|
|
5987ec6014 | ||
|
|
757b0c602f | ||
|
|
498b346219 | ||
|
|
3e66bbc5bc | ||
|
|
3ba7667887 | ||
|
|
fd943d6000 | ||
|
|
691778df33 | ||
|
|
81c3f5813c | ||
|
|
fdf402d027 | ||
|
|
f0014a5a24 | ||
|
|
53a5be3399 | ||
|
|
f389969c0b | ||
|
|
dc02afa3ea | ||
|
|
d1fb41a161 | ||
|
|
ef16591f3f | ||
|
|
29dd45838d | ||
|
|
798bb6e2e1 | ||
|
|
2332cbfefe | ||
|
|
a58a135758 | ||
|
|
634457615c | ||
|
|
cb825766ea | ||
|
|
8b01056b21 | ||
|
|
f6c7a33177 | ||
|
|
daae1cc9b1 | ||
|
|
499c80535b | ||
|
|
9fb3a57a71 | ||
|
|
257ec7cc5f | ||
|
|
73c7ccdb65 | ||
|
|
cffb11fbc9 | ||
|
|
23421b47d9 | ||
|
|
1cab9fe838 | ||
|
|
27ea04c08e | ||
|
|
5c225b8a2e | ||
|
|
4961241c62 | ||
|
|
843204299c | ||
|
|
09cd95d54a | ||
|
|
1d3bef41a4 | ||
|
|
e21fe5d594 | ||
|
|
9133955219 | ||
|
|
acb74905a5 | ||
|
|
ed3fff554a | ||
|
|
7ebe6a0c82 | ||
|
|
87333aa68c | ||
|
|
e593319ba0 | ||
|
|
812a3e7099 | ||
|
|
1097f5488d | ||
|
|
b90410e335 | ||
|
|
deed27cbef | ||
|
|
ea001b439a | ||
|
|
14e5adc7c2 | ||
|
|
81012b3201 | ||
|
|
406aa12468 | ||
|
|
2c2bb11c9b | ||
|
|
1bd63d68a5 | ||
|
|
bf5e9b7b0b | ||
|
|
7fe9dddf65 | ||
|
|
6d7f3976f3 | ||
|
|
65d526d8f6 | ||
|
|
56eeb965bf | ||
|
|
c4d476cc58 | ||
|
|
23b0b8625d | ||
|
|
558983c99c | ||
|
|
c8d6f2845f | ||
|
|
1a115cac5a | ||
|
|
11401edfe7 | ||
|
|
239842b821 | ||
|
|
606ff10ecf | ||
|
|
d37b69ce9c | ||
|
|
226a9abf22 | ||
|
|
f26096ee4c | ||
|
|
2b3ef7e762 | ||
|
|
d62526f9ed | ||
|
|
e66d7216b8 | ||
|
|
fbc59c5f81 | ||
|
|
32dc9e3225 | ||
|
|
b4468239b9 | ||
|
|
95c1282ef4 | ||
|
|
a7b0457753 | ||
|
|
7da7ae622b | ||
|
|
a95cfcc989 | ||
|
|
a65c959940 | ||
|
|
d328c3bccc | ||
|
|
8368568443 | ||
|
|
c223bb1f10 | ||
|
|
c7efd0892f | ||
|
|
ae9429408b | ||
|
|
0ce56d5714 | ||
|
|
509cfcb556 | ||
|
|
3b203d57e9 | ||
|
|
68d66b780c | ||
|
|
f94d6cca7d | ||
|
|
382217887b | ||
|
|
537c11a985 | ||
|
|
bdc0719e76 | ||
|
|
fc82cdfa4a | ||
|
|
e98b994a39 | ||
|
|
a58c838c4c | ||
|
|
f91f2c57ef | ||
|
|
68b7986d9b | ||
|
|
ead0325deb | ||
|
|
0b819badd2 | ||
|
|
3754e6dd12 | ||
|
|
da029607a0 | ||
|
|
803dc6ff77 | ||
|
|
65a629304c | ||
|
|
51cfdfb0d8 | ||
|
|
53108c9ff1 | ||
|
|
82a186e096 | ||
|
|
e467fe9aa6 | ||
|
|
7a1940e1f7 | ||
|
|
6b7c56c909 | ||
|
|
470d30ac23 | ||
|
|
7e87bfd039 | ||
|
|
ab9ccf9eb9 | ||
|
|
15ec013af8 | ||
|
|
748f10c0d6 | ||
|
|
8181d63a95 | ||
|
|
d0e7e69552 | ||
|
|
0558d641f2 | ||
|
|
ac46a4dd58 | ||
|
|
fb56b042c0 | ||
|
|
6298ecc271 | ||
|
|
a26fe08aa6 | ||
|
|
5b2c0f68fe | ||
|
|
e695dd6ead | ||
|
|
953571e3d8 | ||
|
|
01455c3188 | ||
|
|
a5210af823 | ||
|
|
9e42b525ec | ||
|
|
02d69b72f5 | ||
|
|
c998e2e9ef | ||
|
|
a3a85106a1 | ||
|
|
75302a10bd | ||
|
|
2ab0433aca | ||
|
|
e272db0f7f | ||
|
|
3580765ba3 | ||
|
|
cb79d89f83 | ||
|
|
2e178d0f05 | ||
|
|
edf0b171e2 | ||
|
|
148506ede8 | ||
|
|
c0a08d9ca2 | ||
|
|
4802987178 | ||
|
|
1cd7cf9990 | ||
|
|
4830755fac | ||
|
|
124545e1ed | ||
|
|
af01e61c89 | ||
|
|
9400a3b9ef | ||
|
|
6e314ea6d7 | ||
|
|
dfd962a8bc | ||
|
|
cfcbfe1e8f | ||
|
|
0e54f87b18 | ||
|
|
9f5e5b90e5 | ||
|
|
d619ba0857 | ||
|
|
fbea243e56 | ||
|
|
d062386656 | ||
|
|
d2f04f5bdf | ||
|
|
42c8d3ac27 | ||
|
|
d53563ab46 | ||
|
|
3d5f0ee315 | ||
|
|
ecdb7cdc55 | ||
|
|
fd38b752c4 | ||
|
|
64804a2a24 | ||
|
|
b603cb4530 | ||
|
|
8f2c7c0638 | ||
|
|
044ba7697a | ||
|
|
e6bd64b3ea | ||
|
|
56db916833 | ||
|
|
12cf0c4763 | ||
|
|
0a92e0f532 | ||
|
|
e6f9177fdb | ||
|
|
c3f6a4a57a | ||
|
|
653c209253 | ||
|
|
0974075fa0 | ||
|
|
53e1ee3475 | ||
|
|
46affea055 | ||
|
|
0ffe5cf1ff | ||
|
|
d023f9bf2d | ||
|
|
b2832cee8e | ||
|
|
960aa77b6d | ||
|
|
58daa5ed7d | ||
|
|
437e8bd706 | ||
|
|
1a5c7daaf6 | ||
|
|
c1ba4764b5 | ||
|
|
7cb3cb7353 | ||
|
|
604abaf81c | ||
|
|
8b157bb13f | ||
|
|
a8c71dcd20 | ||
|
|
363a8f6282 | ||
|
|
5b314cf1c3 | ||
|
|
02783bd7c6 | ||
|
|
d5c918d258 | ||
|
|
6b044335cd | ||
|
|
cbe20d3740 | ||
|
|
21bc84e837 | ||
|
|
203359ed7f | ||
|
|
24a26a2e94 | ||
|
|
0a7521060a | ||
|
|
6b5a9aa992 | ||
|
|
2dfdaa4d70 | ||
|
|
f2504494fe | ||
|
|
256858d2e5 | ||
|
|
10873bfe35 | ||
|
|
e939f1c1d1 | ||
|
|
b2c8cb655c | ||
|
|
4bdbf02c2d | ||
|
|
f83b2a0940 | ||
|
|
76ec74cbf1 | ||
|
|
8ae5da1472 |
@@ -0,0 +1,6 @@
|
||||
*.sh -crlf
|
||||
*.ac -crlf
|
||||
*.am -crlf
|
||||
|
||||
#Content files are C file
|
||||
*.inc linguist-language=C
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
name: "🐞 Report a Bug"
|
||||
about: Create a report to help us improve nDPI
|
||||
title: ''
|
||||
labels: 'bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Describe the bug
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
### Expected behavior
|
||||
A clear and concise description of what you expected to happen.
|
||||
### Obtained behavior
|
||||
A clear and concise description of what happening.
|
||||
|
||||
## nDPI Environment (please complete the following information):
|
||||
* OS name: [e.g. Ubuntu].
|
||||
* OS version: [e.g. 18.04]
|
||||
* Architecture: [e.g. arm64]
|
||||
* nDPI version or commit hash: [e.g. 4.0-stable or 937357e4bc55610f116f66d15a8e0fc1e260c02c].
|
||||
* nDPI compilation flags used: if you are building from source [e.g. --with-pcre --disable-gcrypt].
|
||||
* Attach the `config.log` file generated after `./configure` ran (if you are building from source).
|
||||
|
||||
## How to reproduce the reported bug
|
||||
|
||||
### Reproducible using ndpiReader?
|
||||
- [x] The reported bug is reproducible using ndpiReader.
|
||||
- [x] The reported bug is not reproducible using ndpiReader.
|
||||
|
||||
### If applicable, the used ndpiReader options:
|
||||
|
||||
``` shell
|
||||
ndpiReader -q -t -i wlo1 -T 20 -U 20
|
||||
```
|
||||
|
||||
### If your bug is reproducible using a pcap, please attach a pcap file (or a valid link to download it)
|
||||
|
||||
Example: test.pcap
|
||||
|
||||
### Steps to reproduce the behavior:
|
||||
1. Run '...'
|
||||
2. Set '....'
|
||||
3. Do '....'
|
||||
4. See error
|
||||
|
||||
## Additional context
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "💡 Suggest an Improvement or Feature"
|
||||
about: Suggest an idea or a feature for nDPI
|
||||
title: ''
|
||||
labels: 'enhancement'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I always need to [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: General question
|
||||
about: Ask a question about nDPI
|
||||
title: ''
|
||||
labels: 'question'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Type your question in a clear and concise way to help the community answering it.
|
||||
@@ -0,0 +1,289 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
types: [opened, synchronize, reopened]
|
||||
release:
|
||||
types: [created]
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.gcrypt }} ${{ matrix.compiler }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} ${{ matrix.msan }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false # Debugging purposes, switch to true when all issues on big endian is solved
|
||||
matrix:
|
||||
os: ["ubuntu-latest", "ubuntu-18.04", "macOS-latest", "macos-11"]
|
||||
arch: ["x86_64"]
|
||||
gcrypt: ["--disable-gcrypt", ""]
|
||||
compiler: ["default-cc"]
|
||||
pcre: [""]
|
||||
maxminddb: [""]
|
||||
msan: [""]
|
||||
include:
|
||||
- compiler: "gcc-7"
|
||||
os: ubuntu-latest
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "gcc-10"
|
||||
os: ubuntu-latest
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "clang-7"
|
||||
os: ubuntu-latest
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "clang-12"
|
||||
os: ubuntu-latest
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "default-cc"
|
||||
os: ubuntu-latest
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "default-cc"
|
||||
os: ubuntu-18.04
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "default-cc"
|
||||
os: macOS-latest
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "" # Disable sanitizer on macos
|
||||
- compiler: "default-cc"
|
||||
os: macos-11
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "" # Disable sanitizer on macos
|
||||
- compiler: "default-cc"
|
||||
os: ubuntu-latest
|
||||
arch: "arm64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "" # Disable sanitizer on arm64
|
||||
- compiler: "default-cc"
|
||||
os: ubuntu-latest
|
||||
arch: "armhf"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "default-cc"
|
||||
os: ubuntu-latest
|
||||
arch: "s390x"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: ""
|
||||
steps:
|
||||
- name: Setup multiarch/qemu-user-static
|
||||
if: startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: Install Ubuntu Prerequisites
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
|
||||
sudo apt-get install gcc-mingw-w64 libc6-dev
|
||||
sudo apt-get install doxygen python3-sphinx python3-sphinx-rtd-theme python3-breathe python3-pip
|
||||
sudo apt-get install rrdtool librrd-dev
|
||||
- name: Install Ubuntu Prerequisites (libgcrypt)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
|
||||
run: |
|
||||
sudo apt-get install libgcrypt20-dev
|
||||
- name: Install Ubuntu Prerequisites (libpcre)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.pcre, '--with-pcre')
|
||||
run: |
|
||||
sudo apt-get install libpcre3-dev
|
||||
- name: Install Ubuntu Prerequisites (maxminddb)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.maxminddb, '--with-maxminddb')
|
||||
run: |
|
||||
sudo apt-get install libmaxminddb-dev
|
||||
- name: Setup Ubuntu specified compiler (gcc)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'gcc')
|
||||
run: |
|
||||
sudo apt-get install ${{ matrix.compiler }}
|
||||
- name: Setup Ubuntu specified compiler (clang)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'clang')
|
||||
run: |
|
||||
sudo apt-get install ${{ matrix.compiler }}
|
||||
- name: Installing MacOS prerequisites
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
brew install autoconf automake libtool pkg-config gettext json-c
|
||||
brew install coreutils
|
||||
brew install rrdtool
|
||||
- name: Install MacOS Prerequisites (libgcrypt)
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
|
||||
run: |
|
||||
brew install libgcrypt
|
||||
- name: Install MacOS Prerequisites (libpcre)
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.pcre, '--with-pcre')
|
||||
run: |
|
||||
brew install pcre
|
||||
- name: Install MacOS Prerequisites (maxminddb)
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.maxminddb, '--with-maxminddb')
|
||||
run: |
|
||||
brew install libmaxminddb
|
||||
- name: Configure nDPI on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
|
||||
run: |
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
- name: Configure nDPI on MacOS
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
|
||||
run: |
|
||||
env CC=clang CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
- name: Configure nDPI with specified GCC version on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'gcc')
|
||||
run: |
|
||||
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
- name: Configure nDPI with specified CLANG on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'clang')
|
||||
run: |
|
||||
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
- name: Build nDPI
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make all
|
||||
make -C example ndpiSimpleIntegration
|
||||
make -C rrdtool
|
||||
make -C python
|
||||
- name: Install nDPI
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make install DESTDIR=$(realpath _install)
|
||||
ls -alhHR _install
|
||||
- name: Test nDPI [DIFF]
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
./tests/do.sh
|
||||
- name: Test nDPI [UNIT]
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
./tests/do-unit.sh
|
||||
- name: Test nDPI [DGA]
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
./tests/do-dga.sh
|
||||
- name: Generate tarball
|
||||
if: startsWith(matrix.os, 'ubuntu-latest') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make dist
|
||||
- name: Generate documentation
|
||||
if: startsWith(matrix.os, 'ubuntu-latest') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
pip3 install --user sphinxcontrib.swaggerdoc
|
||||
make -C doc text
|
||||
make -C doc html
|
||||
- name: Configure nDPI [Mingw-w64] (runs only on ubuntu jobs)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make distclean && ./autogen.sh --host=x86_64-w64-mingw32 ${{ matrix.gcrypt }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
- name: Build nDPI [Mingw-w64] (runs only on ubuntu jobs)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make all
|
||||
- name: Display qemu specified architecture (arm64 - little endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'arm64')
|
||||
uses: docker://multiarch/ubuntu-core:arm64-bionic
|
||||
with:
|
||||
args: >
|
||||
bash -c
|
||||
"uname -a &&
|
||||
lscpu | grep Endian
|
||||
"
|
||||
- name: Configure, compile and test using qemu for the specified architecture (arm64 - little endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'arm64')
|
||||
uses: docker://multiarch/ubuntu-core:arm64-bionic
|
||||
with:
|
||||
args: >
|
||||
bash -c
|
||||
"apt-get -y update &&
|
||||
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
|
||||
make all &&
|
||||
make -C example ndpiSimpleIntegration &&
|
||||
make -C rrdtool &&
|
||||
make -C python &&
|
||||
./tests/do.sh &&
|
||||
./tests/do-unit.sh
|
||||
"
|
||||
- name: Display qemu specified architecture (armhf - little endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'armhf')
|
||||
uses: docker://multiarch/ubuntu-core:armhf-bionic
|
||||
with:
|
||||
args: >
|
||||
bash -c
|
||||
"uname -a &&
|
||||
lscpu | grep Endian
|
||||
"
|
||||
- name: Configure, compile and test using qemu for the specified architecture (armhf - little endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'armhf')
|
||||
uses: docker://multiarch/ubuntu-core:armhf-bionic
|
||||
with:
|
||||
args: >
|
||||
bash -c
|
||||
"apt-get -y update &&
|
||||
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
|
||||
make all &&
|
||||
make -C example ndpiSimpleIntegration &&
|
||||
make -C rrdtool &&
|
||||
make -C python &&
|
||||
./tests/do.sh &&
|
||||
./tests/do-unit.sh
|
||||
"
|
||||
- name: Display qemu specified architecture (s390x - big endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 's390x')
|
||||
uses: docker://multiarch/ubuntu-core:s390x-bionic
|
||||
with:
|
||||
args: >
|
||||
bash -c
|
||||
"uname -a &&
|
||||
lscpu | grep Endian
|
||||
"
|
||||
- name: Configure and compile (no tests) using qemu for the specified architecture (s390x - big endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 's390x')
|
||||
uses: docker://multiarch/ubuntu-core:s390x-bionic
|
||||
with: #./tests/do.sh disabled because we know we have some problems with big-endian machines
|
||||
args: >
|
||||
bash -c
|
||||
"apt-get -y update &&
|
||||
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
|
||||
make all &&
|
||||
make -C example ndpiSimpleIntegration &&
|
||||
make -C rrdtool &&
|
||||
make -C python &&
|
||||
./tests/do-unit.sh
|
||||
"
|
||||
@@ -0,0 +1,34 @@
|
||||
name: CIFuzz
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer: [address, undefined, memory]
|
||||
steps:
|
||||
- name: Build Fuzzers - ${{ matrix.sanitizer }}
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'ndpi'
|
||||
dry-run: false
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Run Fuzzers - ${{ matrix.sanitizer }}
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'ndpi'
|
||||
fuzz-seconds: 600
|
||||
dry-run: false
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Check Crash (fails when a crash is detected)
|
||||
# Run Fuzzers return success even when setting dry-run to false.
|
||||
# A temporal workaround is to trigger failure manually if we fing crash files.
|
||||
run: |
|
||||
exit $(ls out/artifacts |wc -l)
|
||||
- name: Upload Crash (upload detected crash as artifacts)
|
||||
uses: actions/upload-artifact@v1
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ matrix.sanitizer }}-artifacts
|
||||
path: ./out/artifacts
|
||||
+26
-1
@@ -11,7 +11,6 @@ compile
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/configure.ac
|
||||
/configure.tmp
|
||||
.cproject
|
||||
/depcomp
|
||||
@@ -21,6 +20,7 @@ compile
|
||||
/example/ndpiReader
|
||||
/example/Makefile.dpdk
|
||||
/example/build
|
||||
/example/ndpiSimpleIntegration
|
||||
*.in
|
||||
/install-sh
|
||||
*.ko
|
||||
@@ -45,6 +45,7 @@ compile
|
||||
.settings
|
||||
/src/include/Makefile
|
||||
/src/include/ndpi_config.h
|
||||
/src/include/ndpi_api.h
|
||||
/src/include/ndpi_define.h
|
||||
/src/lib/.deps/
|
||||
/src/lib/Makefile
|
||||
@@ -54,3 +55,27 @@ stamp-h1
|
||||
*.swp
|
||||
/test-driver
|
||||
/tests/Makefile
|
||||
/fuzz/.deps/
|
||||
/fuzz/Makefile
|
||||
/fuzz/fuzz_ndpi_reader
|
||||
/fuzz/fuzz_ndpi_reader_with_main
|
||||
/fuzz/fuzz_process_packet
|
||||
/fuzz/fuzz_process_packet_with_main
|
||||
/python/Makefile
|
||||
/tests/dga/Makefile
|
||||
/tests/do.sh
|
||||
/tests/unit/Makefile
|
||||
/example/libndpiReader.a
|
||||
/example/ndpiReader.exe
|
||||
/src/lib/libndpi.a
|
||||
/src/lib/libndpi.so*
|
||||
/src/lib/libndpi
|
||||
/src/lib/libndpi-4.1.0.dll
|
||||
/src/lib/libndpi.4
|
||||
/tests/dga/dga_evaluate
|
||||
/tests/unit/unit
|
||||
/tags
|
||||
/rrdtool/Makefile
|
||||
/rrdtool/rrd_anomaly
|
||||
/rrdtool/rrd_similarity
|
||||
/tests/performance/Makefile
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* @name Suspicious packet->payload based integer arithmetic
|
||||
* @description An arithmetic operation influenced array access is suspicious
|
||||
* if it uses an integer value that is likely to be network-controlled, and
|
||||
* may require a closer manual audit.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @id cpp/packet-payload-integer-arithmetic
|
||||
* @tags audit security
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
import semmle.code.cpp.dataflow.TaintTracking
|
||||
import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
|
||||
|
||||
/** A source of an integer value that is likely to come from the network.
|
||||
* This is produced by an invocation of a macro of the form `ntoh*` or `get_u_int*_t`,
|
||||
* called with `packet->payload` as an argument.
|
||||
*/
|
||||
|
||||
class NetworkMacro extends Macro {
|
||||
NetworkMacro() { this.getName().regexpMatch("^ntoh(ll|l|s)") }
|
||||
}
|
||||
|
||||
class NetworkIntegerSource extends Expr {
|
||||
NetworkIntegerSource() {
|
||||
exists(MacroInvocation mi |
|
||||
this = mi.getExpr() and
|
||||
mi.getUnexpandedArgument(0).regexpMatch(".*packet->payload.*") |
|
||||
// catch all get_u_int*_t(x)
|
||||
mi.getMacroName().regexpMatch("^get_u_int(64|32|16|8)_t") and
|
||||
// dedup ntoh*(get_u_int*_t(x)) since we'll catch those in the next case
|
||||
not mi.getOutermostMacroAccess().getMacro() instanceof NetworkMacro
|
||||
or
|
||||
// catch all ntoh*(x) ... this will also catch the nested cases
|
||||
mi.getMacro() instanceof NetworkMacro
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class ArithmeticOperation extends Operation {
|
||||
ArithmeticOperation() {
|
||||
this instanceof UnaryArithmeticOperation or this instanceof BinaryArithmeticOperation
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkToArrayAccess extends TaintTracking::Configuration {
|
||||
NetworkToArrayAccess() { this = "NetworkToArrayAccess" }
|
||||
|
||||
override predicate isSource(DataFlow::Node source) {
|
||||
source.asExpr() instanceof NetworkIntegerSource
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
exists(ArrayExpr ae | sink.asExpr() = ae.getArrayOffset())
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkToArithmetic extends TaintTracking::Configuration {
|
||||
NetworkToArithmetic() { this = "NetworkToArithmetic" }
|
||||
|
||||
override predicate isSource(DataFlow::Node source) {
|
||||
source.asExpr() instanceof NetworkIntegerSource
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
exists (Assignment assign |
|
||||
sink.asExpr() = assign.getRValue().(ArithmeticOperation) or
|
||||
sink.asExpr() = assign.(AssignArithmeticOperation)
|
||||
) or
|
||||
exists(LocalVariable var |
|
||||
sink.asExpr() = var.getInitializer().getExpr().(ArithmeticOperation)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// find audit candidates based on suspicious network integer use
|
||||
from NetworkIntegerSource source, Expr sink1, Expr sink2, NetworkToArithmetic config1, NetworkToArrayAccess config2
|
||||
where config1.hasFlow(DataFlow::exprNode(source), DataFlow::exprNode(sink1))
|
||||
// or this if you want integer arithmeric _OR_ array accesses
|
||||
and config2.hasFlow(DataFlow::exprNode(source), DataFlow::exprNode(sink2))
|
||||
select source, "Suspicious use of network integer arithmetic."
|
||||
-107
@@ -1,107 +0,0 @@
|
||||
language: c
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libpcap-dev
|
||||
- autogen
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libpcap-dev
|
||||
- autogen
|
||||
|
||||
- os: linux
|
||||
compiler: gcc-8
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-8
|
||||
- libpcap-dev
|
||||
- autogen
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
|
||||
- os: linux
|
||||
compiler: gcc-9
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-9
|
||||
- libpcap-dev
|
||||
- autogen
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
|
||||
|
||||
- os: linux
|
||||
compiler: clang-8
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-8
|
||||
packages:
|
||||
- clang-8
|
||||
- libpcap-dev
|
||||
- autogen
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
|
||||
- os: linux
|
||||
compiler: clang-7
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
packages:
|
||||
- clang-7
|
||||
- libpcap-dev
|
||||
- autogen
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"
|
||||
|
||||
|
||||
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
|
||||
before_script:
|
||||
- ./autogen.sh
|
||||
# - lcov --directory . --zerocounters
|
||||
|
||||
script:
|
||||
- ./configure
|
||||
- make
|
||||
|
||||
#after_script:
|
||||
- cd tests
|
||||
- ./do.sh
|
||||
|
||||
#after_success:
|
||||
#- cd ${TRAVIS_BUILD_DIR}
|
||||
#- lcov --directory . --capture --output-file coverage.info # capture coverage info
|
||||
#- lcov --remove coverage.info 'tests/*' 'packages/*' 'm4/*' 'doc/*' --output-file coverage.info
|
||||
#- lcov --list coverage.info # debug before upload
|
||||
#- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info # uploads to coveralls
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- packager@ntop.org
|
||||
on_success: never
|
||||
on_failure: always
|
||||
+373
-6
@@ -1,5 +1,373 @@
|
||||
# CHANGELOG
|
||||
|
||||
#### nDPI 4.2 (Feb 2022)
|
||||
|
||||
## New Features
|
||||
- Add a "confidence" field indicating the reliability of the classification
|
||||
- Add risk exceptions for services and domain names via ndpi_add_domain_risk_exceptions()
|
||||
- Add ability to report whether a protocol is encrypted
|
||||
|
||||
## New Supported Protocols and Services
|
||||
- Add protocol detection for:
|
||||
- Badoo
|
||||
- Cassandra
|
||||
- EthernetIP
|
||||
|
||||
## Improvements
|
||||
- Reduce memory footprint
|
||||
- Improve protocol detection for:
|
||||
- BitTorrent
|
||||
- ICloud Private Relay
|
||||
- IMAP, POP3, SMTP
|
||||
- Log4J/Log4Shell
|
||||
- Microsoft Azure
|
||||
- Pandora TV
|
||||
- RTP
|
||||
- RTSP
|
||||
- Salesforce
|
||||
- STUN
|
||||
- Whatsapp
|
||||
- QUICv2
|
||||
- Zoom
|
||||
- Add flow risk:
|
||||
- NDPI_CLEAR_TEXT_CREDENTIALS
|
||||
- NDPI_POSSIBLE_EXPLOIT (Log4J)
|
||||
- NDPI_TLS_FATAL_ALERT
|
||||
- NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE
|
||||
- Update WhatsAPP and Instagram addresses
|
||||
- Update the list of default ports for QUIC
|
||||
- Update WindowsUpdate URLs
|
||||
- Add support for the .goog Google TLD
|
||||
- Add googletagmanager.com
|
||||
- Add bitmaps and API for handling compressed bitmaps
|
||||
- Add JA3 in risk exceptions
|
||||
- Add entropy calculation to check for suspicious (encrypted) payload
|
||||
- Add extraction of hostname in SMTP
|
||||
- Add RDP over UDP dissection
|
||||
- Add support for TLS over IPV6 in Subject Alt Names field
|
||||
- Improve JSON and CSV serialization
|
||||
- Improve IPv6 support for almost all dissectors
|
||||
- Improve CI and unit tests, add arm64, armhf and s390x as part of CI
|
||||
- Improve WHOIS detection, reduce false positives
|
||||
- Improve DGA detection for skipping potential DGAs of known/popular domain names
|
||||
- Improve user agent analysis
|
||||
- Reworked HTTP protocol dissection including HTTP proxy and HTTP connect
|
||||
|
||||
## Changes
|
||||
- TLS obsolete protocol is set when TLS < 1.2 (used to be 1.1)
|
||||
- Numeric IPs are not considered for DGA checks
|
||||
- Differentiate between standard Amazon stuff (i.e market) and AWS
|
||||
- Remove Playstation VUE protocol
|
||||
- Remove pandora.tv from Pandora protocol
|
||||
- Remove outdated SoulSeek dissector
|
||||
|
||||
## Fixes
|
||||
- Fix race conditions
|
||||
- Fix dissectors to be big-endian friendly
|
||||
- Fix heap overflow in realloc wrapper
|
||||
- Fix errors in Kerberos, TLS, H323, Netbios, CSGO, Bittorrent
|
||||
- Fix wrong tuple comparison
|
||||
- Fix ndpi_serialize_string_int64
|
||||
- Fix Grease values parsing
|
||||
- Fix certificate mismatch check
|
||||
- Fix null-dereference read for Zattoo with IPv6
|
||||
- Fix dissectors initialization for XBox, Diameter
|
||||
- Fix confidence for STUN classifications
|
||||
- Fix FreeBSD support
|
||||
- Fix old GQUIC versions on big-endian machines
|
||||
- Fix aho-corasick on big-endian machines
|
||||
- Fix DGA false positive
|
||||
- Fix integer overflow for QUIC
|
||||
- Fix HTTP false positives
|
||||
- Fix SonarCloud-CI support
|
||||
- Fix clashes setting the hostname on similar protocols (FTP, SMTP)
|
||||
- Fix some invalid TLS guesses
|
||||
- Fix crash on ARM (Raspberry)
|
||||
- Fix DNS (including fragmented DNS) dissection
|
||||
- Fix parsing of IPv6 packets with extension headers
|
||||
- Fix extraction of Realm attribute in STUN
|
||||
- Fix support for START-TLS sessions in FTP
|
||||
- Fix TCP retransmissions for multiple dissectors
|
||||
- Fix DES initialisation
|
||||
- Fix Git protocol dissection
|
||||
- Fix certificate mismatch for TLS flows with no client hello observed
|
||||
- Fix old versions of GQUIC on big-endian machines
|
||||
|
||||
## Misc
|
||||
- Add tool for generating automatically the Azure IP list
|
||||
|
||||
#### nDPI 4.0 (July 2021)
|
||||
|
||||
## New Features
|
||||
- Add API for computing RSI (Relative Strenght Index)
|
||||
- Add GeoIP support
|
||||
- Add fragments management
|
||||
- Add API for jitter calculation
|
||||
- Add single exponential smoothing API
|
||||
- Add timeseries forecasting support implementing Holt-Winters with confidence interval
|
||||
- Add support for MAC to radi tree and expose the full API to applications
|
||||
- Add JA3+, with ALPN and elliptic curve
|
||||
- Add double exponential smoothing implementation
|
||||
- Extended API for managing flow risks
|
||||
- Add flow risk score
|
||||
- New flow risks:
|
||||
- Desktop or File Sharing Session
|
||||
- HTTP suspicious content (useful for tracking trickbot)
|
||||
- Malicious JA3
|
||||
- Malicious SHA1
|
||||
- Risky domain
|
||||
- Risky AS
|
||||
- TLS Certificate Validity Too Long
|
||||
- TLS Suspicious Extension
|
||||
|
||||
## New Supported Protocols and Services
|
||||
- New protocols:
|
||||
- AmongUs
|
||||
- AVAST SecureDNS
|
||||
- CPHA (CheckPoint High Availability Protocol)
|
||||
- DisneyPlus
|
||||
- DTLS
|
||||
- Genshin Impact
|
||||
- HP Virtual Machine Group Management (hpvirtgrp)
|
||||
- Mongodb
|
||||
- Pinterest
|
||||
- Reddit
|
||||
- Snapchat VoIP calls
|
||||
- Tumblr
|
||||
- Virtual Asssitant (Alexa, Siri)
|
||||
- Z39.50
|
||||
- Add protocols to HTTP as subprotocols
|
||||
- Add detection of TLS browser type
|
||||
- Add connectionless DCE/RPC detection
|
||||
|
||||
## Improvements
|
||||
- 2.5x speed bump. Example ndpiReader with a long mixed pcap
|
||||
v3.4 - nDPI throughput: 1.29 M pps / 3.35 Gb/sec
|
||||
v4.0 - nDPI throughput: 3.35 M pps / 8.68 Gb/sec
|
||||
- Improve detection/dissection of:
|
||||
- AnyDesk
|
||||
- DNS
|
||||
- Hulu
|
||||
- DCE/RPC (avoid false positives)
|
||||
- dnscrypt
|
||||
- Facebook (add new networks)
|
||||
- Fortigate
|
||||
- FTP Control
|
||||
- HTTP
|
||||
- Fix user-agent parsing
|
||||
- Fix logs when NDPI_ENABLE_DEBUG_MESSAGES is defined
|
||||
- IEC104
|
||||
- IEC60870
|
||||
- IRC
|
||||
- Netbios
|
||||
- Netflix
|
||||
- Ookla speedtest (detection over IPv6)
|
||||
- openspeedtest.com
|
||||
- Outlook / MicrosoftMail
|
||||
- QUIC
|
||||
- update to draft-33
|
||||
- improve handling of SNI
|
||||
- support for fragmented Client Hello
|
||||
- support for DNS-over-QUIC
|
||||
- RTSP
|
||||
- RTSP via HTTP
|
||||
- SNMP (reimplemented)
|
||||
- Skype
|
||||
- SSH
|
||||
- Steam (Steam Datagram Relay - SDR)
|
||||
- STUN (avoid false positives, improved Skype detection)
|
||||
- TeamViewer (add new hosts)
|
||||
- TOR (update hosts)
|
||||
- TLS
|
||||
- Certificate Subject matching
|
||||
- Check for common ALPNs
|
||||
- Reworked fingerprint calculation
|
||||
- Fix extraction for TLS signature algorithms
|
||||
- Fix ClientHello parsing
|
||||
- UPnP
|
||||
- wireguard
|
||||
- Improve DGA detection
|
||||
- Improve JA3
|
||||
- Improve Mining detection
|
||||
- Improve string matching algorithm
|
||||
- Improve ndpi_pref_enable_tls_block_dissection
|
||||
- Optimize speed and memory size
|
||||
- Update ahocorasick library
|
||||
- Improve subprotocols detection
|
||||
|
||||
## Fixes
|
||||
- Fix partial application matching
|
||||
- Fix multiple segfault and leaks
|
||||
- Fix uninitialized memory use
|
||||
- Fix release of patterns allocated in ndpi_add_string_to_automa
|
||||
- Fix return value of ndpi_match_string_subprotocol
|
||||
- Fix setting of flow risks on 32 bit machines
|
||||
- Fix TLS certificate threshold
|
||||
- Fix a memory error in TLS JA3 code
|
||||
- Fix false positives in Z39.50
|
||||
- Fix off-by-one memory error for TLS-JA3
|
||||
- Fix bug in ndpi_lru_find_cache
|
||||
- Fix invalid xbox and playstation port guesses
|
||||
- Fix CAPWAP tunnel decoding
|
||||
- Fix parsing of DLT_PPP datalink type
|
||||
- Fix dissection of QUIC initial packets coalesced with 0-RTT one
|
||||
- Fix parsing of GTP headers
|
||||
- Add bitmap boundary checks
|
||||
|
||||
## Misc
|
||||
- Update download category name
|
||||
- Update category labels
|
||||
- Renamed Skype in Skype_Teams (the protocol is now shared across these apps)
|
||||
- Add IEC analysis wireshark plugin
|
||||
- Flow risk visualization in Wireshark
|
||||
- ndpiReader
|
||||
- add statistics about nDPI performance
|
||||
- fix memory leak
|
||||
- fix collecting of risks statistics
|
||||
- Move installed libraries from /usr/local to /usr
|
||||
- Improve NDPI_API_VERSION generation
|
||||
- Update ndpi_ptree_match_addr prototype
|
||||
|
||||
#### nDPI 3.4 (October 2020)
|
||||
|
||||
## New Features
|
||||
* Completely reworked and extended QUIC dissector
|
||||
* Added flow risk concept to move nDPI towards result interpretation
|
||||
* Added ndpi_dpi2json() API call
|
||||
* Added DGA risk for names that look like a DGA
|
||||
* Added HyperLogLog cardinality estimator API calls
|
||||
* Added ndpi_bin_XXX API calls to handle bin handling
|
||||
* Fully fuzzy tested code that has greatly improved reliability and robustness
|
||||
|
||||
## New Supported Protocols and Services
|
||||
* QUIC
|
||||
* SMBv1
|
||||
* WebSocket
|
||||
* TLS: added ESNI support
|
||||
* SOAP
|
||||
* DNScrypt
|
||||
|
||||
## Improvements
|
||||
* Python CFFI bindings
|
||||
* Various TLS extensions and fixes including extendede metadata support
|
||||
* Added various pcap files for testing corner cases in protocols
|
||||
* Various improvements in JSON/Binary data serialization
|
||||
* CiscoVPN
|
||||
* H323
|
||||
* MDNS
|
||||
* MySQL 8
|
||||
* IEC 60870-5-104
|
||||
* DoH/DoT dissection improvements
|
||||
* Office365 renamed to Microsoft365
|
||||
* Major protocol dissection improvement in particular with unknwon traffic
|
||||
* Improvement in Telegram v6 protocol support
|
||||
* HTTP improvements to detect file download/upload and binary files
|
||||
* BitTorrent and WhatsApp dissection improvement
|
||||
* Spotify
|
||||
* Added detection of malformed packets
|
||||
* Fuzzy testing support has been greatly improved
|
||||
* SSH code cleanup
|
||||
|
||||
## Fixes
|
||||
* Fixed various memory leaks and race conditions in protocol decoding
|
||||
* NATS, CAPWAP dissector
|
||||
* Removed HyperScan support that greatly simplified the code
|
||||
* ARM platform fixes on memory alignment
|
||||
* Wireshark extcap support
|
||||
* DPDK support
|
||||
* OpenWRT, OpenBSD support
|
||||
* MINGW compiler support
|
||||
|
||||
## MISC
|
||||
* Created demo app for nDPI newcomers
|
||||
* Removed obsolete pplive and pando protocols
|
||||
|
||||
#### nDPI 3.2 (February 2020)
|
||||
|
||||
## New Features
|
||||
* New API calls
|
||||
* Protocol detection: ndpi_is_protocol_detected
|
||||
* Categories: ndpi_load_categories_file / ndpi_load_category
|
||||
* JSON/TLV serialization: ndpi_serialize_string_boolean / ndpi_serialize_uint32_boolean
|
||||
* Patricia tree: ndpi_load_ipv4_ptree
|
||||
* Module initialization: ndpi_init_detection_module / ndpi_finalize_initalization
|
||||
* Base64 encoding: ndpi_base64_encode
|
||||
* JSON exprot: ndpi_flow2json
|
||||
* Print protocol: ndpi_get_l4_proto_name / ndpi_get_l4_proto_info
|
||||
* Libfuzz integration
|
||||
* Implemented Community ID hash (API call ndpi_flowv6_flow_hash and ndpi_flowv4_flow_hash)
|
||||
* Detection of RCE in HTTP GET requests via PCRE
|
||||
* Integration of the libinjection library to detect SQL injections and XSS type attacks in HTTP requests
|
||||
|
||||
## New Supported Protocols and Services
|
||||
* TLS
|
||||
* Added ALPN support
|
||||
* Added export of supported version in TLS header
|
||||
* Added Telnet dissector with metadata extraction
|
||||
* Added Zabbix dissector
|
||||
* Added POP3/IMAP metadata extraction
|
||||
* Added FTP user/password extraction
|
||||
* Added NetBIOS metadata extraction
|
||||
* Added Kerberos metadata extraction
|
||||
* Implemented SQL Injection and XSS attack detection
|
||||
* Host-based detection improvements and changes
|
||||
* Added Microsoft range
|
||||
* Added twitch.tv website
|
||||
* Added brasilbandalarga.com.br and .eaqbr.com.br as EAQ
|
||||
* Added 20.180.0.0/14, 20.184.0.0/13 range as Skype
|
||||
* Added 52.84.0.0/14 range as Amazon
|
||||
* Added ^pastebin.com
|
||||
* Changed 13.64.0.0/11 range from Skype to Microsoft
|
||||
* Refreshed Whatsapp server list, added *whatsapp-*.fbcdn.net IPs
|
||||
* Added public DNSoverHTTPS servers
|
||||
|
||||
## Improvements
|
||||
* Reworked and improved the TLS dissector
|
||||
* Reworked Kerberos dissector
|
||||
* Improved DNS response decoding
|
||||
* Support for DNS continuous flow dissection
|
||||
* Improved Python bindings
|
||||
* Improved Ethereum support
|
||||
* Improved categories detection with streaming and HTTP
|
||||
* Support for IP-based detection to compute the application protocol
|
||||
* Renamed protocol 104 to IEC60870 (more meaningful)
|
||||
* Added failed authentication support with FTP
|
||||
* Renamed DNSoverHTTPS to handle bot DoH and DoT
|
||||
* Implemented stacked DPI decoding
|
||||
* Improvements for CapWAP and Bloomberg
|
||||
* Improved SMB dissection
|
||||
* Improved SSH dissection
|
||||
* Added capwap support
|
||||
* Modified API signatures for ndpi_ssl_version2str / ndpi_detection_giveup
|
||||
* Removed ndpi_pref_http_dont_dissect_response / ndpi_pref_dns_dont_dissect_response (replaced by ndpi_extra_dissection_possible)
|
||||
|
||||
## Fixes
|
||||
* Fixed memory invalid access in SMTP and leaks in TLS
|
||||
* Fixed a few memory leaks
|
||||
* Fixrd invalid memory access in a few protocol dissectors (HTTP, memcached, Citrix, STUN, DNS, Amazon Video, TLS, Viber)
|
||||
* Fixed IPv6 address format across the various platforms/distributions
|
||||
* Fixed infinite loop in ndpi_workflow_process_packet
|
||||
* Fixed SHA1 certificate detection
|
||||
* Fixed custom protocol detection
|
||||
* Fixed SMTP dissection (including email)
|
||||
* Fixed Telnet dissection and invalid password report
|
||||
* Fixed invalid category matching in HTTP
|
||||
* Fixed Skype and STUN false positives
|
||||
* Fixed SQL Injection detection
|
||||
* Fixed invalid SMBv1 detection
|
||||
* Fixed SSH dissection
|
||||
* Fixed ndpi_ssl_version2str
|
||||
* Fixed ndpi_extra_dissection_possible
|
||||
* Fixed out of bounds read in ndpi_match_custom_category
|
||||
|
||||
## Misc
|
||||
* ndpiReader
|
||||
* CSV output enhancements
|
||||
* Added tunnelling decapsulation
|
||||
* Improved HTTP reporting
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
#### nDPI 3.0 (October 2019)
|
||||
|
||||
## New Features
|
||||
@@ -67,7 +435,6 @@
|
||||
* Fix DNS rsp_addr missing in some tiny responses
|
||||
* Various hardening fixes
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
#### nDPI 2.8 (March 2019)
|
||||
@@ -143,12 +510,12 @@
|
||||
## Other
|
||||
|
||||
* Deb and RPM packages: ndpi with shared libraries and binaries, ndpi-dev with headers and static libraries
|
||||
* Protocols now have an optional subprotocol: Spotify cannot have subprotocols, DNS can (DNS.Spotify)
|
||||
* Protocols now have an optional subprotocol: Spotify cannot have subprotocols, DNS can (DNS.Spotify)
|
||||
* New API functions:
|
||||
- ndpi_fill_ip_protocol_category to handle ICMP flows category
|
||||
- ndpi_flowv4_flow_hash and ndpi_flowv6_flow_hash to support the Community ID Flow Hashing (https://github.com/corelight/community-id-spec)
|
||||
- ndpi_protocol2id to print the protocol as ID
|
||||
- ndpi_get_custom_category_match to search host in custom categories
|
||||
* ndpi_fill_ip_protocol_category to handle ICMP flows category
|
||||
* ndpi_flowv4_flow_hash and ndpi_flowv6_flow_hash to support the Community ID Flow Hashing (https://github.com/corelight/community-id-spec)
|
||||
* ndpi_protocol2id to print the protocol as ID
|
||||
* ndpi_get_custom_category_match to search host in custom categories
|
||||
* Changed ndpi_detection_giveup API: guess is now part of the call
|
||||
* Added DPDK support to ndpiReader
|
||||
* Removed Musical.ly protocol (service no longer used)
|
||||
|
||||
+9
-2
@@ -1,7 +1,14 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = src/lib example tests
|
||||
SUBDIRS = src/lib @EXTRA_TARGETS@
|
||||
|
||||
if BUILD_FUZZTARGETS
|
||||
SUBDIRS += fuzz
|
||||
endif
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libndpi.pc
|
||||
|
||||
EXTRA_DIST = autogen.sh
|
||||
EXTRA_DIST = README.md CHANGELOG.md CONTRIBUTING.md autogen.sh wireshark python windows utils packages example/MacOS doc/api.rst doc/conf.py doc/flow_risks.rst doc/guide/nDPI_QuickStartGuide.pages doc/guide/nDPI_QuickStartGuide.pdf doc/img/logo.png doc/index.rst doc/Makefile doc/what_is_ndpi.rst
|
||||
|
||||
changelog:
|
||||
git log --since={`curl -s https://github.com/ntop/ndpi/releases | grep datetime | head -n1 | egrep -o "[0-9]+\-[0-9]+\-[0-9]+"`} --name-only --pretty=format:" - %s" | grep "^ " > CHANGELOG.latest
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
## Compiling nDPI with Fuzzer
|
||||
|
||||
- Install the latest clang (sudo apt-get install clang-10)
|
||||
- Export environamental variables to prefer clang over g++ (of installed)
|
||||
- export CC=/usr/bin/clang-10
|
||||
- export CPP=/usr/bin/clang-cpp-10
|
||||
- export CXX=/usr/bin/clang++-10
|
||||
- export LD=/usr/bin/ld.lld-10
|
||||
- Run autogen.sh
|
||||
- ./autogen.sh --with-sanitizer --enable-fuzztargets
|
||||
|
||||
|
||||
## Testing nDPI with ClusterFuzz Artifacts
|
||||
- Download the artifact (example clusterfuzz-testcase-fuzz_process_packet-4992218834796544)
|
||||
- Run nDPI against the artifact
|
||||
- Example: ./fuzz/fuzz_process_packet_with_main clusterfuzz-testcase-fuzz_process_packet-4992218834796544
|
||||
|
||||
The output is the error report
|
||||
```
|
||||
./fuzz/fuzz_process_packet_with_main /tmp/clusterfuzz-testcase-fuzz_process_packet-4992218834796544
|
||||
AddressSanitizer:DEADLYSIGNAL
|
||||
=================================================================
|
||||
==11590==ERROR: AddressSanitizer: SEGV on unknown address 0x61a100000087 (pc 0x00000056e6a4 bp 0x7ffd624fa170 sp 0x7ffd624fa090 T0)
|
||||
==11590==The signal is caused by a READ memory access.
|
||||
#0 0x56e6a4 in quic_len /home/deri/nDPI/src/lib/protocols/quic.c:203:12
|
||||
#1 0x575d6b in decrypt_initial_packet /home/deri/nDPI/src/lib/protocols/quic.c:993:16
|
||||
#2 0x571776 in get_clear_payload /home/deri/nDPI/src/lib/protocols/quic.c:1302:21
|
||||
#3 0x56f149 in ndpi_search_quic /home/deri/nDPI/src/lib/protocols/quic.c:1658:19
|
||||
#4 0x503935 in check_ndpi_detection_func /home/deri/nDPI/src/lib/ndpi_main.c:4683:6
|
||||
#5 0x5056fb in check_ndpi_udp_flow_func /home/deri/nDPI/src/lib/ndpi_main.c:4742:10
|
||||
#6 0x505152 in ndpi_check_flow_func /home/deri/nDPI/src/lib/ndpi_main.c:4775:12
|
||||
#7 0x5174cf in ndpi_detection_process_packet /home/deri/nDPI/src/lib/ndpi_main.c:5545:15
|
||||
#8 0x4c709b in LLVMFuzzerTestOneInput /home/deri/nDPI/fuzz/fuzz_process_packet.c:30:3
|
||||
#9 0x4c7640 in main /home/deri/nDPI/fuzz/fuzz_process_packet.c:90:17
|
||||
#10 0x7f888e5dabf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310
|
||||
#11 0x41c399 in _start (/home/deri/nDPI/fuzz/fuzz_process_packet_with_main+0x41c399)
|
||||
|
||||
AddressSanitizer can not provide additional info.
|
||||
SUMMARY: AddressSanitizer: SEGV /home/deri/nDPI/src/lib/protocols/quic.c:203:12 in quic_len
|
||||
==11590==ABORTING
|
||||
```
|
||||
@@ -1,13 +1,14 @@
|
||||
![ntop][ntopng_logo] ![ntop][ntop_logo]
|
||||
# nDPI
|
||||
|
||||
[](https://travis-ci.org/ntop/nDPI)
|
||||
[](https://github.com/ntop/nDPI/actions?query=workflow%3ABuild)
|
||||
[](https://lgtm.com/projects/g/ntop/nDPI/context:cpp)
|
||||
[](https://lgtm.com/projects/g/ntop/nDPI/alerts)
|
||||
[](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:ndpi)
|
||||
|
||||
## What is nDPI ?
|
||||
|
||||
nDPI is an open source LGPLv3 library for deep-packet inspection. Based on OpenDPI it includes ntop extensions. We have tried to push them into the OpenDPI source tree but nobody answered emails so we have decided to create our own source tree
|
||||
nDPI® is an open source LGPLv3 library for deep-packet inspection. Based on OpenDPI it includes ntop extensions. We have tried to push them into the OpenDPI source tree but nobody answered emails so we have decided to create our own source tree
|
||||
|
||||
### How To Compile nDPI
|
||||
|
||||
@@ -25,6 +26,14 @@ Please note that the pre-requisites for compilation include:
|
||||
- GNU tools (autogen, automake, autoconf, libtool)
|
||||
- GNU C compiler (gcc)
|
||||
|
||||
On Debian/Ubuntu systems do:
|
||||
- sudo apt-get install build-essential git bison flex libpcap-dev libtool libtool-bin autoconf pkg-config automake autogen libjson-c-dev libnuma-dev libgcrypt20-dev libpcre2-dev
|
||||
|
||||
FreeBSD
|
||||
- sudo pkg install gcc git autoconf automake libtool devel/pkgconf json-c gmake
|
||||
|
||||
Remember to use gmake and not make on FreeBSD
|
||||
|
||||
### How To Add A New Protocol Dissector
|
||||
|
||||
The entire procedure of adding new protocols in detail:
|
||||
@@ -41,21 +50,19 @@ The entire procedure of adding new protocols in detail:
|
||||
10. make check
|
||||
|
||||
### How to use nDPI to Block Selected Traffic
|
||||
|
||||
You can use nDPI to selectively block selected Internet traffic by embedding it onto an application (remember that nDPI is just a library). Both [ntopng](https://github.com/ntop/ntopng) and [nProbe cento](http://www.ntop.org/products/netflow/nprobe-cento/) can do this.
|
||||
|
||||
### nDPI Paper Citation
|
||||
|
||||
- Deri, Luca, et al. [nDPI: Open-source high-speed deep packet inspection](http://luca.ntop.org/nDPI.pdf) 2014 International Wireless Communications and Mobile Computing Conference (IWCMC). IEEE, 2014.
|
||||
|
||||
### nDPI-Related Projects
|
||||
- [nfstream](https://github.com/aouinizied/nfstream)
|
||||
|
||||
### DISCLAIMER
|
||||
While we do our best to detect network protocols, we cannot guarantee that our software is error free and 100% accurate in protocol detection. Please make sure that you respect the privacy of users and you have proper authorization to listen, capture and inspect network traffic.
|
||||
|
||||
### Creating A Source File Tar Ball
|
||||
|
||||
If you want to distribute a source tar file of nDPI do:
|
||||
|
||||
- make dist
|
||||
|
||||
To ensure that a tar file includes all necessary files and to run tests on distribution do:
|
||||
|
||||
- make distcheck
|
||||
nDPI is a registered trademark in the US and EU.
|
||||
|
||||
[ntopng_logo]: https://camo.githubusercontent.com/0f789abcef232035c05e0d2e82afa3cc3be46485/687474703a2f2f7777772e6e746f702e6f72672f77702d636f6e74656e742f75706c6f6164732f323031312f30382f6e746f706e672d69636f6e2d313530783135302e706e67
|
||||
|
||||
|
||||
+5
-4
@@ -5,17 +5,18 @@ Prerequisites
|
||||
- GNU autotools/libtool
|
||||
- libpcap or PF_RING (optional but recommended)
|
||||
- apt-get install libjson-c-dev (for JSON support)
|
||||
- libgcrypt20-dev (for QUIC support)
|
||||
|
||||
On Ubuntu/Debian
|
||||
- apt-get install build-essential
|
||||
- apt-get install git autoconf automake autogen libpcap-dev libtool
|
||||
- apt-get install git autoconf automake autogen libpcap-dev libtool libgcrypt20-dev
|
||||
|
||||
On Fedora/CentOS
|
||||
- yum groupinstall "Development tools"
|
||||
- yum install git autoconf automake autogen libpcap-devel libtool
|
||||
- yum install git autoconf automake autogen libpcap-devel libtool libgcrypt-devel
|
||||
|
||||
On MacOSX (using http://brew.sh)
|
||||
brew install autoconf automake libtool git
|
||||
brew install autoconf automake libtool git libgcrypt
|
||||
|
||||
On FreeBSD
|
||||
- pkg install autoconf automake libtool gmake git
|
||||
- pkg install autoconf automake libtool gmake git libgcrypt
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
Tor
|
||||
---
|
||||
|
||||
Tor protocol can use SSL to hide itself. These are examples:
|
||||
|
||||
TCP 37.128.208.46:9001 <-> 172.16.253.130:2078 [VLAN: 0][proto: 91/SSL][132 pkts/93834 bytes][SSL client: www.jwrpsthzrih.com]
|
||||
TCP 172.16.253.130:2021 <-> 75.147.140.249:443 [VLAN: 0][proto: 91/SSL][28 pkts/8053 bytes][SSL client: www.5akw23dx.com]
|
||||
TCP 172.16.253.130:2077 <-> 77.247.181.163:443 [VLAN: 0][proto: 91/SSL][136 pkts/94329 bytes][SSL client: www.fk4pprq42hsvl2wey.com]
|
||||
|
||||
It can be detected by analyzing the SSL client certificate and checking the name that does not match to a real host in
|
||||
addition of being a bit weird. As doing DNS resolution is not a task for nDPI we let applications do and then recognize
|
||||
SSL-tunnelled connections.
|
||||
|
||||
See http://www.netresec.com/?page=Blog&month=2013-04&post=Detecting-TOR-Communication-in-Network-Traffic
|
||||
|
||||
For this reason nDPI uses a heuristic, non-DNS based, approach to detect tor communications. If possible, apps
|
||||
should validate the certificate using the DNS. This is not something nDPI can afford to do for performance
|
||||
reasons
|
||||
+8
-14
@@ -1,10 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
NDPI_MAJOR="2"
|
||||
NDPI_MINOR="9"
|
||||
NDPI_PATCH="0"
|
||||
NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"
|
||||
|
||||
rm -f configure config.h config.h.in
|
||||
|
||||
AUTOCONF=$(command -v autoconf)
|
||||
@@ -12,6 +7,7 @@ AUTOMAKE=$(command -v automake)
|
||||
LIBTOOL=$(command -v libtool)
|
||||
LIBTOOLIZE=$(command -v libtoolize)
|
||||
AUTORECONF=$(command -v autoreconf)
|
||||
PKG_CONFIG=$(command -v pkg-config)
|
||||
|
||||
if test -z $AUTOCONF; then
|
||||
echo "autoconf is missing: please install it and try again"
|
||||
@@ -33,16 +29,14 @@ if test -z $AUTORECONF; then
|
||||
exit
|
||||
fi
|
||||
|
||||
cat configure.seed | sed \
|
||||
-e "s/@NDPI_MAJOR@/$NDPI_MAJOR/g" \
|
||||
-e "s/@NDPI_MINOR@/$NDPI_MINOR/g" \
|
||||
-e "s/@NDPI_PATCH@/$NDPI_PATCH/g" \
|
||||
-e "s/@NDPI_VERSION_SHORT@/$NDPI_VERSION_SHORT/g" \
|
||||
> configure.ac
|
||||
if test -z $PKG_CONFIG; then
|
||||
echo "pkg-config is missing: please install it (apt-get install pkg-config) and try again"
|
||||
exit
|
||||
fi
|
||||
|
||||
autoreconf -ivf
|
||||
cat configure | sed "s/#define PACKAGE/#define NDPI_PACKAGE/g" | sed "s/#define VERSION/#define NDPI_VERSION/g" > configure.tmp
|
||||
cat configure.tmp > configure
|
||||
|
||||
echo "./configure $@"
|
||||
chmod +x configure
|
||||
./configure $*
|
||||
./configure $@
|
||||
|
||||
|
||||
+309
@@ -0,0 +1,309 @@
|
||||
AC_INIT([libndpi], [4.2.0])
|
||||
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
EXTRA_TARGETS="example tests tests/unit tests/dga"
|
||||
AC_ARG_WITH(only-libndpi, AS_HELP_STRING([--with-only-libndpi], [Build only libndpi (no examples, tests etc)]))
|
||||
AS_IF([test "${with_only_libndpi+set}" = set],[
|
||||
EXTRA_TARGETS=""
|
||||
])
|
||||
|
||||
AC_ARG_WITH(sanitizer, AS_HELP_STRING([--with-sanitizer], [Build with support for address, undefined and leak sanitizer]))
|
||||
AC_ARG_ENABLE(fuzztargets, AS_HELP_STRING([--enable-fuzztargets], [Enable fuzz targets]),[enable_fuzztargets=$enableval],[enable_fuzztargets=no])
|
||||
AS_IF([test "x$enable_fuzztargets" = "xyes"], [BUILD_FUZZTARGETS=1], [BUILD_FUZZTARGETS=0])
|
||||
AM_CONDITIONAL([BUILD_FUZZTARGETS], [test "x$enable_fuzztargets" = "xyes"])
|
||||
|
||||
AS_IF([test "${with_sanitizer+set}" = set],[
|
||||
CFLAGS="${CFLAGS} -g3 -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer"
|
||||
LDFLAGS="${LDFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak"
|
||||
])
|
||||
|
||||
LT_INIT
|
||||
LT_LIB_M
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
SYSTEM=`uname -s`
|
||||
if test $SYSTEM = "Darwin"; then
|
||||
dnl> AC_PROG_CC(clang gcc)
|
||||
AM_PROG_CC_C_O(clang gcc)
|
||||
AC_PROG_CXX(clang++ g++)
|
||||
AC_PROG_CC_STDC(clang gcc)
|
||||
else
|
||||
AC_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC_STDC
|
||||
fi
|
||||
|
||||
dnl> Can't iuse AM_PROG_AR because not all of our Makefiles are automake (yet?)
|
||||
AC_CHECK_TOOL(AR, ar, [false])
|
||||
|
||||
AC_LANG_WERROR
|
||||
|
||||
NDPI_MAJOR=`echo "${PACKAGE_VERSION}" | cut -d . -f 1`
|
||||
NDPI_MINOR=`echo "${PACKAGE_VERSION}" | cut -d . -f 2`
|
||||
NDPI_PATCH=`echo "${PACKAGE_VERSION}" | cut -d . -f 3`
|
||||
NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"
|
||||
|
||||
AC_DEFINE_UNQUOTED(NDPI_MAJOR_RELEASE, "${NDPI_MAJOR}", [nDPI major release])
|
||||
AC_DEFINE_UNQUOTED(NDPI_MINOR_RELEASE, "${NDPI_MINOR}", [nDPI minor release])
|
||||
AC_DEFINE_UNQUOTED(NDPI_PATCH_LEVEL, "${NDPI_PATCH}", [nDPI patch level])
|
||||
|
||||
# .git as directory in a cloned repo
|
||||
# .git as file in submodule based integration
|
||||
if test -d ".git" || test -f ".git" ; then :
|
||||
GIT_TAG=`git log -1 --format=%h`
|
||||
GIT_DATE=`git log -1 --format=%cd`
|
||||
#
|
||||
# On CentOS 6 `git rev-list HEAD --count` does not work
|
||||
#
|
||||
#
|
||||
GIT_NUM=`git log --pretty=oneline | wc -l | tr -d '[[:space:]]'`
|
||||
GIT_RELEASE="${PACKAGE_VERSION}-${GIT_NUM}-${GIT_TAG}"
|
||||
|
||||
A=`git log src/include/ndpi_typedefs.h|wc -l`
|
||||
B=`git log src/include/ndpi_protocol_ids.h|wc -l`
|
||||
C=`git log src/include/ndpi_api.h.in|wc -l`
|
||||
NDPI_API_VERSION=$((A+B+C))
|
||||
else
|
||||
GIT_RELEASE="${PACKAGE_VERSION}"
|
||||
GIT_DATE=`date -u -r CHANGELOG.md`
|
||||
if test -z "$SOURCE_DATE_EPOCH" ; then :
|
||||
SOURCE_DATE_EPOCH=`date +%s`
|
||||
fi
|
||||
NDPI_API_VERSION=`echo $SOURCE_DATE_EPOCH | cut -c7-10`
|
||||
fi
|
||||
|
||||
NDPI_API_VERSION=`echo $NDPI_API_VERSION | sed 's/^0*//'`
|
||||
|
||||
echo "Setting API version to $NDPI_API_VERSION"
|
||||
|
||||
AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release])
|
||||
AC_DEFINE_UNQUOTED(NDPI_GIT_DATE, "${GIT_DATE}", [Last GIT change])
|
||||
|
||||
if ! test "${with_only_libndpi+set}" = set; then :
|
||||
dnl> used by json-c for unit tests
|
||||
PKG_CHECK_MODULES([JSONC], [json-c], [JSONC_LIBS="${pkg_cv_JSONC_LIBS}" JSONC_CFLAGS="${pkg_cv_JSONC_CFLAGS}"])
|
||||
AC_CHECK_LIB([json-c], [json_object_put], [], [
|
||||
AC_MSG_WARN([JSON-C not available. Disabled unit test.])
|
||||
JSONC_LIBS=""
|
||||
JSONC_CFLAGS=""
|
||||
EXTRA_TARGETS="example tests tests/dga"
|
||||
])
|
||||
AX_PTHREAD([],[
|
||||
AC_MSG_WARN([POSIX Threads not available. Building library only.])
|
||||
JSONC_LIBS=""
|
||||
JSONC_CFLAGS=""
|
||||
EXTRA_TARGETS=""
|
||||
])
|
||||
fi
|
||||
|
||||
LIBS="$LIBS $JSONC_LIBS"
|
||||
CFLAGS="-W -Wall -Wno-unused-parameter -Wno-unused-function $CFLAGS $JSONC_CFLAGS"
|
||||
|
||||
AC_CHECK_HEADERS([netinet/in.h stdint.h stdlib.h string.h unistd.h math.h float.h])
|
||||
AC_CHECK_LIB([m], [sqrt], [], [LIBM="-lm"])
|
||||
AC_CHECK_LIB([rrd], [rrd_fetch_r], [LIBRRD=-lrrd])
|
||||
|
||||
if test "x$ac_cv_lib_rrd_rrd_fetch_r" = xyes; then :
|
||||
AC_DEFINE_UNQUOTED(HAVE_RRDTOOL, "1", [rrdtool is present])
|
||||
EXTRA_TARGETS="$EXTRA_TARGETS rrdtool"
|
||||
fi
|
||||
|
||||
ADDITIONAL_LIBS="$LIBRRD $LIBM"
|
||||
PCAP_HOME=$HOME/PF_RING/userland
|
||||
|
||||
DPDK_TARGET=
|
||||
AC_MSG_CHECKING([DPDK (used by ndpiReader)])
|
||||
if test -d $HOME/DPDK; then :
|
||||
AC_MSG_RESULT(yes)
|
||||
DPDK_TARGET=dpdk
|
||||
else
|
||||
AC_MSG_RESULT([no (missing $HOME/DPDK)])
|
||||
fi
|
||||
|
||||
if ! test -d $PCAP_HOME; then :
|
||||
PCAP_HOME=`pwd`/../../PF_RING/userland
|
||||
fi
|
||||
SHORT_MACHINE=`uname -m | cut -b1-3`
|
||||
if test $SHORT_MACHINE = "arm"; then
|
||||
LIBNUMA=""
|
||||
else
|
||||
AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
|
||||
fi
|
||||
|
||||
MACHINE=`uname -m`
|
||||
|
||||
CUSTOM_NDPI=
|
||||
|
||||
if test -d ../nDPI-custom; then :
|
||||
CUSTOM_NDPI="-DCUSTOM_NDPI_PROTOCOLS"
|
||||
AC_MSG_RESULT([Compiling with custom nDPI protocols])
|
||||
fi
|
||||
|
||||
if test -d ../ndpi-pro; then :
|
||||
with_maxminddb=1
|
||||
fi
|
||||
|
||||
case "$host" in
|
||||
*-*-mingw32*|*-*-msys)
|
||||
PCAP_INC=""
|
||||
PCAP_LIB=""
|
||||
case "$host" in
|
||||
x86_64-*)
|
||||
BUILD_MINGW_X64=1
|
||||
;;
|
||||
i686-*)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unsupported MingW cross compiler.])
|
||||
;;
|
||||
esac
|
||||
CFLAGS="${CFLAGS}"
|
||||
LIBS="${LIBS} -lws2_32"
|
||||
BUILD_MINGW=1
|
||||
;;
|
||||
*)
|
||||
if test -f $PCAP_HOME/libpcap/libpcap.a; then :
|
||||
echo "Using libpcap from $PCAP_HOME"
|
||||
PCAP_INC="-I $PCAP_HOME/libpcap"
|
||||
PFRING_LIB=
|
||||
if test -f $PCAP_HOME/lib/libpfring.a; then :
|
||||
PFRING_LIB=$PCAP_HOME/lib/libpfring.a
|
||||
fi
|
||||
|
||||
PCAP_LIB="$PCAP_HOME/libpcap/libpcap.a $PFRING_LIB $LIBNUMA `$PCAP_HOME/lib/pfring_config --libs`"
|
||||
AC_CHECK_LIB([rt], [clock_gettime], [PCAP_LIB="$PCAP_LIB -lrt"])
|
||||
AC_CHECK_LIB([nl], [nl_handle_alloc], [PCAP_LIB="$PCAP_LIB -lnl"])
|
||||
# The dlopen() function is in libdl on GLIBC-based systems
|
||||
# and in the C library for *BSD systems
|
||||
AC_CHECK_LIB([dl], [dlopen], [DL_LIB="-ldl"],[AC_CHECK_LIB([c],
|
||||
[dlopen], [DL_LIB="-lc"],
|
||||
[AC_MSG_ERROR([unable to find the dlopen(), dlsym() functions]) ]) ])
|
||||
elif test "${with_only_libndpi+set}" != set; then :
|
||||
AC_CHECK_LIB([pcap], [pcap_open_live], [PCAP_LIB="-lpcap"])
|
||||
if test $ac_cv_lib_pcap_pcap_open_live = "no"; then :
|
||||
AC_MSG_ERROR([Missing libpcap(-dev) library required to compile the example application.])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE([debug-messages],
|
||||
AS_HELP_STRING([--enable-debug-messages], [Define NDPI_ENABLE_DEBUG_MESSAGES=1]), [
|
||||
AC_DEFINE(NDPI_ENABLE_DEBUG_MESSAGES, 1, [Enable ndpi_debug_messages]) ])
|
||||
|
||||
AS_IF([test "x$enable_fuzztargets" = "xyes"], [
|
||||
AC_PROG_CXX
|
||||
AC_LANG_PUSH(C++)
|
||||
tmp_saved_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
AX_CHECK_COMPILE_FLAG([-fsanitize=fuzzer],,
|
||||
[AC_MSG_ERROR([--enable-fuzztargets requires -fsanitize=fuzzer which is only supported by LLVM])],
|
||||
[-Werror])
|
||||
AS_IF([test "x$LIB_FUZZING_ENGINE" = "x"], [
|
||||
LIB_FUZZING_ENGINE=-fsanitize=fuzzer
|
||||
AC_SUBST(LIB_FUZZING_ENGINE)
|
||||
])
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $LIB_FUZZING_ENGINE"
|
||||
AC_MSG_CHECKING([whether $CXX accepts $LIB_FUZZING_ENGINE])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/types.h>
|
||||
extern "C" int LLVMFuzzerTestOneInput(const unsigned char *Data, size_t Size);
|
||||
extern "C" int LLVMFuzzerTestOneInput(const unsigned char *Data, size_t Size) {
|
||||
(void)Data;
|
||||
(void)Size;
|
||||
return 0;
|
||||
}
|
||||
]])],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
has_sanitizefuzzer=yes],
|
||||
[ AC_MSG_RESULT(no) ]
|
||||
)
|
||||
_AC_LANG_PREFIX[]FLAGS=$tmp_saved_flags
|
||||
AC_LANG_POP()
|
||||
])
|
||||
AM_CONDITIONAL([HAS_FUZZLDFLAGS], [test "x$has_sanitizefuzzer" = "xyes"])
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
|
||||
|
||||
dnl> GCRYPT
|
||||
GCRYPT_ENABLED=1
|
||||
AC_ARG_ENABLE([gcrypt],
|
||||
[AS_HELP_STRING([--disable-gcrypt], [Avoid compiling with libgcrypt/libgpg-error, even if they are present. QUIC sub-classification may be missing])],
|
||||
[GCRYPT_ENABLED=0],
|
||||
[AC_CHECK_LIB(gcrypt, gcry_cipher_checktag)])
|
||||
AS_IF([test ${GCRYPT_ENABLED} -eq 1], [
|
||||
if test "x$ac_cv_lib_gcrypt_gcry_cipher_checktag" = xyes; then :
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt"
|
||||
else
|
||||
$as_unset ac_cv_lib_gcrypt_gcry_cipher_checktag
|
||||
AC_CHECK_LIB(gpg-error, gpg_strerror_r)
|
||||
AC_CHECK_LIB(gcrypt, gcry_cipher_checktag)
|
||||
if test "x$ac_cv_lib_gcrypt_gcry_cipher_checktag" = xyes -a "x$ac_cv_lib_gpg_error_gpg_strerror_r" = xyes; then :
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt -lgpg-error"
|
||||
else
|
||||
GCRYPT_ENABLED=0
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl> PCRE
|
||||
PCRE_ENABLED=0
|
||||
AC_ARG_WITH(pcre, [ --with-pcre Enable nDPI build with libpcre])
|
||||
if test "${with_pcre+set}" = set; then :
|
||||
AC_CHECK_LIB(pcre, pcre_compile, AC_DEFINE_UNQUOTED(HAVE_PCRE, 1, [libpcre(-dev) is present]))
|
||||
if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lpcre"
|
||||
PCRE_ENABLED=1
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl> GeoIP
|
||||
AC_ARG_WITH(maxminddb, [ --with-maxminddb Enable nDPI build with libmaxminddb])
|
||||
if test "${with_maxminddb+set}" = set; then :
|
||||
AC_CHECK_LIB([maxminddb], [MMDB_lookup_sockaddr])
|
||||
AC_HAVE_HEADERS(maxminddb.h)
|
||||
if test ".${ac_cv_lib_maxminddb_MMDB_lookup_sockaddr}" = ".yes" && test ".${ac_cv_header_maxminddb_h}" = ".yes"; then
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lmaxminddb"
|
||||
AC_DEFINE_UNQUOTED(HAVE_MAXMINDDB, 1, [MaxMind DB support])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl> Curl
|
||||
dnl> AC_CHECK_LIB([curl], [curl_easy_perform])
|
||||
dnl> if test ${ac_cv_lib_curl_curl_easy_perform} = "no"; then
|
||||
dnl> echo "Please install libcurl4-openssl-dev (http://curl.haxx.se/) in order to enable curl support"
|
||||
dnl> else
|
||||
dnl> ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lcurl"
|
||||
dnl> AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [curl is present])
|
||||
dnl> fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile tests/unit/Makefile tests/performance/Makefile tests/dga/Makefile rrdtool/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile python/Makefile fuzz/Makefile src/include/ndpi_api.h])
|
||||
AC_CONFIG_FILES([tests/do.sh], [chmod +x tests/do.sh])
|
||||
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
|
||||
AC_SUBST(GIT_RELEASE)
|
||||
AC_SUBST(NDPI_MAJOR)
|
||||
AC_SUBST(NDPI_MINOR)
|
||||
AC_SUBST(NDPI_PATCH)
|
||||
AC_SUBST(NDPI_VERSION_SHORT)
|
||||
AC_SUBST(PCAP_INC)
|
||||
AC_SUBST(PCAP_LIB)
|
||||
AC_SUBST(ADDITIONAL_LIBS)
|
||||
AC_SUBST(DL_LIB)
|
||||
AC_SUBST(DPDK_TARGET)
|
||||
AC_SUBST(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
AC_SUBST(CUSTOM_NDPI)
|
||||
AC_SUBST(NDPI_API_VERSION)
|
||||
AC_SUBST(EXTRA_TARGETS)
|
||||
AC_SUBST(BUILD_MINGW)
|
||||
AC_SUBST(BUILD_MINGW_X64)
|
||||
AC_SUBST(BUILD_FUZZTARGETS)
|
||||
AC_SUBST(JSONC_CFLAGS)
|
||||
AC_SUBST(JSONC_LIBS)
|
||||
AC_SUBST(GCRYPT_ENABLED)
|
||||
AC_SUBST(PCRE_ENABLED)
|
||||
AC_OUTPUT
|
||||
-159
@@ -1,159 +0,0 @@
|
||||
AC_INIT([libndpi], [@NDPI_VERSION_SHORT@])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
LT_INIT
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC_STDC
|
||||
AC_LANG_WERROR
|
||||
AX_PTHREAD
|
||||
|
||||
NDPI_VERSION_SHORT="@NDPI_VERSION_SHORT@"
|
||||
NDPI_MAJOR="@NDPI_MAJOR@"
|
||||
NDPI_MINOR="@NDPI_MINOR@"
|
||||
NDPI_PATCH="@NDPI_PATCH@"
|
||||
|
||||
AC_DEFINE_UNQUOTED(NDPI_MAJOR_RELEASE, "${NDPI_MAJOR}", [nDPI major release])
|
||||
AC_DEFINE_UNQUOTED(NDPI_MINOR_RELEASE, "${NDPI_MINOR}", [nDPI minor release])
|
||||
AC_DEFINE_UNQUOTED(NDPI_PATCH_LEVEL, "${NDPI_PATCH}", [nDPI patch level])
|
||||
|
||||
if test -d ".git"; then :
|
||||
GIT_TAG=`git log -1 --format=%h`
|
||||
GIT_DATE=`git log -1 --format=%cd`
|
||||
#
|
||||
# On CentOS 6 `git rev-list HEAD --count` does not work
|
||||
#
|
||||
#
|
||||
GIT_NUM=`git log --pretty=oneline | wc -l | tr -d '[[:space:]]'`
|
||||
GIT_RELEASE="${PACKAGE_VERSION}-${GIT_NUM}-${GIT_TAG}"
|
||||
else
|
||||
GIT_RELEASE="${PACKAGE_VERSION}"
|
||||
GIT_DATE=`date -u -r CHANGELOG.md`
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release])
|
||||
AC_DEFINE_UNQUOTED(NDPI_GIT_DATE, "${GIT_DATE}", [Last GIT change])
|
||||
|
||||
AC_CHECK_HEADERS([netinet/in.h stdint.h stdlib.h string.h unistd.h])
|
||||
|
||||
PCAP_HOME=$HOME/PF_RING/userland
|
||||
|
||||
DPDK_TARGET=
|
||||
if test -d $HOME/DPDK; then :
|
||||
echo "Enabling DPDK support in ndpiReader"
|
||||
DPDK_TARGET=dpdk
|
||||
else
|
||||
echo "DPDK support disabled (missing $HOME/DPDK)"
|
||||
fi
|
||||
|
||||
if test -d $PCAP_HOME; then :
|
||||
echo -n ""
|
||||
else
|
||||
PCAP_HOME=`pwd`/../../PF_RING/userland
|
||||
fi
|
||||
SHORT_MACHINE=`uname -m | cut -b1-3`
|
||||
if test $SHORT_MACHINE = "arm"; then
|
||||
LIBNUMA=""
|
||||
else
|
||||
AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
|
||||
fi
|
||||
|
||||
MACHINE=`uname -m`
|
||||
SYSTEM=`uname -s`
|
||||
if test $SYSTEM = "Darwin"; then
|
||||
CC=clang
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
|
||||
|
||||
AS_IF([test "${with_hyperscan+set}" = set],[
|
||||
BKP=$LIBS
|
||||
LIBS="$LIBS -lstdc++ -lm"
|
||||
AC_CHECK_LIB([hs], [hs_compile_multi], AC_DEFINE_UNQUOTED(HAVE_HYPERSCAN, 1, [Intel Hyperscan is present]))
|
||||
LIBS=$BKP
|
||||
|
||||
AS_IF([test "x$ac_cv_lib_hs_hs_compile_multi" = xyes],[
|
||||
AC_CHECK_LIB([m], [pow])
|
||||
AC_CHECK_LIB([stdc++], [main])
|
||||
PKG_CHECK_MODULES([HS],[libhs])
|
||||
LDFLAGS="$LDFLAGS $HS_LIBS"
|
||||
AC_MSG_RESULT([compiling with Intel Hyperscan])
|
||||
],[
|
||||
AC_MSG_RESULT([Intel Hyperscan not found, exiting. See https://github.com/intel/hyperscan/blob/master/doc/dev-reference/getting_started.rst for install/build instructions])
|
||||
exit 1
|
||||
])
|
||||
])
|
||||
|
||||
if test -f $PCAP_HOME/libpcap/libpcap.a; then :
|
||||
echo "Using libpcap from $PCAP_HOME"
|
||||
PCAP_INC="-I $PCAP_HOME/libpcap"
|
||||
PCAP_LIB="$PCAP_HOME/libpcap/libpcap.a $PCAP_HOME/lib/libpfring.a $LIBNUMA `$PCAP_HOME/lib/pfring_config --libs`"
|
||||
|
||||
AC_CHECK_LIB([rt], [clock_gettime], [PCAP_LIB="$PCAP_LIB -lrt"])
|
||||
AC_CHECK_LIB([nl], [nl_handle_alloc], [PCAP_LIB="$PCAP_LIB -lnl"])
|
||||
# The dlopen() function is in libdl on GLIBC-based systems
|
||||
# and in the C library for *BSD systems
|
||||
AC_CHECK_LIB([dl], [dlopen, dlsym], [DL_LIB="-ldl"],
|
||||
[AC_CHECK_LIB([c], [dlopen, dlsym], [DL_LIB="-lc"],
|
||||
[AC_MSG_ERROR([unable to find the dlopen(), dlsym() functions]) ]) ])
|
||||
else
|
||||
AC_CHECK_LIB([pcap], [pcap_open_live], [PCAP_LIB="-lpcap"])
|
||||
|
||||
if test $ac_cv_lib_pcap_pcap_open_live = "no"; then :
|
||||
echo ""
|
||||
echo "ERROR: Missing libpcap(-dev) library required to compile the example application"
|
||||
echo "ERROR: Please install it and try again"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl> https://github.com/json-c/json-c
|
||||
AC_ARG_ENABLE([json-c],
|
||||
AS_HELP_STRING([--disable-json-c], [Disable json-c support]))
|
||||
|
||||
AS_IF([test "x$enable_json_c" != "xno"], [
|
||||
PKG_CHECK_MODULES([JSONC],[json-c],
|
||||
[
|
||||
CFLAGS="$CFLAGS $JSONC_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $JSONC_LIBS"
|
||||
AC_CHECK_LIB(json-c, json_object_new_object, AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present]))
|
||||
],
|
||||
[
|
||||
JSONC_HOME="$HOME/json-c"
|
||||
if test -d "$JSONC_HOME"; then :
|
||||
CFLAGS="$CFLAGS -I $JSONC_HOME"
|
||||
LDFLAGS="$LDFLAGS $JSONC_HOME/.libs/libjson-c.a"
|
||||
AC_MSG_RESULT([Found json-c in $JSONC_HOME])
|
||||
AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE([debug-messages],
|
||||
AS_HELP_STRING([--enable-debug-messages], [Define NDPI_ENABLE_DEBUG_MESSAGES=1]), [
|
||||
AC_DEFINE(NDPI_ENABLE_DEBUG_MESSAGES, 1, [Enable ndpi_debug_messages]) ])
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
|
||||
|
||||
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile python/Makefile])
|
||||
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
|
||||
AC_SUBST(GIT_RELEASE)
|
||||
AC_SUBST(NDPI_MAJOR)
|
||||
AC_SUBST(NDPI_MINOR)
|
||||
AC_SUBST(NDPI_PATCH)
|
||||
AC_SUBST(NDPI_VERSION_SHORT)
|
||||
AC_SUBST(SVN_DATE)
|
||||
AC_SUBST(JSON_C_LIB)
|
||||
AC_SUBST(PCAP_INC)
|
||||
AC_SUBST(PCAP_LIB)
|
||||
AC_SUBST(DL_LIB)
|
||||
AC_SUBST(DPDK_TARGET)
|
||||
AC_SUBST(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
|
||||
AC_OUTPUT
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " release to make standalone HTML files for ntop documentation release"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " applehelp to make an Apple Help Book"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
@echo " coverage to run coverage check of the documentation (if enabled)"
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
cd doxygen; make clean
|
||||
|
||||
.PHONY: html
|
||||
html:
|
||||
cd doxygen; make
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
.PHONY: release
|
||||
release:
|
||||
make clean
|
||||
@{ \
|
||||
git_root=$$(git rev-parse --show-toplevel);\
|
||||
version=$$(grep -Po '^NTOPNG_SHORT_VERSION="\K.+(?=")' $${git_root}/configure.ac);\
|
||||
echo Release version $${version};\
|
||||
sed -i "s/version = u'.*'/version = u'$${version}'/" conf.py;\
|
||||
sed -i "s/release = u'.*'/release = u'$${version}'/" conf.py;\
|
||||
}
|
||||
make html
|
||||
|
||||
.PHONY: dirhtml
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
.PHONY: singlehtml
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
.PHONY: pickle
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
.PHONY: json
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
.PHONY: htmlhelp
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
.PHONY: qthelp
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ntop.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ntop.qhc"
|
||||
|
||||
.PHONY: applehelp
|
||||
applehelp:
|
||||
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||
@echo
|
||||
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
||||
@echo "N.B. You won't be able to view it unless you put it in" \
|
||||
"~/Library/Documentation/Help or install it in your application" \
|
||||
"bundle."
|
||||
|
||||
.PHONY: devhelp
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/ntop"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ntop"
|
||||
@echo "# devhelp"
|
||||
|
||||
.PHONY: epub
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
.PHONY: latex
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
.PHONY: latexpdf
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
.PHONY: latexpdfja
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
.PHONY: text
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
.PHONY: man
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
.PHONY: texinfo
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
.PHONY: info
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
.PHONY: gettext
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
.PHONY: changes
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
.PHONY: linkcheck
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
.PHONY: doctest
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
||||
@echo "Testing of coverage in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/coverage/python.txt."
|
||||
|
||||
.PHONY: xml
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
.PHONY: pseudoxml
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||
@@ -0,0 +1,4 @@
|
||||
nDPI Programming API
|
||||
####################
|
||||
|
||||
Placeholder
|
||||
+291
@@ -0,0 +1,291 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import sphinx_rtd_theme
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
sys.path.append( "breathe/" )
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.intersphinx',
|
||||
'breathe'
|
||||
]
|
||||
|
||||
# Workaround for platforms where swaggerdoc is not available
|
||||
if not os.environ.get("PYTHON_SKIP_SWAGGERDOC"):
|
||||
extensions.append('sphinxcontrib.swaggerdoc')
|
||||
|
||||
breathe_projects = { "apidoc" : "doxygen/xml/" }
|
||||
breathe_default_project = "apidoc"
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
source_suffix = ['.rst', '.md']
|
||||
#source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'nDPI'
|
||||
copyright = u'2021, ntop and contributors'
|
||||
author = u'ntop.org'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = u'4.1'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = u'4.1'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build', 'README.md', 'example.rst']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#html_theme = 'alabaster'
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
html_logo = "img/logo.png"
|
||||
|
||||
# The name of an image file (relative to this directory) to use as a favicon of
|
||||
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Language to be used for generating the HTML full-text search index.
|
||||
# Sphinx supports the following languages:
|
||||
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
|
||||
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
|
||||
#html_search_language = 'en'
|
||||
|
||||
# A dictionary with options for the search language support, empty by default.
|
||||
# Now only 'ja' uses this config value
|
||||
#html_search_options = {'type': 'default'}
|
||||
|
||||
# The name of a javascript file (relative to the configuration directory) that
|
||||
# implements a search results scorer. If empty, the default will be used.
|
||||
#html_search_scorer = 'scorer.js'
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'ntopdoc'
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'nDPI.tex', u'nDPI Documentation',
|
||||
u'ntop', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'nDPI', u'nDPI Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'nDPI', u'nDPI Documentation',
|
||||
author, 'ntop and contributors', 'Deep Packet Inspection toolkit',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
|
||||
def setup(app):
|
||||
app.add_stylesheet('css/ntop.css')
|
||||
@@ -0,0 +1,255 @@
|
||||
nDPI Flow Risks
|
||||
###############
|
||||
|
||||
nDPI is designed not just to detect application protocols in traffic flows but also to evaluate potential security risks associated with the traffic. In nDPI parlance this is called a "flow risk". Flows can have multiple risks detected hence nDPI reports them with a bitmap. Each risk detected corresponds to a bit in the flow risk bitmap. You can read more about `ndpi_risk_enum <https://github.com/ntop/nDPI/blob/dev/src/include/ndpi_typedefs.h>`_ for the list of all numeric risks currently supported.
|
||||
|
||||
Below you can find a description of each flow risk so that you can easily understand when a risk is triggered and its meaning. The flow risks are listed in numerical order as they are defined in ndpi_risk_enum.
|
||||
|
||||
.. _Risk 001:
|
||||
|
||||
NDPI_URL_POSSIBLE_XSS
|
||||
=====================
|
||||
HTTP only: this risk indicates a possible `XSS (Cross Side Scripting) <https://en.wikipedia.org/wiki/Cross-site_scripting>`_ attack.
|
||||
|
||||
.. _Risk 002:
|
||||
|
||||
NDPI_URL_POSSIBLE_SQL_INJECTION
|
||||
===============================
|
||||
HTTP only: this risk indicates a possible `SQL Injection attack <https://en.wikipedia.org/wiki/SQL_injection>`_.
|
||||
|
||||
.. _Risk 003:
|
||||
|
||||
NDPI_URL_POSSIBLE_RCE_INJECTION
|
||||
===============================
|
||||
HTTP only: this risk indicates a possible `RCE (Remote Code Execution) attack <https://en.wikipedia.org/wiki/Arbitrary_code_execution>`_.
|
||||
|
||||
.. _Risk 004:
|
||||
|
||||
NDPI_BINARY_APPLICATION_TRANSFER
|
||||
================================
|
||||
HTTP only: this risk indicates that a binary application is downloaded/uploaded. Detected applications include Windows binaries, Linux executables, Unix scripts and Android apps.
|
||||
|
||||
.. _Risk 005:
|
||||
|
||||
NDPI_KNOWN_PROTOCOL_ON_NON_STANDARD_PORT
|
||||
========================================
|
||||
This risk indicates a known protocol used on a non standard port. Example HTTP is supposed to use TCP/80, and in case it is detected on TCP/1234 this risk is detected.
|
||||
|
||||
.. _Risk 006:
|
||||
|
||||
NDPI_TLS_SELFSIGNED_CERTIFICATE
|
||||
===============================
|
||||
TLS/QUIC only: this risk is triggered when a `self-signed certificate <https://en.wikipedia.org/wiki/Self-signed_certificate>`_ is used.
|
||||
|
||||
.. _Risk 007:
|
||||
|
||||
NDPI_TLS_OBSOLETE_VERSION
|
||||
=========================
|
||||
Risk 0triggered when TLS version is older than 1.1.
|
||||
|
||||
.. _Risk 008:
|
||||
|
||||
NDPI_TLS_WEAK_CIPHER
|
||||
====================
|
||||
Risk 0triggered when an unsafe TLS cipher is used. See `this page <https://community.qualys.com/thread/18212-how-does-qualys-determine-the-server-cipher-suites>`_ for a list of insecure ciphers.
|
||||
|
||||
.. _Risk 009:
|
||||
|
||||
NDPI_TLS_CERTIFICATE_EXPIRED
|
||||
============================
|
||||
Risk 0triggered when a TLS certificate is expired, i.e. the current date falls outside of the certificate validity dates.
|
||||
|
||||
.. _Risk 010:
|
||||
|
||||
NDPI_TLS_CERTIFICATE_MISMATCH
|
||||
=============================
|
||||
Risk 0triggered when a TLS certificate does not match the hostname we're accessing. Example you do http://www.aaa.com and the TLS certificate returned is for www.bbb.com.
|
||||
|
||||
.. _Risk 011:
|
||||
|
||||
NDPI_HTTP_SUSPICIOUS_USER_AGENT
|
||||
===============================
|
||||
HTTP only: this risk is triggered whenever the user agent contains suspicious characters or its format is suspicious. Example: <?php something ?> is a typical suspicious user agent.
|
||||
|
||||
.. _Risk 012:
|
||||
|
||||
NDPI_HTTP_NUMERIC_IP_HOST
|
||||
=========================
|
||||
HTTP only: this risk is triggered whenever we're accessing a host using its IP rather than its symbolic name. Example http://1.2.3.4.
|
||||
|
||||
.. _Risk 013:
|
||||
|
||||
NDPI_HTTP_SUSPICIOUS_URL
|
||||
========================
|
||||
HTTP only: this risk is triggered whenever the accessed URL is suspicious. Example: http://127.0.0.1/msadc/..%255c../..%255c../..%255c../winnt/system32/cmd.exe.
|
||||
|
||||
.. _Risk 014:
|
||||
|
||||
NDPI_HTTP_SUSPICIOUS_HEADER
|
||||
===========================
|
||||
HTTP only: this risk is triggered whenever the HTTP peader contains suspicious entries such as Uuid, TLS_version, Osname that are unexpected on the HTTP header.
|
||||
|
||||
.. _Risk 015:
|
||||
|
||||
NDPI_TLS_NOT_CARRYING_HTTPS
|
||||
===========================
|
||||
TLS only: this risk indicates that this TLS flow will not be used to transport HTTP content. Example VPNs use TLS to encrypt data rather to carry HTTP. This is useful to spot this type of cases.
|
||||
|
||||
.. _Risk 016:
|
||||
|
||||
NDPI_SUSPICIOUS_DGA_DOMAIN
|
||||
==========================
|
||||
A `DGA <https://en.wikipedia.org/wiki/Domain_generation_algorithm>`_ is used to generate domain names often used by malwares. This risk indicates that this domain name can (but it's not 100% sure) a DGA as its name is suspicious.
|
||||
|
||||
.. _Risk 017:
|
||||
|
||||
NDPI_MALFORMED_PACKET
|
||||
=====================
|
||||
This risk is generated when a packet (e.g. a DNS packet) has an unexpected formt. This can indicate a protocol error or more often an attempt to jeopardize a valid protocol to carry other type of data.
|
||||
|
||||
.. _Risk 018:
|
||||
|
||||
NDPI_SSH_OBSOLETE_CLIENT_VERSION_OR_CIPHER
|
||||
==========================================
|
||||
This risk is generated whenever a SSH client uses an obsolete SSH protocol version or insecure ciphers.
|
||||
|
||||
.. _Risk 019:
|
||||
|
||||
NDPI_SSH_OBSOLETE_SERVER_VERSION_OR_CIPHER
|
||||
==========================================
|
||||
This risk is generated whenever a SSH server uses an obsolete SSH protocol version or insecure ciphers.
|
||||
|
||||
.. _Risk 020:
|
||||
|
||||
NDPI_SMB_INSECURE_VERSION
|
||||
=========================
|
||||
This risk indicates that the `SMB <https://en.wikipedia.org/wiki/Server_Message_Block>`_ version used is insecure (i.e. v1).
|
||||
|
||||
.. _Risk 021:
|
||||
|
||||
NDPI_TLS_SUSPICIOUS_ESNI_USAGE
|
||||
==============================
|
||||
`SNI <https://en.wikipedia.org/wiki/Server_Name_Indication>`_ is a way to carry in TLS the host/domain name we're accessing. ESNI means encrypted SNI and it is a way to mask SNI (carried in clear text in the TLS header) with encryption. While this practice is legal, it could be used for hiding data or for attacks such as a suspicious `domain fronting <https://github.com/SixGenInc/Noctilucent/blob/master/docs/>`_.
|
||||
|
||||
.. _Risk 022:
|
||||
|
||||
NDPI_UNSAFE_PROTOCOL
|
||||
====================
|
||||
This risk indicates that the protocol used is insecure and that a secure protocol should be used (e.g. Telnet vs SSH).
|
||||
|
||||
.. _Risk 023:
|
||||
|
||||
NDPI_DNS_SUSPICIOUS_TRAFFIC
|
||||
===========================
|
||||
This risk is returned when DNS traffic returns an unexpected/obsolete `record type <https://en.wikipedia.org/wiki/List_of_DNS_record_types>`_.
|
||||
|
||||
.. _Risk 024:
|
||||
|
||||
NDPI_TLS_MISSING_SNI
|
||||
====================
|
||||
TLS needs to carry the the `SNI <https://en.wikipedia.org/wiki/Server_Name_Indication>`_ of the remote server we're accessing. Unfortunately SNI is optional in TLS so it can be omitted. In this case this risk is triggered as this is a non-standard situation that indicates a potential security problem or a protocol using TLS for other purposes (or a protocol bug).
|
||||
|
||||
.. _Risk 025:
|
||||
|
||||
NDPI_HTTP_SUSPICIOUS_CONTENT
|
||||
============================
|
||||
HTTP only: risk reported when HTTP carries content in expected format. Example the HTTP header indicates that the context is text/html but the real content is not readeable (i.e. it can transport binary data). In general this is an attempt to use a valid MIME type to carry data that does not match the type.
|
||||
|
||||
.. _Risk 026:
|
||||
|
||||
NDPI_RISKY_ASN
|
||||
==============
|
||||
This is a placeholder for traffic exchanged with `ASN <https://en.wikipedia.org/wiki/Autonomous_system_(Internet)>`_ that are considered risky. nDPI does not fill this risk that instead should be filled by aplications sitting on top of nDPI (e.g. ntopng).
|
||||
|
||||
.. _Risk 027:
|
||||
|
||||
NDPI_RISKY_DOMAIN
|
||||
=================
|
||||
This is a placeholder for traffic exchanged with domain names that are considered risky. nDPI does not fill this risk that instead should be filled by aplications sitting on top of nDPI (e.g. ntopng).
|
||||
|
||||
.. _Risk 028:
|
||||
|
||||
NDPI_MALICIOUS_JA3
|
||||
==================
|
||||
`JA3 <https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967>`_ is a method to fingerprint TLS traffic. This risk indicates that the JA3 of the TLS connection is considered suspicious (i.e. it has been found in known malware JA3 blacklists). nDPI does not fill this risk that instead should be filled by aplications sitting on top of nDPI (e.g. ntopng).
|
||||
|
||||
.. _Risk 029:
|
||||
|
||||
NDPI_MALICIOUS_SHA1_CERTIFICATE
|
||||
===============================
|
||||
TLS certificates are uniquely identified with a `SHA1 <https://en.wikipedia.org/wiki/SHA-1>`_ hash value. If such hash is found on a blacklist, this risk can be used. As for other risks, this is a placeholder as nDPI does not fill this risk that instead should be filled by aplications sitting on top of nDPI (e.g. ntopng).
|
||||
|
||||
.. _Risk 030:
|
||||
|
||||
NDPI_DESKTOP_OR_FILE_SHARING_SESSION
|
||||
====================================
|
||||
This risk is set when the flow carries desktop or file sharing sessions (e.g. TeamViewer or AnyDesk just to mention two).
|
||||
|
||||
.. _Risk 031:
|
||||
|
||||
NDPI_TLS_UNCOMMON_ALPN
|
||||
======================
|
||||
This risk is set when the `ALPN <https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation>`_ (it indicates the protocol carried into this TLS flow, for instance HTTP/1.1) is uncommon with respect to the list of expected values.
|
||||
|
||||
.. _Risk 032:
|
||||
|
||||
NDPI_TLS_CERT_VALIDITY_TOO_LONG
|
||||
===============================
|
||||
From 01/09/2020 TLS certificates lifespan is limited to 13 months. This risk is triggered for certificates not respecting this directive.
|
||||
|
||||
.. _Risk 033:
|
||||
|
||||
NDPI_TLS_SUSPICIOUS_EXTENSION
|
||||
=============================
|
||||
This risk is triggered when the domain name (SNI extension) is not printable and thus it is a problem.
|
||||
|
||||
.. _Risk 034:
|
||||
|
||||
NDPI_TLS_FATAL_ALERT
|
||||
====================
|
||||
This risk is triggered when a TLS fatal alert is detected in the TLS flow. See `this page <https://techcommunity.microsoft.com/t5/iis-support-blog/ssl-tls-alert-protocol-and-the-alert-codes/ba-p/377132>`_ for details.
|
||||
|
||||
.. _Risk 035:
|
||||
|
||||
NDPI_SUSPICIOUS_ENTROPY
|
||||
=======================
|
||||
This risk is used to detect suspicious data carried in ICMP packets whose entropy (used to measure how data is distributed, hence to indirectly guess the type of data carried on) is suspicious and thus that it can indicate a data leak.
|
||||
|
||||
.. _Risk 036:
|
||||
|
||||
NDPI_CLEAR_TEXT_CREDENTIALS
|
||||
===========================
|
||||
Clear text protocols are not bad per-se, but they should be avoided when they carry credentials as they can be intercepted by malicious users. This risk is triggered whenever clear text protocols (e.g. FTP, HTTP, IMAP...) contain credentials in clear text (read it as nDPI does not trigger this risk for HTTP connections that do not carry credentials).
|
||||
|
||||
.. _Risk 037:
|
||||
|
||||
NDPI_DNS_LARGE_PACKET
|
||||
=====================
|
||||
`DNS <https://en.wikipedia.org/wiki/Domain_Name_System>`_ packets over UDP should be limited to 512 bytes. DNS packets over this threshold indicate a potential security risk (e.g. use DNS to carry data) or a misconfiguration.
|
||||
|
||||
.. _Risk 038:
|
||||
|
||||
NDPI_DNS_FRAGMENTED
|
||||
===================
|
||||
|
||||
UDP `DNS <https://en.wikipedia.org/wiki/Domain_Name_System>`_ packets cannot be fragmented. If so, this indicates a potential security risk (e.g. use DNS to carry data) or a misconfiguration.
|
||||
|
||||
.. _Risk 039:
|
||||
|
||||
NDPI_INVALID_CHARACTERS
|
||||
=======================
|
||||
The risk is set whenever a dissected protocol contains characters not allowed in that protocol field.
|
||||
For example a DNS hostname must only contain a subset of all printable characters or else this risk is set.
|
||||
Additionally, some TLS protocol fields are checked for printable characters as well.
|
||||
|
||||
.. _Risk 040:
|
||||
|
||||
NDPI_POSSIBLE_EXPLOIT
|
||||
=====================
|
||||
The risk is set whenever a possible exploit (e.g. Log4J/Log4Shell) is detected.
|
||||
|
||||
.. _Risk 041:
|
||||
|
||||
NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE
|
||||
===================================
|
||||
The risk is set whenever a TLS certificate is close to the expiration date.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
@@ -0,0 +1,37 @@
|
||||
nDPI Documentation
|
||||
====================
|
||||
|
||||
nDPI is an open source DPI (Deep Packet Inspection) toolkit for traffic analysis.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: User's Guide
|
||||
|
||||
what_is_ndpi
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Developer's Guide
|
||||
|
||||
api
|
||||
flow_risks
|
||||
|
||||
.. toctree::
|
||||
:caption: Other Products
|
||||
|
||||
ntopng <https://www.ntop.org/guides/ntopng/>
|
||||
nProbe <https://www.ntop.org/guides/nprobe/>
|
||||
nProbe Cento <https://www.ntop.org/guides/cento/>
|
||||
n2disk <https://www.ntop.org/guides/n2disk/>
|
||||
PF_RING <https://www.ntop.org/guides/pf_ring/>
|
||||
nEdge <https://www.ntop.org/guides/nedge/>
|
||||
nScrub <https://www.ntop.org/guides/nscrub/>
|
||||
nBox <https://www.ntop.org/guides/nbox/>
|
||||
|
||||
.. Indices and tables
|
||||
.. ==================
|
||||
..
|
||||
.. * :ref:`genindex`
|
||||
.. * :ref:`modindex`
|
||||
.. * :ref:`search`
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,56 @@
|
||||
What is nDPI
|
||||
##############
|
||||
|
||||
nDPI is a DPI (Deep Packet Inspection) toolkit able to:
|
||||
|
||||
- Detect application protocol on traffic flows
|
||||
- Analize encrypted traffic flows via ET (Encrypted Traffic Analysis)
|
||||
- Extract selected protocol metadata from traffic
|
||||
- Implement APIs for analysing traffic
|
||||
|
||||
Releases and Features
|
||||
---------------------
|
||||
|
||||
nDPI development lifecycle is typically 6 to 9 months. The history of changes and features implemented by every release, is available on its `Changelog <https://github.com/ntop/nDPI/blob/dev/CHANGELOG.md>`_.
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
nDPI is open source and available on `GitHub
|
||||
<https://github.com/ntop/nDPI>`_. In addition, pre-compiled, binary
|
||||
nDPI packages are available both for Linux and other platforms. Installation
|
||||
instructions for binary packages are available below.
|
||||
|
||||
Installing on Linux
|
||||
-------------------
|
||||
|
||||
Installation instructions can be found at
|
||||
http://packages.ntop.org/. Development and stable builds are
|
||||
available. Stable builds are intended for production environments whereas
|
||||
development builds are intended for testing or early feature access.
|
||||
|
||||
|
||||
Software Updates
|
||||
================
|
||||
|
||||
General instructions for updating the software can be found at
|
||||
http://packages.ntop.org/ together with the installation instructions.
|
||||
Depending on the Operating System, nDPI supports also automatic updates
|
||||
through the GUI as described in the below sections.
|
||||
|
||||
Updating the Software on Linux
|
||||
------------------------------
|
||||
|
||||
Instructions for updating the software via command line can be found
|
||||
at http://packages.ntop.org/. For example on Ubuntu/Debian systems the
|
||||
below commands will update the repository, check for updates and install
|
||||
the latest software update if any:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
|
||||
.. _AvailableVersions:
|
||||
|
||||
@@ -17,11 +17,11 @@ include $(RTE_SDK)/mk/rte.vars.mk
|
||||
APP = ndpiReader.dpdk
|
||||
LIBNDPI = $(PWD)/../src/lib/libndpi.a
|
||||
|
||||
SRCS-y := reader_util.c ndpiReader.c
|
||||
SRCS-y := reader_util.c intrusion_detection.c ndpiReader.c
|
||||
|
||||
CFLAGS += -g
|
||||
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
|
||||
LDLIBS = $(LIBNDPI) @PCAP_LIB@ -lpthread @LDFLAGS@
|
||||
LDLIBS = $(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@ -lpthread @LDFLAGS@
|
||||
|
||||
include $(RTE_SDK)/mk/rte.extapp.mk
|
||||
|
||||
|
||||
+54
-16
@@ -1,40 +1,78 @@
|
||||
AR=@AR@
|
||||
CC=@CC@
|
||||
CXX=@CXX@
|
||||
CFLAGS=-g -I../src/include @CFLAGS@
|
||||
LIBNDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=$(LIBNDPI) @PCAP_LIB@ -lpthread -lm @LDFLAGS@
|
||||
OBJS=ndpiReader.o reader_util.o
|
||||
BUILD_MINGW=@BUILD_MINGW@
|
||||
BUILD_MINGW_X64=@BUILD_MINGW_X64@
|
||||
SRCHOME=../src
|
||||
CFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIBNDPI=$(SRCHOME)/lib/libndpi.a
|
||||
LIBS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@
|
||||
HEADERS=intrusion_detection.h reader_util.h $(SRCHOME)/include/ndpi_api.h \
|
||||
$(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
|
||||
OBJS=ndpiReader.o reader_util.o intrusion_detection.o
|
||||
PREFIX?=@prefix@
|
||||
|
||||
all: ndpiReader @DPDK_TARGET@
|
||||
ifneq ($(BUILD_MINGW),)
|
||||
SUFFIX:=.exe
|
||||
CFLAGS+=-I@srcdir@/../windows/WpdPack/Include -I@srcdir@/../windows/WpdPack/Include/pcap
|
||||
LIBS+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic
|
||||
|
||||
ndpiReader: $(OBJS) $(LIBNDPI)
|
||||
$(CXX) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS)
|
||||
ifneq ($(BUILD_MINGW_X64),)
|
||||
LIBS+=@srcdir@/../windows/WpdPack/Lib/x64/wpcap.lib
|
||||
else
|
||||
LIBS+=@srcdir@/../windows/WpdPack/Lib/wpcap.lib
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
LIBS+=-lpthread
|
||||
|
||||
endif
|
||||
|
||||
all: ndpiReader$(SUFFIX) @DPDK_TARGET@
|
||||
|
||||
EXECUTABLE_SOURCES := ndpiReader.c ndpiSimpleIntegration.c
|
||||
COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c ))
|
||||
|
||||
libndpiReader.a: $(COMMON_SOURCES:%.c=%.o) $(LIBNDPI)
|
||||
$(AR) rsv libndpiReader.a $(COMMON_SOURCES:%.c=%.o)
|
||||
|
||||
ndpiReader$(SUFFIX): libndpiReader.a $(LIBNDPI) ndpiReader.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) ndpiReader.o libndpiReader.a $(LIBS) -o $@
|
||||
|
||||
ndpiSimpleIntegration$(SUFFIX): ndpiSimpleIntegration.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
|
||||
|
||||
%.o: %.c $(HEADERS) Makefile
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
install:
|
||||
install: ndpiReader$(SUFFIX)
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin/
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/sbin/ndpi
|
||||
cp ndpiReader $(DESTDIR)$(PREFIX)/bin/
|
||||
cp protos.txt $(DESTDIR)$(PREFIX)/sbin/ndpi/ndpiProtos.txt
|
||||
cp mining_hosts.txt $(DESTDIR)$(PREFIX)/sbin/ndpi/ndpiCustomCategory.txt
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/ndpi
|
||||
cp ndpiReader$(SUFFIX) $(DESTDIR)$(PREFIX)/bin/
|
||||
cp protos.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiProtos.txt
|
||||
cp mining_hosts.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiCustomCategory.txt
|
||||
[ -f ndpiSimpleIntegration$(SUFFIX) ] && cp ndpiSimpleIntegration$(SUFFIX) $(DESTDIR)$(PREFIX)/bin/ndpiSimpleIntegration$(SUFFIX) || true
|
||||
[ -f build/app/ndpiReader.dpdk ] && cp build/app/ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
|
||||
[ -f ndpiReader.dpdk ] && cp ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
|
||||
|
||||
dpdk:
|
||||
make -f Makefile.dpdk
|
||||
$(MAKE) -f Makefile.dpdk
|
||||
|
||||
check:
|
||||
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I../src/include -I/usr/local/include/json-c *.c
|
||||
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I$(SRCHOME)/include *.c
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o ndpiReader ndpiReader.dpdk
|
||||
/bin/rm -f *.o ndpiReader ndpiSimpleIntegration ndpiReader$(SUFFIX) ndpiSimpleIntegration$(SUFFIX) ndpiReader.dpdk
|
||||
/bin/rm -f .*.dpdk.cmd .*.o.cmd *.dpdk.map .*.o.d
|
||||
/bin/rm -f _install _postbuild _postinstall _preinstall
|
||||
/bin/rm -rf build
|
||||
|
||||
distdir:
|
||||
cp categories.txt mining_hosts.txt protos.txt README.DPDK '$(distdir)/'
|
||||
find . -maxdepth 1 -type f -name '*.c' -o -name '*.h' -o -name '*.py' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile.dpdk
|
||||
/bin/rm -f Makefile
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcapExample", "pcapExample\pcapExample.vcxproj", "{F6A2C0AE-2110-438A-87E4-7C1CFCE064C6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F6A2C0AE-2110-438A-87E4-7C1CFCE064C6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F6A2C0AE-2110-438A-87E4-7C1CFCE064C6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F6A2C0AE-2110-438A-87E4-7C1CFCE064C6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F6A2C0AE-2110-438A-87E4-7C1CFCE064C6}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
// pcapExample.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,231 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{F6A2C0AE-2110-438A-87E4-7C1CFCE064C6}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pcapExample</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\ntop\nprobe\nprobe-win-32;C:\ntop\winpcap\Include;C:\ntop\dependencies\nDPI\src\lib\third_party\include;C:\ntop\dependencies\nDPI\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Wsock32.lib;Ws2_32.lib;C:\ntop\winpcap\Lib\Packet.lib;C:\ntop\winpcap\Lib\wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\..\nprobe\nprobe-win-32\getopt.c" />
|
||||
<ClCompile Include="..\..\..\..\..\nprobe\nprobe-win-32\getopt1.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\ndpi_main.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\afp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\aimini.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\applejuice.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\armagetron.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\battlefield.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\bgp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\bittorrent.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ciscovpn.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\citrix.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\corba.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\crossfire.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dcerpc.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dhcp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dhcpv6.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\directconnect.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\directdownloadlink.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dns.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dofus.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dropbox.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\edonkey.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\fasttrack.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\feidian.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\fiesta.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\filetopia.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\flash.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\florensia.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ftp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\gadu_gadu.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\gnutella.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\gtp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\guildwars.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\h323.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\halflife2_and_mods.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\http.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\http_activesync.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\i23v5.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\iax.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\icecast.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\imesh.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ipp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\irc.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\jabber.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\kerberos.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\kontiki.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ldap.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\lotus_notes.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mail_imap.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mail_pop.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mail_smtp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\maplestory.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mdns.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\meebo.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mgcp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mms.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\msn.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mssql.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mysql.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\netbios.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\netflow.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\nfs.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\noe.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\non_tcp_udp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ntp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\openft.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\openvpn.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\oracle.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\oscar.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pando.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pcanywhere.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\popo.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\postgres.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pplive.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ppstream.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pptp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\qq.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\quake.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\quic.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\radius.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rdp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rsync.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rtcp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rtp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rtsp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\sflow.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\shoutcast.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\sip.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\skinny.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\skype.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\smb.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\snmp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\socrates.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\sopcast.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\soulseek.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\spotify.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ssdp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ssh.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ssl.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\stealthnet.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\steam.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\stun.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\syslog.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tcp_udp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tds.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\teamspeak.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\teamviewer.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\telnet.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tftp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\thunder.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tor.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tvants.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tvuplayer.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\usenet.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\veohtv.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\viber.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\vmware.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\vnc.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\warcraft3.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\winmx.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\world_of_kung_fu.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\world_of_warcraft.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\xbox.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\xdmcp.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\yahoo.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\zattoo.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\third_party\src\ahocorasick.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\third_party\src\node.c" />
|
||||
<ClCompile Include="..\..\..\src\lib\third_party\src\sort.c" />
|
||||
<ClCompile Include="..\..\pcapReader.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\nprobe\nprobe-win-32\getopt.h" />
|
||||
<ClInclude Include="..\..\..\src\include\linux_compat.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_api.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_debug_functions.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_define.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_macros.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_main.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_protocols.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_protocols_osdpi.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_protocol_history.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_public_functions.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_structs.h" />
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_utils.h" />
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\actypes.h" />
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\ahocorasick.h" />
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\node.h" />
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\sort.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,465 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\pcapReader.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\ndpi_main.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\zattoo.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\afp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\aimini.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\applejuice.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\armagetron.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\battlefield.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\bgp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\bittorrent.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ciscovpn.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\citrix.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\corba.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\crossfire.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dcerpc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dhcp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dhcpv6.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\directconnect.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\directdownloadlink.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dns.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dofus.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\dropbox.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\edonkey.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\fasttrack.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\feidian.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\fiesta.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\filetopia.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\flash.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\florensia.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ftp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\gadu_gadu.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\gnutella.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\gtp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\guildwars.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\h323.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\halflife2_and_mods.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\http.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\http_activesync.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\i23v5.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\iax.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\icecast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\imesh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ipp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\irc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\jabber.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\kerberos.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\kontiki.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ldap.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\lotus_notes.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mail_imap.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mail_pop.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mail_smtp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\maplestory.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mdns.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\meebo.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mgcp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mms.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\msn.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mssql.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\mysql.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\netbios.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\netflow.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\nfs.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\noe.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\non_tcp_udp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ntp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\openft.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\openvpn.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\oracle.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\oscar.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pando.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pcanywhere.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\popo.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\postgres.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pplive.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ppstream.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\pptp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\qq.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\quake.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\quic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\radius.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rdp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rsync.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rtcp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rtp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\rtsp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\sflow.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\shoutcast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\sip.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\skinny.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\skype.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\smb.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\snmp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\socrates.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\sopcast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\soulseek.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\spotify.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ssdp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ssh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\ssl.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\stealthnet.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\steam.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\stun.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\syslog.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tcp_udp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tds.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\teamspeak.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\teamviewer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\telnet.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tftp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\thunder.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tvants.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\tvuplayer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\usenet.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\veohtv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\viber.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\vmware.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\vnc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\warcraft3.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\winmx.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\world_of_kung_fu.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\world_of_warcraft.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\xbox.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\xdmcp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\protocols\yahoo.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\third_party\src\ahocorasick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\third_party\src\node.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\lib\third_party\src\sort.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\nprobe\nprobe-win-32\getopt.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\nprobe\nprobe-win-32\getopt1.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\actypes.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\ahocorasick.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\node.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\lib\third_party\include\sort.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_api.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_debug_functions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_define.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_macros.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_main.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_protocol_history.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_protocols.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_protocols_osdpi.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_public_functions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_structs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\ndpi_utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\include\linux_compat.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\nprobe\nprobe-win-32\getopt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -0,0 +1,109 @@
|
||||
################################################################
|
||||
# abuse.ch Suricata JA3 Fingerprint Blacklist (CSV) #
|
||||
# For Suricata 4.1.0 or newer #
|
||||
# Last updated: 2020-04-09 06:48:14 UTC #
|
||||
# #
|
||||
# Terms Of Use: https://sslbl.abuse.ch/blacklist/ #
|
||||
# For questions please contact sslbl [at] abuse.ch #
|
||||
################################################################
|
||||
#
|
||||
# ja3_md5,Firstseen,Lastseen,Listingreason
|
||||
b386946a5a44d1ddcc843bc75336dfce,2017-07-14 18:08:15,2019-07-27 20:42:54,Dridex
|
||||
8991a387e4cc841740f25d6f5139f92d,2017-07-14 19:02:03,2019-07-28 00:34:38,Adware
|
||||
cb98a24ee4b9134448ffb5714fd870ac,2017-07-14 19:48:28,2019-05-22 03:22:38,Dridex
|
||||
1aa7bf8b97e540ca5edd75f7b8384bfa,2017-07-14 20:23:38,2019-07-28 01:38:22,TrickBot
|
||||
3d89c0dfb1fa44911b8fa7523ef8dedb,2017-07-15 04:23:45,2021-02-01 18:23:25,Adware
|
||||
bc6c386f480ee97b9d9e52d472b772d8,2017-07-15 10:57:38,2021-02-21 13:13:30,Adware
|
||||
8f52d1ce303fb4a6515836aec3cc16b1,2017-07-15 19:05:11,2019-07-27 20:00:57,TrickBot
|
||||
d6f04b5a910115f4b50ecec09d40a1df,2017-07-15 19:42:24,2018-10-14 08:12:51,Dridex
|
||||
35c0a31c481927f022a3b530255ac080,2017-07-15 19:43:19,2021-02-06 03:21:55,Tofsee
|
||||
d551fafc4f40f1dec2bb45980bfa9492,2017-07-15 19:59:29,2020-11-16 13:06:20,Adware
|
||||
e330bca99c8a5256ae126a55c4c725c5,2017-07-15 19:59:29,2021-01-13 00:29:37,Adware
|
||||
b8f81673c0e1d29908346f3bab892b9b,2017-07-16 01:32:03,2018-12-17 06:08:03,Adware
|
||||
83e04bc58d402f9633983cbf22724b02,2017-07-16 01:32:03,2021-01-14 14:23:42,Adware
|
||||
70722097d1fe1d78d8c2164640ab6df4,2017-07-16 02:39:08,2021-02-22 04:56:57,Tofsee
|
||||
9c2589e1c0e9f533a022c6205f9719e1,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware
|
||||
849b04bdbd1d2b983f6e8a457e0632a8,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware
|
||||
16efcf0e00504ddfedde13bfea997952,2017-07-16 19:45:45,2020-12-23 15:10:32,Adware
|
||||
4d7a28d6f2263ed61de88ca66eb011e3,2017-07-16 21:20:29,2020-12-08 18:10:55,Tofsee
|
||||
550dce18de1bb143e69d6dd9413b8355,2017-07-16 22:17:20,2018-12-21 07:04:50,Adware
|
||||
c50f6a8b9173676b47ba6085bd0c6cee,2017-07-16 22:38:41,2019-05-21 09:42:17,TrickBot
|
||||
20dd18bdd3209ea718989030a6f93364,2017-07-18 10:22:58,2019-04-28 09:23:31,Adware
|
||||
8498fe4268764dbf926a38283e9d3d8f,2017-07-18 10:22:58,2020-12-31 02:06:27,Adware
|
||||
590a232d04d56409fab72e752a8a2634,2017-07-18 18:53:24,2020-10-11 20:48:33,Tofsee
|
||||
51a7ad14509fd614c7bb3a50c4982b8c,2017-07-19 07:28:19,2019-07-14 11:58:32,JBifrost
|
||||
96eba628dcb2b47607192ba74a3b55ba,2017-07-19 18:53:48,2021-01-04 12:45:08,Tofsee
|
||||
df5c30e670dba99f9270ed36060cf054,2017-07-20 17:44:07,2018-04-11 15:57:59,Tofsee
|
||||
098f55e27d8c4b0a590102cbdb3a5f3a,2017-07-21 09:52:01,2019-04-08 01:09:54,Adware
|
||||
46efd49abcca8ea9baa932da68fdb529,2017-07-22 14:07:36,2021-02-20 20:45:32,Adware
|
||||
29085f03f8e8a03f0b399c5c7cf0b0b8,2017-07-22 14:07:36,2021-02-21 20:56:01,Adware
|
||||
d7150af4514b868defb854db0f62a441,2017-07-23 09:39:24,2018-07-24 01:04:58,Tofsee
|
||||
03e186a7f83285e93341de478334006e,2017-07-24 18:17:14,2021-02-13 23:55:58,Tofsee
|
||||
3cda52da4ade09f1f781ad2e82dcfa20,2017-07-30 18:41:36,2019-05-21 17:34:18,Quakbot
|
||||
b13d01846ad7a14a70bf030a16775c78,2017-08-08 07:12:49,2021-02-21 01:32:12,Adware
|
||||
1543a7c46633acf71e8401baccbd0568,2017-08-08 21:32:28,2020-11-10 05:30:17,Tofsee
|
||||
1d095e68489d3c535297cd8dffb06cb9,2017-08-12 19:56:28,2020-10-28 11:06:23,Tofsee
|
||||
93d056782d649deb51cda44ecb714bb0,2017-08-28 12:20:47,2019-04-15 23:47:27,Adware
|
||||
698e36219f3979420fa2581b21dac7ec,2017-08-28 12:20:47,2020-12-31 02:06:31,Adware
|
||||
1712287800ac91b34cadd5884ce85568,2017-08-28 16:01:59,2021-01-23 09:36:32,TorrentLocker
|
||||
5e573c9c9f8ba720ef9b18e9fce2e2f7,2017-08-30 13:44:56,2021-02-17 17:11:34,Adware
|
||||
f6fd83a21f9f3c5f9ff7b5c63bbc179d,2017-10-20 08:03:21,2018-11-06 06:42:12,Adware
|
||||
92579701f145605e9edc0b01a901c6d5,2017-10-23 00:10:48,2021-02-18 22:56:49,Adware
|
||||
a61299f9b501adcf680b9275d79d4ac6,2017-11-04 18:03:59,2020-04-21 17:08:24,Tofsee
|
||||
b2b61db7b9490a60d270ccb20b462826,2017-11-14 20:12:03,2021-02-18 22:56:49,Adware
|
||||
7dcce5b76c8b17472d024758970a406b,2017-11-22 12:42:46,2020-12-22 15:15:49,Tofsee
|
||||
534ce2dbc413c68e908363b5df0ae5e0,2017-12-22 09:36:21,2019-07-27 15:22:33,TrickBot
|
||||
fb00055a1196aeea8d1bc609885ba953,2018-01-01 22:49:25,2019-04-09 06:58:58,TrickBot
|
||||
a50a861119aceb0ccc74902e8fddb618,2018-01-02 08:16:23,2018-07-05 02:33:08,Tofsee
|
||||
e7643725fcff971e3051fe0e47fc2c71,2018-01-31 08:06:13,2020-03-25 16:19:48,Tofsee
|
||||
7c410ce832e848a3321432c9a82e972b,2018-01-31 20:04:25,2021-02-21 22:51:31,Tofsee
|
||||
da949afd9bd6df820730f8f171584a71,2018-02-03 05:19:37,2021-02-21 05:20:43,Tofsee
|
||||
906004246f3ba5e755b043c057254a29,2018-03-11 08:25:38,2018-04-14 00:59:16,Tofsee
|
||||
fd80fa9c6120cdeea8520510f3c644ac,2018-03-11 09:34:30,2021-02-21 22:16:39,Tofsee
|
||||
b90bdbe961a648f0427db21aaa6ccb59,2018-03-11 10:37:43,2020-05-29 23:39:01,Tofsee
|
||||
1fe4c7a3544eb27afec2adfb3a3dbf60,2018-03-11 19:23:08,2021-02-20 11:19:52,Tofsee
|
||||
c201b92f8b483fa388be174d6689f534,2018-03-12 13:43:52,2021-01-28 06:17:06,Gozi
|
||||
9f62c4f26b90d3d757bea609e82f2eaf,2018-03-13 06:23:41,2020-12-18 16:07:31,Tofsee
|
||||
1be3ecebe5aa9d3654e6e703d81f6928,2018-03-13 11:50:02,2021-02-14 23:03:13,Ransomware.Troldesh
|
||||
e3b2ab1f9a56f2fb4c9248f2f41631fa,2018-03-15 01:06:34,2021-02-22 10:36:48,Tofsee
|
||||
dff8a0aa1c904aaea76c5bf624e88333,2018-03-18 09:41:15,2020-10-27 09:50:24,Tofsee
|
||||
17fd49722f8d11f3d76dce84f8e099a7,2018-03-19 23:02:27,2020-12-09 11:32:21,Tofsee
|
||||
911479ac8a0813ed1241b3686ccdade9,2018-03-19 23:24:59,2020-03-30 04:09:18,Tofsee
|
||||
c5deb9465d47232dd48772f9c4d14679,2018-03-22 15:42:48,2021-02-17 07:39:32,Tofsee
|
||||
f22bdd57e3a52de86cda40da2d84e83b,2018-03-27 13:40:19,2019-01-20 14:31:39,Tofsee
|
||||
d18a4da84af59e1108862a39bae7c9d4,2018-04-03 00:40:51,2021-02-06 01:53:12,Tofsee
|
||||
2d8794cb7b52b777bee2695e79c15760,2018-04-04 06:56:37,2021-02-10 08:22:31,Ransomware
|
||||
40adfd923eb82b89d8836ba37a19bca1,2018-04-15 15:49:08,2021-02-21 22:22:56,CoinMiner
|
||||
1aee0238942d453d679fc1e37a303387,2018-05-13 01:59:49,2021-02-10 13:19:24,Tofsee
|
||||
2092e1fffb45d7e4a19a57f9bc5e203a,2018-05-16 21:59:36,2018-09-05 01:58:33,Adware
|
||||
bffa4501966196d3d6e90cee1f88fc89,2018-06-07 15:08:04,2020-03-16 00:03:44,Tofsee
|
||||
807fca46d9d0cf63adf4e5e80e414bbe,2018-06-07 16:51:03,2021-02-20 03:15:38,Tofsee
|
||||
fb58831f892190644fe44e25bc830b45,2018-06-08 12:07:59,2019-05-31 21:02:37,Adware
|
||||
0cc1e84568e471aa1d62ad4158ade6b5,2018-06-24 10:50:47,2021-02-10 21:48:57,Tofsee
|
||||
d2935c58fe676744fecc8614ee5356c7,2018-08-14 21:48:41,2021-02-21 21:44:55,Adwind
|
||||
8916410db85077a5460817142dcbc8de,2018-08-21 12:32:28,2021-02-21 20:02:19,TrickBot
|
||||
c5235d3a8b9934b7fbbd204d50bc058d,2018-08-23 17:36:08,2019-10-13 05:11:09,Gootkit
|
||||
57f3642b4e37e28f5cbe3020c9331b4c,2018-08-28 15:54:53,2021-02-22 11:09:43,Gozi
|
||||
e62a5f4d538cbf169c2af71bec2399b4,2018-08-30 15:45:40,2021-02-21 20:36:55,TrickBot
|
||||
51c64c77e60f3980eea90869b68c58a8,2018-08-30 21:04:57,2021-02-21 22:09:16,Dridex
|
||||
7691297bcb20a41233fd0a0baa0a3628,2018-09-17 02:50:05,2021-02-21 17:05:57,Adware
|
||||
7dd50e112cd23734a310b90f6f44a7cd,2018-09-17 17:54:58,2021-02-22 11:14:04,Quakbot
|
||||
52c7396a501e4fecbdfa99c5408334ac,2018-09-18 00:29:04,2019-12-03 17:24:02,Tofsee
|
||||
f735bbc6b69723b9df7b0e7ef27872af,2018-10-02 18:04:16,2021-02-19 06:55:39,TrickBot
|
||||
49ed2ef3f1321e5f044f1e71b0e6fdd5,2018-10-02 18:04:17,2021-02-19 06:55:39,TrickBot
|
||||
d76ee64fb7273733cbe455ac81c292e6,2018-11-16 13:26:39,2018-11-18 19:19:36,Tofsee
|
||||
8f6c918dcb585ebbea05e2cc94530e3d,2018-11-16 13:26:41,2020-05-06 15:45:21,Tofsee
|
||||
34f14a69ad7009ca5863379218af17f3,2018-11-17 05:17:22,2021-01-28 08:19:18,Tofsee
|
||||
c2b4710c6888a5d47befe865c8e6fb19,2018-11-29 20:46:04,2020-12-16 15:08:09,Tofsee
|
||||
decfb48a53789ebe081b88aabb58ee34,2018-12-21 09:06:16,2021-02-16 12:28:53,Adwind
|
||||
08a8a4e85b25ac42e1490bc85cfdb5ce,2019-01-30 02:48:34,2020-10-27 09:50:19,Tofsee
|
||||
c0220cd64849a629397a9cb68f78a0ea,2019-03-24 00:12:32,2021-02-13 05:13:33,Tofsee
|
||||
7a29c223fb122ec64d10f0a159e07996,2019-06-09 22:55:29,2020-10-27 09:50:26,Tofsee
|
||||
44dab16d680ef93487bc16ad23b3ffb1,2019-06-09 22:55:29,2020-10-27 09:50:25,Tofsee
|
||||
70a04365be5bbd4653698bebeb43ce68,2019-07-02 06:26:56,2020-05-30 04:19:00,Tofsee
|
||||
d81d654effb94714a4086734fa0adad9,2019-07-16 23:29:02,2020-10-27 09:50:21,Tofsee
|
||||
25d74b7b4b779eb1efd4b31d26d651c6,2019-08-03 20:15:33,2020-07-14 21:43:25,Tofsee
|
||||
fc2299d5b2964cd242c5a2c8c531a5f0,2019-08-09 23:56:32,2021-02-22 08:49:18,Tofsee
|
||||
32926ca3e59f0413d0b98725454594f5,2019-09-12 06:56:10,2020-10-27 21:49:31,Tofsee
|
||||
ffefafdb86336d057eda5fdf02b3d5ce,2019-10-26 07:31:49,2020-07-25 00:14:09,Tofsee
|
||||
# END (98) entries
|
||||
|
Executable
+136
@@ -0,0 +1,136 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright (C) 2019 - ntop.org
|
||||
#
|
||||
# nDPI is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# nDPI is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Usage
|
||||
#
|
||||
# 1) Generate a CSV file using the ndpiReader tool. Example:
|
||||
# ./ndpiReader -C sample.json -i sample.pcap
|
||||
#
|
||||
# 2) Open Google Chrome and type in the URL 'chrome://tracing/'
|
||||
#
|
||||
# 3) Inside Chrome click on 'Load' or drop sample.json in the
|
||||
# Chrome window to visualize the output
|
||||
#
|
||||
|
||||
import sys
|
||||
import json
|
||||
|
||||
protos = {}
|
||||
lastId = 1
|
||||
|
||||
def get_timestamp(seen):
|
||||
tok = seen.split(".")
|
||||
return int(tok[0]) * 1000 + int(tok[1])
|
||||
|
||||
def get_record(toks, csv_fields):
|
||||
global protos
|
||||
global lastId
|
||||
|
||||
if len(toks) < 11:
|
||||
return None
|
||||
|
||||
record = dict()
|
||||
ndpiProtocol = toks[10]
|
||||
|
||||
ndpi_protos = ndpiProtocol.split(".")
|
||||
if(len(ndpi_protos) == 1):
|
||||
app_proto = ndpi_protos[0]
|
||||
else:
|
||||
app_proto = ndpi_protos[1]
|
||||
|
||||
id = protos.get(ndpiProtocol)
|
||||
if(id == None):
|
||||
lastId = lastId + 1
|
||||
protos[ndpiProtocol] = lastId
|
||||
id = lastId
|
||||
#print(ndpiProtocol+"="+str(id))
|
||||
|
||||
ip_address = toks[5]
|
||||
server_name = toks[11]
|
||||
record["cat"] = "flow"
|
||||
record["pid"] = ip_address
|
||||
record["tid"] = ndpiProtocol # id
|
||||
record["ts"] = get_timestamp(toks[2])
|
||||
record["ph"] = "X"
|
||||
record["name"] = app_proto
|
||||
|
||||
if(server_name == ""):
|
||||
args = {}
|
||||
else:
|
||||
args = { "name": server_name }
|
||||
record["args"] = args
|
||||
record["dur"] = get_timestamp(toks[3]) - record["ts"]
|
||||
|
||||
# if we do not have the legend we just return
|
||||
if csv_fields is None:
|
||||
return record
|
||||
|
||||
# Otherwise we just add everything we find as a string
|
||||
if(0):
|
||||
idx = 0
|
||||
for tok in toks:
|
||||
name = csv_fields[idx]
|
||||
idx += 1
|
||||
record["args"][name] = str(tok)
|
||||
|
||||
return record
|
||||
|
||||
def get_record_dict(filename):
|
||||
csv_fields = None
|
||||
records = []
|
||||
fin = open(filename, "r");
|
||||
for line in fin:
|
||||
line = line.replace("\n","")
|
||||
|
||||
# Get the legend if present
|
||||
if line[0] == '#':
|
||||
csv_fields = []
|
||||
line = line.replace("#", "")
|
||||
toks = line.split(",")
|
||||
for tok in toks:
|
||||
csv_fields.append(tok)
|
||||
continue
|
||||
|
||||
toks = line.split(",")
|
||||
flow_id = int(toks[0])
|
||||
record = get_record(toks, csv_fields)
|
||||
if record is None:
|
||||
print("Error while parsing " + line)
|
||||
continue
|
||||
|
||||
records.append(record)
|
||||
|
||||
json_dict = dict()
|
||||
json_dict["traceEvents"] = records
|
||||
|
||||
return json_dict
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 3:
|
||||
print("ndpi2json <csv_file> <json_file>")
|
||||
sys.exit(0)
|
||||
|
||||
record_dict = get_record_dict(sys.argv[1])
|
||||
#print(record_dict)
|
||||
#json_string = json.dumps(json_dict)
|
||||
#print(json_string)
|
||||
|
||||
with open(sys.argv[2], 'w') as fp:
|
||||
json.dump(record_dict, fp)
|
||||
print("Written " + str(len(record_dict["traceEvents"])) + " records")
|
||||
+1881
-1614
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+39
-9
@@ -10,19 +10,49 @@ tcp:3000@ntop
|
||||
# Format:
|
||||
# host:"<value>",host:"<value>",.....@<subproto>
|
||||
|
||||
host:"googlesyndication.com"@Google
|
||||
host:"venere.com"@Venere
|
||||
host:"kataweb.it",host:"repubblica.it"@Repubblica
|
||||
host:"ntop"@ntop
|
||||
host:"atv-ext.amazon.com",host:"*.api.amazon.com",host:"*.api.amazonvideo.com"@AmazonVideo
|
||||
host:"*.amazonaws.com"@AmazonVideo
|
||||
host:"*.netflix.com"@Netflix
|
||||
host:"disneyplus.com",host:"cdn.registerdisney.go.com",host:"disney-portal.my.onetrust.com",host:"disneyplus.bn5x.net",host:"disney-plus.net"@DisneyPlus
|
||||
host:"*.lvlt.dash.us.aiv-cdn.net.c.footprint.net"@AmazonVideo
|
||||
host:"api-global.netflix.com"@Netflix
|
||||
# IP based Subprotocols
|
||||
# Format:
|
||||
# ip:<value>,ip:<value>,.....@<subproto>
|
||||
|
||||
ip:213.75.170.11@CustomProtocol
|
||||
ip:8.248.73.247@AmazonPrime
|
||||
#
|
||||
# NOTES
|
||||
# 1) the port of a custom protocol is optional but if
|
||||
# specified it must match the port.
|
||||
# 2) you can specify up to 1 port per IP address
|
||||
# 3) if you specify a custom ip:<IP>:<PORT> rule,
|
||||
# even if the <PORT> doesn't match the <IP>
|
||||
# (if best match during the search) will
|
||||
# have priority as best match. Example if
|
||||
# you specify a <Google IP>:<port 9999> and
|
||||
# in your traffic have match for such IP but
|
||||
# with a port other than 9999, the IP address
|
||||
# begin a best match will hve preference over
|
||||
# <Google IP> so this protocol will not be
|
||||
# detected as <L7 proto>.Google but only
|
||||
# as <L7 proto>
|
||||
#
|
||||
|
||||
ip:213.75.170.11/32:443@CustomProtocol
|
||||
ip:8.248.73.247:443@AmazonPrime
|
||||
ip:54.80.47.130@AmazonPrime
|
||||
|
||||
#
|
||||
# Risk Exceptions
|
||||
#
|
||||
# ip_risk_mask: used to mask flow risks for IP addresses
|
||||
# host_risk_mask: used to mask exceptions for domain names and hosts
|
||||
#
|
||||
# Syntax: <name>=<64 bit mask to be put in AND with the risk
|
||||
#
|
||||
# For IPs, the flow risk is put in AND (source IP mask OR destination IP mask)
|
||||
# For Flows with a hostname (e.g. TLS) the risk is also put in AND with the host_risk_mask
|
||||
#ip_risk_mask:192.168.1.0/24=0
|
||||
#ip_risk_mask:10.196.157.228=0
|
||||
host_risk_mask:".home"=0
|
||||
|
||||
|
||||
# Custom certification autorities we trust
|
||||
trusted_issuer_dn:"CN=813845657003339838, O=Code42, OU=TEST, ST=MN, C=US"
|
||||
|
||||
+903
-388
File diff suppressed because it is too large
Load Diff
+110
-50
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_util.h
|
||||
*
|
||||
* Copyright (C) 2011-19 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -29,9 +29,11 @@
|
||||
#ifndef __NDPI_UTIL_H__
|
||||
#define __NDPI_UTIL_H__
|
||||
|
||||
#include "uthash.h"
|
||||
#include "../src/lib/third_party/include/uthash.h"
|
||||
#include <pcap.h>
|
||||
#include "ndpi_includes.h"
|
||||
#include "ndpi_classify.h"
|
||||
#include "ndpi_typedefs.h"
|
||||
|
||||
#ifdef USE_DPDK
|
||||
#include <rte_eal.h>
|
||||
@@ -49,8 +51,14 @@
|
||||
#define PREFETCH_OFFSET 3
|
||||
|
||||
extern int dpdk_port_init(int port, struct rte_mempool *mbuf_pool);
|
||||
extern int dpdk_port_deinit(int port);
|
||||
#endif
|
||||
|
||||
#define PLEN_MAX 1504
|
||||
#define PLEN_BIN_LEN 32
|
||||
#define PLEN_NUM_BINS 48 /* 47*32 = 1504 */
|
||||
#define MAX_NUM_BIN_PKTS 256
|
||||
|
||||
/* ETTA Spec defiintions for feature readiness */
|
||||
#define ETTA_MIN_PACKETS 10
|
||||
#define ETTA_MIN_OCTETS 4000
|
||||
@@ -86,38 +94,38 @@ extern int dpdk_port_init(int port, struct rte_mempool *mbuf_pool);
|
||||
|
||||
// inner hash table (ja3 -> security state)
|
||||
typedef struct ndpi_ja3_info {
|
||||
char * ja3;
|
||||
ndpi_cipher_weakness unsafe_cipher;
|
||||
UT_hash_handle hh;
|
||||
char * ja3;
|
||||
ndpi_cipher_weakness unsafe_cipher;
|
||||
UT_hash_handle hh;
|
||||
} ndpi_ja3_info;
|
||||
|
||||
// external hash table (host ip -> <ip string, hash table ja3c, hash table ja3s>)
|
||||
// used to aggregate ja3 fingerprints by hosts
|
||||
typedef struct ndpi_host_ja3_fingerprints{
|
||||
u_int32_t ip;
|
||||
char *ip_string;
|
||||
char *dns_name;
|
||||
ndpi_ja3_info *host_client_info_hasht;
|
||||
ndpi_ja3_info *host_server_info_hasht;
|
||||
typedef struct ndpi_host_ja3_fingerprints {
|
||||
u_int32_t ip;
|
||||
char *ip_string;
|
||||
char *dns_name;
|
||||
ndpi_ja3_info *host_client_info_hasht;
|
||||
ndpi_ja3_info *host_server_info_hasht;
|
||||
|
||||
UT_hash_handle hh;
|
||||
UT_hash_handle hh;
|
||||
} ndpi_host_ja3_fingerprints;
|
||||
|
||||
|
||||
//inner hash table
|
||||
typedef struct ndpi_ip_dns{
|
||||
u_int32_t ip;
|
||||
char *ip_string;
|
||||
char *dns_name; //server name if any;
|
||||
UT_hash_handle hh;
|
||||
u_int32_t ip;
|
||||
char *ip_string;
|
||||
char *dns_name; //server name if any;
|
||||
UT_hash_handle hh;
|
||||
} ndpi_ip_dns;
|
||||
|
||||
//hash table ja3 -> <host, ip, security>, used to aggregate host by ja3 fingerprints
|
||||
typedef struct ndpi_ja3_fingerprints_host{
|
||||
char *ja3; //key
|
||||
ndpi_cipher_weakness unsafe_cipher;
|
||||
ndpi_ip_dns *ipToDNS_ht;
|
||||
UT_hash_handle hh;
|
||||
char *ja3; //key
|
||||
ndpi_cipher_weakness unsafe_cipher;
|
||||
ndpi_ip_dns *ipToDNS_ht;
|
||||
UT_hash_handle hh;
|
||||
} ndpi_ja3_fingerprints_host;
|
||||
|
||||
struct flow_metrics {
|
||||
@@ -126,13 +134,12 @@ struct flow_metrics {
|
||||
|
||||
struct ndpi_entropy {
|
||||
// Entropy fields
|
||||
struct timeval src2dst_last_pkt_time, dst2src_last_pkt_time, flow_last_pkt_time;
|
||||
u_int16_t src2dst_pkt_len[MAX_NUM_PKTS]; /*!< array of packet appdata lengths */
|
||||
struct timeval src2dst_pkt_time[MAX_NUM_PKTS]; /*!< array of arrival times */
|
||||
pkt_timeval src2dst_pkt_time[MAX_NUM_PKTS]; /*!< array of arrival times */
|
||||
u_int16_t dst2src_pkt_len[MAX_NUM_PKTS]; /*!< array of packet appdata lengths */
|
||||
struct timeval dst2src_pkt_time[MAX_NUM_PKTS]; /*!< array of arrival times */
|
||||
struct timeval src2dst_start; /*!< first packet arrival time */
|
||||
struct timeval dst2src_start; /*!< first packet arrival time */
|
||||
pkt_timeval dst2src_pkt_time[MAX_NUM_PKTS]; /*!< array of arrival times */
|
||||
pkt_timeval src2dst_start; /*!< first packet arrival time */
|
||||
pkt_timeval dst2src_start; /*!< first packet arrival time */
|
||||
u_int32_t src2dst_opackets; /*!< non-zero packet counts */
|
||||
u_int32_t dst2src_opackets; /*!< non-zero packet counts */
|
||||
u_int16_t src2dst_pkt_count; /*!< packet counts */
|
||||
@@ -154,55 +161,90 @@ struct ndpi_entropy {
|
||||
typedef struct ndpi_flow_info {
|
||||
u_int32_t flow_id;
|
||||
u_int32_t hashval;
|
||||
u_int32_t src_ip;
|
||||
u_int32_t dst_ip;
|
||||
u_int16_t src_port;
|
||||
u_int16_t dst_port;
|
||||
u_int32_t src_ip; /* network order */
|
||||
u_int32_t dst_ip; /* network order */
|
||||
u_int16_t src_port; /* network order */
|
||||
u_int16_t dst_port; /* network order */
|
||||
u_int8_t detection_completed, protocol, bidirectional, check_extra_packets;
|
||||
u_int16_t vlan_id;
|
||||
ndpi_packet_tunnel tunnel_type;
|
||||
struct ndpi_flow_struct *ndpi_flow;
|
||||
char src_name[48], dst_name[48];
|
||||
u_int8_t ip_version;
|
||||
u_int64_t first_seen, last_seen;
|
||||
u_int32_t cwr_count, src2dst_cwr_count, dst2src_cwr_count;
|
||||
u_int32_t ece_count, src2dst_ece_count, dst2src_ece_count;
|
||||
u_int32_t urg_count, src2dst_urg_count, dst2src_urg_count;
|
||||
u_int32_t ack_count, src2dst_ack_count, dst2src_ack_count;
|
||||
u_int32_t psh_count, src2dst_psh_count, dst2src_psh_count;
|
||||
u_int32_t syn_count, src2dst_syn_count, dst2src_syn_count;
|
||||
u_int32_t fin_count, src2dst_fin_count, dst2src_fin_count;
|
||||
u_int32_t rst_count, src2dst_rst_count, dst2src_rst_count;
|
||||
u_int32_t c_to_s_init_win, s_to_c_init_win;
|
||||
u_int64_t first_seen_ms, last_seen_ms;
|
||||
u_int64_t src2dst_bytes, dst2src_bytes;
|
||||
u_int64_t src2dst_goodput_bytes, dst2src_goodput_bytes;
|
||||
u_int32_t src2dst_packets, dst2src_packets;
|
||||
u_int32_t has_human_readeable_strings;
|
||||
char human_readeable_string_buffer[32];
|
||||
|
||||
|
||||
// result only, not used for flow identification
|
||||
ndpi_protocol detected_protocol;
|
||||
ndpi_confidence_t confidence;
|
||||
|
||||
// Flow data analysis
|
||||
pkt_timeval src2dst_last_pkt_time, dst2src_last_pkt_time, flow_last_pkt_time;
|
||||
struct ndpi_analyze_struct *iat_c_to_s, *iat_s_to_c, *iat_flow,
|
||||
*pktlen_c_to_s, *pktlen_s_to_c;
|
||||
|
||||
char info[96];
|
||||
char host_server_name[256];
|
||||
char bittorent_hash[41];
|
||||
char dhcp_fingerprint[48];
|
||||
|
||||
char info[255];
|
||||
char flow_extra_info[16];
|
||||
char host_server_name[80]; /* Hostname/SNI */
|
||||
char *bittorent_hash;
|
||||
char *dhcp_fingerprint;
|
||||
char *dhcp_class_ident;
|
||||
ndpi_risk risk;
|
||||
|
||||
struct {
|
||||
u_int16_t ssl_version;
|
||||
char client_info[64], server_info[64],
|
||||
client_hassh[33], server_hassh[33],
|
||||
server_organization[64],
|
||||
char server_info[64],
|
||||
client_hassh[33], server_hassh[33], *server_names,
|
||||
*tls_alpn, *tls_supported_versions,
|
||||
*tls_issuerDN, *tls_subjectDN,
|
||||
ja3_client[33], ja3_server[33],
|
||||
sha1_cert_fingerprint[20];
|
||||
u_int8_t sha1_cert_fingerprint_set;
|
||||
struct tls_heuristics browser_heuristics;
|
||||
|
||||
struct {
|
||||
u_int16_t cipher_suite;
|
||||
char *esni;
|
||||
} encrypted_sni;
|
||||
|
||||
time_t notBefore, notAfter;
|
||||
u_int16_t server_cipher;
|
||||
ndpi_cipher_weakness client_unsafe_cipher, server_unsafe_cipher;
|
||||
ndpi_cipher_weakness client_unsafe_cipher, server_unsafe_cipher;
|
||||
} ssh_tls;
|
||||
|
||||
struct {
|
||||
char url[256];
|
||||
char url[256], request_content_type[64], content_type[64], user_agent[256];
|
||||
u_int response_status_code;
|
||||
} http;
|
||||
|
||||
|
||||
struct {
|
||||
char *username, *password;
|
||||
} telnet;
|
||||
|
||||
void *src_id, *dst_id;
|
||||
|
||||
struct ndpi_entropy entropy;
|
||||
struct ndpi_entropy last_entropy;
|
||||
|
||||
struct ndpi_entropy *entropy;
|
||||
struct ndpi_entropy *last_entropy;
|
||||
|
||||
/* Payload lenght bins */
|
||||
#ifdef DIRECTION_BINS
|
||||
struct ndpi_bin payload_len_bin_src2dst, payload_len_bin_dst2src;
|
||||
#else
|
||||
struct ndpi_bin payload_len_bin;
|
||||
#endif
|
||||
} ndpi_flow_info_t;
|
||||
|
||||
|
||||
@@ -216,10 +258,13 @@ typedef struct ndpi_stats {
|
||||
u_int64_t protocol_counter_bytes[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1];
|
||||
u_int32_t protocol_flows[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1];
|
||||
u_int32_t ndpi_flow_count;
|
||||
u_int32_t flow_count[3];
|
||||
u_int64_t tcp_count, udp_count;
|
||||
u_int64_t mpls_count, pppoe_count, vlan_count, fragmented_count;
|
||||
u_int64_t packet_len[6];
|
||||
u_int16_t max_packet_len;
|
||||
u_int64_t dpi_packet_count[3];
|
||||
u_int64_t flow_confidence[NDPI_CONFIDENCE_MAX];
|
||||
} ndpi_stats_t;
|
||||
|
||||
|
||||
@@ -227,6 +272,7 @@ typedef struct ndpi_stats {
|
||||
typedef struct ndpi_workflow_prefs {
|
||||
u_int8_t decode_tunnels;
|
||||
u_int8_t quiet_mode;
|
||||
u_int8_t ignore_vlanid;
|
||||
u_int32_t num_roots;
|
||||
u_int32_t max_ndpi_flows;
|
||||
} ndpi_workflow_prefs_t;
|
||||
@@ -256,14 +302,14 @@ typedef struct ndpi_workflow {
|
||||
void **ndpi_flows_root;
|
||||
struct ndpi_detection_module_struct *ndpi_struct;
|
||||
u_int32_t num_allocated_flows;
|
||||
} ndpi_workflow_t;
|
||||
} ndpi_workflow_t;
|
||||
|
||||
|
||||
/* TODO: remove wrappers parameters and use ndpi global, when their initialization will be fixed... */
|
||||
struct ndpi_workflow * ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs, pcap_t * pcap_handle);
|
||||
|
||||
|
||||
/* workflow main free function */
|
||||
/* workflow main free function */
|
||||
void ndpi_workflow_free(struct ndpi_workflow * workflow);
|
||||
|
||||
|
||||
@@ -277,8 +323,11 @@ void ndpi_free_flow_info_half(struct ndpi_flow_info *flow);
|
||||
/* Process a packet and update the workflow */
|
||||
struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
const struct pcap_pkthdr *header,
|
||||
const u_char *packet);
|
||||
const u_char *packet,
|
||||
ndpi_risk *flow_risk,
|
||||
FILE * csv_fp);
|
||||
|
||||
int ndpi_is_datalink_supported(int datalink_type);
|
||||
|
||||
/* flow callbacks for complete detected flow
|
||||
(ndpi_flow_info will be freed right after) */
|
||||
@@ -294,14 +343,25 @@ static inline void ndpi_workflow_set_flow_giveup_callback(struct ndpi_workflow *
|
||||
workflow->__flow_giveup_udata = udata;
|
||||
}
|
||||
|
||||
/* compare two nodes in workflow */
|
||||
/* compare two nodes in workflow */
|
||||
int ndpi_workflow_node_cmp(const void *a, const void *b);
|
||||
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow);
|
||||
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow, FILE * csv_fp);
|
||||
u_int32_t ethernet_crc32(const void* data, size_t n_bytes);
|
||||
void ndpi_flow_info_free_data(struct ndpi_flow_info *flow);
|
||||
void ndpi_flow_info_freer(void *node);
|
||||
const char* print_cipher_id(u_int32_t cipher);
|
||||
float ndpi_flow_get_byte_count_entropy(const uint32_t byte_count[256], unsigned int num_bytes);
|
||||
|
||||
extern int nDPI_LogLevel;
|
||||
|
||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||
#define LOG(log_level, args...) \
|
||||
{ \
|
||||
if(log_level <= nDPI_LogLevel) \
|
||||
printf(args); \
|
||||
}
|
||||
#else
|
||||
#define LOG(...) {}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# https://www.spamhaus.org/statistics/tlds/
|
||||
.fail
|
||||
.viajes
|
||||
.exposed
|
||||
.london
|
||||
.work
|
||||
.gq
|
||||
.ml
|
||||
.surk
|
||||
.tk
|
||||
.xyz
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
||||
bin_PROGRAMS = fuzz_process_packet fuzz_process_packet_with_main fuzz_ndpi_reader fuzz_ndpi_reader_with_main
|
||||
|
||||
fuzz_process_packet_SOURCES = fuzz_process_packet.c
|
||||
fuzz_process_packet_CFLAGS =
|
||||
fuzz_process_packet_LDADD = ../src/lib/libndpi.a
|
||||
fuzz_process_packet_LDFLAGS = $(ADDITIONAL_LIBS) $(LIBS)
|
||||
if HAS_FUZZLDFLAGS
|
||||
fuzz_process_packet_CFLAGS += $(LIB_FUZZING_ENGINE)
|
||||
fuzz_process_packet_LDFLAGS += $(LIB_FUZZING_ENGINE)
|
||||
endif
|
||||
# force usage of CXX for linker
|
||||
fuzz_process_packet_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
||||
$(fuzz_process_packet_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
fuzz_process_packet_with_main_SOURCES = fuzz_process_packet.c
|
||||
fuzz_process_packet_with_main_CFLAGS = -DBUILD_MAIN
|
||||
fuzz_process_packet_with_main_LDADD = ../src/lib/libndpi.a
|
||||
fuzz_process_packet_with_main_LDFLAGS = $(ADDITIONAL_LIBS) $(LIBS)
|
||||
# force usage of CXX for linker
|
||||
fuzz_process_packet_with_main_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
||||
$(fuzz_process_packet_with_main_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
fuzz_ndpi_reader_SOURCES = fuzz_ndpi_reader.c
|
||||
fuzz_ndpi_reader_CFLAGS = -I../example/
|
||||
fuzz_ndpi_reader_LDADD = ../example/libndpiReader.a ../src/lib/libndpi.a
|
||||
fuzz_ndpi_reader_LDFLAGS = $(PCAP_LIB) $(ADDITIONAL_LIBS) $(LIBS)
|
||||
if HAS_FUZZLDFLAGS
|
||||
fuzz_ndpi_reader_CFLAGS += $(LIB_FUZZING_ENGINE)
|
||||
fuzz_ndpi_reader_LDFLAGS += $(LIB_FUZZING_ENGINE)
|
||||
endif
|
||||
# force usage of CXX for linker
|
||||
fuzz_ndpi_reader_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
||||
$(fuzz_ndpi_reader_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
fuzz_ndpi_reader_with_main_SOURCES = fuzz_ndpi_reader.c
|
||||
fuzz_ndpi_reader_with_main_CFLAGS = -I../example/ -DBUILD_MAIN
|
||||
fuzz_ndpi_reader_with_main_LDADD = ../src/lib/libndpi.a
|
||||
fuzz_ndpi_reader_with_main_LDFLAGS = ../example/libndpiReader.a $(PCAP_LIB) $(ADDITIONAL_LIBS) $(LIBS)
|
||||
# force usage of CXX for linker
|
||||
fuzz_ndpi_reader_with_main_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
||||
$(fuzz_ndpi_reader_with_main_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
# required for Google oss-fuzz
|
||||
# see https://github.com/google/oss-fuzz/tree/master/projects/ndpi
|
||||
testpcaps := $(wildcard ../tests/pcap/*.pcap*)
|
||||
|
||||
fuzz_ndpi_reader_seed_corpus.zip: $(testpcaps)
|
||||
zip -r fuzz_ndpi_reader_seed_corpus.zip $(testpcaps)
|
||||
@@ -0,0 +1,175 @@
|
||||
#include "reader_util.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#include <pcap/pcap.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct ndpi_workflow_prefs *prefs = NULL;
|
||||
|
||||
int nDPI_LogLevel = 0;
|
||||
char *_debug_protocols = NULL;
|
||||
u_int32_t current_ndpi_memory = 0, max_ndpi_memory = 0;
|
||||
u_int8_t enable_protocol_guess = 1, enable_payload_analyzer = 0;
|
||||
u_int8_t enable_flow_stats = 0;
|
||||
u_int8_t human_readeable_string_len = 5;
|
||||
u_int8_t max_num_udp_dissected_pkts = 16 /* 8 is enough for most protocols, Signal requires more */, max_num_tcp_dissected_pkts = 80 /* due to telnet */;
|
||||
|
||||
int bufferToFile(const char * name, const uint8_t *Data, size_t Size) {
|
||||
FILE * fd;
|
||||
if (remove(name) != 0) {
|
||||
if (errno != ENOENT) {
|
||||
perror("remove failed");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
fd = fopen(name, "wb");
|
||||
if (fd == NULL) {
|
||||
perror("open failed");
|
||||
return -2;
|
||||
}
|
||||
if (fwrite (Data, 1, Size, fd) != Size) {
|
||||
fclose(fd);
|
||||
return -3;
|
||||
}
|
||||
fclose(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
pcap_t * pkts;
|
||||
const u_char *pkt;
|
||||
struct pcap_pkthdr *header;
|
||||
int r;
|
||||
char errbuf[PCAP_ERRBUF_SIZE];
|
||||
NDPI_PROTOCOL_BITMASK all;
|
||||
char * pcap_path = tempnam("/tmp", "fuzz-ndpi-reader");
|
||||
|
||||
if (prefs == NULL) {
|
||||
prefs = calloc(sizeof(struct ndpi_workflow_prefs), 1);
|
||||
if (prefs == NULL) {
|
||||
//should not happen
|
||||
return 1;
|
||||
}
|
||||
prefs->decode_tunnels = 1;
|
||||
prefs->num_roots = 16;
|
||||
prefs->max_ndpi_flows = 1024;
|
||||
prefs->quiet_mode = 0;
|
||||
}
|
||||
bufferToFile(pcap_path, Data, Size);
|
||||
|
||||
pkts = pcap_open_offline(pcap_path, errbuf);
|
||||
if (pkts == NULL) {
|
||||
remove(pcap_path);
|
||||
free(pcap_path);
|
||||
return 0;
|
||||
}
|
||||
if (ndpi_is_datalink_supported(pcap_datalink(pkts)) == 0)
|
||||
{
|
||||
/* Do not fail if the datalink type is not supported (may happen often during fuzzing). */
|
||||
pcap_close(pkts);
|
||||
remove(pcap_path);
|
||||
free(pcap_path);
|
||||
return 0;
|
||||
}
|
||||
struct ndpi_workflow * workflow = ndpi_workflow_init(prefs, pkts);
|
||||
// enable all protocols
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all);
|
||||
memset(workflow->stats.protocol_counter, 0,
|
||||
sizeof(workflow->stats.protocol_counter));
|
||||
memset(workflow->stats.protocol_counter_bytes, 0,
|
||||
sizeof(workflow->stats.protocol_counter_bytes));
|
||||
memset(workflow->stats.protocol_flows, 0,
|
||||
sizeof(workflow->stats.protocol_flows));
|
||||
ndpi_finalize_initialization(workflow->ndpi_struct);
|
||||
|
||||
header = NULL;
|
||||
r = pcap_next_ex(pkts, &header, &pkt);
|
||||
while (r > 0) {
|
||||
if(header->caplen >= 42 /* ARP+ size */) {
|
||||
/* allocate an exact size buffer to check overflows */
|
||||
uint8_t *packet_checked = malloc(header->caplen);
|
||||
|
||||
if(packet_checked) {
|
||||
ndpi_risk flow_risk;
|
||||
|
||||
memcpy(packet_checked, pkt, header->caplen);
|
||||
ndpi_workflow_process_packet(workflow, header, packet_checked, &flow_risk, NULL);
|
||||
free(packet_checked);
|
||||
}
|
||||
}
|
||||
|
||||
r = pcap_next_ex(pkts, &header, &pkt);
|
||||
}
|
||||
ndpi_workflow_free(workflow);
|
||||
pcap_close(pkts);
|
||||
|
||||
remove(pcap_path);
|
||||
free(pcap_path);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef BUILD_MAIN
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
FILE * pcap_file;
|
||||
long pcap_file_size;
|
||||
uint8_t * pcap_buffer;
|
||||
int test_retval;
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: %s: [pcap-file]\n",
|
||||
(argc > 0 ? argv[0] : "fuzz_ndpi_reader_with_main"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
pcap_file = fopen(argv[1], "r");
|
||||
if (pcap_file == NULL) {
|
||||
perror("fopen failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fseek(pcap_file, 0, SEEK_END) != 0) {
|
||||
perror("fseek(SEEK_END) failed");
|
||||
fclose(pcap_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
pcap_file_size = ftell(pcap_file);
|
||||
if (pcap_file_size < 0) {
|
||||
perror("ftell failed");
|
||||
fclose(pcap_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fseek(pcap_file, 0, SEEK_SET) != 0) {
|
||||
perror("fseek(0, SEEK_SET) failed");
|
||||
fclose(pcap_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
pcap_buffer = malloc(pcap_file_size);
|
||||
if (pcap_buffer == NULL) {
|
||||
perror("malloc failed");
|
||||
fclose(pcap_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fread(pcap_buffer, sizeof(*pcap_buffer), pcap_file_size, pcap_file) != (size_t)pcap_file_size) {
|
||||
perror("fread failed");
|
||||
fclose(pcap_file);
|
||||
free(pcap_buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
test_retval = LLVMFuzzerTestOneInput(pcap_buffer, pcap_file_size);
|
||||
fclose(pcap_file);
|
||||
free(pcap_buffer);
|
||||
|
||||
return test_retval;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct ndpi_detection_module_struct *ndpi_info_mod = NULL;
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
uint8_t protocol_was_guessed;
|
||||
|
||||
if (ndpi_info_mod == NULL) {
|
||||
ndpi_info_mod = ndpi_init_detection_module(ndpi_enable_ja3_plus);
|
||||
NDPI_PROTOCOL_BITMASK all, debug_bitmask;
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
NDPI_BITMASK_SET_ALL(debug_bitmask);
|
||||
ndpi_set_protocol_detection_bitmask2(ndpi_info_mod, &all);
|
||||
ndpi_set_log_level(ndpi_info_mod, 4);
|
||||
ndpi_set_debug_bitmask(ndpi_info_mod, debug_bitmask);
|
||||
ndpi_finalize_initialization(ndpi_info_mod);
|
||||
}
|
||||
|
||||
struct ndpi_flow_struct *ndpi_flow = ndpi_flow_malloc(SIZEOF_FLOW_STRUCT);
|
||||
memset(ndpi_flow, 0, SIZEOF_FLOW_STRUCT);
|
||||
ndpi_detection_process_packet(ndpi_info_mod, ndpi_flow, Data, Size, 0);
|
||||
ndpi_detection_giveup(ndpi_info_mod, ndpi_flow, 1, &protocol_was_guessed);
|
||||
ndpi_free_flow(ndpi_flow);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef BUILD_MAIN
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
FILE * data_file;
|
||||
long data_file_size;
|
||||
uint8_t * data_buffer;
|
||||
int test_retval;
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: %s: [data-file]\n",
|
||||
(argc > 0 ? argv[0] : "fuzz_process_packet_with_main"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
data_file = fopen(argv[1], "r");
|
||||
if (data_file == NULL) {
|
||||
perror("fopen failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fseek(data_file, 0, SEEK_END) != 0) {
|
||||
perror("fseek(SEEK_END) failed");
|
||||
fclose(data_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
data_file_size = ftell(data_file);
|
||||
if (data_file_size < 0) {
|
||||
perror("ftell failed");
|
||||
fclose(data_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fseek(data_file, 0, SEEK_SET) != 0) {
|
||||
perror("fseek(0, SEEK_SET) failed");
|
||||
fclose(data_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
data_buffer = malloc(data_file_size);
|
||||
if (data_buffer == NULL) {
|
||||
perror("malloc failed");
|
||||
fclose(data_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fread(data_buffer, sizeof(*data_buffer), data_file_size, data_file) != (size_t)data_file_size) {
|
||||
perror("fread failed");
|
||||
fclose(data_file);
|
||||
free(data_buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
test_retval = LLVMFuzzerTestOneInput(data_buffer, data_file_size);
|
||||
fclose(data_file);
|
||||
free(data_buffer);
|
||||
|
||||
return test_retval;
|
||||
}
|
||||
#endif
|
||||
+1
-1
@@ -6,5 +6,5 @@ includedir=@includedir@
|
||||
Name: libndpi
|
||||
Description: deep packet inspection library
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lndpi
|
||||
Libs: -L${libdir} -lndpi @ADDITIONAL_LIBS@
|
||||
Cflags: -I${includedir}/ndpi
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 6
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
||||
+153
-115
@@ -1,5 +1,5 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
@@ -14,20 +14,24 @@
|
||||
# flags that are needed. (The user can also force certain compiler
|
||||
# flags/libs to be tested by setting these environment variables.)
|
||||
#
|
||||
# Also sets PTHREAD_CC to any special C compiler that is needed for
|
||||
# multi-threaded programs (defaults to the value of CC otherwise). (This
|
||||
# is necessary on AIX to use the special cc_r compiler alias.)
|
||||
# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
|
||||
# needed for multi-threaded programs (defaults to the value of CC
|
||||
# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
|
||||
# special cc_r/CC_r compiler alias.)
|
||||
#
|
||||
# NOTE: You are assumed to not only compile your program with these flags,
|
||||
# but also to link with them as well. For example, you might link with
|
||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
#
|
||||
# If you are only building threaded programs, you may wish to use these
|
||||
# variables in your default LIBS, CFLAGS, and CC:
|
||||
#
|
||||
# LIBS="$PTHREAD_LIBS $LIBS"
|
||||
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
|
||||
# CC="$PTHREAD_CC"
|
||||
# CXX="$PTHREAD_CXX"
|
||||
#
|
||||
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
||||
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
|
||||
@@ -55,6 +59,7 @@
|
||||
#
|
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||
# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
@@ -67,7 +72,7 @@
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
@@ -82,7 +87,7 @@
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 23
|
||||
#serial 31
|
||||
|
||||
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
||||
AC_DEFUN([AX_PTHREAD], [
|
||||
@@ -104,6 +109,7 @@ if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
|
||||
AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
|
||||
@@ -123,10 +129,12 @@ fi
|
||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
||||
# libraries is broken (non-POSIX).
|
||||
|
||||
# Create a list of thread flags to try. Items starting with a "-" are
|
||||
# C compiler flags, and other items are library names, except for "none"
|
||||
# which indicates that we try without any flags at all, and "pthread-config"
|
||||
# which is a program returning the flags for the Pth emulation library.
|
||||
# Create a list of thread flags to try. Items with a "," contain both
|
||||
# C compiler flags (before ",") and linker flags (after ","). Other items
|
||||
# starting with a "-" are C compiler flags, and remaining items are
|
||||
# library names, except for "none" which indicates that we try without
|
||||
# any flags at all, and "pthread-config" which is a program returning
|
||||
# the flags for the Pth emulation library.
|
||||
|
||||
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
||||
|
||||
@@ -194,14 +202,47 @@ case $host_os in
|
||||
# that too in a future libc.) So we'll check first for the
|
||||
# standard Solaris way of linking pthreads (-mt -lpthread).
|
||||
|
||||
ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
|
||||
ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Are we compiling with Clang?
|
||||
|
||||
AC_CACHE_CHECK([whether $CC is Clang],
|
||||
[ax_cv_PTHREAD_CLANG],
|
||||
[ax_cv_PTHREAD_CLANG=no
|
||||
# Note that Autoconf sets GCC=yes for Clang as well as GCC
|
||||
if test "x$GCC" = "xyes"; then
|
||||
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
|
||||
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
|
||||
# if defined(__clang__) && defined(__llvm__)
|
||||
AX_PTHREAD_CC_IS_CLANG
|
||||
# endif
|
||||
],
|
||||
[ax_cv_PTHREAD_CLANG=yes])
|
||||
fi
|
||||
])
|
||||
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
|
||||
|
||||
|
||||
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
|
||||
|
||||
# Note that for GCC and Clang -pthread generally implies -lpthread,
|
||||
# except when -nostdlib is passed.
|
||||
# This is problematic using libtool to build C++ shared libraries with pthread:
|
||||
# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
|
||||
# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
|
||||
# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
|
||||
# To solve this, first try -pthread together with -lpthread for GCC
|
||||
|
||||
AS_IF([test "x$GCC" = "xyes"],
|
||||
[ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
|
||||
[ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
|
||||
|
||||
# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
|
||||
|
||||
AS_IF([test "x$ax_pthread_clang" = "xyes"],
|
||||
[ax_pthread_flags="-pthread,-lpthread -pthread"])
|
||||
|
||||
|
||||
# The presence of a feature test macro requesting re-entrant function
|
||||
# definitions is, on some systems, a strong hint that pthreads support is
|
||||
@@ -224,101 +265,6 @@ AS_IF([test "x$ax_pthread_check_macro" = "x--"],
|
||||
[ax_pthread_check_cond=0],
|
||||
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
|
||||
|
||||
# Are we compiling with Clang?
|
||||
|
||||
AC_CACHE_CHECK([whether $CC is Clang],
|
||||
[ax_cv_PTHREAD_CLANG],
|
||||
[ax_cv_PTHREAD_CLANG=no
|
||||
# Note that Autoconf sets GCC=yes for Clang as well as GCC
|
||||
if test "x$GCC" = "xyes"; then
|
||||
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
|
||||
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
|
||||
# if defined(__clang__) && defined(__llvm__)
|
||||
AX_PTHREAD_CC_IS_CLANG
|
||||
# endif
|
||||
],
|
||||
[ax_cv_PTHREAD_CLANG=yes])
|
||||
fi
|
||||
])
|
||||
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
|
||||
|
||||
ax_pthread_clang_warning=no
|
||||
|
||||
# Clang needs special handling, because older versions handle the -pthread
|
||||
# option in a rather... idiosyncratic way
|
||||
|
||||
if test "x$ax_pthread_clang" = "xyes"; then
|
||||
|
||||
# Clang takes -pthread; it has never supported any other flag
|
||||
|
||||
# (Note 1: This will need to be revisited if a system that Clang
|
||||
# supports has POSIX threads in a separate library. This tends not
|
||||
# to be the way of modern systems, but it's conceivable.)
|
||||
|
||||
# (Note 2: On some systems, notably Darwin, -pthread is not needed
|
||||
# to get POSIX threads support; the API is always present and
|
||||
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
|
||||
# -pthread does define _REENTRANT, and while the Darwin headers
|
||||
# ignore this macro, third-party headers might not.)
|
||||
|
||||
PTHREAD_CFLAGS="-pthread"
|
||||
PTHREAD_LIBS=
|
||||
|
||||
ax_pthread_ok=yes
|
||||
|
||||
# However, older versions of Clang make a point of warning the user
|
||||
# that, in an invocation where only linking and no compilation is
|
||||
# taking place, the -pthread option has no effect ("argument unused
|
||||
# during compilation"). They expect -pthread to be passed in only
|
||||
# when source code is being compiled.
|
||||
#
|
||||
# Problem is, this is at odds with the way Automake and most other
|
||||
# C build frameworks function, which is that the same flags used in
|
||||
# compilation (CFLAGS) are also used in linking. Many systems
|
||||
# supported by AX_PTHREAD require exactly this for POSIX threads
|
||||
# support, and in fact it is often not straightforward to specify a
|
||||
# flag that is used only in the compilation phase and not in
|
||||
# linking. Such a scenario is extremely rare in practice.
|
||||
#
|
||||
# Even though use of the -pthread flag in linking would only print
|
||||
# a warning, this can be a nuisance for well-run software projects
|
||||
# that build with -Werror. So if the active version of Clang has
|
||||
# this misfeature, we search for an option to squash it.
|
||||
|
||||
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
|
||||
# Create an alternate version of $ac_link that compiles and
|
||||
# links in two steps (.c -> .o, .o -> exe) instead of one
|
||||
# (.c -> exe), because the warning occurs only in the second
|
||||
# step
|
||||
ax_pthread_save_ac_link="$ac_link"
|
||||
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
|
||||
ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
|
||||
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
|
||||
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
|
||||
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[ac_link="$ax_pthread_2step_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[break])
|
||||
])
|
||||
done
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
|
||||
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
|
||||
])
|
||||
|
||||
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
|
||||
no | unknown) ;;
|
||||
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
|
||||
esac
|
||||
|
||||
fi # $ax_pthread_clang = yes
|
||||
|
||||
if test "x$ax_pthread_ok" = "xno"; then
|
||||
for ax_pthread_try_flag in $ax_pthread_flags; do
|
||||
@@ -328,10 +274,10 @@ for ax_pthread_try_flag in $ax_pthread_flags; do
|
||||
AC_MSG_CHECKING([whether pthreads work without any flags])
|
||||
;;
|
||||
|
||||
-mt,pthread)
|
||||
AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
|
||||
PTHREAD_CFLAGS="-mt"
|
||||
PTHREAD_LIBS="-lpthread"
|
||||
*,*)
|
||||
PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
|
||||
PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
|
||||
AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
|
||||
;;
|
||||
|
||||
-*)
|
||||
@@ -371,7 +317,13 @@ for ax_pthread_try_flag in $ax_pthread_flags; do
|
||||
# if $ax_pthread_check_cond
|
||||
# error "$ax_pthread_check_macro must be defined"
|
||||
# endif
|
||||
static void routine(void *a) { a = 0; }
|
||||
static void *some_global = NULL;
|
||||
static void routine(void *a)
|
||||
{
|
||||
/* To avoid any unused-parameter or
|
||||
unused-but-set-parameter warning. */
|
||||
some_global = a;
|
||||
}
|
||||
static void *start_routine(void *a) { return a; }],
|
||||
[pthread_t th; pthread_attr_t attr;
|
||||
pthread_create(&th, 0, start_routine, 0);
|
||||
@@ -393,6 +345,80 @@ for ax_pthread_try_flag in $ax_pthread_flags; do
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Clang needs special handling, because older versions handle the -pthread
|
||||
# option in a rather... idiosyncratic way
|
||||
|
||||
if test "x$ax_pthread_clang" = "xyes"; then
|
||||
|
||||
# Clang takes -pthread; it has never supported any other flag
|
||||
|
||||
# (Note 1: This will need to be revisited if a system that Clang
|
||||
# supports has POSIX threads in a separate library. This tends not
|
||||
# to be the way of modern systems, but it's conceivable.)
|
||||
|
||||
# (Note 2: On some systems, notably Darwin, -pthread is not needed
|
||||
# to get POSIX threads support; the API is always present and
|
||||
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
|
||||
# -pthread does define _REENTRANT, and while the Darwin headers
|
||||
# ignore this macro, third-party headers might not.)
|
||||
|
||||
# However, older versions of Clang make a point of warning the user
|
||||
# that, in an invocation where only linking and no compilation is
|
||||
# taking place, the -pthread option has no effect ("argument unused
|
||||
# during compilation"). They expect -pthread to be passed in only
|
||||
# when source code is being compiled.
|
||||
#
|
||||
# Problem is, this is at odds with the way Automake and most other
|
||||
# C build frameworks function, which is that the same flags used in
|
||||
# compilation (CFLAGS) are also used in linking. Many systems
|
||||
# supported by AX_PTHREAD require exactly this for POSIX threads
|
||||
# support, and in fact it is often not straightforward to specify a
|
||||
# flag that is used only in the compilation phase and not in
|
||||
# linking. Such a scenario is extremely rare in practice.
|
||||
#
|
||||
# Even though use of the -pthread flag in linking would only print
|
||||
# a warning, this can be a nuisance for well-run software projects
|
||||
# that build with -Werror. So if the active version of Clang has
|
||||
# this misfeature, we search for an option to squash it.
|
||||
|
||||
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
|
||||
# Create an alternate version of $ac_link that compiles and
|
||||
# links in two steps (.c -> .o, .o -> exe) instead of one
|
||||
# (.c -> exe), because the warning occurs only in the second
|
||||
# step
|
||||
ax_pthread_save_ac_link="$ac_link"
|
||||
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
|
||||
ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
|
||||
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
|
||||
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
|
||||
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[ac_link="$ax_pthread_2step_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[break])
|
||||
])
|
||||
done
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
|
||||
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
|
||||
])
|
||||
|
||||
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
|
||||
no | unknown) ;;
|
||||
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
|
||||
esac
|
||||
|
||||
fi # $ax_pthread_clang = yes
|
||||
|
||||
|
||||
|
||||
# Various other checks:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
@@ -438,7 +464,8 @@ if test "x$ax_pthread_ok" = "xyes"; then
|
||||
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
|
||||
[[int i = PTHREAD_PRIO_INHERIT;]])],
|
||||
[[int i = PTHREAD_PRIO_INHERIT;
|
||||
return i;]])],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
||||
])
|
||||
@@ -460,18 +487,28 @@ if test "x$ax_pthread_ok" = "xyes"; then
|
||||
[#handle absolute path differently from PATH based program lookup
|
||||
AS_CASE(["x$CC"],
|
||||
[x/*],
|
||||
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
|
||||
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
|
||||
[
|
||||
AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
|
||||
AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
|
||||
],
|
||||
[
|
||||
AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
|
||||
AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
|
||||
]
|
||||
)
|
||||
])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
|
||||
test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
|
||||
|
||||
AC_SUBST([PTHREAD_LIBS])
|
||||
AC_SUBST([PTHREAD_CFLAGS])
|
||||
AC_SUBST([PTHREAD_CC])
|
||||
AC_SUBST([PTHREAD_CXX])
|
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
@@ -483,3 +520,4 @@ else
|
||||
fi
|
||||
AC_LANG_POP
|
||||
])dnl AX_PTHREAD
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
|
||||
+58
-31
@@ -1,59 +1,86 @@
|
||||
#
|
||||
# Copyright (C) 2018 - ntop.org
|
||||
# Copyright (C) 2017 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libndpi
|
||||
PKG_VERSION:=1333.ab2f3ce
|
||||
PKG_VERSION:=4.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/ntop/nDPI.git
|
||||
PKG_SOURCE_VERSION:=ab2f3cefc89017d73e67faa4eb4011e7e3f2044d
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=dc9b291c7fde94edb45fb0f222e0d93c93f8d6d37f4efba20ebd9c655bfcedf9
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/nDPI-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Emanuele Faranda <faranda@ntop.org>
|
||||
PKG_LICENSE:=GPL3
|
||||
PKG_BUILD_DEPENDS:=+libpcap
|
||||
PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>, Toni Uhlig <matzeton@googlemail.com>
|
||||
PKG_LICENSE:=LGPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_REMOVE_FILES:=autogen.sh
|
||||
PKG_BUILD_DEPENDS:=libpcap
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
# autogen fix
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_LIBNDPI_GCRYPT),)
|
||||
CONFIGURE_ARGS += --disable-gcrypt
|
||||
endif
|
||||
|
||||
define Package/libndpi
|
||||
SECTION:=network
|
||||
CATEGORY:=Network
|
||||
#DEPENDS:=+libc +libjson-c +libpthread
|
||||
TITLE:=nDPI Deep Packet Inspection Library
|
||||
URL:=https://www.ntop.org
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for deep-packet inspection
|
||||
URL:=https://github.com/ntop/nDPI
|
||||
DEPENDS:=$(CXX_DEPENDS) +LIBNDPI_GCRYPT:libgcrypt +libpcap +libjson-c
|
||||
endef
|
||||
|
||||
define Package/libndpi/description
|
||||
Open and Extensible GPLv3 Deep Packet Inspection Library
|
||||
nDPI is an open source LGPLv3 library for deep-packet inspection.
|
||||
Based on OpenDPI it includes ntop extensions.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-pic \
|
||||
--disable-json-c \
|
||||
define Package/libndpi/config
|
||||
config LIBNDPI_GCRYPT
|
||||
bool "GCrypt support"
|
||||
depends on PACKAGE_libndpi
|
||||
default n
|
||||
help
|
||||
This option enables QUIC client hello decryption.
|
||||
Disabled by default.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( cd $(PKG_BUILD_DIR); ./autogen.sh )
|
||||
$(call Build/Configure/Default)
|
||||
$(PKG_UNPACK)
|
||||
$(Build/Patch)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/local/include/libndpi
|
||||
$(CP) $(PKG_BUILD_DIR)/src/include/* $(STAGING_DIR)/usr/local/include/libndpi
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/local/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.* $(STAGING_DIR)/usr/local/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include/ndpi
|
||||
$(CP) $(PKG_BUILD_DIR)/src/include/*.h \
|
||||
$(1)/usr/include/ndpi/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_BUILD_DIR)/libndpi.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libndpi/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
|
||||
$(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(CP) $(PKG_BUILD_DIR)/example/ndpiReader \
|
||||
$(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libndpi))
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
#
|
||||
# Copyright (C) 2017 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libndpi
|
||||
# Avoid a specfic version
|
||||
PKG_VERSION:=dev
|
||||
PKG_RELEASE:=1
|
||||
|
||||
# Compile it from soucre
|
||||
SOURCE_DIR:=/home/deri/openwrt-dependencies/nDPI/
|
||||
|
||||
PKG_MAINTAINER:=Luca Deri <deri@ntop.org>
|
||||
PKG_LICENSE:=LGPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_REMOVE_FILES:=autogen.sh
|
||||
PKG_BUILD_DEPENDS:=libpcap
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_LIBNDPI_GCRYPT),)
|
||||
CONFIGURE_ARGS += --disable-gcrypt
|
||||
endif
|
||||
|
||||
define Package/libndpi
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for deep-packet inspection
|
||||
URL:=https://github.com/ntop/nDPI
|
||||
DEPENDS:=$(CXX_DEPENDS) +LIBNDPI_GCRYPT:libgcrypt +libpcap +libjson-c
|
||||
endef
|
||||
|
||||
define Package/libndpi/description
|
||||
nDPI is an open source LGPLv3 library for deep-packet inspection.
|
||||
Based on OpenDPI it includes ntop extensions.
|
||||
endef
|
||||
|
||||
define Package/libndpi/config
|
||||
config LIBNDPI_GCRYPT
|
||||
bool "GCrypt support"
|
||||
depends on PACKAGE_libndpi
|
||||
default n
|
||||
help
|
||||
This option enables QUIC client hello decryption.
|
||||
Disabled by default.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
cp -r $(SOURCE_DIR)/* $(PKG_BUILD_DIR)
|
||||
$(PKG_UNPACK)
|
||||
$(Build/Patch)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/ndpi
|
||||
$(CP) $(PKG_BUILD_DIR)/src/include/*.h \
|
||||
$(1)/usr/include/ndpi/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_BUILD_DIR)/libndpi.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libndpi/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
|
||||
$(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(CP) $(PKG_BUILD_DIR)/example/ndpiReader \
|
||||
$(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libndpi))
|
||||
@@ -0,0 +1,32 @@
|
||||
Howto Compile libndpi on OpenWRT
|
||||
-------------------------------
|
||||
|
||||
cd myopenwrt_directory
|
||||
mkdir package/network/services/libndpi
|
||||
cd package/network/services/libndpi
|
||||
|
||||
# (a) Stable version
|
||||
ln -s ~/nDPI/packages/openwrt/Makefile .
|
||||
|
||||
# (b) Dev version
|
||||
cp ~/nDPI/packages/openwrt/Makefile.dev Makefile
|
||||
|
||||
cd myopenwrt_directory
|
||||
make menuconfig
|
||||
|
||||
Go under libraries and select
|
||||
|
||||
<M> libndpi.............................. nDPI Deep Packet Inspection Library
|
||||
|
||||
|
||||
Build Commands
|
||||
--------------
|
||||
|
||||
If you want to build just libndpi do:
|
||||
make -j1 V=s package/network/services/libndpi/clean
|
||||
make -j1 V=s package/network/services/libndpi/compile
|
||||
|
||||
Other Documents
|
||||
---------------
|
||||
https://openwrt.org/packages/pkgdata/libndpi
|
||||
|
||||
@@ -29,8 +29,8 @@ build-rpm: build-src cleanup-rpm
|
||||
tar cvfz $(HOME)/rpmbuild/SOURCES/ndpi-@PACKAGE_VERSION@.tgz ndpi-@PACKAGE_VERSION@
|
||||
@rm -f $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE)
|
||||
@rpmbuild -bb ./$(APPL).spec --define "buildnumber $(GIT_REVISION)"
|
||||
@if [[ $EUID -ne 0 ]]; then ./rpm-sign.exp $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE); fi
|
||||
@if [[ $EUID -ne 0 ]]; then ./rpm-sign.exp $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(DEV_PACKAGE); fi
|
||||
@if [[ $EUID -ne 0 ]]; then @RPM_SIGN_CMD@ $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE); fi
|
||||
@if [[ $EUID -ne 0 ]]; then @RPM_SIGN_CMD@ $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(DEV_PACKAGE); fi
|
||||
@echo ""
|
||||
@echo "Package contents:"
|
||||
@rpm -qpl $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE)
|
||||
|
||||
Vendored
+1612
-2
File diff suppressed because it is too large
Load Diff
@@ -29,16 +29,35 @@ PACKAGE_VERSION=`../version.sh --release`
|
||||
MAJOR_RELEASE=`../version.sh --major-release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 3|cut -d '.' -f 1`
|
||||
if test $CENTOS_RELEASE = "release"; then
|
||||
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 4|cut -d '.' -f 1`
|
||||
fi
|
||||
|
||||
RPM_SIGN_CMD="rpm --addsign"
|
||||
if test "$CENTOS_RELEASE" -ne 8; then
|
||||
RPM_SIGN_CMD="./rpm-sign.exp"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([maxminddb], [MMDB_lookup_sockaddr])
|
||||
AC_HAVE_HEADERS(maxminddb.h)
|
||||
if test ".${ac_cv_lib_maxminddb_MMDB_lookup_sockaddr}" = ".yes" &&
|
||||
test ".${ac_cv_header_maxminddb_h}" = ".yes"; then
|
||||
GEOIP_DEP="libmaxminddb"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile ndpi.spec])
|
||||
|
||||
AC_SUBST(PACKAGE_VERSION)
|
||||
AC_SUBST(PLATFORM)
|
||||
AC_SUBST(GEOIP_DEP)
|
||||
AC_SUBST(MACHINE)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
AC_SUBST(KERNEL)
|
||||
AC_SUBST(GIT_REVISION)
|
||||
AC_SUBST(MAJOR_RELEASE)
|
||||
AC_SUBST(RPM_SIGN_CMD)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
+25
-15
@@ -8,10 +8,16 @@ URL: http://www.ntop.org/products/deep-packet-inspection/ndpi/
|
||||
Source: ndpi-%{version}.tgz
|
||||
Packager: Luca Deri <deri@ntop.org>
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
%{?el7:Requires: glibc >= 2.3.4 numactl coreutils }
|
||||
%{?el6:Requires: glibc >= 2.3.4 numactl coreutils }
|
||||
%{?el8:Requires: glibc >= 2.3.4 numactl coreutils @GEOIP_DEP@ }
|
||||
%{?el7:Requires: glibc >= 2.3.4 numactl coreutils @GEOIP_DEP@ }
|
||||
%{?el6:Requires: glibc >= 2.3.4 numactl coreutils @GEOIP_DEP@ }
|
||||
AutoReqProv: no
|
||||
|
||||
%define debug_package %{nil}
|
||||
|
||||
# Make sure .build-id is not part of the package
|
||||
%define _build_id_links none
|
||||
|
||||
%description
|
||||
nDPI Open and Extensible LGPLv3 Deep Packet Inspection Library.
|
||||
|
||||
@@ -41,9 +47,11 @@ you will need to install %{name}-dev.
|
||||
%build
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
%define includedir /usr/local/include/ndpi
|
||||
%define libdir /usr/local/lib
|
||||
%define bindir /usr/local/bin
|
||||
%define includedir /usr/include/ndpi
|
||||
%{?el6:%define libdir /usr/lib}
|
||||
%{?el7:%define libdir /usr/lib}
|
||||
%{?el8:%define libdir /usr/lib64}
|
||||
%define bindir /usr/bin
|
||||
|
||||
%install
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
@@ -54,13 +62,13 @@ mkdir -p $RPM_BUILD_ROOT%{includedir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{libdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{bindir}
|
||||
cd $HOME/nDPI; make DESTDIR=$RPM_BUILD_ROOT install;
|
||||
rm $RPM_BUILD_ROOT%{libdir}/libndpi.so
|
||||
rm $RPM_BUILD_ROOT%{libdir}/libndpi.so.?
|
||||
cd $RPM_BUILD_ROOT%{libdir}/; ln -s libndpi.so.@PACKAGE_VERSION@ libndpi.so.@MAJOR_RELEASE@; cd -
|
||||
cd $RPM_BUILD_ROOT%{libdir}/; ln -s libndpi.so.@PACKAGE_VERSION@ libndpi.so; cd -
|
||||
rm $RPM_BUILD_ROOT/usr/lib/libndpi.so
|
||||
rm $RPM_BUILD_ROOT/usr/lib/libndpi.so.?
|
||||
cd $RPM_BUILD_ROOT/usr/lib/; ln -s libndpi.so.@PACKAGE_VERSION@ libndpi.so.@MAJOR_RELEASE@; cd -
|
||||
cd $RPM_BUILD_ROOT/usr/lib/; ln -s libndpi.so.@PACKAGE_VERSION@ libndpi.so; cd -
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||
cp $HOME/nDPI/packages/etc/ld.so.conf.d/ndpi.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||
rm -rf $RPM_BUILD_ROOT/usr/local/sbin/ndpi
|
||||
rm -rf $RPM_BUILD_ROOT/usr/sbin/ndpi
|
||||
strip $RPM_BUILD_ROOT%{bindir}/*
|
||||
rm -fr %{buildroot}%{includedir}/ndpi_win32.h
|
||||
#sed -i -e "s/#include \"ndpi_win32.h\"//g" %{buildroot}%{includedir}/ndpi_main.h
|
||||
@@ -71,10 +79,12 @@ rm -fr $RPM_BUILD_ROOT
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
|
||||
/usr/local/lib/libndpi.so
|
||||
/usr/local/lib/libndpi.so.@MAJOR_RELEASE@
|
||||
/usr/local/lib/libndpi.so.@PACKAGE_VERSION@
|
||||
/usr/local/bin/ndpiReader
|
||||
/usr/lib/libndpi.so
|
||||
/usr/lib/libndpi.so.@MAJOR_RELEASE@
|
||||
/usr/lib/libndpi.so.@PACKAGE_VERSION@
|
||||
/usr/bin/ndpiReader
|
||||
/usr/share/ndpi/ndpiCustomCategory.txt
|
||||
/usr/share/ndpi/ndpiProtos.txt
|
||||
/etc/ld.so.conf.d/ndpi.conf
|
||||
%{libdir}/pkgconfig/libndpi.pc
|
||||
|
||||
@@ -84,7 +94,7 @@ rm -fr $RPM_BUILD_ROOT
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%{includedir}
|
||||
%{libdir}/libndpi.a
|
||||
/usr/lib/libndpi.a
|
||||
|
||||
%changelog
|
||||
* Mon Nov 19 2018 Alfredo Cardigliano <cardigliano@ntop.org> 2.5
|
||||
|
||||
+16
-19
@@ -1,24 +1,20 @@
|
||||
#
|
||||
# Change it according to your setup
|
||||
#
|
||||
NDPI_HOME=$(PWD)/../..
|
||||
NDPI_BUILD=${NDPI_HOME}/packages/ubuntu
|
||||
|
||||
all: clean ndpi
|
||||
NDPI_BUILD="$(realpath ${NDPI_HOME}/packages/ubuntu)"
|
||||
|
||||
ndpi:
|
||||
\rm -rf ./debian/ndpi-tmp ./debian/ndpi-dev-tmp ./debian/ndpi ./debian/ndpi-dev
|
||||
mkdir -p ./debian/ndpi-tmp ./debian/ndpi-dev-tmp
|
||||
mkdir -p ./debian/ndpi-tmp/usr/local/lib ./debian/ndpi-tmp/usr/local/bin
|
||||
mkdir -p ./debian/ndpi-dev-tmp/usr/local/lib ./debian/ndpi-dev-tmp/usr/local/include/ndpi
|
||||
cd ${NDPI_HOME}; ./autogen.sh; ./configure; make
|
||||
cp $(NDPI_HOME)/src/lib/libndpi.so.@NDPI_VERS@ ./debian/ndpi-tmp/usr/local/lib/
|
||||
cd ./debian/ndpi-tmp/usr/local/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so; cd -
|
||||
cd ./debian/ndpi-tmp/usr/local/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so.@MAJOR_RELEASE@; cd -
|
||||
cp $(NDPI_HOME)/src/lib/libndpi.a ./debian/ndpi-dev-tmp/usr/local/lib/
|
||||
cp $(NDPI_HOME)/example/ndpiReader ./debian/ndpi-tmp/usr/local/bin/
|
||||
cp $(NDPI_HOME)/src/include/*.h ./debian/ndpi-dev-tmp/usr/local/include/ndpi/
|
||||
-rm -fr ./debian/ndpi-dev-tmp/usr/local/include/ndpi/ndpi_win32.h*
|
||||
mkdir -p ./debian/ndpi-tmp/usr/lib ./debian/ndpi-tmp/usr/bin
|
||||
mkdir -p ./debian/ndpi-dev-tmp/usr/lib ./debian/ndpi-dev-tmp/usr/include/ndpi ./debian/ndpi-dev-tmp/usr/lib/pkgconfig
|
||||
cd ${NDPI_HOME}; ./autogen.sh; ./configure; $(MAKE)
|
||||
cp $(NDPI_HOME)/src/lib/libndpi.so.@NDPI_VERS@ ./debian/ndpi-tmp/usr/lib/
|
||||
cd ./debian/ndpi-tmp/usr/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so; cd -
|
||||
cd ./debian/ndpi-tmp/usr/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so.@MAJOR_RELEASE@; cd -
|
||||
cp $(NDPI_HOME)/src/lib/libndpi.a ./debian/ndpi-dev-tmp/usr/lib/
|
||||
cp $(NDPI_HOME)/example/ndpiReader ./debian/ndpi-tmp/usr/bin/
|
||||
cp $(NDPI_HOME)/src/include/*.h ./debian/ndpi-dev-tmp/usr/include/ndpi/
|
||||
cp $(NDPI_HOME)/libndpi.pc ./debian/ndpi-dev-tmp/usr/lib/pkgconfig/
|
||||
-rm -fr ./debian/ndpi-dev-tmp/usr/include/ndpi/ndpi_win32.h*
|
||||
@echo
|
||||
@find ./debian/ndpi-tmp -name "*~" -exec /bin/rm {} ';'
|
||||
@find ./debian/ndpi-dev-tmp -name "*~" -exec /bin/rm {} ';'
|
||||
@@ -37,10 +33,11 @@ ndpi:
|
||||
@echo "-------------------------------"
|
||||
|
||||
distclean:
|
||||
echo "dummy distclean"
|
||||
-cd ${NDPI_HOME} && $(MAKE) distclean
|
||||
|
||||
install:
|
||||
echo "dummy install"
|
||||
cd ${NDPI_HOME}; $(MAKE) install DESTDIR="${NDPI_BUILD}/debian/tmp" AM_UPDATE_INFO_DIR=no
|
||||
|
||||
clean:
|
||||
-rm -rf *~ *deb ./usr ./debian/ndpi ./debian/ndpi-dev ./debian/ndpi-tmp ./debian/ndpi-dev-tmp
|
||||
-cd ${NDPI_HOME} && $(MAKE) clean
|
||||
-rm -rf *~ *deb ./usr ./debian/ndpi ./debian/ndpi-dev ./debian/ndpi ./debian/ndpi-dev
|
||||
|
||||
Vendored
+1604
-18
File diff suppressed because it is too large
Load Diff
@@ -24,13 +24,21 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
NDPI_VERS=`../version.sh --release`
|
||||
MAJOR_RELEASE=`../version.sh --major-release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
NDPI_VERS=`$(dirname "${0}")/../version.sh --release`
|
||||
MAJOR_RELEASE=`$(dirname "${0}")/../version.sh --major-release`
|
||||
GIT_REVISION=`$(dirname "${0}")/../version.sh --revision`
|
||||
|
||||
AC_CHECK_LIB([maxminddb], [MMDB_lookup_sockaddr])
|
||||
AC_HAVE_HEADERS(maxminddb.h)
|
||||
if test ".${ac_cv_lib_maxminddb_MMDB_lookup_sockaddr}" = ".yes" &&
|
||||
test ".${ac_cv_header_maxminddb_h}" = ".yes"; then
|
||||
GEOIP_DEP=", libmaxminddb0"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile debian/changelog debian/files debian/control])
|
||||
|
||||
AC_SUBST(NDPI_VERS)
|
||||
AC_SUBST(GEOIP_DEP)
|
||||
AC_SUBST(MACHINE)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
|
||||
@@ -8,7 +8,7 @@ Build-Conflicts:
|
||||
|
||||
Package: ndpi
|
||||
Architecture: @EXTN@
|
||||
Depends: libnuma1
|
||||
Depends: libnuma1 @GEOIP_DEP@
|
||||
Recommends:
|
||||
Suggests:
|
||||
Pre-Depends:
|
||||
|
||||
+4
-3
@@ -1,8 +1,9 @@
|
||||
CC=@CC@
|
||||
CFLAGS=-I. -I../src/include -I./src/lib/third_party/include -shared -Wl,
|
||||
CFLAGS=-I. -I../src/include -I./src/lib/third_party/include @CFLAGS@ @CUSTOM_NDPI@ -shared
|
||||
#LIBNDPI=../src/lib/libndpi.so.@NDPI_VERSION_SHORT@
|
||||
LIBNDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=$(CFILE) $(LIBNDPI) -lpcap
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIBS=$(CFILE) $(LIBNDPI) -lpcap @LIBS@ @ADDITIONAL_LIBS@
|
||||
SHARE = -soname,ndpi_wrap
|
||||
SO=ndpi_wrap.so
|
||||
OBJS = ndpi_wrap.o
|
||||
@@ -19,7 +20,7 @@ endif
|
||||
all: $(SO)
|
||||
|
||||
$(SO): $(CFILE) $(LIBNDPI) Makefile
|
||||
$(CC) $(CFLAGS)$(SHARE) -o $@ $(PIC) $(LDFLAGS)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(PIC) -Wl,$(SHARE) -o $@ $(LIBS)
|
||||
# ln -s $(LIBNDPI) .
|
||||
|
||||
clean:
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
This direcgory contains the Python bindings for nDPI
|
||||
|
||||
Usage:
|
||||
- python3 ndpi_example.py <interface>
|
||||
- python3 ndpi_example.py <pcap_file>
|
||||
|
||||
Code courtesy of Massimo Puddu
|
||||
@@ -0,0 +1,43 @@
|
||||
nDPI Python bindings
|
||||
--------------------
|
||||
|
||||
This directory contains the Python3 bindings for nDPI. We provide both cffi and ctypes based bindings.
|
||||
|
||||
**cffi bindings**
|
||||
|
||||
Files:
|
||||
|
||||
* ndpi.py
|
||||
|
||||
Example (using `nfstream <https://github.com/aouinizied/nfstream>`_ package):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip3 install nfstream
|
||||
python3 flow_printer.py <interface>
|
||||
python3 flow_printer.py <pcap_file>
|
||||
|
||||
Code courtesy:
|
||||
|
||||
* Zied Aouini
|
||||
|
||||
**ctypes bindings**
|
||||
|
||||
Files:
|
||||
|
||||
* ndpi_typestruct.py
|
||||
* ndpi_wrap.c
|
||||
* Makefile.in
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip3 install scapy
|
||||
python3 ndpi_example.py <interface>
|
||||
python3 ndpi_example.py <pcap_file>
|
||||
|
||||
Code courtesy:
|
||||
|
||||
* Massimo Puddu
|
||||
* Zied Aouini
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
flow_printer.py
|
||||
Copyright (C) 2019-20 - NFStream Developers
|
||||
This file is part of NFStream, a Flexible Network Data Analysis Framework (https://www.nfstream.org/).
|
||||
NFStream is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
NFStream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public License along with NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from nfstream import NFStreamer
|
||||
import sys
|
||||
|
||||
# Example must run with nfstream >= 6.1.1
|
||||
path = sys.argv[1]
|
||||
flow_streamer = NFStreamer(source=path, statistical_analysis=False, performance_report=1)
|
||||
result = {}
|
||||
try:
|
||||
for flow in flow_streamer:
|
||||
print(flow)
|
||||
try:
|
||||
result[flow.application_name] += flow.bidirectional_packets
|
||||
except KeyError:
|
||||
result[flow.application_name] = flow.bidirectional_packets
|
||||
print("\nSummary (Application Name: Packets):")
|
||||
print(result)
|
||||
except KeyboardInterrupt:
|
||||
print("\nSummary (Application Name: Packets):")
|
||||
print(result)
|
||||
print("Terminated.")
|
||||
+1363
File diff suppressed because it is too large
Load Diff
+88
-67
@@ -1,43 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# ndpi_example.py
|
||||
#
|
||||
# Copyright (C) 2011-19 - ntop.org
|
||||
#
|
||||
# nDPI is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# nDPI is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
file: ndpi_example.py
|
||||
This file is part of nDPI.
|
||||
|
||||
Copyright (C) 2011-19 - ntop.org
|
||||
Copyright (C) 2019 - Zied Aouini <aouinizied@gmail.com> (Incremental improvements)
|
||||
|
||||
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with nDPI.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from ndpi_typestruct import *
|
||||
from ctypes import *
|
||||
from scapy.all import *
|
||||
|
||||
import sys
|
||||
|
||||
# ------- return type & pcapstruct to declare -------
|
||||
|
||||
|
||||
class workflow(Structure):
|
||||
class WorkFlow(Structure):
|
||||
_fields_ = [("src_ip", c_uint32),
|
||||
("dst_ip", c_uint32),
|
||||
("src_port", c_uint16),
|
||||
("dst_port", c_uint16),
|
||||
("protocol", c_uint8),
|
||||
("packets", c_uint32),
|
||||
("detected_protocol", ndpi_protocol),
|
||||
("detected_protocol", NDPIProtocol),
|
||||
("detection_completed", c_uint8),
|
||||
("id", c_uint32),
|
||||
("src_id", POINTER(ndpi_id_struct)),
|
||||
("dst_id", POINTER(ndpi_id_struct)),
|
||||
("flow", POINTER(ndpi_flow_struct))]
|
||||
("src_id", POINTER(NDPIIdStruct)),
|
||||
("dst_id", POINTER(NDPIIdStruct)),
|
||||
("flow", POINTER(NDPIFlowStruct))]
|
||||
|
||||
|
||||
CMCFUN = CFUNCTYPE(c_int, c_void_p, c_void_p)
|
||||
@@ -48,17 +49,19 @@ FREE = CFUNCTYPE(None, c_void_p)
|
||||
def node_proto_guess_walker(nodo, which, depth, user_data):
|
||||
global ndpi_info_mod
|
||||
|
||||
flow = cast(nodo, POINTER(POINTER(workflow))).contents.contents
|
||||
if which == 0 or which == 3: #execute only preorder operation of the tree
|
||||
flow = cast(nodo, POINTER(POINTER(WorkFlow))).contents.contents
|
||||
if which == 0 or which == 3: # execute only preorder operation of the tree
|
||||
if flow.detection_completed == 0: # order for tree operation
|
||||
flow.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod, flow.flow, flow.protocol,
|
||||
int(socket.ntohl(flow.src_ip)), 1)
|
||||
flow.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod,
|
||||
flow.flow,
|
||||
1,
|
||||
cast(addressof(c_uint8(0)), POINTER(c_uint8)))
|
||||
count_protocol[flow.detected_protocol.app_protocol] += flow.packets
|
||||
|
||||
|
||||
def py_cmp_fun(a, b):
|
||||
fa = cast(a, POINTER(workflow))
|
||||
fb = cast(b, POINTER(workflow))
|
||||
fa = cast(a, POINTER(WorkFlow))
|
||||
fb = cast(b, POINTER(WorkFlow))
|
||||
|
||||
if fa.contents.src_ip < fb.contents.src_ip: return -1
|
||||
elif fa.contents.src_ip > fb.contents.src_ip: return 1
|
||||
@@ -83,7 +86,7 @@ free_walk = FREE(freer)
|
||||
|
||||
# --------------------------------------
|
||||
|
||||
# number of anylized packet
|
||||
# number of analyzed packet
|
||||
packet_number = 0
|
||||
flow_count = 0
|
||||
max_num_udp_dissected_pkts = 16
|
||||
@@ -103,6 +106,8 @@ if ndpi.ndpi_get_api_version() != ndpi.ndpi_wrap_get_api_version():
|
||||
ndpi_info_mod = ndpi.ndpi_init_detection_module()
|
||||
if ndpi_info_mod is None:
|
||||
sys.exit(-1)
|
||||
else:
|
||||
ndpi_ndpi_finalize_initalization(ndpi_info_mod)
|
||||
|
||||
|
||||
def ip2int(ip):
|
||||
@@ -113,30 +118,34 @@ def ip2int(ip):
|
||||
return int(struct.unpack("!I", packedIP)[0])
|
||||
|
||||
|
||||
def get_flow(packet):
|
||||
def get_flow(pkt):
|
||||
global flows_root
|
||||
global flows_root_ref
|
||||
global flow_count
|
||||
|
||||
ip_packet = packet[1]
|
||||
ip_packet = pkt[1]
|
||||
ip_protocol = ip_packet.proto
|
||||
transport_packet = None
|
||||
|
||||
if ip_protocol == 6 or ip_protocol == 17: transport_packet = packet[2]
|
||||
if ip_protocol == 6 or ip_protocol == 17:
|
||||
transport_packet = pkt[2]
|
||||
if transport_packet is not None:
|
||||
# to avoid two nodes in one binary tree for a flow
|
||||
ip_src = ip2int(ip_packet.src)
|
||||
ip_dst = ip2int(ip_packet.dst)
|
||||
src_port = transport_packet.sport
|
||||
dst_port = transport_packet.dport
|
||||
else: return None
|
||||
# set flows to correct type and data
|
||||
ndpi_flow = pointer(ndpi_flow_struct())
|
||||
memset(ndpi_flow, 0, sizeof(ndpi_flow_struct))
|
||||
if ip_src > ip_dst:
|
||||
flow = workflow(ip_src, ip_dst, src_port, dst_port, int(ip_packet.proto), 0, ndpi_protocol(), 0, 0, pointer(ndpi_id_struct()), pointer(ndpi_id_struct()), ndpi_flow)
|
||||
else:
|
||||
flow = workflow(ip_dst, ip_src, dst_port, src_port, int(ip_packet.proto), 0, ndpi_protocol(), 0, 0, pointer(ndpi_id_struct()), pointer(ndpi_id_struct()), ndpi_flow)
|
||||
return None
|
||||
# set flows to correct type and data
|
||||
ndpi_flow = pointer(NDPIFlowStruct())
|
||||
memset(ndpi_flow, 0, sizeof(NDPIFlowStruct))
|
||||
if ip_src > ip_dst:
|
||||
flow = WorkFlow(ip_src, ip_dst, src_port, dst_port, int(ip_packet.proto), 0, NDPIProtocol(), 0, 0,
|
||||
pointer(NDPIIdStruct()), pointer(NDPIIdStruct()), ndpi_flow)
|
||||
else:
|
||||
flow = WorkFlow(ip_dst, ip_src, dst_port, src_port, int(ip_packet.proto), 0, NDPIProtocol(), 0, 0,
|
||||
pointer(NDPIIdStruct()), pointer(NDPIIdStruct()), ndpi_flow)
|
||||
flow_ref = pointer(flow)
|
||||
res = ndpi.ndpi_tfind(flow_ref, flows_root_ref, cmp_func)
|
||||
if res is None:
|
||||
@@ -144,41 +153,45 @@ def get_flow(packet):
|
||||
lista.append(flow)
|
||||
flow_count += 1
|
||||
return pointer(flow)
|
||||
flow = cast(res, POINTER(POINTER(workflow))).contents
|
||||
flow = cast(res, POINTER(POINTER(WorkFlow))).contents
|
||||
return flow
|
||||
|
||||
|
||||
def packetcaptured(packet):
|
||||
def packetcaptured(pkt):
|
||||
global packet_number
|
||||
global start_time
|
||||
global ndpi_info_mod
|
||||
|
||||
flow = None
|
||||
h = pcap_pkthdr()
|
||||
h = PcapPktHdr()
|
||||
|
||||
#getting flow
|
||||
# getting flow
|
||||
try:
|
||||
flow = get_flow(packet)
|
||||
flow = get_flow(pkt)
|
||||
except AttributeError:
|
||||
pass # ignore packet
|
||||
pass # ignore packet
|
||||
if flow is None: return
|
||||
|
||||
#filling pcap_pkthdr
|
||||
h.len = h.caplen = len(packet)
|
||||
h.ts.tv_sec = int(packet["IP"].time/1000000)
|
||||
h.ts.tv_usec = int(packet["IP"].time)
|
||||
# filling pcap_pkthdr
|
||||
h.len = h.caplen = len(pkt)
|
||||
h.ts.tv_sec = int(pkt["IP"].time/1000000)
|
||||
h.ts.tv_usec = int(pkt["IP"].time)
|
||||
|
||||
# real work
|
||||
if int(packet[1].frag) == 0: # not fragmented packet
|
||||
if int(pkt[1].frag) == 0: # not fragmented packet
|
||||
flow.contents.packets += 1
|
||||
packet_number += 1
|
||||
# get ndpi_iphdr address
|
||||
iphdr_addr = cast(c_char_p(packet[1].build()), c_void_p)
|
||||
iphdr_addr = cast(c_char_p(pkt[1].build()), c_void_p)
|
||||
ndpi_flow = flow.contents.flow
|
||||
|
||||
if flow.contents.detection_completed is 0:
|
||||
flow.contents.detected_protocol = ndpi.ndpi_detection_process_packet(ndpi_info_mod, ndpi_flow, cast(iphdr_addr, POINTER(c_uint8)),
|
||||
int(packet[1].len), h.ts.tv_usec, flow.contents.src_id, flow.contents.dst_id)
|
||||
flow.contents.detected_protocol = ndpi.ndpi_detection_process_packet(ndpi_info_mod,
|
||||
ndpi_flow,
|
||||
cast(iphdr_addr, POINTER(c_uint8)),
|
||||
int(pkt[1].len),
|
||||
h.ts.tv_usec,
|
||||
flow.contents.src_id,
|
||||
flow.contents.dst_id)
|
||||
|
||||
flow1 = flow.contents.detected_protocol
|
||||
|
||||
@@ -187,27 +200,32 @@ def packetcaptured(packet):
|
||||
if flow.contents.protocol == 6: valid = flow.contents.packets > max_num_tcp_dissected_pkts
|
||||
elif flow.contents.protocol == 17: valid = flow.contents.packets > max_num_udp_dissected_pkts
|
||||
|
||||
#should we continue anylizing packet or not?
|
||||
# should we continue anylizing packet or not?
|
||||
if valid or flow1.app_protocol is not 0:
|
||||
if valid or flow1.master_protocol is not 91: #or # 91 is NDPI_PROTOCOL_TLS
|
||||
flow.contents.detection_completed = 1 #protocol found
|
||||
if valid or flow1.master_protocol is not 91: # or # 91 is NDPI_PROTOCOL_TLS
|
||||
flow.contents.detection_completed = 1 # protocol found
|
||||
if flow1.app_protocol is 0:
|
||||
flow.contents.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod, ndpi_flow, 1)
|
||||
|
||||
flow.contents.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod,
|
||||
ndpi_flow,
|
||||
1,
|
||||
cast(addressof(c_uint8(0)),
|
||||
POINTER(c_uint8)))
|
||||
|
||||
|
||||
def result():
|
||||
global flows_root_ref
|
||||
global ndpi_info_mod
|
||||
print('\nnumber of anylized packet ' + str(packet_number))
|
||||
print('number of flows ' + str(flow_count))
|
||||
print('\nnumber of analyzed packet: ' + str(packet_number))
|
||||
print('number of flows: ' + str(flow_count))
|
||||
|
||||
ndpi.ndpi_twalk(flows_root_ref.contents, guess_walker, None)
|
||||
|
||||
print('\nDetected protocols:')
|
||||
for i in range(0, ndpi.ndpi_get_num_supported_protocols(ndpi_info_mod)):
|
||||
if count_protocol[i] > 0:
|
||||
print(cast(ndpi.ndpi_get_proto_name(ndpi_info_mod, i), c_char_p).value + ': '.encode('UTF-8') + str(count_protocol[i]).encode('UTF-8'))
|
||||
print("{}: {} packets".format(
|
||||
cast(ndpi.ndpi_get_proto_name(ndpi_info_mod, i), c_char_p).value.decode('utf-8'),
|
||||
str(count_protocol[i])))
|
||||
|
||||
|
||||
def free(ndpi_struct):
|
||||
@@ -216,16 +234,16 @@ def free(ndpi_struct):
|
||||
|
||||
|
||||
def initialize(ndpi_struct):
|
||||
all = NDPI_PROTOCOL_BITMASK()
|
||||
all = NDPIProtocolBitMask()
|
||||
ndpi.ndpi_wrap_NDPI_BITMASK_SET_ALL(pointer(all))
|
||||
ndpi.ndpi_set_protocol_detection_bitmask2(ndpi_struct, pointer(all))
|
||||
|
||||
|
||||
print('Using nDPI ' + str(cast(ndpi.ndpi_revision(), c_char_p).value))
|
||||
print('Using nDPI ' + cast(ndpi.ndpi_revision(), c_char_p).value.decode("utf-8"))
|
||||
|
||||
initialize(ndpi_info_mod)
|
||||
|
||||
if(len(sys.argv) != 2):
|
||||
if len(sys.argv) != 2:
|
||||
print("\nUsage: ndpi_example.py <device>")
|
||||
sys.exit(0)
|
||||
|
||||
@@ -247,6 +265,9 @@ else:
|
||||
sniff(iface=sys.argv[1], prn=packetcaptured)
|
||||
except KeyboardInterrupt:
|
||||
print('\nInterrupted\n')
|
||||
except PermissionError:
|
||||
sys.exit('\nRoot privilege required for live capture on interface: {}\n'.format(sys.argv[1]))
|
||||
|
||||
|
||||
result()
|
||||
free(ndpi_info_mod)
|
||||
|
||||
+434
-414
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
CC=@CC@
|
||||
INC=-I ../src/include -I/usr/local/include
|
||||
LIBDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIB=$(LIBDPI) -lrrd -lm @LIBS@ @ADDITIONAL_LIBS@
|
||||
|
||||
TOOLS=rrd_anomaly rrd_similarity
|
||||
|
||||
all: $(TOOLS)
|
||||
|
||||
rrd_anomaly: rrd_anomaly.c Makefile $(LIBDPI)
|
||||
$(CC) $(CPPFLAGS) -g $(INC) $(LDFLAGS) rrd_anomaly.c -o rrd_anomaly $(LIB)
|
||||
|
||||
rrd_similarity: rrd_similarity.c Makefile $(LIBDPI)
|
||||
$(CC) $(CPPFLAGS) -g $(INC) $(LDFLAGS) rrd_similarity.c -o rrd_similarity $(LIB)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o $(TOOLS) *~
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile
|
||||
|
||||
distdir:
|
||||
|
||||
install:
|
||||
@echo -n ""
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
This directory contains a tool that allows to identify anomalies and similarities in RRD files
|
||||
|
||||
|
||||
Prerequisite
|
||||
- rrdtool (https://oss.oetiker.ch/rrdtool/)
|
||||
|
||||
If you have Ubuntu-based systems you need to do
|
||||
- sudo apt-get install rrdtool librrd-dev
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* rrd_anomaly.c
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <getopt.h>
|
||||
#include <rrd.h>
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define DEFAULT_ALPHA 0.5
|
||||
#define DEFAULT_RO 0.05
|
||||
#define DEFAULT_START "now-1d"
|
||||
#define DEFAULT_END "now"
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
static void help() {
|
||||
printf("Usage: rrd_anomaly [-v][-a <alpha>][-e <end>][-q][-s <start>] -f <filename>\n"
|
||||
"-a | Set alpha. Valid range >0 .. <1. Default %.2f\n"
|
||||
"-e <end> | RRD end time. Default %s\n"
|
||||
"-q | Quick output (only anomalies are reported)\n"
|
||||
"-s <start> | RRD start time. Default %s\n"
|
||||
"-f <rrd path> | Path of the RRD filename to analyze\n"
|
||||
"-v | Verbose\n"
|
||||
,
|
||||
DEFAULT_ALPHA, DEFAULT_END, DEFAULT_START);
|
||||
|
||||
printf("\n\nExample: rrd_anomaly -q -f hum.rrd\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
rrd_time_value_t start_tv, end_tv;
|
||||
unsigned long step = 0, ds_cnt = 0;
|
||||
rrd_value_t *data, *p;
|
||||
char **names, *filename = NULL, *start_s, *end_s, *cf;
|
||||
u_int i, j, t, first = 1, quick_mode = 0, verbose = 0;
|
||||
time_t start, end;
|
||||
struct ndpi_ses_struct ses;
|
||||
float alpha, ro;
|
||||
char c;
|
||||
|
||||
/* Defaults */
|
||||
alpha = DEFAULT_ALPHA;
|
||||
start_s = DEFAULT_START;
|
||||
end_s = DEFAULT_END;
|
||||
cf = "AVERAGE";
|
||||
ro = DEFAULT_RO;
|
||||
|
||||
while((c = getopt(argc, argv, "s:e:a:qf:r:v")) != '?') {
|
||||
if(c == -1) break;
|
||||
|
||||
switch(c) {
|
||||
case 's':
|
||||
start_s = optarg;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
end_s = optarg;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
quick_mode = 1;
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
{
|
||||
float f = atof(optarg);
|
||||
|
||||
if((f > 0) && (f < 1))
|
||||
alpha = f;
|
||||
else
|
||||
printf("Discarding -a: valid range is >0 .. <1\n");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
filename = optarg;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
ro = atof(optarg);
|
||||
if((ro <= 0) || (ro >= 1))
|
||||
ro = DEFAULT_RO;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
help();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(filename == NULL)
|
||||
help();
|
||||
|
||||
ndpi_ses_init(&ses, alpha, ro);
|
||||
|
||||
if((rrd_parsetime(start_s, &start_tv) != NULL)) {
|
||||
printf("Unable to parse start time %s\n", start_s);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if((rrd_parsetime(end_s, &end_tv) != NULL)) {
|
||||
printf("Unable to parse end time %s\n", end_s);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
rrd_proc_start_end(&start_tv, &end_tv, &start, &end);
|
||||
|
||||
if(rrd_fetch_r(filename, cf, &start, &end, &step, &ds_cnt, &names, &data) != 0) {
|
||||
printf("Unable to extract data from rrd %s\n", filename);
|
||||
return(-2);
|
||||
}
|
||||
|
||||
p = data;
|
||||
for(t=start+1, i=0; t<end; t+=step, i++) {
|
||||
j = 0; /* Consider only the first DS */
|
||||
/* for(j=0; j<ds_cnt; j++) */ {
|
||||
rrd_value_t value = *p++;
|
||||
|
||||
if(!isnan(value)) {
|
||||
double prediction, confidence_band;
|
||||
double lower, upper;
|
||||
char buf[32];
|
||||
int rc;
|
||||
u_int is_anomaly;
|
||||
|
||||
value *= 100; /* trick to avoid dealing with floats */
|
||||
rc = ndpi_ses_add_value(&ses, value, &prediction, &confidence_band);
|
||||
lower = prediction - confidence_band, upper = prediction + confidence_band;
|
||||
is_anomaly = ((rc == 0) || (confidence_band == 0) || ((value >= lower) && (value <= upper))) ? 0 : 1;
|
||||
|
||||
if(verbose || is_anomaly) {
|
||||
if(quick_mode) {
|
||||
printf("%u\n", t);
|
||||
} else {
|
||||
const time_t _t = t;
|
||||
struct tm *t_info = localtime((const time_t*)&_t);
|
||||
|
||||
strftime(buf, sizeof(buf), "%d/%b/%Y %H:%M:%S", t_info);
|
||||
|
||||
if(first) {
|
||||
first = 0;
|
||||
printf("%s %s\t%s %s %s\t %s [%s]\n",
|
||||
"When", "Value", "Prediction", "Lower", "Upper", "Out", "Band");
|
||||
}
|
||||
|
||||
printf("%s %12.3f\t%.3f\t%12.3f\t%12.3f\t %s [%.3f]\n",
|
||||
buf, value/100., prediction/100., lower/100., upper/100., is_anomaly? "ANOMALY" : "OK",
|
||||
confidence_band/100.);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rrd_freemem(data);
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
/*
|
||||
* rrd_similarity.c
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <getopt.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
#include "rrd.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define DEFAULT_ALPHA 0.5
|
||||
#define DEFAULT_START "now-1d"
|
||||
#define DEFAULT_END "now"
|
||||
|
||||
#define MAX_NUM_RRDS 8192
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
char *path;
|
||||
float average, stddev;
|
||||
struct ndpi_bin b;
|
||||
} rrd_file_stats;
|
||||
|
||||
u_int verbose = 0, similarity_threshold = 100, skip_zero = 0;
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
static void help() {
|
||||
printf("Usage: rrd_similarity [-v][-a <alpha>][-e <end>][-q][-s <start>]\n"
|
||||
" -f <filename> -d <basedir> [-t <threshold>]\n"
|
||||
"-a | Set alpha. Valid range >0 .. <1. Default %.2f\n"
|
||||
"-e <end> | RRD end time. Default %s\n"
|
||||
"-q | Quick output (only anomalies are reported)\n"
|
||||
"-s <start> | RRD start time. Default %s\n"
|
||||
|
||||
"-d <basedir> | Base directory where RRD filename is searched\n"
|
||||
"-f <rrd path> | Path of the RRD filename to analyze\n"
|
||||
"-t <threshold> | Similarity threshold. Default %u (0 == alike)\n"
|
||||
"-v | Verbose\n"
|
||||
"-z | Skip zero RRDs during comparison\n"
|
||||
,
|
||||
DEFAULT_ALPHA, DEFAULT_END, DEFAULT_START, similarity_threshold);
|
||||
|
||||
printf("\n\nExample: rrd_similarity -q -f bytes.rrd -d /var/lib/ntopng/-1/snmpstats\n");
|
||||
|
||||
printf("\n\nGoal: find similar RRDs\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
void analyze_rrd(rrd_file_stats *rrd, time_t start, time_t end) {
|
||||
unsigned long step = 0, ds_cnt = 0;
|
||||
rrd_value_t *data, *p;
|
||||
char **names;
|
||||
u_int t, i, j, num_points;
|
||||
struct ndpi_analyze_struct *s;
|
||||
|
||||
if(rrd_fetch_r(rrd->path, "AVERAGE", &start, &end, &step, &ds_cnt, &names, &data) != 0) {
|
||||
printf("Unable to extract data from rrd %s\n", rrd->path);
|
||||
return;
|
||||
}
|
||||
|
||||
p = data;
|
||||
num_points = (end-start)/step;
|
||||
|
||||
if((s = ndpi_alloc_data_analysis(num_points)) == NULL)
|
||||
return;
|
||||
|
||||
ndpi_init_bin(&rrd->b, ndpi_bin_family32, num_points);
|
||||
|
||||
/* Step 1 - Compute average and stddev */
|
||||
for(t=start+1, i=0; t<end; t+=step, i++) {
|
||||
double value = (double)*p++;
|
||||
|
||||
if(isnan(value)) value = 0;
|
||||
ndpi_data_add_value(s, value);
|
||||
ndpi_set_bin(&rrd->b, i, value);
|
||||
}
|
||||
|
||||
rrd->average = ndpi_data_average(s);
|
||||
rrd->stddev = ndpi_data_stddev(s);
|
||||
|
||||
/* Step 2 - Bin analysis */
|
||||
ndpi_free_data_analysis(s, 1);
|
||||
rrd_freemem(data);
|
||||
}
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
int circles_touch(int x1, int r1, int x2, int r2) {
|
||||
int radius_sum = r1+r2;
|
||||
int x_diff = abs(x1 - x2);
|
||||
|
||||
return((radius_sum < x_diff) ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
void find_rrd_similarities(rrd_file_stats *rrd, u_int num_rrds) {
|
||||
u_int i, j, num_similar_rrds = 0, num_potentially_zero_equal = 0;
|
||||
|
||||
for(i=0; i<num_rrds; i++) {
|
||||
for(j=i+1; j<num_rrds; j++) {
|
||||
/*
|
||||
Average is the circle center, and stddev is the radius
|
||||
if circles touch each other then there is a chance that
|
||||
the two rrds are similar
|
||||
*/
|
||||
|
||||
if((rrd[i].average == 0) && (rrd[i].average == rrd[j].average)) {
|
||||
if(!skip_zero)
|
||||
printf("%s [%.1f/%.1f] - %s [%.1f/%.1f] are alike\n",
|
||||
rrd[i].path, rrd[i].average, rrd[i].stddev,
|
||||
rrd[j].path, rrd[j].average, rrd[j].stddev);
|
||||
|
||||
num_potentially_zero_equal++;
|
||||
} else if(circles_touch(rrd[i].average, rrd[i].stddev, rrd[j].average, rrd[j].stddev)
|
||||
) {
|
||||
float similarity = ndpi_bin_similarity(&rrd[i].b, &rrd[j].b, 0, similarity_threshold);
|
||||
|
||||
if((similarity >= 0) && (similarity < similarity_threshold)) {
|
||||
if(verbose)
|
||||
printf("%s [%.1f/%.1f] - %s [%.1f/%.1f] are %s [%.1f]\n",
|
||||
rrd[i].path, rrd[i].average, rrd[i].stddev,
|
||||
rrd[j].path, rrd[j].average, rrd[j].stddev,
|
||||
(similarity == 0) ? "alike" : "similar",
|
||||
similarity
|
||||
);
|
||||
|
||||
num_similar_rrds++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("Found %u (%.3f %%) similar RRDs / %u zero alike RRDs [num_rrds: %u]\n",
|
||||
num_similar_rrds,
|
||||
(num_similar_rrds*100.)/(float)(num_rrds*num_rrds),
|
||||
num_potentially_zero_equal,
|
||||
num_rrds);
|
||||
}
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
void find_rrds(char *basedir, char *filename, rrd_file_stats *rrds, u_int *num_rrds) {
|
||||
struct dirent **namelist;
|
||||
int n = scandir(basedir, &namelist, 0, NULL);
|
||||
|
||||
if(n < 0)
|
||||
return; /* End of the tree */
|
||||
|
||||
while(n--) {
|
||||
if(namelist[n]->d_name[0] != '.') {
|
||||
char path[PATH_MAX];
|
||||
struct stat s;
|
||||
|
||||
snprintf(path, sizeof(path), "%s/%s", basedir, namelist[n]->d_name);
|
||||
|
||||
if(stat(path, &s) == 0) {
|
||||
if(S_ISDIR(s.st_mode))
|
||||
find_rrds(path, filename, rrds, num_rrds);
|
||||
else if(strcmp(namelist[n]->d_name, filename) == 0) {
|
||||
if(*num_rrds < MAX_NUM_RRDS) {
|
||||
rrds[*num_rrds].path = strdup(path);
|
||||
if(rrds[*num_rrds].path != NULL)
|
||||
(*num_rrds)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free(namelist[n]);
|
||||
}
|
||||
|
||||
free(namelist);
|
||||
}
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
rrd_time_value_t start_tv, end_tv;
|
||||
char *filename = NULL, *start_s, *end_s, *dirname = NULL, *basedir = NULL;
|
||||
u_int first = 1, quick_mode = 0;
|
||||
float alpha;
|
||||
char c;
|
||||
time_t start, end;
|
||||
u_int num_rrds = 0, i;
|
||||
rrd_file_stats *rrds;
|
||||
|
||||
/* Defaults */
|
||||
alpha = DEFAULT_ALPHA;
|
||||
start_s = DEFAULT_START;
|
||||
end_s = DEFAULT_END;
|
||||
|
||||
|
||||
while((c = getopt(argc, argv, "d:s:e:a:qf:t:vz")) != '?') {
|
||||
if(c == -1) break;
|
||||
|
||||
switch(c) {
|
||||
case 's':
|
||||
start_s = optarg;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
basedir = optarg;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
end_s = optarg;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
quick_mode = 1;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
{
|
||||
float f = atof(optarg);
|
||||
|
||||
if((f > 0) && (f < 1))
|
||||
alpha = f;
|
||||
else
|
||||
printf("Discarding -a: valid range is >0 .. <1\n");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
filename = optarg;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
similarity_threshold = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
skip_zero = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
help();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if((filename == NULL) || (basedir == NULL))
|
||||
help();
|
||||
|
||||
if((rrd_parsetime(start_s, &start_tv) != NULL)) {
|
||||
printf("Unable to parse start time %s\n", start_s);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if((rrd_parsetime(end_s, &end_tv) != NULL)) {
|
||||
printf("Unable to parse end time %s\n", end_s);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
rrd_proc_start_end(&start_tv, &end_tv, &start, &end);
|
||||
|
||||
if((rrds = ndpi_calloc(sizeof(rrd_file_stats), MAX_NUM_RRDS)) == NULL) {
|
||||
printf("Not enough memory !\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Find all rrd's */
|
||||
find_rrds(basedir, filename, rrds, &num_rrds);
|
||||
|
||||
/* Read RRD's data */
|
||||
for(i=0; i<num_rrds; i++)
|
||||
analyze_rrd(&rrds[i], start, end);
|
||||
|
||||
find_rrd_similarities(rrds, num_rrds);
|
||||
|
||||
#if 0
|
||||
if(verbose) {
|
||||
for(i=0; i<num_rrds; i++)
|
||||
printf("%s\t%.1f\t%.1f\n", rrds[i].path, rrds[i].average, rrds[i].stddev);
|
||||
}
|
||||
#endif
|
||||
|
||||
for(i=0; i<num_rrds; i++) {
|
||||
ndpi_free_bin(&rrds[i].b);
|
||||
free(rrds[i].path);
|
||||
}
|
||||
|
||||
ndpi_free(rrds);
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
sonar.projectKey=ntop_nDPI
|
||||
sonar.organization=ntop
|
||||
|
||||
# This is the name and version displayed in the SonarCloud UI.
|
||||
#sonar.projectName=nDPI
|
||||
#sonar.projectVersion=1.0
|
||||
|
||||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
|
||||
#sonar.sources=.
|
||||
|
||||
# Encoding of the source code. Default is default system encoding
|
||||
#sonar.sourceEncoding=UTF-8
|
||||
@@ -1,10 +0,0 @@
|
||||
plibrary_includedir=$(includedir)/libndpi-@VERSION@/libndpi
|
||||
|
||||
library_include_HEADERS = ndpi_api.h \
|
||||
ndpi_define.h \
|
||||
ndpi_typedefs.h \
|
||||
ndpi_main.h \
|
||||
ndpi_protocol_ids.h \
|
||||
ndpi_protocols.h \
|
||||
ndpi_win32.h \
|
||||
ndpi_includes.h
|
||||
@@ -1,919 +0,0 @@
|
||||
/*
|
||||
* ndpi_api.h
|
||||
*
|
||||
* Copyright (C) 2011-19 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __NDPI_API_H__
|
||||
#define __NDPI_API_H__
|
||||
|
||||
#include "ndpi_main.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The #define below is used for apps that dynamically link with nDPI to make
|
||||
sure that datastructures and in sync across versions
|
||||
*/
|
||||
#define NDPI_API_VERSION 1
|
||||
|
||||
#define SIZEOF_ID_STRUCT ( sizeof(struct ndpi_id_struct) )
|
||||
#define SIZEOF_FLOW_STRUCT ( sizeof(struct ndpi_flow_struct) )
|
||||
|
||||
#define NDPI_DETECTION_ONLY_IPV4 ( 1 << 0 )
|
||||
#define NDPI_DETECTION_ONLY_IPV6 ( 1 << 1 )
|
||||
|
||||
#define ADD_TO_DETECTION_BITMASK 1
|
||||
#define NO_ADD_TO_DETECTION_BITMASK 0
|
||||
#define SAVE_DETECTION_BITMASK_AS_UNKNOWN 1
|
||||
#define NO_SAVE_DETECTION_BITMASK_AS_UNKNOWN 0
|
||||
|
||||
|
||||
/**
|
||||
* Check if a string is encoded with punycode
|
||||
* ( https://tools.ietf.org/html/rfc3492 )
|
||||
*
|
||||
* @par buff = pointer to the string to ckeck
|
||||
* @par len = len of the string
|
||||
* @return 1 if the string is punycoded;
|
||||
* else 0
|
||||
*
|
||||
*/
|
||||
int ndpi_check_punycode_string(char *buff, int len);
|
||||
|
||||
|
||||
/**
|
||||
* Get the size of the flow struct
|
||||
*
|
||||
* @return the size of the flow struct
|
||||
*
|
||||
*/
|
||||
u_int32_t ndpi_detection_get_sizeof_ndpi_flow_struct(void);
|
||||
|
||||
|
||||
/**
|
||||
* Get the size of the id struct
|
||||
*
|
||||
* @return the size of the id struct
|
||||
*
|
||||
*/
|
||||
u_int32_t ndpi_detection_get_sizeof_ndpi_id_struct(void);
|
||||
|
||||
/**
|
||||
* nDPI personal allocation and free functions
|
||||
**/
|
||||
void * ndpi_malloc(size_t size);
|
||||
void * ndpi_calloc(unsigned long count, size_t size);
|
||||
void * ndpi_realloc(void *ptr, size_t old_size, size_t new_size);
|
||||
char * ndpi_strdup(const char *s);
|
||||
void ndpi_free(void *ptr);
|
||||
void * ndpi_flow_malloc(size_t size);
|
||||
void ndpi_flow_free(void *ptr);
|
||||
|
||||
/**
|
||||
* Search the first occurrence of substring -find- in -s-
|
||||
* The search is limited to the first -slen- characters of the string
|
||||
*
|
||||
* @par s = string to parse
|
||||
* @par find = string to match with -s-
|
||||
* @par slen = max length to match between -s- and -find-
|
||||
* @return a pointer to the beginning of the located substring;
|
||||
* NULL if the substring is not found
|
||||
*
|
||||
*/
|
||||
char* ndpi_strnstr(const char *s, const char *find, size_t slen);
|
||||
|
||||
/**
|
||||
* Same as ndpi_strnstr but case insensitive
|
||||
*
|
||||
* @par s = string to parse
|
||||
* @par find = string to match with -s-
|
||||
* @par slen = max length to match between -s- and -find-
|
||||
* @return a pointer to the beginning of the located substring;
|
||||
* NULL if the substring is not found
|
||||
*
|
||||
*/
|
||||
char* ndpi_strncasestr(const char *s, const char *find, size_t slen);
|
||||
|
||||
/**
|
||||
* Returns the nDPI protocol id for IP-based protocol detection
|
||||
*
|
||||
* @par ndpi_struct = the struct created for the protocol detection
|
||||
* @par pin = IP host address (MUST BE in network byte order):
|
||||
* See man(7) ip for details
|
||||
* @return the nDPI protocol ID
|
||||
*
|
||||
*/
|
||||
u_int16_t ndpi_network_ptree_match(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct in_addr *pin);
|
||||
|
||||
/**
|
||||
* Init single protocol match
|
||||
*
|
||||
* @par ndpi_mod = the struct created for the protocol detection
|
||||
* @par match = the struct passed to match the protocol
|
||||
*
|
||||
*/
|
||||
void ndpi_init_protocol_match(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol_match *match);
|
||||
|
||||
/**
|
||||
* Returns a new initialized detection module
|
||||
*
|
||||
* @return the initialized detection module
|
||||
*
|
||||
*/
|
||||
struct ndpi_detection_module_struct *ndpi_init_detection_module(void);
|
||||
|
||||
/**
|
||||
* Frees the memory allocated in the specified flow
|
||||
*
|
||||
* @par flow = the flow to deallocate
|
||||
*
|
||||
*/
|
||||
void ndpi_free_flow(struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* Enables cache support.
|
||||
* In nDPI is used for some protocol (i.e. Skype)
|
||||
*
|
||||
* @par ndpi_mod = the struct created for the protocol detection
|
||||
* @par host = string for the host name
|
||||
* @par port = unsigned int for the port number
|
||||
*
|
||||
*/
|
||||
void ndpi_enable_cache(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
char* host, u_int port);
|
||||
|
||||
/**
|
||||
* Destroys the detection module
|
||||
*
|
||||
* @par ndpi_struct = the struct to clearing for the detection module
|
||||
*
|
||||
*/
|
||||
void ndpi_exit_detection_module(struct ndpi_detection_module_struct *ndpi_struct);
|
||||
|
||||
/**
|
||||
* Sets a single protocol bitmask
|
||||
* This function does not increment the index of the callback_buffer
|
||||
*
|
||||
* @par label = string for the protocol name
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par detection_bitmask = the protocol bitmask
|
||||
* @par idx = the index of the callback_buffer
|
||||
* @par func = function pointer of the protocol search
|
||||
* @par ndpi_selection_bitmask = the protocol selected bitmask
|
||||
* @par b_save_bitmask_unknow = if set as "true" save the detection bitmask as unknow
|
||||
* @par b_add_detection_bitmask = if set as "true" add the protocol bitmask to the detection bitmask
|
||||
*
|
||||
*/
|
||||
void ndpi_set_bitmask_protocol_detection(char *label,
|
||||
struct ndpi_detection_module_struct *ndpi_struct,
|
||||
const NDPI_PROTOCOL_BITMASK *detection_bitmask,
|
||||
const u_int32_t idx,
|
||||
u_int16_t ndpi_protocol_id,
|
||||
void (*func) (struct ndpi_detection_module_struct *,
|
||||
struct ndpi_flow_struct *flow),
|
||||
const NDPI_SELECTION_BITMASK_PROTOCOL_SIZE ndpi_selection_bitmask,
|
||||
u_int8_t b_save_bitmask_unknow,
|
||||
u_int8_t b_add_detection_bitmask);
|
||||
|
||||
/**
|
||||
* Sets the protocol bitmask2
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par detection_bitmask = the protocol bitmask to set
|
||||
*
|
||||
*/
|
||||
void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
const NDPI_PROTOCOL_BITMASK * detection_bitmask);
|
||||
|
||||
/**
|
||||
* Function to be called to see in case of unknown match to see if there is
|
||||
* a partial match that has been prevented by the current nDPI preferences configuration
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @return the detected protocol even if the flow is not completed;
|
||||
*
|
||||
*/
|
||||
ndpi_protocol ndpi_get_partial_detection(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow);
|
||||
/**
|
||||
* Function to be called before we give up with detection for a given flow.
|
||||
* This function reduces the NDPI_UNKNOWN_PROTOCOL detection
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @par enable_guess = guess protocol if unknown
|
||||
* @return the detected protocol even if the flow is not completed;
|
||||
*
|
||||
*/
|
||||
ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int8_t enable_guess);
|
||||
|
||||
/**
|
||||
* Processes an extra packet in order to get more information for a given protocol
|
||||
* (like SSL getting both client and server certificate even if we already know after
|
||||
* seeing the client certificate what the protocol is)
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = pointer to the connection state machine
|
||||
* @par packet = unsigned char pointer to the Layer 3 (IP header)
|
||||
* @par packetlen = the length of the packet
|
||||
* @par current_tick = the current timestamp for the packet
|
||||
* @par src = pointer to the source subscriber state machine
|
||||
* @par dst = pointer to the destination subscriber state machine
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
void ndpi_process_extra_packet(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
const unsigned char *packet,
|
||||
const unsigned short packetlen,
|
||||
const u_int64_t current_tick,
|
||||
struct ndpi_id_struct *src,
|
||||
struct ndpi_id_struct *dst);
|
||||
|
||||
/**
|
||||
* Processes one packet and returns the ID of the detected protocol.
|
||||
* This is the MAIN PACKET PROCESSING FUNCTION.
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = pointer to the connection state machine
|
||||
* @par packet = unsigned char pointer to the Layer 3 (IP header)
|
||||
* @par packetlen = the length of the packet
|
||||
* @par current_tick = the current timestamp for the packet
|
||||
* @par src = pointer to the source subscriber state machine
|
||||
* @par dst = pointer to the destination subscriber state machine
|
||||
* @return the detected ID of the protocol
|
||||
*
|
||||
*/
|
||||
ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
const unsigned char *packet,
|
||||
const unsigned short packetlen,
|
||||
const u_int64_t current_tick,
|
||||
struct ndpi_id_struct *src,
|
||||
struct ndpi_id_struct *dst);
|
||||
/**
|
||||
* Get the main protocol of the passed flows for the detected module
|
||||
*
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @return the ID of the master protocol detected
|
||||
*
|
||||
*/
|
||||
u_int16_t ndpi_get_flow_masterprotocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* API call that is called internally by ndpi_detection_process_packet or by apps
|
||||
* that want to avoid calling ndpi_detection_process_packet as they have already
|
||||
* parsed the packet and thus want to avoid this.
|
||||
*
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @par ndpi_selection_bitmask = the protocol selected bitmask
|
||||
*
|
||||
*/
|
||||
void ndpi_check_flow_func(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
NDPI_SELECTION_BITMASK_PROTOCOL_SIZE *ndpi_selection_packet);
|
||||
|
||||
/**
|
||||
* Query the pointer to the layer 4 packet
|
||||
*
|
||||
* @par l3 = pointer to the layer 3 data
|
||||
* @par l3_len = length of the layer 3 data
|
||||
* @par l4_return = address to the pointer of the layer 4 data if return value == 0, else undefined
|
||||
* @par l4_len_return = length of the layer 4 data if return value == 0, else undefined
|
||||
* @par l4_protocol_return = protocol of the layer 4 data if return value == 0, undefined otherwise
|
||||
* @par flags = limit operation on ipv4 or ipv6 packets. Possible values: NDPI_DETECTION_ONLY_IPV4 - NDPI_DETECTION_ONLY_IPV6 - 0 (any)
|
||||
* @return 0 if layer 4 data could be found correctly;
|
||||
else != 0
|
||||
*
|
||||
*/
|
||||
u_int8_t ndpi_detection_get_l4(const u_int8_t *l3, u_int16_t l3_len, const u_int8_t **l4_return, u_int16_t *l4_len_return,
|
||||
u_int8_t *l4_protocol_return, u_int32_t flags);
|
||||
|
||||
/**
|
||||
* Search and return the protocol based on matched ports
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par shost = source address in host byte order
|
||||
* @par sport = source port number
|
||||
* @par dhost = destination address in host byte order
|
||||
* @par dport = destination port number
|
||||
* @return the struct ndpi_protocol that match the port base protocol
|
||||
*
|
||||
*/
|
||||
ndpi_protocol ndpi_find_port_based_protocol(struct ndpi_detection_module_struct *ndpi_struct/* , u_int8_t proto */,
|
||||
u_int32_t shost,
|
||||
u_int16_t sport,
|
||||
u_int32_t dhost,
|
||||
u_int16_t dport);
|
||||
/**
|
||||
* Search and return the protocol guessed that is undetected
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow we're trying to guess, NULL if not available
|
||||
* @par proto = the l4 protocol number
|
||||
* @par shost = source address in host byte order
|
||||
* @par sport = source port number
|
||||
* @par dhost = destination address in host byte order
|
||||
* @par dport = destination port number
|
||||
* @return the struct ndpi_protocol that match the port base protocol
|
||||
*
|
||||
*/
|
||||
ndpi_protocol ndpi_guess_undetected_protocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int8_t proto,
|
||||
u_int32_t shost,
|
||||
u_int16_t sport,
|
||||
u_int32_t dhost,
|
||||
u_int16_t dport);
|
||||
/**
|
||||
* Check if the string passed match with a protocol
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par string_to_match = the string to match
|
||||
* @par string_to_match_len = the length of the string
|
||||
* @par ret_match = completed returned match information
|
||||
* @par is_host_match = value of the second field of struct ndpi_automa
|
||||
* @return the ID of the matched subprotocol
|
||||
*
|
||||
*/
|
||||
int ndpi_match_string_subprotocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *string_to_match,
|
||||
u_int string_to_match_len,
|
||||
ndpi_protocol_match_result *ret_match,
|
||||
u_int8_t is_host_match);
|
||||
/**
|
||||
* Check if the host passed match with a protocol
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow where match the host
|
||||
* @par string_to_match = the string to match
|
||||
* @par string_to_match_len = the length of the string
|
||||
* @par ret_match = completed returned match information
|
||||
* @par master_protocol_id = value of the ID associated to the master protocol detected
|
||||
* @return the ID of the matched subprotocol
|
||||
*
|
||||
*/
|
||||
u_int16_t ndpi_match_host_subprotocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
char *string_to_match,
|
||||
u_int string_to_match_len,
|
||||
ndpi_protocol_match_result *ret_match,
|
||||
u_int16_t master_protocol_id);
|
||||
|
||||
/**
|
||||
* Check if the string content passed match with a protocol
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow where match the host
|
||||
* @par string_to_match = the string to match
|
||||
* @par string_to_match_len = the length of the string
|
||||
* @par ret_match = completed returned match information
|
||||
* @par master_protocol_id = value of the ID associated to the master protocol detected
|
||||
* @return the ID of the matched subprotocol
|
||||
*
|
||||
*/
|
||||
u_int16_t ndpi_match_content_subprotocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
char *string_to_match,
|
||||
u_int string_to_match_len,
|
||||
ndpi_protocol_match_result *ret_match,
|
||||
u_int16_t master_protocol_id);
|
||||
/**
|
||||
* Exclude protocol from search
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow where match the host
|
||||
* @par master_protocol_id = value of the ID associated to the master protocol detected
|
||||
*
|
||||
*/
|
||||
void ndpi_exclude_protocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int16_t master_protocol_id,
|
||||
const char *_file, const char *_func,int _line);
|
||||
/**
|
||||
* Check if the string -bigram_to_match- match with a bigram of -automa-
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par automa = the struct ndpi_automa for the bigram
|
||||
* @par bigram_to_match = the bigram string to match
|
||||
* @return 0
|
||||
*
|
||||
*/
|
||||
int ndpi_match_bigram(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_automa *automa,
|
||||
char *bigram_to_match);
|
||||
|
||||
/**
|
||||
* Write the protocol name in the buffer -buf- as master_protocol.protocol
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par proto = the struct ndpi_protocol contain the protocols name
|
||||
* @par buf = the buffer to write the name of the protocols
|
||||
* @par buf_len = the length of the buffer
|
||||
* @return the buffer contains the master_protocol and protocol name
|
||||
*
|
||||
*/
|
||||
char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol proto, char *buf, u_int buf_len);
|
||||
|
||||
/**
|
||||
* Same as ndpi_protocol2name() with the difference that the numeric protocol
|
||||
* name is returned
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par proto = the struct ndpi_protocol contain the protocols name
|
||||
* @par buf = the buffer to write the name of the protocols
|
||||
* @par buf_len = the length of the buffer
|
||||
* @return the buffer contains the master_protocol and protocol name
|
||||
*
|
||||
*/
|
||||
char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol proto, char *buf, u_int buf_len);
|
||||
|
||||
/**
|
||||
* Find out if a given category is custom/user-defined
|
||||
*
|
||||
* @par category = the category associated to the protocol
|
||||
* @return 1 if this is a custom user category, 0 otherwise
|
||||
*
|
||||
*/
|
||||
int ndpi_is_custom_category(ndpi_protocol_category_t category);
|
||||
|
||||
/**
|
||||
* Overwrite a protocol category defined by nDPI with the custom category
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par protoId = the protocol identifier to overwrite
|
||||
* @par breed = the breed to be associated to the protocol
|
||||
*
|
||||
*/
|
||||
void ndpi_set_proto_breed(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
u_int16_t protoId, ndpi_protocol_breed_t breed);
|
||||
|
||||
/**
|
||||
* Overwrite a protocol category defined by nDPI with the custom category
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par protoId = the protocol identifier to overwrite
|
||||
* @par category = the category associated to the protocol
|
||||
*
|
||||
*/
|
||||
void ndpi_set_proto_category(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
u_int16_t protoId, ndpi_protocol_category_t protoCategory);
|
||||
|
||||
/**
|
||||
* Check if subprotocols of the specified master protocol are just
|
||||
* informative (and not real)
|
||||
*
|
||||
* @par mod = the detection module
|
||||
* @par protoId = the (master) protocol identifier to query
|
||||
* @return 1 = the subprotocol is informative, 0 otherwise.
|
||||
*
|
||||
*/
|
||||
u_int8_t ndpi_is_subprotocol_informative(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
u_int16_t protoId);
|
||||
|
||||
/**
|
||||
* Get protocol category as string
|
||||
*
|
||||
* @par mod = the detection module
|
||||
* @par category = the category associated to the protocol
|
||||
* @return the string name of the category
|
||||
*
|
||||
*/
|
||||
const char* ndpi_category_get_name(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol_category_t category);
|
||||
|
||||
/**
|
||||
* Set protocol category string
|
||||
*
|
||||
* @par mod = the detection module
|
||||
* @par category = the category associated to the protocol
|
||||
* @paw name = the string name of the category
|
||||
*
|
||||
*/
|
||||
void ndpi_category_set_name(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol_category_t category, char *name);
|
||||
|
||||
/**
|
||||
* Get protocol category
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par proto = the struct ndpi_protocol contain the protocols name
|
||||
* @return the protocol category
|
||||
*/
|
||||
ndpi_protocol_category_t ndpi_get_proto_category(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol proto);
|
||||
|
||||
/**
|
||||
* Get the protocol name associated to the ID
|
||||
*
|
||||
* @par mod = the detection module
|
||||
* @par proto_id = the ID of the protocol
|
||||
* @return the buffer contains the master_protocol and protocol name
|
||||
*
|
||||
*/
|
||||
char* ndpi_get_proto_name(struct ndpi_detection_module_struct *mod, u_int16_t proto_id);
|
||||
|
||||
|
||||
/**
|
||||
* Return the protocol breed ID associated to the protocol
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par proto = the ID of the protocol
|
||||
* @return the breed ID associated to the protocol
|
||||
*
|
||||
*/
|
||||
ndpi_protocol_breed_t ndpi_get_proto_breed(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int16_t proto);
|
||||
|
||||
/**
|
||||
* Return the string name of the protocol breed
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par breed_id = the breed ID associated to the protocol
|
||||
* @return the string name of the breed ID
|
||||
*
|
||||
*/
|
||||
char* ndpi_get_proto_breed_name(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
ndpi_protocol_breed_t breed_id);
|
||||
|
||||
/**
|
||||
* Return the ID of the protocol
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par proto = the protocol name
|
||||
* @return the ID of the protocol
|
||||
*
|
||||
*/
|
||||
int ndpi_get_protocol_id(struct ndpi_detection_module_struct *ndpi_mod, char *proto);
|
||||
|
||||
/**
|
||||
* Return the ID of the category
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par proto = the category name
|
||||
* @return the ID of the category
|
||||
*
|
||||
*/
|
||||
int ndpi_get_category_id(struct ndpi_detection_module_struct *ndpi_mod, char *cat);
|
||||
|
||||
/**
|
||||
* Write the list of the supported protocols
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
*/
|
||||
void ndpi_dump_protocols(struct ndpi_detection_module_struct *mod);
|
||||
|
||||
/**
|
||||
* Read a file and load the protocols
|
||||
*
|
||||
* Format: <tcp|udp>:<port>,<tcp|udp>:<port>,.....@<proto>
|
||||
*
|
||||
* Example:
|
||||
* tcp:80,tcp:3128@HTTP
|
||||
* udp:139@NETBIOS
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par path = the path of the file
|
||||
* @return 0 if the file is loaded correctly;
|
||||
* -1 else
|
||||
*
|
||||
*/
|
||||
int ndpi_load_protocols_file(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
const char* path);
|
||||
|
||||
/**
|
||||
* Get the total number of the supported protocols
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @return the number of protocols
|
||||
*
|
||||
*/
|
||||
u_int ndpi_get_num_supported_protocols(struct ndpi_detection_module_struct *ndpi_mod);
|
||||
|
||||
/**
|
||||
* Get the nDPI version release
|
||||
*
|
||||
* @return the NDPI_GIT_RELEASE
|
||||
*
|
||||
*/
|
||||
char* ndpi_revision(void);
|
||||
|
||||
/**
|
||||
* Set the automa for the protocol search
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par automa = the automa to match
|
||||
*
|
||||
*/
|
||||
void ndpi_set_automa(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
void* automa);
|
||||
|
||||
/* NDPI_PROTOCOL_HTTP */
|
||||
/**
|
||||
* Retrieve information for HTTP flows
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par flow = the detected flow
|
||||
* @return the HTTP method information about the flow
|
||||
*
|
||||
*/
|
||||
ndpi_http_method ndpi_get_http_method(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* Get the HTTP url
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par flow = the detected flow
|
||||
* @return the HTTP method information about the flow
|
||||
*
|
||||
*/
|
||||
char* ndpi_get_http_url(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* Get the HTTP content-type
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par flow = the detected flow
|
||||
* @return the HTTP method information about the flow
|
||||
*
|
||||
*/
|
||||
char* ndpi_get_http_content_type(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
struct ndpi_flow_struct *flow);
|
||||
|
||||
/* NDPI_PROTOCOL_TOR */
|
||||
/**
|
||||
* Check if the flow could be detected as TOR protocol
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the detected flow
|
||||
* @par certificate = the SSL/TLS certificate
|
||||
* @return 1 if the flow is TOR;
|
||||
* 0 else
|
||||
*
|
||||
*/
|
||||
int ndpi_is_tls_tor(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow, char *certificate);
|
||||
|
||||
/* Wrappers functions */
|
||||
/**
|
||||
* Init Aho-Corasick automata
|
||||
*
|
||||
* @return The requested automata, or NULL if an error occurred
|
||||
*
|
||||
*/
|
||||
void* ndpi_init_automa(void);
|
||||
|
||||
/**
|
||||
* Free Aho-Corasick automata allocated with ndpi_init_automa();
|
||||
*
|
||||
* @par The automata initialized with ndpi_init_automa();
|
||||
*
|
||||
*/
|
||||
void ndpi_free_automa(void *_automa);
|
||||
|
||||
/**
|
||||
* Add a string to match to an automata
|
||||
*
|
||||
* @par The automata initialized with ndpi_init_automa();
|
||||
* @par The (sub)string to search
|
||||
* @par The number associated with this string
|
||||
* @return 0 in case of no error, or -1 if an error occurred.
|
||||
*
|
||||
*/
|
||||
int ndpi_add_string_value_to_automa(void *_automa, char *str, unsigned long num);
|
||||
|
||||
/**
|
||||
* Add a string to match to an automata. Same as ndpi_add_string_value_to_automa() with num set to 1
|
||||
*
|
||||
* @par The automata initialized with ndpi_init_automa();
|
||||
* @par The (sub)string to search
|
||||
* @return 0 in case of no error, or -1 if an error occurred.
|
||||
*
|
||||
*/
|
||||
int ndpi_add_string_to_automa(void *_automa, char *str);
|
||||
|
||||
/**
|
||||
* Finalize the automa (necessary before start searching)
|
||||
*
|
||||
* @par The automata initialized with ndpi_init_automa();
|
||||
*
|
||||
*/
|
||||
void ndpi_finalize_automa(void *_automa);
|
||||
|
||||
/**
|
||||
* Add a string to match to an automata
|
||||
*
|
||||
* @par The automata initialized with ndpi_init_automa();
|
||||
* @par The (sub)string to search
|
||||
* @return 0 in case of match, or -1 if no match, or -2 if an error occurred.
|
||||
*
|
||||
*/
|
||||
int ndpi_match_string(void *_automa, char *string_to_match);
|
||||
|
||||
void ndpi_load_ip_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *ip_address_and_mask, ndpi_protocol_category_t category);
|
||||
int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *name, ndpi_protocol_category_t category);
|
||||
int ndpi_enable_loaded_categories(struct ndpi_detection_module_struct *ndpi_struct);
|
||||
int ndpi_fill_ip_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int32_t saddr,
|
||||
u_int32_t daddr,
|
||||
ndpi_protocol *ret);
|
||||
int ndpi_match_custom_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *name, unsigned long *id);
|
||||
void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
ndpi_protocol *ret);
|
||||
int ndpi_get_custom_category_match(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *name_or_ip, unsigned long *id);
|
||||
int ndpi_set_detection_preferences(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_detection_preference pref,
|
||||
int value);
|
||||
|
||||
ndpi_proto_defaults_t* ndpi_get_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod);
|
||||
u_int ndpi_get_ndpi_num_supported_protocols(struct ndpi_detection_module_struct *ndpi_mod);
|
||||
u_int ndpi_get_ndpi_num_custom_protocols(struct ndpi_detection_module_struct *ndpi_mod);
|
||||
u_int ndpi_get_ndpi_detection_module_size(void);
|
||||
void ndpi_set_log_level(struct ndpi_detection_module_struct *ndpi_mod, u_int l);
|
||||
|
||||
/* LRU cache */
|
||||
struct ndpi_lru_cache* ndpi_lru_cache_init(u_int32_t num_entries);
|
||||
void ndpi_lru_free_cache(struct ndpi_lru_cache *c);
|
||||
u_int8_t ndpi_lru_find_cache(struct ndpi_lru_cache *c, u_int32_t key,
|
||||
u_int16_t *value, u_int8_t clean_key_when_found);
|
||||
void ndpi_lru_add_to_cache(struct ndpi_lru_cache *c, u_int32_t key, u_int16_t value);
|
||||
|
||||
/**
|
||||
* Add a string to match to an automata
|
||||
*
|
||||
* @par The automata initialized with ndpi_init_automa();
|
||||
* @par The (sub)string to search
|
||||
* @par The id associated with the matched string or 0 id not found.
|
||||
* @return 0 in case of match, or -1 if no match, or -2 if an error occurred.
|
||||
*
|
||||
*/
|
||||
int ndpi_match_string_id(void *_automa, char *string_to_match, unsigned long *id);
|
||||
|
||||
/* Utility functions to set ndpi malloc/free/print wrappers */
|
||||
void set_ndpi_malloc(void* (*__ndpi_malloc)(size_t size));
|
||||
void set_ndpi_free(void (*__ndpi_free)(void *ptr));
|
||||
void set_ndpi_flow_malloc(void* (*__ndpi_flow_malloc)(size_t size));
|
||||
void set_ndpi_flow_free(void (*__ndpi_flow_free)(void *ptr));
|
||||
void set_ndpi_debug_function(struct ndpi_detection_module_struct *ndpi_str,
|
||||
ndpi_debug_function_ptr ndpi_debug_printf);
|
||||
//void * ndpi_malloc(size_t size);
|
||||
//void * ndpi_calloc(unsigned long count, size_t size);
|
||||
//void ndpi_free(void *ptr);
|
||||
u_int8_t ndpi_get_api_version(void);
|
||||
|
||||
/* https://github.com/corelight/community-id-spec */
|
||||
int ndpi_flowv4_flow_hash(u_int8_t l4_proto, u_int32_t src_ip, u_int32_t dst_ip, u_int16_t src_port, u_int16_t dst_port,
|
||||
u_int8_t icmp_type, u_int8_t icmp_code, u_char *hash_buf, u_int8_t hash_buf_len);
|
||||
int ndpi_flowv6_flow_hash(u_int8_t l4_proto, struct ndpi_in6_addr *src_ip, struct ndpi_in6_addr *dst_ip,
|
||||
u_int16_t src_port, u_int16_t dst_port, u_int8_t icmp_type, u_int8_t icmp_code,
|
||||
u_char *hash_buf, u_int8_t hash_buf_len);
|
||||
u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow);
|
||||
u_int8_t ndpi_is_safe_ssl_cipher(u_int32_t cipher);
|
||||
const char* ndpi_cipher2str(u_int32_t cipher);
|
||||
u_int16_t ndpi_guess_host_protocol_id(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow);
|
||||
int ndpi_has_human_readeable_string(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *buffer, u_int buffer_size,
|
||||
u_int8_t min_string_match_len, /* Will return 0 if no string > min_string_match_len have been found */
|
||||
char *outbuf, u_int outbuf_len);
|
||||
char* ndpi_ssl_version2str(u_int16_t version);
|
||||
|
||||
/* Serializer */
|
||||
int ndpi_init_serializer_ll(ndpi_serializer *serializer, ndpi_serialization_format fmt,
|
||||
u_int32_t buffer_size);
|
||||
int ndpi_init_serializer(ndpi_serializer *serializer, ndpi_serialization_format fmt);
|
||||
void ndpi_term_serializer(ndpi_serializer *serializer);
|
||||
void ndpi_reset_serializer(ndpi_serializer *serializer);
|
||||
int ndpi_serialize_string_int32(ndpi_serializer *serializer,
|
||||
const char *key, int32_t value);
|
||||
int ndpi_serialize_string_int64(ndpi_serializer *serializer,
|
||||
const char *key, int64_t value);
|
||||
int ndpi_serialize_uint32_uint32(ndpi_serializer *serializer,
|
||||
u_int32_t key, u_int32_t value);
|
||||
int ndpi_serialize_uint32_uint64(ndpi_serializer *serializer,
|
||||
u_int32_t key, u_int64_t value);
|
||||
int ndpi_serialize_uint32_int32(ndpi_serializer *serializer,
|
||||
u_int32_t key, int32_t value);
|
||||
int ndpi_serialize_uint32_int64(ndpi_serializer *serializer,
|
||||
u_int32_t key, int64_t value);
|
||||
int ndpi_serialize_uint32_float(ndpi_serializer *serializer,
|
||||
u_int32_t key, float value,
|
||||
const char *format /* e.f. "%.2f" */);
|
||||
int ndpi_serialize_uint32_string(ndpi_serializer *serializer,
|
||||
u_int32_t key, const char *value);
|
||||
int ndpi_serialize_string_uint32(ndpi_serializer *serializer,
|
||||
const char *key, u_int32_t value);
|
||||
int ndpi_serialize_string_uint32_format(ndpi_serializer *serializer,
|
||||
const char *key, u_int32_t value,
|
||||
const char *format);
|
||||
int ndpi_serialize_string_uint64(ndpi_serializer *serializer,
|
||||
const char *key, u_int64_t value);
|
||||
int ndpi_serialize_string_string(ndpi_serializer *serializer,
|
||||
const char *key, const char *value);
|
||||
int ndpi_serialize_string_binary(ndpi_serializer *_serializer,
|
||||
const char *key, const char *_value,
|
||||
u_int16_t vlen);
|
||||
|
||||
int ndpi_serialize_string_float(ndpi_serializer *serializer,
|
||||
const char *key, float value,
|
||||
const char *format /* e.f. "%.2f" */);
|
||||
int ndpi_serialize_end_of_record(ndpi_serializer *serializer);
|
||||
int ndpi_serialize_start_of_block(ndpi_serializer *_serializer,
|
||||
const char *key);
|
||||
int ndpi_serialize_end_of_block(ndpi_serializer *_serializer);
|
||||
char* ndpi_serializer_get_buffer(ndpi_serializer *_serializer, u_int32_t *buffer_len);
|
||||
u_int32_t ndpi_serializer_get_buffer_len(ndpi_serializer *_serializer);
|
||||
int ndpi_serializer_set_buffer_len(ndpi_serializer *_serializer, u_int32_t l);
|
||||
void ndpi_serializer_set_csv_separator(ndpi_serializer *serializer, char separator);
|
||||
|
||||
void ndpi_serializer_create_snapshot(ndpi_serializer *serializer);
|
||||
void ndpi_serializer_rollback_snapshot(ndpi_serializer *serializer);
|
||||
|
||||
/* Deserializer */
|
||||
int ndpi_init_deserializer(ndpi_deserializer *deserializer,
|
||||
ndpi_serializer *serializer);
|
||||
int ndpi_init_deserializer_buf(ndpi_deserializer *deserializer,
|
||||
u_int8_t *serialized_buffer,
|
||||
u_int32_t serialized_buffer_len);
|
||||
|
||||
ndpi_serialization_format ndpi_deserialize_get_format(ndpi_deserializer *_deserializer);
|
||||
ndpi_serialization_type ndpi_deserialize_get_item_type(ndpi_deserializer *deserializer, ndpi_serialization_type *key_type);
|
||||
int ndpi_deserialize_next(ndpi_deserializer *deserializer);
|
||||
|
||||
int ndpi_deserialize_key_uint32(ndpi_deserializer *deserializer, u_int32_t *key);
|
||||
int ndpi_deserialize_key_string(ndpi_deserializer *deserializer, ndpi_string *key);
|
||||
|
||||
int ndpi_deserialize_value_uint32(ndpi_deserializer *deserializer, u_int32_t *value);
|
||||
int ndpi_deserialize_value_uint64(ndpi_deserializer *deserializer, u_int64_t *value);
|
||||
int ndpi_deserialize_value_int32(ndpi_deserializer *deserializer, int32_t *value);
|
||||
int ndpi_deserialize_value_int64(ndpi_deserializer *deserializer, int64_t *value);
|
||||
int ndpi_deserialize_value_float(ndpi_deserializer *deserializer, float *value);
|
||||
int ndpi_deserialize_value_string(ndpi_deserializer *deserializer, ndpi_string *value);
|
||||
|
||||
int ndpi_deserialize_clone_item(ndpi_deserializer *deserializer, ndpi_serializer *serializer);
|
||||
int ndpi_deserialize_clone_all(ndpi_deserializer *deserializer, ndpi_serializer *serializer);
|
||||
|
||||
/* Data analysis */
|
||||
struct ndpi_analyze_struct* ndpi_alloc_data_analysis(u_int16_t _max_series_len);
|
||||
void ndpi_init_data_analysis(struct ndpi_analyze_struct *s, u_int16_t _max_series_len);
|
||||
void ndpi_free_data_analysis(struct ndpi_analyze_struct *d);
|
||||
void ndpi_data_add_value(struct ndpi_analyze_struct *s, const u_int32_t value);
|
||||
|
||||
float ndpi_data_average(struct ndpi_analyze_struct *s);
|
||||
float ndpi_data_window_average(struct ndpi_analyze_struct *s);
|
||||
|
||||
float ndpi_data_entropy(struct ndpi_analyze_struct *s);
|
||||
float ndpi_data_variance(struct ndpi_analyze_struct *s);
|
||||
float ndpi_data_stddev(struct ndpi_analyze_struct *s);
|
||||
u_int32_t ndpi_data_min(struct ndpi_analyze_struct *s);
|
||||
u_int32_t ndpi_data_max(struct ndpi_analyze_struct *s);
|
||||
float ndpi_data_ratio(u_int32_t sent, u_int32_t rcvd);
|
||||
|
||||
const char* ndpi_data_ratio2str(float ratio);
|
||||
|
||||
void ndpi_data_print_window_values(struct ndpi_analyze_struct *s); /* debug */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NDPI_API_H__ */
|
||||
File diff suppressed because it is too large
Load Diff
+13
-14
@@ -43,8 +43,7 @@
|
||||
#ifndef NDPI_CLASSIFY_H
|
||||
#define NDPI_CLASSIFY_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
#include "ndpi_includes.h"
|
||||
|
||||
/* constants */
|
||||
#define NUM_PARAMETERS_SPLT_LOGREG 208
|
||||
@@ -67,27 +66,27 @@ extern float parameters_bd[NUM_PARAMETERS_BD_LOGREG];
|
||||
extern float parameters_splt[NUM_PARAMETERS_SPLT_LOGREG];
|
||||
|
||||
/* Classifier functions */
|
||||
float ndpi_classify(const unsigned short *pkt_len, const struct timeval *pkt_time,
|
||||
const unsigned short *pkt_len_twin, const struct timeval *pkt_time_twin,
|
||||
struct timeval start_time, struct timeval start_time_twin, uint32_t max_num_pkt_len,
|
||||
float ndpi_classify(const unsigned short *pkt_len, const pkt_timeval *pkt_time,
|
||||
const unsigned short *pkt_len_twin, const pkt_timeval *pkt_time_twin,
|
||||
pkt_timeval start_time, pkt_timeval start_time_twin, uint32_t max_num_pkt_len,
|
||||
uint16_t sp, uint16_t dp, uint32_t op, uint32_t ip, uint32_t np_o, uint32_t np_i,
|
||||
uint32_t ob, uint32_t ib, uint16_t use_bd, const uint32_t *bd, const uint32_t *bd_t);
|
||||
|
||||
void ndpi_merge_splt_arrays(const uint16_t *pkt_len, const struct timeval *pkt_time,
|
||||
const uint16_t *pkt_len_twin, const struct timeval *pkt_time_twin,
|
||||
struct timeval start_time, struct timeval start_time_twin,
|
||||
void ndpi_merge_splt_arrays(const uint16_t *pkt_len, const pkt_timeval *pkt_time,
|
||||
const uint16_t *pkt_len_twin, const pkt_timeval *pkt_time_twin,
|
||||
pkt_timeval start_time, pkt_timeval start_time_twin,
|
||||
uint16_t s_idx, uint16_t r_idx,
|
||||
uint16_t *merged_lens, uint16_t *merged_times);
|
||||
|
||||
void ndpi_update_params(classifier_type_codes_t param_type, const char *param_file);
|
||||
|
||||
void ndpi_flow_info_freer(void *node);
|
||||
unsigned int ndpi_timer_eq(const struct timeval *a, const struct timeval *b);
|
||||
unsigned int ndpi_timer_lt(const struct timeval *a, const struct timeval *b);
|
||||
void ndpi_timer_sub(const struct timeval *a, const struct timeval *b, struct timeval *result);
|
||||
void ndpi_timer_clear(struct timeval *a);
|
||||
unsigned int ndpi_timeval_to_milliseconds(struct timeval ts);
|
||||
unsigned int ndpi_timeval_to_microseconds(struct timeval ts);
|
||||
unsigned int ndpi_timer_eq(const pkt_timeval *a, const pkt_timeval *b);
|
||||
unsigned int ndpi_timer_lt(const pkt_timeval *a, const pkt_timeval *b);
|
||||
void ndpi_timer_sub(const pkt_timeval *a, const pkt_timeval *b, pkt_timeval *result);
|
||||
void ndpi_timer_clear(pkt_timeval *a);
|
||||
unsigned int ndpi_timeval_to_milliseconds(pkt_timeval ts);
|
||||
unsigned int ndpi_timeval_to_microseconds(pkt_timeval ts);
|
||||
void ndpi_log_timestamp(char *log_ts, uint32_t log_ts_len);
|
||||
|
||||
#endif /* NDPI_CLASSIFY_H */
|
||||
|
||||
+116
-16
@@ -27,15 +27,17 @@
|
||||
gcc -E -dM - < /dev/null |grep ENDIAN
|
||||
*/
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <machine/endian.h>
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
#include <endian.h>
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
#define __LITTLE_ENDIAN__
|
||||
#endif /* __LITTLE_ENDIAN__ */
|
||||
#else
|
||||
#define __BIG_ENDIAN__
|
||||
#endif/* BYTE_ORDER */
|
||||
@@ -154,6 +156,7 @@
|
||||
|
||||
/* misc definitions */
|
||||
#define NDPI_DEFAULT_MAX_TCP_RETRANSMISSION_WINDOW_SIZE 0x10000
|
||||
#define NDPI_MAX_NUM_PKTS_PER_FLOW_TO_DISSECT 32
|
||||
|
||||
|
||||
/* TODO: rebuild all memory areas to have a more aligned memory block here */
|
||||
@@ -169,15 +172,11 @@
|
||||
#define NDPI_GNUTELLA_CONNECTION_TIMEOUT 60
|
||||
#define NDPI_BATTLEFIELD_CONNECTION_TIMEOUT 60
|
||||
#define NDPI_THUNDER_CONNECTION_TIMEOUT 30
|
||||
#define NDPI_RTSP_CONNECTION_TIMEOUT 5
|
||||
#define NDPI_TVANTS_CONNECTION_TIMEOUT 5
|
||||
#define NDPI_YAHOO_DETECT_HTTP_CONNECTIONS 1
|
||||
#define NDPI_YAHOO_LAN_VIDEO_TIMEOUT 30
|
||||
#define NDPI_ZATTOO_CONNECTION_TIMEOUT 120
|
||||
#define NDPI_ZATTOO_FLASH_TIMEOUT 5
|
||||
#define NDPI_JABBER_STUN_TIMEOUT 30
|
||||
#define NDPI_JABBER_FT_TIMEOUT 5
|
||||
#define NDPI_SOULSEEK_CONNECTION_IP_TICK_TIMEOUT 600
|
||||
|
||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||
#define NDPI_LOG(proto, m, log_level, args...) \
|
||||
@@ -187,7 +186,7 @@
|
||||
(*(mod->ndpi_debug_printf))(proto, mod, log_level, __FILE__, __FUNCTION__, __LINE__, args); \
|
||||
}
|
||||
|
||||
/* We must define NDPI_CURRENT_PROTO before include ndpi_main.h !!!
|
||||
/* We must define NDPI_CURRENT_PROTO before include ndpi_main.h !!!
|
||||
*
|
||||
* #include "ndpi_protocol_ids.h"
|
||||
* #define NDPI_CURRENT_PROTO NDPI_PROTOCOL_XXXX
|
||||
@@ -196,7 +195,7 @@
|
||||
*/
|
||||
|
||||
#ifndef NDPI_CURRENT_PROTO
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTO_UNKNOWN
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_UNKNOWN
|
||||
#endif
|
||||
|
||||
#define NDPI_LOG_ERR(mod, args...) \
|
||||
@@ -253,6 +252,7 @@
|
||||
((x.u6_addr.u6_addr64[0] < y.u6_addr.u6_addr64[0]) || ((x.u6_addr.u6_addr64[0] == y.u6_addr.u6_addr64[0]) && (x.u6_addr.u6_addr64[1] < y.u6_addr.u6_addr64[1])))
|
||||
|
||||
#define NDPI_NUM_BITS 512
|
||||
#define NDPI_NUM_BITS_MASK (512-1)
|
||||
|
||||
#define NDPI_BITS /* 32 */ (sizeof(ndpi_ndpi_mask) * 8 /* number of bits in a byte */) /* bits per mask */
|
||||
#define howmanybits(x, y) (((x)+((y)-1))/(y))
|
||||
@@ -274,12 +274,18 @@
|
||||
#define NDPI_BITMASK_SET_ALL(a) NDPI_ONE(&a)
|
||||
#define NDPI_BITMASK_SET(a, b) { memcpy(&a, &b, sizeof(NDPI_PROTOCOL_BITMASK)); }
|
||||
|
||||
#define NDPI_SET_BIT(num, n) num |= 1ULL << ( n )
|
||||
#define NDPI_CLR_BIT(num, n) num &= ~(1ULL << ( n ))
|
||||
#define NDPI_CLR_BIT(num, n) num &= ~(1ULL << ( n ))
|
||||
#define NDPI_ISSET_BIT(num, n) (num & (1ULL << ( n )))
|
||||
#define NDPI_ZERO_BIT(num) num = 0
|
||||
|
||||
/* this is a very very tricky macro *g*,
|
||||
* the compiler will remove all shifts here if the protocol is static...
|
||||
*/
|
||||
#define NDPI_ADD_PROTOCOL_TO_BITMASK(bmask,value) NDPI_SET(&bmask,value)
|
||||
#define NDPI_DEL_PROTOCOL_FROM_BITMASK(bmask,value) NDPI_CLR(&bmask,value)
|
||||
#define NDPI_COMPARE_PROTOCOL_TO_BITMASK(bmask,value) NDPI_ISSET(&bmask,value)
|
||||
#define NDPI_ADD_PROTOCOL_TO_BITMASK(bmask,value) NDPI_SET(&bmask, value & NDPI_NUM_BITS_MASK)
|
||||
#define NDPI_DEL_PROTOCOL_FROM_BITMASK(bmask,value) NDPI_CLR(&bmask, value & NDPI_NUM_BITS_MASK)
|
||||
#define NDPI_COMPARE_PROTOCOL_TO_BITMASK(bmask,value) NDPI_ISSET(&bmask, value & NDPI_NUM_BITS_MASK)
|
||||
|
||||
#define NDPI_SAVE_AS_BITMASK(bmask,value) { NDPI_ZERO(&bmask) ; NDPI_ADD_PROTOCOL_TO_BITMASK(bmask, value); }
|
||||
|
||||
@@ -304,10 +310,19 @@
|
||||
#define NDPI_ICMPV6_PROTOCOL_TYPE 0x3a
|
||||
|
||||
/* the get_uXX will return raw network packet bytes !! */
|
||||
#define get_u_int8_t(X,O) (*(u_int8_t *)(((u_int8_t *)X) + O))
|
||||
#define get_u_int16_t(X,O) (*(u_int16_t *)(((u_int8_t *)X) + O))
|
||||
#define get_u_int32_t(X,O) (*(u_int32_t *)(((u_int8_t *)X) + O))
|
||||
#define get_u_int64_t(X,O) (*(u_int64_t *)(((u_int8_t *)X) + O))
|
||||
#define get_u_int8_t(X,O) (*(u_int8_t *)((&(((u_int8_t *)X)[O]))))
|
||||
#define get_u_int16_t(X,O) (*(u_int16_t *)((&(((u_int8_t *)X)[O]))))
|
||||
#define get_u_int32_t(X,O) (*(u_int32_t *)((&(((u_int8_t *)X)[O]))))
|
||||
#if defined(__arm__)
|
||||
static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
|
||||
{
|
||||
u_int64_t tmp;
|
||||
memcpy(&tmp, X + O, sizeof(tmp));
|
||||
return tmp;
|
||||
}
|
||||
#else
|
||||
#define get_u_int64_t(X,O) (*(u_int64_t *)((&(((u_int8_t *)X)[O]))))
|
||||
#endif // __arm__
|
||||
|
||||
/* new definitions to get little endian from network bytes */
|
||||
#define get_ul8(X,O) get_u_int8_t(X,O)
|
||||
@@ -328,9 +343,22 @@
|
||||
#define match_first_bytes(payload,st) (memcmp((payload),(st),(sizeof(st)-1))==0)
|
||||
|
||||
#if defined(WIN32) && !defined(snprintf)
|
||||
#define snprintf _snprintf
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#undef strtok_r
|
||||
#define strtok_r strtok_s
|
||||
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define le16toh(x) (x)
|
||||
#define le32toh(x) (x)
|
||||
#else
|
||||
#error "byte order not supported"
|
||||
#endif
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
#define NDPI_MAX_DNS_REQUESTS 16
|
||||
#define NDPI_MIN_NUM_STUN_DETECTION 8
|
||||
|
||||
@@ -343,6 +371,10 @@
|
||||
#define NDPI_CIPHER_WEAK 1
|
||||
#define NDPI_CIPHER_INSECURE 2
|
||||
|
||||
#define NDPI_OPTIMAL_HLL_NUM_BUCKETS 16
|
||||
|
||||
#define NDPI_MAX_NUM_TLS_APPL_BLOCKS 8
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <libkern/OSByteOrder.h>
|
||||
@@ -364,4 +396,72 @@
|
||||
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
|
||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
|
||||
#define htobe16(x) htons(x)
|
||||
#define htole16(x) (x)
|
||||
#define be16toh(x) ntohs(x)
|
||||
#define le16toh(x) (x)
|
||||
#define htobe32(x) htonl(x)
|
||||
#define htole32(x) (x)
|
||||
#define be32toh(x) ntohl(x)
|
||||
#define le32toh(x) (x)
|
||||
#define htobe64(x) htonll(x)
|
||||
#define htole64(x) (x)
|
||||
#define be64toh(x) ntohll(x)
|
||||
#define le64toh(x) (x)
|
||||
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
|
||||
#define htobe16(x) (x)
|
||||
#define htole16(x) __builtin_bswap16(x)
|
||||
#define be16toh(x) (x)
|
||||
#define le16toh(x) __builtin_bswap16(x)
|
||||
#define htobe32(x) (x)
|
||||
#define htole32(x) __builtin_bswap32(x)
|
||||
#define be32toh(x) (x)
|
||||
#define le32toh(x) __builtin_bswap32(x)
|
||||
#define htobe64(x) (x)
|
||||
#define htole64(x) __builtin_bswap64(x)
|
||||
#define be64toh(x) (x)
|
||||
#define le64toh(x) __builtin_bswap64(x)
|
||||
|
||||
#else
|
||||
#error Unexpected __BYTE_ORDER__
|
||||
|
||||
#endif /* __BYTE_ORDER__ */
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
|
||||
#ifndef ETH_ARP
|
||||
#define ETH_ARP 0x0806
|
||||
#endif
|
||||
|
||||
#ifndef ETH_P_IP
|
||||
#define ETH_P_IP 0x0800 /* IPv4 */
|
||||
#endif
|
||||
|
||||
#ifndef ETH_P_IPV6
|
||||
#define ETH_P_IPV6 0x86dd /* IPv6 */
|
||||
#endif
|
||||
|
||||
#ifndef ETH_P_VLAN
|
||||
#define ETH_P_VLAN 0x8100
|
||||
#endif
|
||||
|
||||
#ifndef ETH_P_MPLS_UNI
|
||||
#define ETH_P_MPLS_UNI 0x8847
|
||||
#endif
|
||||
|
||||
#ifndef ETH_P_MPLS_MULTI
|
||||
#define ETH_P_MPLS_MULTI 0x8848
|
||||
#endif
|
||||
|
||||
#ifndef ETH_P_PPPoE
|
||||
#define ETH_P_PPPoE 0x8864
|
||||
#endif
|
||||
|
||||
#endif /* __NDPI_DEFINE_INCLUDE_FILE__ */
|
||||
|
||||
@@ -0,0 +1,408 @@
|
||||
/*
|
||||
* ndpi_encryption.h
|
||||
*
|
||||
* Copyright (C) 2016-22 - ntop.org
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/* https://wiki.mozilla.org/Security/Cipher_Suites */
|
||||
/* https://www.oryx-embedded.com/doc/tls__cipher__suites_8h.html */
|
||||
|
||||
#define TLS_NULL_WITH_NULL_NULL 0x0000
|
||||
#define TLS_RSA_EXPORT_WITH_RC4_40_MD5 0x0003
|
||||
#define TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 0x0006
|
||||
#define TLS_RSA_EXPORT_WITH_DES40_CBC_SHA 0x0008
|
||||
#define TLS_RSA_WITH_NULL_MD5 0x0001
|
||||
#define TLS_RSA_WITH_NULL_SHA 0x0002
|
||||
#define TLS_RSA_WITH_NULL_SHA256 0x003B
|
||||
#define TLS_RSA_WITH_RC4_128_MD5 0x0004
|
||||
#define TLS_RSA_WITH_RC4_128_SHA 0x0005
|
||||
#define TLS_RSA_WITH_IDEA_CBC_SHA 0x0007
|
||||
#define TLS_RSA_WITH_DES_CBC_SHA 0x0009
|
||||
#define TLS_RSA_WITH_3DES_EDE_CBC_SHA 0x000A
|
||||
#define TLS_RSA_WITH_AES_128_CBC_SHA 0x002F
|
||||
#define TLS_RSA_WITH_AES_256_CBC_SHA 0x0035
|
||||
#define TLS_RSA_WITH_AES_128_CBC_SHA256 0x003C
|
||||
#define TLS_RSA_WITH_AES_256_CBC_SHA256 0x003D
|
||||
#define TLS_RSA_WITH_AES_128_GCM_SHA256 0x009C
|
||||
#define TLS_RSA_WITH_AES_256_GCM_SHA384 0x009D
|
||||
#define TLS_RSA_WITH_AES_128_CCM 0xC09C
|
||||
#define TLS_RSA_WITH_AES_256_CCM 0xC09D
|
||||
#define TLS_RSA_WITH_AES_128_CCM_8 0xC0A0
|
||||
#define TLS_RSA_WITH_AES_256_CCM_8 0xC0A1
|
||||
#define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA 0x0041
|
||||
#define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 0x0084
|
||||
#define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x00BA
|
||||
#define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x00C0
|
||||
#define TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC07A
|
||||
#define TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC07B
|
||||
#define TLS_RSA_WITH_SEED_CBC_SHA 0x0096
|
||||
#define TLS_RSA_WITH_ARIA_128_CBC_SHA256 0xC03C
|
||||
#define TLS_RSA_WITH_ARIA_256_CBC_SHA384 0xC03D
|
||||
#define TLS_RSA_WITH_ARIA_128_GCM_SHA256 0xC050
|
||||
#define TLS_RSA_WITH_ARIA_256_GCM_SHA384 0xC051
|
||||
#define TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA 0x000E
|
||||
#define TLS_DH_RSA_WITH_DES_CBC_SHA 0x000F
|
||||
#define TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA 0x0010
|
||||
#define TLS_DH_RSA_WITH_AES_128_CBC_SHA 0x0031
|
||||
#define TLS_DH_RSA_WITH_AES_256_CBC_SHA 0x0037
|
||||
#define TLS_DH_RSA_WITH_AES_128_CBC_SHA256 0x003F
|
||||
#define TLS_DH_RSA_WITH_AES_256_CBC_SHA256 0x0069
|
||||
#define TLS_DH_RSA_WITH_AES_128_GCM_SHA256 0x00A0
|
||||
#define TLS_DH_RSA_WITH_AES_256_GCM_SHA384 0x00A1
|
||||
#define TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x0043
|
||||
#define TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x0086
|
||||
#define TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x00BC
|
||||
#define TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x00C2
|
||||
#define TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC07E
|
||||
#define TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC07F
|
||||
#define TLS_DH_RSA_WITH_SEED_CBC_SHA 0x0098
|
||||
#define TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 0xC040
|
||||
#define TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 0xC041
|
||||
#define TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 0xC054
|
||||
#define TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 0xC055
|
||||
#define TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA 0x0014
|
||||
#define TLS_DHE_RSA_WITH_DES_CBC_SHA 0x0015
|
||||
#define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 0x0016
|
||||
#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x0033
|
||||
#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x0039
|
||||
#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x0067
|
||||
#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006B
|
||||
#define TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x009E
|
||||
#define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x009F
|
||||
#define TLS_DHE_RSA_WITH_AES_128_CCM 0xC09E
|
||||
#define TLS_DHE_RSA_WITH_AES_256_CCM 0xC09F
|
||||
#define TLS_DHE_RSA_WITH_AES_128_CCM_8 0xC0A2
|
||||
#define TLS_DHE_RSA_WITH_AES_256_CCM_8 0xC0A3
|
||||
#define TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x0045
|
||||
#define TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x0088
|
||||
#define TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x00BE
|
||||
#define TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x00C4
|
||||
#define TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC07C
|
||||
#define TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC07D
|
||||
#define TLS_DHE_RSA_WITH_SEED_CBC_SHA 0x009A
|
||||
#define TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 0xC044
|
||||
#define TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 0xC045
|
||||
#define TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 0xC052
|
||||
#define TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 0xC053
|
||||
#define TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 0xCCAA
|
||||
#define TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA 0x000B
|
||||
#define TLS_DH_DSS_WITH_DES_CBC_SHA 0x000C
|
||||
#define TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA 0x000D
|
||||
#define TLS_DH_DSS_WITH_AES_128_CBC_SHA 0x0030
|
||||
#define TLS_DH_DSS_WITH_AES_256_CBC_SHA 0x0036
|
||||
#define TLS_DH_DSS_WITH_AES_128_CBC_SHA256 0x003E
|
||||
#define TLS_DH_DSS_WITH_AES_256_CBC_SHA256 0x0068
|
||||
#define TLS_DH_DSS_WITH_AES_128_GCM_SHA256 0x00A4
|
||||
#define TLS_DH_DSS_WITH_AES_256_GCM_SHA384 0x00A5
|
||||
#define TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x0042
|
||||
#define TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x0085
|
||||
#define TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x00BB
|
||||
#define TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x00C1
|
||||
#define TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 0xC082
|
||||
#define TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 0xC083
|
||||
#define TLS_DH_DSS_WITH_SEED_CBC_SHA 0x0097
|
||||
#define TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 0xC03E
|
||||
#define TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 0xC03F
|
||||
#define TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 0xC058
|
||||
#define TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 0xC059
|
||||
#define TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA 0x0011
|
||||
#define TLS_DHE_DSS_WITH_DES_CBC_SHA 0x0012
|
||||
#define TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA 0x0013
|
||||
#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA 0x0032
|
||||
#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA 0x0038
|
||||
#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 0x0040
|
||||
#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 0x006A
|
||||
#define TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 0x00A2
|
||||
#define TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 0x00A3
|
||||
#define TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x0044
|
||||
#define TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x0087
|
||||
#define TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x00BD
|
||||
#define TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x00C3
|
||||
#define TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256 0xC080
|
||||
#define TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384 0xC081
|
||||
#define TLS_DHE_DSS_WITH_SEED_CBC_SHA 0x0099
|
||||
#define TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 0xC042
|
||||
#define TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 0xC043
|
||||
#define TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 0xC056
|
||||
#define TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 0xC057
|
||||
#define TLS_DH_ANON_EXPORT_WITH_RC4_40_MD5 0x0017
|
||||
#define TLS_DH_ANON_EXPORT_WITH_DES40_CBC_SHA 0x0019
|
||||
#define TLS_DH_ANON_WITH_RC4_128_MD5 0x0018
|
||||
#define TLS_DH_ANON_WITH_DES_CBC_SHA 0x001A
|
||||
#define TLS_DH_ANON_WITH_3DES_EDE_CBC_SHA 0x001B
|
||||
#define TLS_DH_ANON_WITH_AES_128_CBC_SHA 0x0034
|
||||
#define TLS_DH_ANON_WITH_AES_256_CBC_SHA 0x003A
|
||||
#define TLS_DH_ANON_WITH_AES_128_CBC_SHA256 0x006C
|
||||
#define TLS_DH_ANON_WITH_AES_256_CBC_SHA256 0x006D
|
||||
#define TLS_DH_ANON_WITH_AES_128_GCM_SHA256 0x00A6
|
||||
#define TLS_DH_ANON_WITH_AES_256_GCM_SHA384 0x00A7
|
||||
#define TLS_DH_ANON_WITH_CAMELLIA_128_CBC_SHA 0x0046
|
||||
#define TLS_DH_ANON_WITH_CAMELLIA_256_CBC_SHA 0x0089
|
||||
#define TLS_DH_ANON_WITH_CAMELLIA_128_CBC_SHA256 0x00BF
|
||||
#define TLS_DH_ANON_WITH_CAMELLIA_256_CBC_SHA256 0x00C5
|
||||
#define TLS_DH_ANON_WITH_CAMELLIA_128_GCM_SHA256 0xC084
|
||||
#define TLS_DH_ANON_WITH_CAMELLIA_256_GCM_SHA384 0xC085
|
||||
#define TLS_DH_ANON_WITH_SEED_CBC_SHA 0x009B
|
||||
#define TLS_DH_ANON_WITH_ARIA_128_CBC_SHA256 0xC046
|
||||
#define TLS_DH_ANON_WITH_ARIA_256_CBC_SHA384 0xC047
|
||||
#define TLS_DH_ANON_WITH_ARIA_128_GCM_SHA256 0xC05A
|
||||
#define TLS_DH_ANON_WITH_ARIA_256_GCM_SHA384 0xC05B
|
||||
#define TLS_ECDH_RSA_WITH_NULL_SHA 0xC00B
|
||||
#define TLS_ECDH_RSA_WITH_RC4_128_SHA 0xC00C
|
||||
#define TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 0xC00D
|
||||
#define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 0xC00E
|
||||
#define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 0xC00F
|
||||
#define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 0xC029
|
||||
#define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 0xC02A
|
||||
#define TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 0xC031
|
||||
#define TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 0xC032
|
||||
#define TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xC078
|
||||
#define TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0xC079
|
||||
#define TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC08C
|
||||
#define TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC08D
|
||||
#define TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 0xC04E
|
||||
#define TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 0xC04F
|
||||
#define TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 0xC062
|
||||
#define TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 0xC063
|
||||
#define TLS_ECDHE_RSA_WITH_NULL_SHA 0xC010
|
||||
#define TLS_ECDHE_RSA_WITH_RC4_128_SHA 0xC011
|
||||
#define TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 0xC012
|
||||
#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xC013
|
||||
#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xC014
|
||||
#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 0xC027
|
||||
#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 0xC028
|
||||
#define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xC02F
|
||||
#define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xC030
|
||||
#define TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xC076
|
||||
#define TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0xC077
|
||||
#define TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC08A
|
||||
#define TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC08B
|
||||
#define TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 0xC04C
|
||||
#define TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 0xC04D
|
||||
#define TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 0xC060
|
||||
#define TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 0xC061
|
||||
#define TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 0xCCA8
|
||||
#define TLS_ECDH_ECDSA_WITH_NULL_SHA 0xC001
|
||||
#define TLS_ECDH_ECDSA_WITH_RC4_128_SHA 0xC002
|
||||
#define TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC003
|
||||
#define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0xC004
|
||||
#define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0xC005
|
||||
#define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 0xC025
|
||||
#define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 0xC026
|
||||
#define TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0xC02D
|
||||
#define TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0xC02E
|
||||
#define TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0xC074
|
||||
#define TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0xC075
|
||||
#define TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 0xC088
|
||||
#define TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 0xC089
|
||||
#define TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 0xC04A
|
||||
#define TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 0xC04B
|
||||
#define TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 0xC05E
|
||||
#define TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 0xC05F
|
||||
#define TLS_ECDHE_ECDSA_WITH_NULL_SHA 0xC006
|
||||
#define TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 0xC007
|
||||
#define TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC008
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xC009
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xC00A
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xC023
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xC024
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xC02B
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xC02C
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_128_CCM 0xC0AC
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_256_CCM 0xC0AD
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 0xC0AE
|
||||
#define TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 0xC0AF
|
||||
#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0xC072
|
||||
#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0xC073
|
||||
#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 0xC086
|
||||
#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 0xC087
|
||||
#define TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 0xC048
|
||||
#define TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 0xC049
|
||||
#define TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 0xC05C
|
||||
#define TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 0xC05D
|
||||
#define TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 0xCCA9
|
||||
#define TLS_ECDH_ANON_WITH_NULL_SHA 0xC015
|
||||
#define TLS_ECDH_ANON_WITH_RC4_128_SHA 0xC016
|
||||
#define TLS_ECDH_ANON_WITH_3DES_EDE_CBC_SHA 0xC017
|
||||
#define TLS_ECDH_ANON_WITH_AES_128_CBC_SHA 0xC018
|
||||
#define TLS_ECDH_ANON_WITH_AES_256_CBC_SHA 0xC019
|
||||
#define TLS_PSK_WITH_NULL_SHA 0x002C
|
||||
#define TLS_PSK_WITH_NULL_SHA256 0x00B0
|
||||
#define TLS_PSK_WITH_NULL_SHA384 0x00B1
|
||||
#define TLS_PSK_WITH_RC4_128_SHA 0x008A
|
||||
#define TLS_PSK_WITH_3DES_EDE_CBC_SHA 0x008B
|
||||
#define TLS_PSK_WITH_AES_128_CBC_SHA 0x008C
|
||||
#define TLS_PSK_WITH_AES_256_CBC_SHA 0x008D
|
||||
#define TLS_PSK_WITH_AES_128_CBC_SHA256 0x00AE
|
||||
#define TLS_PSK_WITH_AES_256_CBC_SHA384 0x00AF
|
||||
#define TLS_PSK_WITH_AES_128_GCM_SHA256 0x00A8
|
||||
#define TLS_PSK_WITH_AES_256_GCM_SHA384 0x00A9
|
||||
#define TLS_PSK_WITH_AES_128_CCM 0xC0A4
|
||||
#define TLS_PSK_WITH_AES_256_CCM 0xC0A5
|
||||
#define TLS_PSK_WITH_AES_128_CCM_8 0xC0A8
|
||||
#define TLS_PSK_WITH_AES_256_CCM_8 0xC0A9
|
||||
#define TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC094
|
||||
#define TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC095
|
||||
#define TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC08E
|
||||
#define TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC08F
|
||||
#define TLS_PSK_WITH_ARIA_128_CBC_SHA256 0xC064
|
||||
#define TLS_PSK_WITH_ARIA_256_CBC_SHA384 0xC065
|
||||
#define TLS_PSK_WITH_ARIA_128_GCM_SHA256 0xC06A
|
||||
#define TLS_PSK_WITH_ARIA_256_GCM_SHA384 0xC06B
|
||||
#define TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 0xCCAB
|
||||
#define TLS_RSA_PSK_WITH_NULL_SHA 0x002E
|
||||
#define TLS_RSA_PSK_WITH_NULL_SHA256 0x00B8
|
||||
#define TLS_RSA_PSK_WITH_NULL_SHA384 0x00B9
|
||||
#define TLS_RSA_PSK_WITH_RC4_128_SHA 0x0092
|
||||
#define TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x0093
|
||||
#define TLS_RSA_PSK_WITH_AES_128_CBC_SHA 0x0094
|
||||
#define TLS_RSA_PSK_WITH_AES_256_CBC_SHA 0x0095
|
||||
#define TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 0x00B6
|
||||
#define TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 0x00B7
|
||||
#define TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 0x00AC
|
||||
#define TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 0x00AD
|
||||
#define TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC098
|
||||
#define TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC099
|
||||
#define TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC092
|
||||
#define TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC093
|
||||
#define TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 0xC068
|
||||
#define TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 0xC069
|
||||
#define TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 0xC06E
|
||||
#define TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 0xC06F
|
||||
#define TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 0xCCAE
|
||||
#define TLS_DHE_PSK_WITH_NULL_SHA 0x002D
|
||||
#define TLS_DHE_PSK_WITH_NULL_SHA256 0x00B4
|
||||
#define TLS_DHE_PSK_WITH_NULL_SHA384 0x00B5
|
||||
#define TLS_DHE_PSK_WITH_RC4_128_SHA 0x008E
|
||||
#define TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x008F
|
||||
#define TLS_DHE_PSK_WITH_AES_128_CBC_SHA 0x0090
|
||||
#define TLS_DHE_PSK_WITH_AES_256_CBC_SHA 0x0091
|
||||
#define TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 0x00B2
|
||||
#define TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 0x00B3
|
||||
#define TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 0x00AA
|
||||
#define TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 0x00AB
|
||||
#define TLS_DHE_PSK_WITH_AES_128_CCM 0xC0A6
|
||||
#define TLS_DHE_PSK_WITH_AES_256_CCM 0xC0A7
|
||||
#define TLS_DHE_PSK_WITH_AES_128_CCM_8 0xC0AA
|
||||
#define TLS_DHE_PSK_WITH_AES_256_CCM_8 0xC0AB
|
||||
#define TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC096
|
||||
#define TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC097
|
||||
#define TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC090
|
||||
#define TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC091
|
||||
#define TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 0xC066
|
||||
#define TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 0xC067
|
||||
#define TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 0xC06C
|
||||
#define TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 0xC06D
|
||||
#define TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 0xCCAD
|
||||
#define TLS_ECDHE_PSK_WITH_NULL_SHA 0xC039
|
||||
#define TLS_ECDHE_PSK_WITH_NULL_SHA256 0xC03A
|
||||
#define TLS_ECDHE_PSK_WITH_NULL_SHA384 0xC03B
|
||||
#define TLS_ECDHE_PSK_WITH_RC4_128_SHA 0xC033
|
||||
#define TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0xC034
|
||||
#define TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA 0xC035
|
||||
#define TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA 0xC036
|
||||
#define TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0xC037
|
||||
#define TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0xC038
|
||||
#define TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256 0xD001
|
||||
#define TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384 0xD002
|
||||
#define TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256 0xD005
|
||||
#define TLS_ECDHE_PSK_WITH_AES_128_CCM_8_SHA256 0xD003
|
||||
#define TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC09A
|
||||
#define TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC09B
|
||||
#define TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 0xC070
|
||||
#define TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 0xC071
|
||||
#define TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 0xCCAC
|
||||
#define TLS_KRB5_EXPORT_WITH_RC4_40_MD5 0x002B
|
||||
#define TLS_KRB5_EXPORT_WITH_RC4_40_SHA 0x0028
|
||||
#define TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 0x002A
|
||||
#define TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA 0x0027
|
||||
#define TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 0x0029
|
||||
#define TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA 0x0026
|
||||
#define TLS_KRB5_WITH_RC4_128_MD5 0x0024
|
||||
#define TLS_KRB5_WITH_RC4_128_SHA 0x0020
|
||||
#define TLS_KRB5_WITH_IDEA_CBC_MD5 0x0025
|
||||
#define TLS_KRB5_WITH_IDEA_CBC_SHA 0x0021
|
||||
#define TLS_KRB5_WITH_DES_CBC_MD5 0x0022
|
||||
#define TLS_KRB5_WITH_DES_CBC_SHA 0x001E
|
||||
#define TLS_KRB5_WITH_3DES_EDE_CBC_MD5 0x0023
|
||||
#define TLS_KRB5_WITH_3DES_EDE_CBC_SHA 0x001F
|
||||
#define TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0xC01A
|
||||
#define TLS_SRP_SHA_WITH_AES_128_CBC_SHA 0xC01D
|
||||
#define TLS_SRP_SHA_WITH_AES_256_CBC_SHA 0xC020
|
||||
#define TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0xC01B
|
||||
#define TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0xC01E
|
||||
#define TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0xC021
|
||||
#define TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0xC01C
|
||||
#define TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0xC01F
|
||||
#define TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0xC022
|
||||
#define TLS_ECCPWD_WITH_AES_128_GCM_SHA256 0xC0B0
|
||||
#define TLS_ECCPWD_WITH_AES_256_GCM_SHA384 0xC0B1
|
||||
#define TLS_ECCPWD_WITH_AES_128_CCM_SHA256 0xC0B2
|
||||
#define TLS_ECCPWD_WITH_AES_256_CCM_SHA384 0xC0B3
|
||||
#define TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC 0xC100
|
||||
#define TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC 0xC101
|
||||
#define TLS_GOSTR341112_256_WITH_28147_CNT_IMIT 0xC102
|
||||
#define TLS_AES_128_GCM_SHA256 0x1301
|
||||
#define TLS_AES_256_GCM_SHA384 0x1302
|
||||
#define TLS_AES_128_CCM_SHA256 0x1304
|
||||
#define TLS_AES_128_CCM_8_SHA256 0x1305
|
||||
#define TLS_CHACHA20_POLY1305_SHA256 0x1303
|
||||
#define TLS_SM4_GCM_SM3 0x00C6
|
||||
#define TLS_SM4_CCM_SM3 0x00C7
|
||||
#define TLS_SHA256_SHA256 0xC0B4
|
||||
#define TLS_SHA384_SHA384 0xC0B5
|
||||
#define TLS_EMPTY_RENEGOTIATION_INFO_SCSV 0x00FF
|
||||
#define TLS_FALLBACK_SCSV 0x5600
|
||||
|
||||
/* https://datatracker.ietf.org/doc/html/rfc8701 */
|
||||
#define TLS_CIPHER_GREASE_RESERVED_0 0x0A0A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_1 0x1A1A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_2 0x2A2A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_3 0x3A3A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_4 0x4A4A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_5 0x5A5A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_6 0x6A6A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_7 0x7A7A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_8 0x8A8A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_9 0x9A9A
|
||||
#define TLS_CIPHER_GREASE_RESERVED_A 0xAAAA
|
||||
#define TLS_CIPHER_GREASE_RESERVED_B 0xBABA
|
||||
#define TLS_CIPHER_GREASE_RESERVED_C 0xCACA
|
||||
#define TLS_CIPHER_GREASE_RESERVED_D 0xDADA
|
||||
#define TLS_CIPHER_GREASE_RESERVED_E 0xEAEA
|
||||
#define TLS_CIPHER_GREASE_RESERVED_F 0xFAFA
|
||||
|
||||
/* ********************************************** */
|
||||
|
||||
/* Signature algorithms */
|
||||
|
||||
#define RSA_PKCS1_SHA1 0x0201
|
||||
#define ECDSA_SHA1 0x0203
|
||||
#define RSA_PKCS1_SHA256 0x0401
|
||||
#define ECDSA_SECP256R1_SHA256 0x0403
|
||||
#define RSA_PKCS1_SHA384 0x0501
|
||||
#define ECDSA_SECP384R1_SHA384 0x0503
|
||||
#define RSA_PKCS1_SHA512 0x0601
|
||||
#define ECDSA_SECP521R1_SHA512 0x0603
|
||||
#define RSA_PSS_RSAE_SHA256 0x0804
|
||||
#define RSA_PSS_RSAE_SHA384 0x0805
|
||||
#define RSA_PSS_RSAE_SHA512 0x0806
|
||||
#define ED25519 0x0807
|
||||
#define ED448 0x0808
|
||||
#define RSA_PSS_PSS_SHA256 0x0809
|
||||
#define RSA_PSS_PSS_SHA384 0x080A
|
||||
#define RSA_PSS_PSS_SHA512 0x080B
|
||||
@@ -32,13 +32,13 @@
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include "ndpi_win32.h"
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <pthread.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -57,14 +57,16 @@
|
||||
#if defined __NetBSD__ || defined __OpenBSD__
|
||||
#include <netinet/in_systm.h>
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
#include <pthread.h>
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* Win32 */
|
||||
|
||||
#if defined __OpenBSD__
|
||||
#include "ndpi_includes_OpenBSD.h"
|
||||
#else
|
||||
typedef struct timeval pkt_timeval;
|
||||
#endif /* __OpenBSD__ */
|
||||
|
||||
#endif /* __NDPI_INCLUDES_H__ */
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* ndpi_includes_OpenBSD.h
|
||||
*
|
||||
* Copyright (C) 2011-16 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NDPI_INCLUDES_OPENBSD_H__
|
||||
#define __NDPI_INCLUDES_OPENBSD_H__
|
||||
|
||||
#ifndef IPPROTO_SCTP
|
||||
#define IPPROTO_SCTP 132
|
||||
#endif /* IPPROTO_SCTP */
|
||||
|
||||
#include <net/bpf.h>
|
||||
|
||||
typedef struct bpf_timeval pkt_timeval;
|
||||
|
||||
#endif /* __NDPI_INCLUDES_OPENBSD_H__ */
|
||||
+30
-22
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_main.h
|
||||
*
|
||||
* Copyright (C) 2011-19 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "ndpi_api.h"
|
||||
#include "ndpi_protocols.h"
|
||||
|
||||
/* used by ndpi_set_proto_subprotocols */
|
||||
#define NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS (-1)
|
||||
#define NDPI_PROTOCOL_MATCHED_BY_CONTENT (-2)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -73,7 +77,8 @@ extern "C" {
|
||||
void ndpi_set_detected_protocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int16_t upper_detected_protocol,
|
||||
u_int16_t lower_detected_protocol);
|
||||
u_int16_t lower_detected_protocol,
|
||||
ndpi_confidence_t confidence);
|
||||
|
||||
extern void ndpi_parse_packet_line_info(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow);
|
||||
@@ -83,28 +88,20 @@ extern "C" {
|
||||
extern u_int16_t ndpi_check_for_email_address(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow, u_int16_t counter);
|
||||
|
||||
extern void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int16_t upper_detected_protocol,
|
||||
u_int16_t lower_detected_protocol);
|
||||
extern void ndpi_int_change_protocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int16_t upper_detected_protocol,
|
||||
u_int16_t lower_detected_protocol);
|
||||
extern void ndpi_int_change_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
ndpi_protocol_category_t protocol_category);
|
||||
|
||||
extern void ndpi_set_proto_subprotocols(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
int protoId, ...);
|
||||
|
||||
extern void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol_breed_t protoBreed, u_int16_t protoId,
|
||||
u_int8_t can_have_a_subprotocol,
|
||||
u_int16_t tcp_alias_protoId[2],
|
||||
u_int16_t udp_alias_protoId[2], char *protoName,
|
||||
u_int8_t is_cleartext,
|
||||
ndpi_protocol_breed_t protoBreed, u_int16_t protoId, char *protoName,
|
||||
ndpi_protocol_category_t protoCategory,
|
||||
ndpi_port_range *tcpDefPorts,
|
||||
ndpi_port_range *udpDefPorts);
|
||||
|
||||
extern void ndpi_int_reset_packet_protocol(struct ndpi_packet_struct *packet);
|
||||
extern void ndpi_int_reset_protocol(struct ndpi_flow_struct *flow);
|
||||
|
||||
extern int ndpi_packet_src_ip_eql(const struct ndpi_packet_struct *packet, const ndpi_ip_addr_t * ip);
|
||||
@@ -114,6 +111,7 @@ extern "C" {
|
||||
|
||||
extern int ndpi_parse_ip_string(const char *ip_str, ndpi_ip_addr_t *parsed_ip);
|
||||
extern char *ndpi_get_ip_string(const ndpi_ip_addr_t * ip, char *buf, u_int buf_len);
|
||||
extern u_int8_t ndpi_is_ipv6(const ndpi_ip_addr_t *ip);
|
||||
|
||||
extern char* ndpi_get_proto_by_id(struct ndpi_detection_module_struct *ndpi_mod, u_int id);
|
||||
u_int16_t ndpi_get_proto_by_name(struct ndpi_detection_module_struct *ndpi_mod, const char *name);
|
||||
@@ -126,13 +124,7 @@ extern "C" {
|
||||
extern u_int8_t ndpi_is_proto(ndpi_protocol proto, u_int16_t p);
|
||||
|
||||
extern u_int16_t ndpi_get_lower_proto(ndpi_protocol p);
|
||||
extern int ndpi_get_protocol_id_master_proto(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int16_t protocol_id,
|
||||
u_int16_t** tcp_master_proto,
|
||||
u_int16_t** udp_master_proto);
|
||||
#/* NDPI_PROTOCOL_NETBIOS */
|
||||
int ndpi_netbios_name_interpret(char *in, char *out, u_int out_len);
|
||||
|
||||
|
||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||
void ndpi_debug_get_last_log_function_line(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
const char **file, const char **func, u_int32_t * line);
|
||||
@@ -149,6 +141,22 @@ extern "C" {
|
||||
#define ndpi_match_strprefix(payload, payload_len, str) \
|
||||
ndpi_match_prefix((payload), (payload_len), (str), (sizeof(str)-1))
|
||||
|
||||
int ndpi_handle_ipv6_extension_headers(u_int16_t l3len,
|
||||
const u_int8_t ** l4ptr, u_int16_t * l4len,
|
||||
u_int8_t * nxt_hdr);
|
||||
void ndpi_set_risk(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct ndpi_flow_struct *flow, ndpi_risk_enum r);
|
||||
int ndpi_isset_risk(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct ndpi_flow_struct *flow, ndpi_risk_enum r);
|
||||
int ndpi_is_printable_string(char * const str, size_t len);
|
||||
#define NDPI_ENTROPY_ENCRYPTED_OR_RANDOM(entropy) (entropy > 7.0f)
|
||||
float ndpi_entropy(u_int8_t const * const buf, size_t len);
|
||||
void load_common_alpns(struct ndpi_detection_module_struct *ndpi_str);
|
||||
u_int8_t is_a_common_alpn(struct ndpi_detection_module_struct *ndpi_str,
|
||||
const char *alpn_to_check, u_int alpn_to_check_len);
|
||||
|
||||
char *ndpi_hostname_sni_set(struct ndpi_flow_struct *flow, const u_int8_t *value, size_t value_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* ndpi_patricia_typedef.h
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: ndpi_patricia.h,v 1.6 2005/12/07 20:53:01 dplonka Exp $
|
||||
* Dave Plonka <plonka@doit.wisc.edu>
|
||||
*
|
||||
* This product includes software developed by the University of Michigan,
|
||||
* Merit Network, Inc., and their contributors.
|
||||
*
|
||||
* This file had been called "radix.h" in the MRT sources.
|
||||
*
|
||||
* I renamed it to "ndpi_patricia.h" since it's not an implementation of a general
|
||||
* radix trie. Also, pulled in various requirements from "mrt.h" and added
|
||||
* some other things it could be used as a standalone API.
|
||||
|
||||
https://github.com/deepfield/MRT/blob/master/COPYRIGHT
|
||||
|
||||
Copyright (c) 1999-2013
|
||||
|
||||
The Regents of the University of Michigan ("The Regents") and Merit
|
||||
Network, Inc.
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _NDPI_PATRICIA_TYPEDEF_H_
|
||||
#define _NDPI_PATRICIA_TYPEDEF_H_
|
||||
|
||||
/* pointer to usr data (ex. route flap info) */
|
||||
union ndpi_patricia_node_value_t {
|
||||
/* User-defined values */
|
||||
union {
|
||||
struct {
|
||||
u_int32_t user_value, additional_user_value;
|
||||
} uv32;
|
||||
|
||||
u_int64_t uv64;
|
||||
|
||||
void *user_data;
|
||||
} u;
|
||||
};
|
||||
|
||||
typedef struct _ndpi_prefix_t {
|
||||
u_int16_t family; /* AF_INET | AF_INET6 */
|
||||
u_int16_t bitlen; /* same as mask? */
|
||||
int ref_count; /* reference count */
|
||||
union {
|
||||
struct in_addr sin;
|
||||
struct in6_addr sin6;
|
||||
u_int8_t mac[6];
|
||||
} add;
|
||||
} ndpi_prefix_t;
|
||||
|
||||
typedef struct _ndpi_patricia_node_t {
|
||||
u_int16_t bit; /* flag if this node used */
|
||||
ndpi_prefix_t *prefix; /* who we are in patricia tree */
|
||||
struct _ndpi_patricia_node_t *l, *r; /* left and right children */
|
||||
struct _ndpi_patricia_node_t *parent;/* may be used */
|
||||
void *data; /* pointer to data */
|
||||
union ndpi_patricia_node_value_t value;
|
||||
} ndpi_patricia_node_t;
|
||||
|
||||
typedef struct _ndpi_patricia_tree_t {
|
||||
ndpi_patricia_node_t *head;
|
||||
u_int16_t maxbits; /* for IP, 32 bit addresses */
|
||||
int num_active_node; /* for debug purpose */
|
||||
} ndpi_patricia_tree_t;
|
||||
|
||||
#endif /* _NDPI_PATRICIA_TYPEDEF_H_ */
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
/*
|
||||
* ndpi_protocol_ids.h
|
||||
*
|
||||
* Copyright (C) 2011-19 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
@@ -23,14 +22,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __NDPI_API_H__
|
||||
#ifndef __NDPI_PROTOCOLS_IDS_H__
|
||||
#define __NDPI_PROTOCOLS_IDS_H__
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __NDPI_PROTOCOLS_DEFAULT_H__
|
||||
#define __NDPI_PROTOCOLS_DEFAULT_H__
|
||||
|
||||
#define NDPI_DETECTION_SUPPORT_IPV6
|
||||
#define NDPI_PROTOCOL_SIZE 2
|
||||
|
||||
typedef enum {
|
||||
@@ -64,7 +58,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_COAP = 27,
|
||||
NDPI_PROTOCOL_VMWARE = 28,
|
||||
NDPI_PROTOCOL_MAIL_SMTPS = 29,
|
||||
NDPI_PROTOCOL_FBZERO = 30,
|
||||
NDPI_PROTOCOL_DTLS = 30,
|
||||
NDPI_PROTOCOL_UBNTAC2 = 31, /* Ubiquity UBNT AirControl = 2 - Thomas Fjellstrom <thomas+ndpi@fjellstrom.ca> */
|
||||
NDPI_PROTOCOL_KONTIKI = 32,
|
||||
NDPI_PROTOCOL_OPENFT = 33,
|
||||
@@ -75,37 +69,37 @@ typedef enum {
|
||||
NDPI_PROTOCOL_SKYPE_CALL = 38, /* Skype call and videocalls */
|
||||
NDPI_PROTOCOL_SIGNAL = 39,
|
||||
NDPI_PROTOCOL_MEMCACHED = 40, /* Memcached - Darryl Sokoloski <darryl@egloo.ca> */
|
||||
NDPI_PROTOCOL_SMBV23 = 41, /* SMB version 2/3 */
|
||||
NDPI_PROTOCOL_SMBV23 = 41, /* SMB version 2/3 */
|
||||
NDPI_PROTOCOL_MINING = 42, /* Bitcoin, Ethereum, ZCash, Monero */
|
||||
NDPI_PROTOCOL_NEST_LOG_SINK = 43, /* Nest Log Sink (Nest Protect) - Darryl Sokoloski <darryl@egloo.ca> */
|
||||
NDPI_PROTOCOL_MODBUS = 44, /* Modbus */
|
||||
NDPI_PROTOCOL_WHATSAPP_CALL = 45, /* WhatsApp video ad audio calls go here */
|
||||
NDPI_PROTOCOL_DATASAVER = 46, /* Protocols used to save data on Internet communications */
|
||||
NDPI_PROTOCOL_DATASAVER = 46, /* Protocols used to save data on Internet communications */
|
||||
NDPI_PROTOCOL_XBOX = 47,
|
||||
NDPI_PROTOCOL_QQ = 48,
|
||||
NDPI_PROTOCOL_TIKTOK = 49,
|
||||
NDPI_PROTOCOL_RTSP = 50,
|
||||
NDPI_PROTOCOL_MAIL_IMAPS = 51,
|
||||
NDPI_PROTOCOL_ICECAST = 52,
|
||||
NDPI_PROTOCOL_PPLIVE = 53, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_CPHA = 53,
|
||||
NDPI_PROTOCOL_PPSTREAM = 54,
|
||||
NDPI_PROTOCOL_ZATTOO = 55,
|
||||
NDPI_PROTOCOL_SHOUTCAST = 56,
|
||||
NDPI_PROTOCOL_SOPCAST = 57,
|
||||
NDPI_PROTOCOL_TVANTS = 58,
|
||||
NDPI_PROTOCOL_DISCORD = 58,
|
||||
NDPI_PROTOCOL_TVUPLAYER = 59,
|
||||
NDPI_PROTOCOL_HTTP_DOWNLOAD = 60,
|
||||
NDPI_PROTOCOL_MONGODB = 60, /* Leonn Paiva <leonn.paiva@gmail.com> */
|
||||
NDPI_PROTOCOL_QQLIVE = 61,
|
||||
NDPI_PROTOCOL_THUNDER = 62,
|
||||
NDPI_PROTOCOL_SOULSEEK = 63,
|
||||
NDPI_PROTOCOL_PS_VUE = 64,
|
||||
NDPI_PROTOCOL_OCSP = 63,
|
||||
NDPI_PROTOCOL_FREE_64 = 64, /* FREE */
|
||||
NDPI_PROTOCOL_IRC = 65,
|
||||
NDPI_PROTOCOL_AYIYA = 66,
|
||||
NDPI_PROTOCOL_UNENCRYPTED_JABBER = 67,
|
||||
NDPI_PROTOCOL_MSN = 68,
|
||||
NDPI_PROTOCOL_OSCAR = 69,
|
||||
NDPI_PROTOCOL_JABBER = 67,
|
||||
NDPI_PROTOCOL_NATS = 68,
|
||||
NDPI_PROTOCOL_AMONG_US = 69, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_YAHOO = 70,
|
||||
NDPI_PROTOCOL_BATTLEFIELD = 71,
|
||||
NDPI_PROTOCOL_DISNEYPLUS = 71, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_GOOGLE_PLUS = 72,
|
||||
NDPI_PROTOCOL_IP_VRRP = 73,
|
||||
NDPI_PROTOCOL_STEAM = 74, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
@@ -124,7 +118,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_RTP = 87,
|
||||
NDPI_PROTOCOL_RDP = 88,
|
||||
NDPI_PROTOCOL_VNC = 89,
|
||||
NDPI_PROTOCOL_PCANYWHERE = 90,
|
||||
NDPI_PROTOCOL_TUMBLR = 90, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_TLS = 91,
|
||||
NDPI_PROTOCOL_SSH = 92,
|
||||
NDPI_PROTOCOL_USENET = 93,
|
||||
@@ -144,7 +138,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_FIESTA = 107,
|
||||
NDPI_PROTOCOL_FLORENSIA = 108,
|
||||
NDPI_PROTOCOL_GUILDWARS = 109,
|
||||
NDPI_PROTOCOL_HTTP_ACTIVESYNC = 110,
|
||||
NDPI_PROTOCOL_AMAZON_ALEXA = 110, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_KERBEROS = 111,
|
||||
NDPI_PROTOCOL_LDAP = 112,
|
||||
NDPI_PROTOCOL_MAPLESTORY = 113,
|
||||
@@ -159,7 +153,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_GMAIL = 122,
|
||||
NDPI_PROTOCOL_GOOGLE_MAPS = 123,
|
||||
NDPI_PROTOCOL_YOUTUBE = 124,
|
||||
NDPI_PROTOCOL_SKYPE = 125,
|
||||
NDPI_PROTOCOL_SKYPE_TEAMS = 125,
|
||||
NDPI_PROTOCOL_GOOGLE = 126,
|
||||
NDPI_PROTOCOL_DCERPC = 127,
|
||||
NDPI_PROTOCOL_NETFLOW = 128,
|
||||
@@ -187,7 +181,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_LOTUS_NOTES = 150,
|
||||
NDPI_PROTOCOL_SAP = 151,
|
||||
NDPI_PROTOCOL_GTP = 152,
|
||||
NDPI_PROTOCOL_UPNP = 153,
|
||||
NDPI_PROTOCOL_WSD = 153,
|
||||
NDPI_PROTOCOL_LLMNR = 154,
|
||||
NDPI_PROTOCOL_REMOTE_SCAN = 155,
|
||||
NDPI_PROTOCOL_SPOTIFY = 156,
|
||||
@@ -217,7 +211,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_CNN = 180, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_MEGACO = 181, /* Gianluca Costa <g.costa@xplico.org> */
|
||||
NDPI_PROTOCOL_REDIS = 182,
|
||||
NDPI_PROTOCOL_PANDO = 183, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_PINTEREST = 183, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_VHUA = 184,
|
||||
NDPI_PROTOCOL_TELEGRAM = 185, /* Gianluca Costa <g.costa@xplico.org> */
|
||||
NDPI_PROTOCOL_VEVO = 186,
|
||||
@@ -230,19 +224,19 @@ typedef enum {
|
||||
NDPI_PROTOCOL_KAKAOTALK = 193, /* KakaoTalk Chat (no voice call) */
|
||||
NDPI_PROTOCOL_KAKAOTALK_VOICE = 194, /* KakaoTalk Voice */
|
||||
NDPI_PROTOCOL_TWITCH = 195, /* Edoardo Dominici <edoaramis@gmail.com> */
|
||||
NDPI_PROTOCOL_DNS_OVER_HTTPS = 196,
|
||||
NDPI_PROTOCOL_DOH_DOT = 196, /* DoH (DNS over HTTPS), DoT (DNS over TLS), DoQ (DNS over QUIC). TODO: rename in NDPI_PROTOCOL_DOH_DOT_DOQ? */
|
||||
NDPI_PROTOCOL_WECHAT = 197,
|
||||
NDPI_PROTOCOL_MPEGTS = 198,
|
||||
NDPI_PROTOCOL_SNAPCHAT = 199,
|
||||
NDPI_PROTOCOL_SINA = 200,
|
||||
NDPI_PROTOCOL_HANGOUT_DUO = 201, /* Google Hangout ad Duo (merged as they are very similar) */
|
||||
NDPI_PROTOCOL_HANGOUT_DUO = 201, /* Google Hangout ad Duo (merged as they are very similar) */
|
||||
NDPI_PROTOCOL_IFLIX = 202, /* www.vizuamatix.com R&D team & M.Mallawaarachchie <manoj_ws@yahoo.com> */
|
||||
NDPI_PROTOCOL_GITHUB = 203,
|
||||
NDPI_PROTOCOL_BJNP = 204,
|
||||
NDPI_PROTOCOL_LINE = 205, /* https://en.wikipedia.org/wiki/Line_(software) */
|
||||
NDPI_PROTOCOL_REDDIT = 205, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_WIREGUARD = 206,
|
||||
NDPI_PROTOCOL_SMPP = 207, /* Damir Franusic <df@release14.org> */
|
||||
NDPI_PROTOCOL_DNSCRYPT = 208,
|
||||
NDPI_PROTOCOL_DNSCRYPT = 208, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_TINC = 209, /* William Guglielmo <william@deselmo.com> */
|
||||
NDPI_PROTOCOL_DEEZER = 210,
|
||||
NDPI_PROTOCOL_INSTAGRAM = 211, /* Andrea Buscarinu <andrea.buscarinu@gmail.com> */
|
||||
@@ -253,7 +247,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_IMO = 216,
|
||||
NDPI_PROTOCOL_GOOGLE_DRIVE = 217,
|
||||
NDPI_PROTOCOL_OCS = 218,
|
||||
NDPI_PROTOCOL_OFFICE_365 = 219,
|
||||
NDPI_PROTOCOL_MICROSOFT_365 = 219,
|
||||
NDPI_PROTOCOL_CLOUDFLARE = 220,
|
||||
NDPI_PROTOCOL_MS_ONE_DRIVE = 221,
|
||||
NDPI_PROTOCOL_MQTT = 222,
|
||||
@@ -270,8 +264,8 @@ typedef enum {
|
||||
NDPI_PROTOCOL_LINKEDIN = 233, /* Paulo Angelo <pa@pauloangelo.com> */
|
||||
NDPI_PROTOCOL_SOUNDCLOUD = 234,
|
||||
NDPI_PROTOCOL_CSGO = 235, /* Counter-Strike Global Offensive, Dota = 2 */
|
||||
NDPI_PROTOCOL_LISP = 236,
|
||||
NDPI_PROTOCOL_DIAMETER = 237,
|
||||
NDPI_PROTOCOL_LISP = 236,
|
||||
NDPI_PROTOCOL_DIAMETER = 237,
|
||||
NDPI_PROTOCOL_APPLE_PUSH = 238,
|
||||
NDPI_PROTOCOL_GOOGLE_SERVICES = 239,
|
||||
NDPI_PROTOCOL_AMAZON_VIDEO = 240,
|
||||
@@ -279,14 +273,55 @@ typedef enum {
|
||||
NDPI_PROTOCOL_WHATSAPP_FILES = 242, /* Videos, pictures, voice messages... */
|
||||
NDPI_PROTOCOL_TARGUS_GETDATA = 243,
|
||||
NDPI_PROTOCOL_DNP3 = 244,
|
||||
NDPI_PROTOCOL_104 = 245,
|
||||
/*
|
||||
NDPI_PROTOCOL_IEC60870 = 245, /* https://en.wikipedia.org/wiki/IEC_60870-5 */
|
||||
NDPI_PROTOCOL_BLOOMBERG = 246,
|
||||
NDPI_PROTOCOL_CAPWAP = 247,
|
||||
NDPI_PROTOCOL_ZABBIX = 248,
|
||||
NDPI_PROTOCOL_S7COMM = 249,
|
||||
NDPI_PROTOCOL_MSTEAMS = 250,
|
||||
NDPI_PROTOCOL_WEBSOCKET = 251, /* Leonn Paiva <leonn.paiva@gmail.com> */
|
||||
NDPI_PROTOCOL_ANYDESK = 252, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_SOAP = 253, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_APPLE_SIRI = 254, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_SNAPCHAT_CALL = 255,
|
||||
NDPI_PROTOCOL_HPVIRTGRP = 256, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_GENSHIN_IMPACT = 257, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_ACTIVISION = 258,
|
||||
NDPI_PROTOCOL_FORTICLIENT = 259,
|
||||
NDPI_PROTOCOL_Z3950 = 260, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_LIKEE = 261,
|
||||
NDPI_PROTOCOL_GITLAB = 262,
|
||||
NDPI_PROTOCOL_AVAST_SECUREDNS = 263, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_CASSANDRA = 264, /* Lucas Santos <lfneiva.santos@gmail.com> */
|
||||
NDPI_PROTOCOL_AMAZON_AWS = 265,
|
||||
NDPI_PROTOCOL_SALESFORCE = 266,
|
||||
NDPI_PROTOCOL_VIMEO = 267,
|
||||
NDPI_PROTOCOL_FACEBOOK_VOIP = 268,
|
||||
NDPI_PROTOCOL_SIGNAL_VOIP = 269,
|
||||
NDPI_PROTOCOL_FUZE = 270,
|
||||
NDPI_PROTOCOL_GTP_U = 271,
|
||||
NDPI_PROTOCOL_GTP_C = 272,
|
||||
NDPI_PROTOCOL_GTP_PRIME = 273,
|
||||
NDPI_PROTOCOL_ALIBABA = 274,
|
||||
NDPI_PROTOCOL_CRASHLYSTICS = 275,
|
||||
NDPI_PROTOCOL_MICROSOFT_AZURE = 276,
|
||||
NDPI_PROTOCOL_ICLOUD_PRIVATE_RELAY = 277,
|
||||
NDPI_PROTOCOL_ETHERNET_IP = 278,
|
||||
NDPI_PROTOCOL_BADOO = 279,
|
||||
NDPI_PROTOCOL_ACCUWEATHER = 280,
|
||||
NDPI_PROTOCOL_GOOGLE_CLASSROOM = 281,
|
||||
|
||||
#ifdef CUSTOM_NDPI_PROTOCOLS
|
||||
#include "../../../nDPI-custom/custom_ndpi_protocol_ids.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
IMPORTANT
|
||||
before allocating a new identifier please fill up
|
||||
one of those named NDPI_PROTOCOL_FREE_XXX and not used
|
||||
(placeholders to avoid protocol renumbering)
|
||||
*/
|
||||
|
||||
|
||||
/* IMPORTANT:NDPI_LAST_IMPLEMENTED_PROTOCOL MUST BE THE LAST ELEMENT */
|
||||
NDPI_LAST_IMPLEMENTED_PROTOCOL
|
||||
} ndpi_protocol_id_t;
|
||||
@@ -294,4 +329,5 @@ typedef enum {
|
||||
#define NDPI_PROTOCOL_NO_MASTER_PROTO NDPI_PROTOCOL_UNKNOWN
|
||||
#define NDPI_MAX_SUPPORTED_PROTOCOLS NDPI_LAST_IMPLEMENTED_PROTOCOL
|
||||
#define NDPI_MAX_NUM_CUSTOM_PROTOCOLS (NDPI_NUM_BITS-NDPI_LAST_IMPLEMENTED_PROTOCOL)
|
||||
#endif
|
||||
|
||||
#endif /* __NDPI_PROTOCOL_IDS_H__ */
|
||||
|
||||
+23
-175
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_protocols.h
|
||||
*
|
||||
* Copyright (C) 2011-19 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
@@ -51,165 +51,6 @@ u_int ndpi_search_tcp_or_udp_raw(struct ndpi_detection_module_struct *ndpi_struc
|
||||
|
||||
void ndpi_search_tcp_or_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
|
||||
/* Applications and other protocols. */
|
||||
void ndpi_search_diameter(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_lisp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_edonkey(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_fasttrack_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_directconnect(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_applejuice_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_i23v5(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_socrates(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_soulseek_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_msn(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_yahoo(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_oscar(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_irc_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_sip(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_imo(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_direct_download_link_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mail_pop_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mail_imap_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mail_smtp_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_http_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_http_subprotocol_conf(struct ndpi_detection_module_struct *ndpi_struct, char *attr, char *value, int protocol_id);
|
||||
void ndpi_search_ftp_control(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ftp_data(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_usenet_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_rtsp_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_filetopia_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_vmware(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ssl_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mms_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_icecast_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_shoutcast_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_veohtv_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_openft_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_stun(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_tvants_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_sopcast(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_tvuplayer(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ppstream(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_pplive(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_iax(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mgcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_zattoo(struct ndpi_detection_module_struct*ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_qq(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_feidian(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ayiya(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_thunder(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_activesync(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_in_non_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_vnc_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_dhcp_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_steam(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_halflife2(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_xbox(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_smb_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_telnet_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ntp_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_nfs(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_rtp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ssdp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_worldofwarcraft(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_postgres_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mysql_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_bgp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_quake(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_battlefield(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_secondlife(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_pcanywhere(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_rdp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_snmp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_kontiki(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_syslog(struct ndpi_detection_module_struct*ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_netbios(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mdns(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ipp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ldap(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_warcraft3(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_kerberos(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_xdmcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_tftp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mssql_tds(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_pptp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_stealthnet(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_dhcpv6_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_afp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_checkmk(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_aimini(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_florensia(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_maplestory(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_dofus(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_world_of_kung_fu(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_fiesta(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_crossfire_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_guildwars_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_armagetron_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_dropbox(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_citrix(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_dcerpc(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_netflow(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_sflow(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_radius(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_wsus(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_teamview(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_lotus_notes(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_gtp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_spotify(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_openvpn(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_noe(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ciscovpn(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_viber(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_teamspeak(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_corba(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_collectd(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_oracle(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_rsync(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_rtcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_skinny(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_tor(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_whois_das(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_socks5(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_socks4(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_rtmp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_pando(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_megaco(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_redis(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_zmq(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_vhua(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_telegram(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_quic(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_eaq(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_kakaotalk_voice(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mpegts(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_starcraft(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ubntac2(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_coap(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_mqtt (struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_someip (struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_rx(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_git(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_drda(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_bjnp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_smpp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_tinc(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_fix(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_csgo(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ajp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_memcached(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_nest_log_sink(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_wireguard(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_targus_getdata(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_apple_push(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_amazon_video(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
/* --- INIT FUNCTIONS --- */
|
||||
void init_diameter_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_afp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_aimini_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -217,9 +58,10 @@ void init_applejuice_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
void init_armagetron_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ayiya_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_amqp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_battlefield_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_bgp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_bittorrent_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
int ndpi_search_into_bittorrent_cache(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow,
|
||||
u_int32_t saddr, u_int16_t sport, u_int32_t daddr, u_int16_t dport);
|
||||
void init_lisp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_teredo_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ciscovpn_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -247,7 +89,6 @@ void init_guildwars_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
void init_h323_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_halflife2_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_http_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_http_activesync_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_iax_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_icecast_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ipp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -262,12 +103,11 @@ void init_mail_imap_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
void init_mail_pop_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mail_smtp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_maplestory_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mdns_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_megaco_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mgpc_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mining_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mms_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_msn_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_nats_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mpegts_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mssql_tds_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mysql_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -280,11 +120,7 @@ void init_ntp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int3
|
||||
void init_openft_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_openvpn_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_oracle_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_oscar_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_pando_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_pcanywhere_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_postgres_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_pplive_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ppstream_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_pptp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_qq_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -308,7 +144,6 @@ void init_smb_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int3
|
||||
void init_snmp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_socrates_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_sopcast_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_soulseek_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_socks_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_spotify_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ssh_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -325,11 +160,9 @@ void init_telegram_dissector(struct ndpi_detection_module_struct *ndpi_struct, u
|
||||
void init_telnet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_tftp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_thunder_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_tor_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_tvants_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_tvuplayer_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_usenet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_upnp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_wsd_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_veohtv_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_vhua_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_viber_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -341,7 +174,6 @@ void init_world_of_warcraft_dissector(struct ndpi_detection_module_struct *ndpi_
|
||||
void init_world_of_kung_fu_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_xbox_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_xdmcp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_yahoo_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_zattoo_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_zmq_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_stracraft_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -360,18 +192,34 @@ void init_fix_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int3
|
||||
void init_nintendo_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_csgo_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_checkmk_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_cpha_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_apple_push_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_amazon_video_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_whatsapp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ajp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_fbzero_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_memcached_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_nest_log_sink_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ookla_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_modbus_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_line_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_capwap_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_zabbix_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_wireguard_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_targus_getdata_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_dnp3_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_104_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_s7comm_dissector(struct ndpi_detection_module_struct *ndpi_struct,u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_websocket_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_soap_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_dnscrypt_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mongodb_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_among_us_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_hpvirtgrp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_genshin_impact_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_z3950_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_avast_securedns_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_cassandra_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
|
||||
/* ndpi_main.c */
|
||||
extern u_int32_t ndpi_ip_port_hash_funct(u_int32_t ip, u_int16_t port);
|
||||
|
||||
#endif /* __NDPI_PROTOCOLS_H__ */
|
||||
|
||||
+663
-460
File diff suppressed because it is too large
Load Diff
@@ -28,9 +28,6 @@
|
||||
#include <netinet/in.h>
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <netinet/in_systm.h>
|
||||
#if defined(__OpenBSD__)
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
|
||||
#ifndef __NDPI_UTILS_H__
|
||||
#define __NDPI_UTILS_H__
|
||||
|
||||
#include "ndpi_define.h"
|
||||
|
||||
#define MYDBG(m, ...) \
|
||||
printf(" DBG[%s:%s:%u]: \t" m "\n", __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);
|
||||
|
||||
// #define NDPI_ENABLE_DEBUG_POINTER_MESSAGES
|
||||
// #define NDPI_ENABLE_DEBUG_INFO_MESSAGES
|
||||
// #define NDPI_ENABLE_DEBUG_TRACE_MESSAGES
|
||||
|
||||
extern void printRawData(const uint8_t *ptr, size_t len);
|
||||
//extern uint8_t add_segment_to_buffer( struct ndpi_flow_struct *flow, struct ndpi_tcphdr const * tcph, uint32_t waited);
|
||||
//extern uint8_t check_for_sequence( struct ndpi_flow_struct *flow, struct ndpi_tcphdr const * tcph);
|
||||
|
||||
extern u_int8_t ndpi_ends_with(char *str, char *ends);
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
/* Can't call libc functions from kernel space, define some stub instead */
|
||||
|
||||
#define ndpi_isalpha(ch) (((ch) >= 'a' && (ch) <= 'z') || ((ch) >= 'A' && (ch) <= 'Z'))
|
||||
#define ndpi_isdigit(ch) ((ch) >= '0' && (ch) <= '9')
|
||||
#define ndpi_isspace(ch) (((ch) >= '\t' && (ch) <= '\r') || ((ch) == ' '))
|
||||
#define ndpi_isprint(ch) ((ch) >= 0x20 && (ch) <= 0x7e)
|
||||
#define ndpi_ispunct(ch) (((ch) >= '!' && (ch) <= '/') || \
|
||||
((ch) >= ':' && (ch) <= '@') || \
|
||||
((ch) >= '[' && (ch) <= '`') || \
|
||||
((ch) >= '{' && (ch) <= '~'))
|
||||
|
||||
#endif
|
||||
+19
-14
@@ -31,6 +31,8 @@
|
||||
#define __mingw_forceinline __inline__ __attribute__((__always_inline__,__gnu_inline__))
|
||||
#endif
|
||||
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT _WIN32_WINNT_WIN8
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
@@ -39,6 +41,7 @@
|
||||
#include <getopt.h> /* getopt from: http://www.pwilson.net/sample.html. */
|
||||
#include <process.h> /* for getpid() and the exec..() family */
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
@@ -48,6 +51,19 @@
|
||||
|
||||
#define IPVERSION 4 /* on *nix it is defined in netinet/ip.h */
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
|
||||
#endif
|
||||
|
||||
#ifndef IPPROTO_SCTP
|
||||
#define IPPROTO_SCTP 132
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#undef gettimeofday
|
||||
#define gettimeofday mingw_gettimeofday
|
||||
#endif
|
||||
|
||||
extern char* strsep(char **sp, char *sep);
|
||||
|
||||
typedef unsigned char u_char;
|
||||
@@ -60,21 +76,10 @@ typedef uint u_int32_t;
|
||||
typedef uint u_int;
|
||||
typedef unsigned __int64 u_int64_t;
|
||||
|
||||
#define pthread_t HANDLE
|
||||
#define pthread_mutex_t HANDLE
|
||||
#define pthread_rwlock_t pthread_mutex_t
|
||||
#define pthread_rwlock_init pthread_mutex_init
|
||||
#define pthread_rwlock_wrlock pthread_mutex_lock
|
||||
#define pthread_rwlock_rdlock pthread_mutex_lock
|
||||
#define pthread_rwlock_unlock pthread_mutex_unlock
|
||||
#define pthread_rwlock_destroy pthread_mutex_destroy
|
||||
#define gmtime_r(a, b) memcpy(b, gmtime(a), sizeof(struct tm))
|
||||
|
||||
#define gmtime_r(a, b) memcpy(b, gmtime(a), sizeof(struct tm))
|
||||
#define timegm _mkgmtime
|
||||
|
||||
#define in_addr_t unsigned long
|
||||
|
||||
extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */);
|
||||
|
||||
#define sleep(a /* sec */) waitForNextEvent(1000*a /* ms */)
|
||||
#define sleep(a /* sec */) Sleep(1000*a /* ms */)
|
||||
|
||||
#endif /* __NDPI_WIN32_H__ */
|
||||
|
||||
+23
-10
@@ -5,17 +5,18 @@
|
||||
# cd src/lib
|
||||
# make Makefile
|
||||
#
|
||||
|
||||
|
||||
AR = @AR@
|
||||
CC = @CC@
|
||||
RANLIB = @RANLIB@
|
||||
#
|
||||
# Installation directories
|
||||
#
|
||||
prefix = @prefix@
|
||||
libdir = ${prefix}/lib
|
||||
includedir = ${prefix}/include/ndpi
|
||||
CC = @CC@
|
||||
CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 -g -Wall
|
||||
RANLIB = ranlib
|
||||
CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @CFLAGS@ @CUSTOM_NDPI@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @ADDITIONAL_LIBS@ @LIBS@
|
||||
|
||||
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) $(patsubst ./%.c, ./%.o, $(wildcard ./*.c))
|
||||
HEADERS = $(wildcard ../include/*.h)
|
||||
@@ -28,32 +29,44 @@ NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
|
||||
ifneq ($(OS),Windows_NT)
|
||||
OS := $(shell uname)
|
||||
endif
|
||||
BUILD_MINGW = @BUILD_MINGW@
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
CC=clang
|
||||
SONAME_FLAG=
|
||||
else
|
||||
ifneq ($(BUILD_MINGW),)
|
||||
NDPI_LIB_SHARED_BASE = libndpi
|
||||
NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE)-@NDPI_VERSION_SHORT@.dll
|
||||
else
|
||||
SONAME_FLAG=-Wl,-soname,$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
|
||||
endif
|
||||
endif
|
||||
|
||||
all: $(NDPI_LIBS)
|
||||
|
||||
ndpi_main.c: ndpi_content_match.c.inc
|
||||
|
||||
$(NDPI_LIB_STATIC): $(OBJECTS)
|
||||
ar rc $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
$(AR) rc $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(NDPI_LIB_SHARED): $(OBJECTS)
|
||||
$(CC) -shared -fPIC $(SONAME_FLAG) -o $@ $(OBJECTS)
|
||||
$(CC) -shared -fPIC $(SONAME_FLAG) -o $@ $(LDFLAGS) $(OBJECTS) $(LIBS)
|
||||
ln -fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
|
||||
ln -fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
|
||||
|
||||
%.o: %.c $(HEADERS) Makefile
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
/bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo $(NDPI_LIB_SHARED)
|
||||
/bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo libndpi.so*
|
||||
|
||||
distdir:
|
||||
cp ndpi_content_match.c.inc '$(distdir)/'
|
||||
find . -type d | xargs -I'{}' mkdir -p '$(distdir)/{}'
|
||||
find ../include -type f -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
find . -type f -name '*.c' -o -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile
|
||||
|
||||
+1253
-33
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* ndpi_utils.c
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_UNKNOWN
|
||||
|
||||
#include "ndpi_config.h"
|
||||
#include "ndpi_api.h"
|
||||
#include "ndpi_includes.h"
|
||||
#include "ndpi_encryption.h"
|
||||
|
||||
#include "third_party/include/roaring.h"
|
||||
#include "third_party/src/roaring.cc"
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
ndpi_bitmap* ndpi_bitmap_alloc() {
|
||||
return((ndpi_bitmap*)roaring_bitmap_create());
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
void ndpi_bitmap_free(ndpi_bitmap* b) {
|
||||
roaring_bitmap_free((const roaring_bitmap_t *)b);
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
u_int64_t ndpi_bitmap_cardinality(ndpi_bitmap* b) {
|
||||
return(roaring_bitmap_get_cardinality((const roaring_bitmap_t *)b));
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
void ndpi_bitmap_set(ndpi_bitmap* b, u_int32_t value) {
|
||||
roaring_bitmap_add((roaring_bitmap_t *)b, value);
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
void ndpi_bitmap_unset(ndpi_bitmap* b, u_int32_t value) {
|
||||
roaring_bitmap_remove((roaring_bitmap_t *)b, value);
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
bool ndpi_bitmap_isset(ndpi_bitmap* b, u_int32_t value) {
|
||||
return(roaring_bitmap_contains((const roaring_bitmap_t *)b, value));
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
void ndpi_bitmap_clear(ndpi_bitmap* b) {
|
||||
roaring_bitmap_clear((roaring_bitmap_t *)b);
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
size_t ndpi_bitmap_serialize(ndpi_bitmap* b, char **buf) {
|
||||
const roaring_bitmap_t *r = (const roaring_bitmap_t *)b;
|
||||
size_t s = roaring_bitmap_size_in_bytes(r);
|
||||
|
||||
*buf = (char*)ndpi_malloc(s);
|
||||
|
||||
if((*buf) == NULL) return(0);
|
||||
|
||||
return(roaring_bitmap_serialize(r, *buf));
|
||||
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
ndpi_bitmap* ndpi_bitmap_deserialize(char *buf) {
|
||||
return((ndpi_bitmap*)roaring_bitmap_deserialize(buf));
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
/* b = b & b_and */
|
||||
void ndpi_bitmap_and(ndpi_bitmap* a, ndpi_bitmap* b_and) {
|
||||
roaring_bitmap_and_inplace((ndpi_bitmap*)a, (ndpi_bitmap*)b_and);
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
/* b = b | b_or */
|
||||
void ndpi_bitmap_or(ndpi_bitmap* a, ndpi_bitmap* b_or) {
|
||||
roaring_bitmap_or_inplace((ndpi_bitmap*)a, (ndpi_bitmap*)b_or);
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
ndpi_bitmap_iterator* ndpi_bitmap_iterator_alloc(ndpi_bitmap* b) {
|
||||
return(roaring_create_iterator((ndpi_bitmap*)b));
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
void ndpi_bitmap_iterator_free(ndpi_bitmap* b) {
|
||||
return(roaring_free_uint32_iterator((ndpi_bitmap*)b));
|
||||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
/* Return the next value in the bitmap iterator
|
||||
|
||||
true is returned when a value is present, false when we reached the end
|
||||
*/
|
||||
bool ndpi_bitmap_iterator_next(ndpi_bitmap_iterator* i, uint32_t *value) {
|
||||
uint32_t num = roaring_read_uint32_iterator((roaring_uint32_iterator_t*)i, value, 1);
|
||||
|
||||
return((num == 1) ? true /* found */ : false /* not found */);
|
||||
}
|
||||
+475
-467
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,380 @@
|
||||
/*
|
||||
* ndpi_community_id.c
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "ndpi_config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "ndpi_api.h"
|
||||
#include "ndpi_config.h"
|
||||
#include "ndpi_includes.h"
|
||||
|
||||
#include <time.h>
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#include "ndpi_sha1.h"
|
||||
|
||||
#define NDPI_ICMP6_ECHO_REQUEST 128
|
||||
#define NDPI_ICMP6_ECHO_REPLY 129
|
||||
#define NDPI_MLD_LISTENER_QUERY 130
|
||||
#define NDPI_MLD_LISTENER_REPORT 131
|
||||
|
||||
#define NDPI_ROUTER_SOLICIT 133
|
||||
#define NDPI_ROUTER_ADVERT 134
|
||||
#define NDPI_NEIGHBOR_SOLICIT 135
|
||||
#define NDPI_NEIGHBOR_ADVERT 136
|
||||
|
||||
#define NDPI_ICMP_ECHOREPLY 0
|
||||
#define NDPI_ICMP_ECHO 8
|
||||
#define NDPI_ICMP_ROUTERADVERT 9
|
||||
#define NDPI_ICMP_ROUTERSOLICIT 10
|
||||
#define NDPI_ICMP_TIMESTAMP 13
|
||||
#define NDPI_ICMP_TIMESTAMPREPLY 14
|
||||
#define NDPI_ICMP_INFO_REQUEST 15
|
||||
#define NDPI_ICMP_INFO_REPLY 16
|
||||
#define NDPI_ICMP_MASKREQ 17
|
||||
#define NDPI_ICMP_MASKREPLY 18
|
||||
|
||||
#define NDPI_ICMP6_WRUREQUEST 139
|
||||
#define NDPI_ICMP6_WRUREPLY 140
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
static u_int16_t ndpi_community_id_buf_copy(u_int8_t * const dst, const void * const src, u_int16_t len) {
|
||||
if(src)
|
||||
memcpy(dst, src, len);
|
||||
else
|
||||
memset(dst, 0, len);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
/*
|
||||
https://github.com/corelight/community-id-spec/blob/bda913f617389df07cdaa23606e11bbd318e265c/community-id.py#L56
|
||||
*/
|
||||
static u_int8_t ndpi_community_id_icmp_type_to_code_v4(u_int8_t icmp_type, u_int8_t icmp_code, int *is_one_way) {
|
||||
*is_one_way = 0;
|
||||
|
||||
switch(icmp_type) {
|
||||
case NDPI_ICMP_ECHO:
|
||||
return NDPI_ICMP_ECHOREPLY;
|
||||
case NDPI_ICMP_ECHOREPLY:
|
||||
return NDPI_ICMP_ECHO;
|
||||
case NDPI_ICMP_TIMESTAMP:
|
||||
return NDPI_ICMP_TIMESTAMPREPLY;
|
||||
case NDPI_ICMP_TIMESTAMPREPLY:
|
||||
return NDPI_ICMP_TIMESTAMP;
|
||||
case NDPI_ICMP_INFO_REQUEST:
|
||||
return NDPI_ICMP_INFO_REPLY;
|
||||
case NDPI_ICMP_INFO_REPLY:
|
||||
return NDPI_ICMP_INFO_REQUEST;
|
||||
case NDPI_ICMP_ROUTERSOLICIT:
|
||||
return NDPI_ICMP_ROUTERADVERT;
|
||||
case NDPI_ICMP_ROUTERADVERT:
|
||||
return NDPI_ICMP_ROUTERSOLICIT;
|
||||
case NDPI_ICMP_MASKREQ:
|
||||
return NDPI_ICMP_MASKREPLY;
|
||||
case NDPI_ICMP_MASKREPLY:
|
||||
return NDPI_ICMP_MASKREQ;
|
||||
default:
|
||||
*is_one_way = 1;
|
||||
return icmp_code;
|
||||
}
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
/*
|
||||
https://github.com/corelight/community-id-spec/blob/bda913f617389df07cdaa23606e11bbd318e265c/community-id.py#L83
|
||||
*/
|
||||
static u_int8_t ndpi_community_id_icmp_type_to_code_v6(u_int8_t icmp_type, u_int8_t icmp_code, int *is_one_way) {
|
||||
*is_one_way = 0;
|
||||
|
||||
switch(icmp_type) {
|
||||
case NDPI_ICMP6_ECHO_REQUEST:
|
||||
return NDPI_ICMP6_ECHO_REPLY;
|
||||
case NDPI_ICMP6_ECHO_REPLY:
|
||||
return NDPI_ICMP6_ECHO_REQUEST;
|
||||
case NDPI_ROUTER_SOLICIT:
|
||||
return NDPI_ROUTER_ADVERT;
|
||||
case NDPI_ROUTER_ADVERT:
|
||||
return NDPI_ROUTER_SOLICIT;
|
||||
case NDPI_NEIGHBOR_SOLICIT:
|
||||
return NDPI_NEIGHBOR_ADVERT;
|
||||
case NDPI_NEIGHBOR_ADVERT:
|
||||
return NDPI_NEIGHBOR_SOLICIT;
|
||||
case NDPI_MLD_LISTENER_QUERY:
|
||||
return NDPI_MLD_LISTENER_REPORT;
|
||||
case NDPI_MLD_LISTENER_REPORT:
|
||||
return NDPI_MLD_LISTENER_QUERY;
|
||||
case NDPI_ICMP6_WRUREQUEST:
|
||||
return NDPI_ICMP6_WRUREPLY;
|
||||
case NDPI_ICMP6_WRUREPLY:
|
||||
return NDPI_ICMP6_WRUREQUEST;
|
||||
// Home Agent Address Discovery Request Message and reply
|
||||
case 144:
|
||||
return 145;
|
||||
case 145:
|
||||
return 144;
|
||||
default:
|
||||
*is_one_way = 1;
|
||||
return icmp_code;
|
||||
}
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
/*
|
||||
https://github.com/corelight/community-id-spec/blob/bda913f617389df07cdaa23606e11bbd318e265c/community-id.py#L164
|
||||
*/
|
||||
static int ndpi_community_id_peer_v4_is_less_than(u_int32_t ip1, u_int32_t ip2, u_int16_t p1, u_int16_t p2) {
|
||||
int comp = memcmp(&ip1, &ip2, sizeof(u_int32_t));
|
||||
return comp < 0 || (comp == 0 && p1 < p2);
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
static int ndpi_community_id_peer_v6_is_less_than(struct ndpi_in6_addr *ip1, struct ndpi_in6_addr *ip2, u_int16_t p1, u_int16_t p2) {
|
||||
int comp = memcmp(ip1, ip2, sizeof(struct ndpi_in6_addr));
|
||||
|
||||
return comp < 0 || (comp == 0 && p1 < p2);
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
void ndpi_string_sha1_hash(const uint8_t *message, size_t len, u_char *hash /* 20-bytes */) {
|
||||
SHA1_CTX ctx;
|
||||
|
||||
SHA1Init(&ctx);
|
||||
SHA1Update(&ctx, message, len);
|
||||
SHA1Final(hash, &ctx);
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
/*
|
||||
https://github.com/corelight/community-id-spec/blob/bda913f617389df07cdaa23606e11bbd318e265c/community-id.py#L285
|
||||
*/
|
||||
static int ndpi_community_id_finalize_and_compute_hash(u_int8_t *comm_buf, u_int16_t off, u_int8_t l4_proto,
|
||||
u_int16_t src_port, u_int16_t dst_port,
|
||||
char *hash_buf, size_t hash_buf_len) {
|
||||
u_int8_t pad = 0;
|
||||
uint32_t hash[5];
|
||||
char *community_id;
|
||||
|
||||
/* L4 proto */
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], &l4_proto, sizeof(l4_proto));
|
||||
|
||||
/* Pad */
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], &pad, sizeof(pad));
|
||||
|
||||
/* Source and destination ports */
|
||||
switch(l4_proto) {
|
||||
case IPPROTO_ICMP:
|
||||
case IPPROTO_ICMPV6:
|
||||
case IPPROTO_SCTP:
|
||||
case IPPROTO_UDP:
|
||||
case IPPROTO_TCP:
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], &src_port, sizeof(src_port));
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], &dst_port, sizeof(dst_port));
|
||||
break;
|
||||
}
|
||||
|
||||
/* Compute SHA1 */
|
||||
ndpi_string_sha1_hash(comm_buf, off, (u_char*)hash);
|
||||
|
||||
/* Base64 encoding */
|
||||
community_id = ndpi_base64_encode((u_int8_t*)hash, sizeof(hash));
|
||||
|
||||
if(community_id == NULL)
|
||||
return -1;
|
||||
|
||||
#if 0 /* Debug Info */
|
||||
printf("Hex output: ");
|
||||
for(int i = 0; i < off; i++)
|
||||
printf("%.2x ", comm_buf[i]);
|
||||
printf("\n");
|
||||
|
||||
printf("Sha1 sum: ");
|
||||
for(int i = 0; i < 5; i++)
|
||||
printf("%.2x ", ntohl(hash[i]));
|
||||
printf("\n");
|
||||
|
||||
printf("Base64: %s\n", community_id);
|
||||
#endif
|
||||
|
||||
if(hash_buf_len < 2 || hash_buf_len-2 < strlen(community_id)+1) {
|
||||
ndpi_free(community_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Writing hash */
|
||||
hash_buf[0] = '1';
|
||||
hash_buf[1] = ':';
|
||||
strcpy(&hash_buf[2], community_id);
|
||||
ndpi_free(community_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
/*
|
||||
NOTE:
|
||||
- Leave fields empty/zero when information is missing (e.g. with ICMP ports are zero)
|
||||
- The hash_buf most be 30+1 bits or longer
|
||||
- Return code: 0 = OK, -1 otherwise
|
||||
*/
|
||||
|
||||
int ndpi_flowv4_flow_hash(u_int8_t l4_proto, u_int32_t src_ip, u_int32_t dst_ip,
|
||||
u_int16_t src_port, u_int16_t dst_port,
|
||||
u_int8_t icmp_type, u_int8_t icmp_code,
|
||||
u_char *hash_buf, u_int8_t hash_buf_len) {
|
||||
/*
|
||||
Input buffer (40 bytes)
|
||||
2 - Seed
|
||||
16 - IPv6 src
|
||||
16 - IPv6 dst
|
||||
1 - L4 proto
|
||||
1 - Pad
|
||||
2 - Port src
|
||||
2 - Port dst
|
||||
*/
|
||||
u_int8_t comm_buf[40] = { 0 };
|
||||
u_int16_t off = 0;
|
||||
u_int16_t seed = 0;
|
||||
u_int32_t *ip_a_ptr, *ip_b_ptr;
|
||||
u_int16_t port_a, port_b;
|
||||
int icmp_one_way = 0;
|
||||
|
||||
/* Adjust the ports according to the specs */
|
||||
switch(l4_proto) {
|
||||
case IPPROTO_ICMP:
|
||||
src_port = icmp_type;
|
||||
dst_port = ndpi_community_id_icmp_type_to_code_v4(icmp_type, icmp_code, &icmp_one_way);
|
||||
break;
|
||||
case IPPROTO_SCTP:
|
||||
case IPPROTO_UDP:
|
||||
case IPPROTO_TCP:
|
||||
/* src/dst port ok */
|
||||
break;
|
||||
default:
|
||||
src_port = dst_port = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Convert tuple to NBO */
|
||||
src_ip = htonl(src_ip);
|
||||
dst_ip = htonl(dst_ip);
|
||||
src_port = htons(src_port);
|
||||
dst_port = htons(dst_port);
|
||||
|
||||
/*
|
||||
The community id hash doesn't have the definition of client and server, it just sorts IP addresses
|
||||
and ports to make sure the smaller ip address is the first. This performs this check and
|
||||
possibly swap client ip and port.
|
||||
*/
|
||||
if(icmp_one_way || ndpi_community_id_peer_v4_is_less_than(src_ip, dst_ip, src_port, dst_port)) {
|
||||
ip_a_ptr = &src_ip, ip_b_ptr = &dst_ip;
|
||||
port_a = src_port, port_b = dst_port;
|
||||
} else {
|
||||
/* swap flow peers */
|
||||
ip_a_ptr = &dst_ip, ip_b_ptr = &src_ip;
|
||||
port_a = dst_port, port_b = src_port;
|
||||
}
|
||||
|
||||
/* Seed */
|
||||
off = ndpi_community_id_buf_copy(&comm_buf[off], &seed, sizeof(seed));
|
||||
|
||||
/* Source and destination IPs */
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], ip_a_ptr, sizeof(src_ip));
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], ip_b_ptr, sizeof(dst_ip));
|
||||
|
||||
return ndpi_community_id_finalize_and_compute_hash(comm_buf, off,
|
||||
l4_proto, port_a, port_b, (char*)hash_buf, hash_buf_len);
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
||||
int ndpi_flowv6_flow_hash(u_int8_t l4_proto, struct ndpi_in6_addr *src_ip, struct ndpi_in6_addr *dst_ip,
|
||||
u_int16_t src_port, u_int16_t dst_port,
|
||||
u_int8_t icmp_type, u_int8_t icmp_code,
|
||||
u_char *hash_buf, u_int8_t hash_buf_len) {
|
||||
u_int8_t comm_buf[40] = { 0 };
|
||||
u_int16_t off = 0;
|
||||
u_int16_t seed = 0;
|
||||
struct ndpi_in6_addr *ip_a_ptr, *ip_b_ptr;
|
||||
u_int16_t port_a, port_b;
|
||||
int icmp_one_way = 0;
|
||||
|
||||
switch(l4_proto) {
|
||||
case IPPROTO_ICMPV6:
|
||||
src_port = icmp_type;
|
||||
dst_port = ndpi_community_id_icmp_type_to_code_v6(icmp_type, icmp_code, &icmp_one_way);
|
||||
break;
|
||||
case IPPROTO_SCTP:
|
||||
case IPPROTO_UDP:
|
||||
case IPPROTO_TCP:
|
||||
/* src/dst port ok */
|
||||
break;
|
||||
default:
|
||||
src_port = dst_port = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Convert tuple to NBO */
|
||||
src_port = htons(src_port);
|
||||
dst_port = htons(dst_port);
|
||||
|
||||
if(icmp_one_way || ndpi_community_id_peer_v6_is_less_than(src_ip, dst_ip, src_port, dst_port)) {
|
||||
ip_a_ptr = src_ip, ip_b_ptr = dst_ip;
|
||||
port_a = src_port, port_b = dst_port;
|
||||
} else {
|
||||
ip_a_ptr = dst_ip, ip_b_ptr = src_ip;
|
||||
port_a = dst_port, port_b = src_port;
|
||||
}
|
||||
|
||||
/* Seed */
|
||||
off = ndpi_community_id_buf_copy(&comm_buf[off], &seed, sizeof(seed));
|
||||
|
||||
/* Source and destination IPs */
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], ip_a_ptr, sizeof(struct ndpi_in6_addr));
|
||||
off += ndpi_community_id_buf_copy(&comm_buf[off], ip_b_ptr, sizeof(struct ndpi_in6_addr));
|
||||
|
||||
return ndpi_community_id_finalize_and_compute_hash(comm_buf, off,
|
||||
l4_proto, port_a, port_b, (char*)hash_buf, hash_buf_len);
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
+8931
-7542
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user