openbsd-ports/net/ntopng/patches/patch-src_DummyInterface_cpp
sthen 4cef38f09a import ports/net/ntopng, feedback/ok jca
ntopng is a network traffic probe that shows network usage in a high level
of detail. It provides a web-based UI allowing you to visualize traffic flows
broken down by host, country, port, application (via deep packet inspection),
AS number, etc. Flow information can also be dumped to ElasticSearch or
MySQL/MariaDB.

User guide: https://github.com/ntop/ntopng/blob/dev/doc/UserGuide.pdf
2016-04-26 20:56:01 +00:00

18 lines
1022 B
Plaintext

$OpenBSD: patch-src_DummyInterface_cpp,v 1.1.1.1 2016/04/26 20:56:01 sthen Exp $
--- src/DummyInterface.cpp.orig Tue Apr 26 17:57:19 2016
+++ src/DummyInterface.cpp Tue Apr 26 17:57:48 2016
@@ -44,11 +44,11 @@ void DummyInterface::forgeFlow(u_int iteration) {
u_int16_t sport = 1234+i, dport = 80;
snprintf(payload, sizeof(payload),
- "{\"8\":\"%s\",\"12\":\"%s\",\"10\":0,\"14\":0,\"2\":%u,\"1\":%u,\"22\":%lu,\"21\":%lu,\"7\":%u,\"11\":%u,\"6\":0,\"4\":17,\"5\":0,\"16\":0,\"17\":0,\"9\":0,\"13\":0,\"42\":297}",
+ "{\"8\":\"%s\",\"12\":\"%s\",\"10\":0,\"14\":0,\"2\":%u,\"1\":%u,\"22\":%llu,\"21\":%llu,\"7\":%u,\"11\":%u,\"6\":0,\"4\":17,\"5\":0,\"16\":0,\"17\":0,\"9\":0,\"13\":0,\"42\":297}",
Utils::intoaV4(srcIp, a, sizeof(a)),
Utils::intoaV4(dstIp, b, sizeof(b)),
iteration, iteration*1500,
- now-60, now, sport, dport);
+ (long long)now-60, (long long)now, sport, dport);
parseFlow(payload, sizeof(payload), 1 /* source_id */, this /* iface */);
}