On Wed, Aug 16, 2006 at 06:57:59PM -0700, Aaron Turner wrote:
> Well this just might work.  First you'll need to grab the 2.3.5 source
> code since was easier to make this work off the top of my head.  Then
> apply the attached patch.  The options are totally different (also
> there's no tcprewrite) but something like this should work:
> 
> ./tcpreplay -i en0 -I $DMAC -k $SMAC -J $SMAC -K $DMAC -c cachefile -w
> out.pcap  \
> ~/Desktop/in.pcap
> 
> You may need to re-run tcpprep w/ 2.3.5 if it complains about cache
> file versions being incompatible.  If you need to use this for
> something other then HDLC -> Ethernet, you'll need to edit tcpreplay.c
> and change the default value for l2len to be the length of that L2
> header.  I've already changed it from ethernet to 4 bytes for HDLC.
> 
> Hopefully that get's the job done... if not, it'll prolly be a bit.

Aaron, thanks for the attempted help.  It almost entirely worked :)

Here's what I did.  All were with 2.3.5, and I used your patch, which was
applied successfully:

$i is the pcap file

A) tcpprep -a -n server -i $i -o ${i}.cache
B) tcpreplay -i eth0 -j eth0 -I $DMAC -k $SMAC -J $SMAC -K $DMAC -c ${i}.cache 
-w ${i}.rewritten.pcap ${i}

This chugged and chugged, and eventually ended.  When I opened the file
in ethereal, however, 
A) MAC addresses were all 0s; and
B) all the DNS payload shows up as "[Malformed Packet: DNS]"

(A) I could probably live with, because once the transformation to
ethernet was done, I could probably use tcprewrite to rewrite the MAC
addresses.  (B) is sort of bad :)

I know you're busy, so I'm not expecting a resolution anytime soon, but I
figured I'd mention :)

-roy

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tcpreplay-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users

Reply via email to