Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62978 - fix the handling of "-x" and Tcpdump flags "-X" so that "-x" print both hex and ASCII instead of just hex for the last one.
Summary: fix the handling of "-x" and Tcpdump flags "-X" so that "-x" print both hex a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-06 00:44 UTC by Sebastien Vincent
Modified: 2006-01-08 14:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for fix (patch,1.85 KB, patch)
2004-09-06 00:49 UTC, Sebastien Vincent
Details | Diff
"emerge info" output, but it don't help here I think. (emerge_info,1.78 KB, text/plain)
2004-09-06 01:11 UTC, Sebastien Vincent
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Vincent 2004-09-06 00:44:56 UTC
Tcpdump have two flags -x and -X witch should let user choose between print "hex" dumped paquets or "hex and ascii".

The man says :
[man]
       -x     Print each packet (minus its link level header) in hex.  The smaller of the entire packet or snaplen bytes will be printed.  Note
              that  this  is  the entire link-layer packet, so for link layers that pad (e.g. Ethernet), the padding bytes will also be printed
              when the higher layer packet is shorter than the required padding.

       -xx    Print each packet, including its link level header, in hex.

       -X     Print each packet (minus its link level header) in hex and ASCII.  This is very handy for analysing new protocols.

       -XX    Print each packet, including its link level header, in hex and ASCII.
[/man]

Reproducible: Always
Steps to Reproduce:
1. try "tcpdump -x" or "tcpdump -xx".
2. wait for a packet.
3.

Actual Results:  
I dumped packet :
11:39:14.850828 IP ns3.wanadoo.fr.domain > ..32890:  40334*[|domain]
        0x0000:  4500 0058 b876 4000 4011 eb52 c1fc 1303  E..X.v@.@..R....
        0x0010:  c0a8 0124 0035 807a 0044 ea1b 9d8e 8580  ...$.5.z.D......
        0x0020:  0001 0001 0000 0000 0233 3601 3103 3136  .........36.1.16
        0x0030:  3803 3139 3207                           8.192.

Expected Results:  
11:39:14.850828 IP ns3.wanadoo.fr.domain > ..32890:  40334*[|domain]
        0x0000:  4500 0058 b876 4000 4011 eb52 c1fc 1303
        0x0010:  c0a8 0124 0035 807a 0044 ea1b 9d8e 8580
        0x0020:  0001 0001 0000 0000 0233 3601 3103 3136
        0x0030:  3803 3139 3207

I gived a patch to tcpdump.org witch was checked in the cvs.
Comment 1 Sebastien Vincent 2004-09-06 00:49:26 UTC
Created attachment 39031 [details, diff]
Patch for fix

This patch were added to tcpdump cvs.
See http://cvs.tcpdump.org/cgi-bin/cvsweb/tcpdump/tcpdump.c
diff between versions 1.248 and 1.247.

Can someone make a portage patch to patch the source durring the emerge process
?

Hope I can help Open Source :)

Best regards,

Sebastien Vincent
Comment 2 Sebastien Vincent 2004-09-06 01:11:26 UTC
Created attachment 39032 [details]
"emerge info" output, but it don't help here I think.
Comment 3 Marcelo Goes (RETIRED) gentoo-dev 2006-01-08 14:32:42 UTC
net-analyzer/tcpdump belongs to netmon... Any reason this is assigned to spider?
Comment 4 Marcelo Goes (RETIRED) gentoo-dev 2006-01-08 14:35:18 UTC
Patch in question is available upstream (checked tcpdump-3.9.3).
Thanks for reporting.