diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-05-02 19:01:28 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-05-02 19:01:28 +0200 |
commit | 11c7e6a5f5d0d78f03f59e5d071aff7a11126127 (patch) | |
tree | 3c6da6d717890c669ae32e3d7d3f8dccda855383 | |
parent | 93de7b524a3cea6f820dd1679472dc84b55bcaa1 (diff) |
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 <tklauser@distanz.ch>
-rw-r--r-- | dissector.h | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } |