mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 15:09:33 +00:00
* added feature sorting flows by protocol * changed protocols comparison order * initial commit for bitmap of server ports * bitmap added to redis * added debug string, bitmap not working * Update ServerPortsBitmap.cpp * updated bitmapserverports * added restore function
21 lines
572 B
C++
21 lines
572 B
C++
#ifndef _SERVER_PORTS_BITMAP_H_
|
|
#define _SERVER_PORTS_BITMAP_H_
|
|
|
|
#include "ntop_includes.h"
|
|
|
|
class ServerPortsBitmap {
|
|
private:
|
|
ndpi_bitmap *tcp_bitmap, *udp_bitmap;
|
|
const char* bitmap_serialize(ndpi_bitmap* bitmap);
|
|
void bitmap_deserialize(const char* tcp_str, const char* udp_str);
|
|
|
|
public:
|
|
ServerPortsBitmap();
|
|
~ServerPortsBitmap();
|
|
|
|
inline void addPort(bool isTCP, u_int16_t port) { ndpi_bitmap_set((isTCP ? tcp_bitmap : udp_bitmap), port); };
|
|
const char* serializer();
|
|
bool deserializer(const char* json_str);
|
|
};
|
|
|
|
#endif /*_SERVER_PORTS_BITMAP_H_*/
|