Prevents unnecessary strdups when parsing ZMQ flows

This commit is contained in:
Simone Mainardi 2019-05-03 21:47:20 +02:00
parent e78e5d8f5d
commit 1813aa23dd
2 changed files with 8 additions and 15 deletions

View file

@ -39,7 +39,7 @@ class ZMQParserInterface : public ParserInterface {
bool getKeyId(char *sym, u_int32_t * const pen, u_int32_t * const field) const;
void addMapping(const char *sym, u_int32_t num, u_int32_t pen = 0);
bool parsePENZeroField(Parsed_Flow * const flow, u_int32_t field, const char * const value) const;
bool parsePENNtopField(Parsed_Flow * const flow, u_int32_t field, const char * const value) const;
bool parsePENNtopField(Parsed_Flow * const flow, u_int32_t field, const char * const value, json_object * const jvalue) const;
static bool parseContainerInfo(json_object *jo, ContainerInfo * const container_info);
bool parseNProbeMiniField(Parsed_Flow * const flow, const char * const key, const char * const value, json_object * const jvalue) const;
void parseSingleFlow(json_object *o, u_int8_t source_id, NetworkInterface *iface);