Skip to content

Commit 195048f

Browse files
committed
Make g_inet_flow_parse_ip available
1 parent 45abaed commit 195048f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

ginetflow.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,15 @@ static gboolean flow_parse_ip(GInetTuple * f, const guint8 * data, guint32 lengt
561561
return TRUE;
562562
}
563563

564+
GInetTuple *g_inet_flow_parse_ip(const guint8 * iphdr, guint length, GInetFragList * fragments,
565+
GInetTuple * result, gboolean inspect_tunnel)
566+
{
567+
if (!result)
568+
result = calloc(1, sizeof(GInetTuple));
569+
flow_parse_ip(result, iphdr, length, 0, fragments, NULL, 0, NULL, inspect_tunnel);
570+
return result;
571+
}
572+
564573
static gboolean flow_parse(GInetTuple * f, const guint8 * data, guint32 length,
565574
guint16 hash, GInetFragList * fragments, const uint8_t ** iphr,
566575
guint64 ts, guint16 * flags, gboolean tunnel)

ginetflow.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ void g_inet_flow_close(GInetFlowTable * table, GInetFlow * flow);
6868
* to return. */
6969
GInetTuple *g_inet_flow_parse(const guint8 * frame, guint length, GInetFragList * fragments,
7070
GInetTuple * result, gboolean inspect_tunnel);
71+
GInetTuple *g_inet_flow_parse_ip(const guint8 * iphdr, guint length, GInetFragList * fragments,
72+
GInetTuple * result, gboolean inspect_tunnel);
7173

7274
typedef void (*GIFFunc) (GInetFlow * flow, gpointer user_data);
7375
void g_inet_flow_foreach(GInetFlowTable * table, GIFFunc func, gpointer user_data);

0 commit comments

Comments
 (0)