This patch adds a parent_id field to the Flow structure that
contain the flow ID of the parent connection for protocol with
dynamic parallel connection opening like FTP.
SC_ATOMIC_INIT((f)->flow_state); \
SC_ATOMIC_INIT((f)->use_cnt); \
(f)->tenant_id = 0; \
+ (f)->parent_id = 0; \
(f)->probing_parser_toserver_alproto_masks = 0; \
(f)->probing_parser_toclient_alproto_masks = 0; \
(f)->flags = 0; \
SC_ATOMIC_RESET((f)->flow_state); \
SC_ATOMIC_RESET((f)->use_cnt); \
(f)->tenant_id = 0; \
+ (f)->parent_id = 0; \
(f)->probing_parser_toserver_alproto_masks = 0; \
(f)->probing_parser_toclient_alproto_masks = 0; \
(f)->flags = 0; \
uint32_t flags; /**< generic flags */
+ /* Parent flow id for protocol like ftp */
+ int64_t parent_id;
+
uint16_t file_flags; /**< file tracking/extraction flags */
/* coccinelle: Flow:file_flags:FLOWFILE_ */
return;
int64_t flow_id = FlowGetId(f);
json_object_set_new(js, "flow_id", json_integer(flow_id));
+ if (f->parent_id) {
+ json_object_set_new(js, "parent_id", json_integer(f->parent_id));
+ }
}
json_t *CreateJSONHeader(const Packet *p, int direction_sensitive,