flow: add function to say if there is gap

pull/7959/head
Eric Leblond 3 years ago committed by Victor Julien
parent e6768118da
commit f9faff5c4c

@ -187,6 +187,23 @@ int FlowHasAlerts(const Flow *f)
return 0;
}
bool FlowHasGaps(const Flow *f, uint8_t way)
{
if (f->proto == IPPROTO_TCP) {
TcpSession *ssn = (TcpSession *)f->protoctx;
if (ssn != NULL) {
if (way == STREAM_TOCLIENT) {
if (ssn->server.flags & STREAMTCP_STREAM_FLAG_HAS_GAP)
return 1;
} else {
if (ssn->client.flags & STREAMTCP_STREAM_FLAG_HAS_GAP)
return 1;
}
}
}
return 0;
}
/** \brief Set flag to indicate to change proto for the flow
*
* \param f flow

@ -568,6 +568,7 @@ void FlowShutdown(void);
void FlowSetIPOnlyFlag(Flow *, int);
void FlowSetHasAlertsFlag(Flow *);
int FlowHasAlerts(const Flow *);
bool FlowHasGaps(const Flow *, uint8_t way);
void FlowSetChangeProtoFlag(Flow *);
void FlowUnsetChangeProtoFlag(Flow *);
int FlowChangeProto(Flow *);

Loading…
Cancel
Save