Ethereal-users: [Ethereal-users] Questions on Text2Pcap

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Panos Kassianidis" <pkassianidis@xxxxxxxxxxx>
Date: Tue, 31 Jul 2001 15:10:36 +0300
I am trying to use the utility text2pcap included with the Ethereal package to produce a libpcap-style capture file from an ASCII hexdump. The exact hexdump file that I use is
 
00000000 30 37 02 01 00 07...
00000005 04 06 70 75 62 ..pub
0000000A 6C 69 63 A4 2A lic.*
0000000F 06 06 2B 06 01 ..+..
00000014 01 0F 01 40 04 ...@.
00000019 78 78 01 8D 02 xx...
0000001E 01 04 02 01 00 .....
00000023 43 03 03 EE 2F C.../
00000028 30 0F 30 0D 06 0.0..
0000002D 09 2B 06 01 04 .+...
00000032 01 0F 01 03 00 .....
00000037 05 00          ..  
The above are the contents of an SNMP frame. So in order to produce a full frame with a UDP, IP and ethernet  header I give the command
 
text2pcap -u 161 162 file.txt (where file.txt) is the name of the above hexdump file.
 
Unfortunately the response I get is "Cannot open file [162] for reading: No such file or directory" and I don't understand why.
Does anyone know if the text2pcap utility has a problem or give me some help? Thank you very much in advance.