Skip to content

Commit

Permalink
netsniff-ng: Reorder packet number output
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tklauser committed May 2, 2015
1 parent 93de7b5 commit 11c7e6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dissector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 11c7e6a

Please sign in to comment.