ongrep

A cleaned up fork of ngrep for OpenBSD
git clone git://git.sgregoratto.me/ongrep
Log | Files | Refs | README | LICENSE

commit 771a214274e8c15778d8dad76ed311ea0d42091e
parent 975b62817ab1a0c47dbf173b799763bd5c3787d3
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date:   Thu, 17 Sep 2020 11:21:02 +1000

Make frame/match counters size_t

Diffstat:
Mngrep.c | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/ngrep.c b/ngrep.c @@ -59,13 +59,14 @@ bool live_read = true; bool want_delay = false; bool highlight = false; -uint32_t keep_matching = 0; +size_t keep_matching = 0; +size_t match_after = 0; +size_t matches = 0; +size_t max_matches = 0; +size_t seen_frames = 0; + uint32_t limitlen = 65535; -uint32_t match_after = 0; -uint32_t matches = 0; -uint32_t max_matches = 0; char nonprint_char = '.'; -uint32_t seen_frames = 0; uint32_t snaplen = 65535; uint32_t to = 100; int quiet = 0; @@ -879,7 +880,7 @@ dump_packet(struct pcap_pkthdr *h, uint8_t *p, uint8_t proto, uint8_t *data, if (dump_single) printf(" "); else - printf(" #%u\n", seen_frames); + printf(" #%zu\n", seen_frames); if (quiet < 3 && len > 0) dumper(data, len, match_index, match_size);