Reworked nDPI stats (and dependencies)

Removed deserialization code
This commit is contained in:
Luca Deri 2023-04-08 14:03:01 +02:00
parent 8746498939
commit dfb41880d5
61 changed files with 1352 additions and 1904 deletions

View file

@ -90,24 +90,9 @@ class AutonomousSystem : public GenericHashEntry,
virtual void updateStats(const struct timeval *tv);
inline void deserialize(json_object *obj) {
GenericHashEntry::deserialize(obj);
GenericTrafficElement::deserialize(obj, iface);
}
inline void serialize(json_object *obj, DetailsLevel details_level) {
GenericHashEntry::getJSONObject(obj, details_level);
GenericTrafficElement::getJSONObject(obj, iface);
}
inline char *getSerializationKey(char *buf, uint bufsize) {
snprintf(buf, bufsize, AS_SERIALIZED_KEY, iface->get_id(), asn);
return (buf);
}
inline u_int32_t getTotalAlertedNumFlowsAsClient() const {
return (alerted_flows_as_client);
};
inline u_int32_t getTotalAlertedNumFlowsAsServer() const {
return (alerted_flows_as_server);
};
inline char* getSerializationKey(char *buf, uint bufsize) { snprintf(buf, bufsize, AS_SERIALIZED_KEY, iface->get_id(), asn); return(buf); }
inline u_int32_t getTotalAlertedNumFlowsAsClient() const { return(alerted_flows_as_client); };
inline u_int32_t getTotalAlertedNumFlowsAsServer() const { return(alerted_flows_as_server); };
};
#endif /* _AUTONOMOUS_SYSTEM_H_ */