Skip to content

Commit

Permalink
Add IP version in json output
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Mar 29, 2024
1 parent 98b1928 commit c6ea78a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/output/output_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ static void stringEXipv4Flow(FILE *stream, void *extensionRecord, const char *in
LookupV4Location(ipv4Flow->dstAddr, dloc, 128);

fprintf(stream,
"%s\"ip_version\" : \"%u\"%s"
"%s\"src4_addr\" : \"%s\"%s"
"%s\"dst4_addr\" : \"%s\"%s"
"%s\"src_geo\" : \"%s\"%s"
"%s\"dst_geo\" : \"%s\"%s",
indent, as, fs, indent, ds, fs, indent, sloc, fs, indent, dloc, fs);
indent, 4, fs, indent, as, fs, indent, ds, fs, indent, sloc, fs, indent, dloc, fs);

} // End of stringEXipv4Flow

Expand All @@ -148,11 +149,12 @@ static void stringEXipv6Flow(FILE *stream, void *extensionRecord, const char *in
LookupV6Location(ipv6Flow->dstAddr, dloc, 128);

fprintf(stream,
"%s\"ip_version\" : \"%u\"%s"
"%s\"src6_addr\" : \"%s\"%s"
"%s\"dst6_addr\" : \"%s\"%s"
"%s\"src_geo\" : \"%s\"%s"
"%s\"dst_geo\" : \"%s\"%s",
indent, as, fs, indent, ds, fs, indent, sloc, fs, indent, dloc, fs);
indent, 6, fs, indent, as, fs, indent, ds, fs, indent, sloc, fs, indent, dloc, fs);

} // End of stringEXipv6Flow

Expand Down

0 comments on commit c6ea78a

Please sign in to comment.