Opened 7 years ago

Last modified 7 years ago

#482 assigned enhancement

print stats after CTRL-C

Reported by: aturner Owned by: aturner
Priority: low Milestone: Future Release
Component: tcpreplay Version: 3.4.4
Keywords: Cc:
Operating System: Add to FAQ?: no
Hardware: All
Output of tcpreplay -V:

Description

pseudo-Patch provided by user:


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)

Change History (3)

comment:1 Changed 7 years ago by aturner

(In [2541]) Fix bug with packet stats after CTRL-C not having the
end time saved. send_packet.[cho] not used with tcpbridge.
refs #482

comment:2 Changed 7 years ago by aturner

  • Status changed from new to assigned

Need to mention that the patch above is broken. abort.c is used by more then just tcpreplay, so you can't just willy-nilly say 'extern tcpreplay_opts_t options' without causing problems. Maybe should move abort.c out of common and have it link individually?

comment:3 Changed 7 years ago by aturner

  • Milestone changed from 3.4.5 to Future Release
Note: See TracTickets for help on using tickets.