Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Add ENTER and EXIT macros to record function execution
Browse files Browse the repository at this point in the history
  • Loading branch information
thomotron committed Oct 8, 2019
1 parent 9484894 commit 2bcf98d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/captureme.c
Original file line number Diff line number Diff line change
@@ -22,6 +22,9 @@
#include <ctype.h>
#include <argp.h>

#define ENTER(n) printf("Entered "n"\n");
#define EXIT(n) printf("Exited "n"\n");

//#define TEST
#define DEFAULT_SERVER_PORT 3940
#define DEFAULT_PCAP_DEV "mon0"
@@ -463,9 +466,13 @@ int process_serial_char(struct serial_port *sp, unsigned char c)
case '!':
// Double ! = TX packet
printf("Recognised TX of %d byte packet.\n", sp->tx_bytes);
ENTER("dump_packet")
dump_packet("sent packet", sp->tx_buff, sp->tx_bytes);
EXIT("dump_packet")

ENTER("record_rfd900_tx_event")
record_rfd900_tx_event(sp);
EXIT("record_rfd900_tx_event")

sp->rfd900_tx_count++;
sp->tx_bytes = 0;

0 comments on commit 2bcf98d

Please sign in to comment.