From 11c7e6a5f5d0d78f03f59e5d071aff7a11126127 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sat, 2 May 2015 19:01:28 +0200 Subject: netsniff-ng: Reorder packet number output Change the position of the packet number in the packet header output such that we don't print two spaces between timestamp and number if no timestamp source is available. Signed-off-by: Tobias Klauser --- dissector.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dissector.h') diff --git a/dissector.h b/dissector.h index 04b2e92..a99442e 100644 --- a/dissector.h +++ b/dissector.h @@ -76,21 +76,21 @@ static inline void __show_frame_hdr(uint8_t *packet, size_t len, int linktype, hdr.raw = raw_hdr; switch (mode) { case PRINT_LESS: - tprintf("%s %s %u (#%lu) ", + tprintf("%s %s %u #%lu", packet_types[pkttype] ? : "?", if_indextoname(s_ll->sll_ifindex, tmp) ? : "?", tpacket_uhdr(hdr, tp_len, v3), count); break; default: - tprintf("%s %s %u %us.%uns %s (#%lu)\n", + tprintf("%s %s %u %us.%uns #%lu %s\n", packet_types[pkttype] ? : "?", if_indextoname(s_ll->sll_ifindex, tmp) ? : "?", tpacket_uhdr(hdr, tp_len, v3), tpacket_uhdr(hdr, tp_sec, v3), tpacket_uhdr(hdr, tp_nsec, v3), - v3 ? "" : __show_ts_source(hdr.h2->tp_status), - count); + count, + v3 ? "" : __show_ts_source(hdr.h2->tp_status)); break; } } -- cgit v1.2.3-54-g00ecf