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.

Good luck,
Aaron

On 8/16/06, Roy S. Rapoport <[EMAIL PROTECTED]> wrote:
On Wed, Aug 16, 2006 at 09:18:26AM -0700, Aaron Turner wrote:
> Vacation was great... did some wine tasting, hiked a waterfall,
> checked out Mount St. Helens, and did a lot of relaxing.   But I'm
> guessing you're not interested in my trip to Portland.  :)

I care deeply about your trip to Portland, and I'm glad you had a great
time.

Now onto something *I* want...

:)

> Right now I'm not spending a lot of time on tcpreplay due to we're
> trying to get a release out at work this week.  The time I am spending
> on it is mostly planning how layer 2 editing should work with changing
> DLT's.  The current code is more complex then I like and it makes
> adding support for additional DLT's too complicated.
>
> Mostly I think it's a matter of re-organizing the code, so hopefully I
> won't have to make a bunch of major changes, but I won't know for sure
> until I get some more time to look at things.  Hopefully I'll have
> most everything squared away over the weekend.

OK, fair enough.

So let me ask you this:  Given that my life would be gloriously improved
if I was able to make this work in the next day or so, and given that I
don't need a solution that actually lets you do interesting things --
some horrific kludge that lets me rewrite to ethernet and specify MAC
addresses is good enough -- is there some easy way you'd suggest I mangle
the code to make this happen? Say, by hard-coding DLT = 1 in some place?

-roy



--
Aaron Turner
http://synfin.net/

Attachment: hack_for_roy.patch
Description: Binary data

-------------------------------------------------------------------------
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