Thanks Dileep.  In the future it would be easier for me if you sent a
patch using diff, but this is small enough where I can apply it by
hand.

On Tue, Jun 28, 2011 at 8:07 AM, Dileep Simha <dsi...@gmail.com> wrote:
> Hey
> I've been working on fixing the bug with the Timing and the CTRL-C
> calculation and i THINK i fixed it.  I edited four files.  The change I made
> in tcpreplay,c doesn;t have anything to do with the timer, I just added a
> line of code to re-randomize ip addresses after each loop iteration.  I have
> done some testing with this code and I believe it does work.  However, I
> don't know if my changes could cause the code to break in different areas.
>  I believe the only place where break_now is called is in send_packets.
>  With my tests, when I send a sigint to tcpreplay on a loop, it ends and
> gives what I believe is a correct output.  I've tested the output with
> tcpdump to make sure it is correct.  I just wanted to know if someone might
> see a potential problem that could arise with these changes.  I've attached
> the files I have changed and put the output of diff with the original file.
> Thanks,
> Dileep
>
> TCPREPLAY.C
> 160a161,166
>>
>> //////////////////////////////////DILEEP////////////////////////////////////////////////
>>             #ifdef TCPREPLAY_EDIT
>>               OPT_VALUE_SEED += options.loop;
>>               tcpedit_post_args(&tcpedit);
>>                       #endif
>>
>> //////////////////////////////////DILEEP////////////////////////////////////////////////
>
>
> SENDPACKETS.C
> 121c121
> <             break_now(0,options);
> ---
>>             break_now(0);
>
> ABORT.C
> 35a36
>> #include "../send_packets.h"
> 38a40
>> #include <sys/time.h>
> 66c68
> < break_now(int signo)
> ---
>> break_now(int signo, tcpreplay_opt_t options)
> 78a81,83
>>
>>         gettimeofday(&end, NULL);
>>
> 80c85,92
> <         exit(1);
> ---
>>
>>        // if (options != NULL){
>>                       printf("%s", sendpacket_getstat(options.intf1));
>>                       if (options.intf2 != NULL)
>>                               printf("%s",
>> sendpacket_getstat(options.intf2));
>>        // }
>>       exit(1);
>>
> ABORT.H
> 37c37
> < void break_now(int signo);
> ---
>> void break_now(int signo, tcpreplay_opt_t options)
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Tcpreplay-users mailing list
> Tcpreplay-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tcpreplay-users
> Support Information: http://tcpreplay.synfin.net/trac/wiki/Support
>



-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Tcpreplay-users mailing list
Tcpreplay-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users
Support Information: http://tcpreplay.synfin.net/trac/wiki/Support

Reply via email to