#include "berkeleyapi.h"
#include <unistd.h>
#include <sys/time.h>
Go to the source code of this file.
Defines | |
#define | DBG_ALL (0xffffffff) |
the ALL debug level: if debuging is on at any level then it is forced on at this level | |
#define | DBG_VERBOSE (0x00000001) |
the VERBOSE debug level: basic verbose information | |
#define | DBG_NETWORK (0x00000002) |
the NETWORK debug level: information about basic networking | |
#define | DBG_LIST (0x00000004) |
the LIST debug level: information relating the the shared peer list structure | |
#define | DBG_PROTOCOL (0x00000008) |
the PROTOCOL debug level: information about the natblaster communnication protocol | |
#define | DBG_THREAD (0x00000010) |
the THREAD debug level: information about the list multi-threading | |
#define | DBG_PORT_PRED (0x00000020) |
the PORT_PRED debug level: information about port prediction | |
#define | DBG_BUDDY (0x00000040) |
the BUDDY debug level: information about dealing with a peer's buddy | |
#define | DBG_DIR_CONN (0x00000080) |
the DIR_CONN debug level: information relating directly to the direct connection attempt | |
#define | DBG_SNIFF (0x00000100) |
the SNIFF debug level: information pertaining to the process of sniffing packets | |
#define | DBG_SPOOF (0x00000200) |
the SPOOF debug level: information pertaining to spoofing packets | |
#define | DBG_BDAY (0x00000400) |
the BDAY debug level: information pertaining to the birthday paradox port determination | |
#define | DBG_LEVEL |
all the debug levels that are turned on | |
#define | DEBUG(level, fmt, args...) if (level & DBG_LEVEL) fprintf(stderr,"%s:" fmt, __FUNCTION__, ##args) |
a macro to allow easy debugging info to be turned on and off | |
#define | DBG_IP(x) ((char*)inet_ntoa(*(struct in_addr*)&x)) |
a macro to put ip_t in pretty-print format for debugging | |
#define | DBG_PORT(x) ((unsigned short)(ntohs(x))) |
a macro to put port_t in pretty-print format for debugging | |
#define | DBG_SEQ_NUM(x) ((unsigned int)ntohl(x)) |
a macro to put seq_num_t in pretty-print format for debugging | |
#define | DBG_TIME(x) |
a macro to print the current system time |
Daniel Ferullo (ferullo@cmu.edu)
Definition in file debug.h.
|
Value: (DBG_PROTOCOL | DBG_VERBOSE | DBG_NETWORK | DBG_PORT_PRED \ | DBG_SNIFF | DBG_SPOOF | DBG_BDAY)
|
|
Value: ({ \ struct timeval val; \ if (gettimeofday(&val,NULL)<0) \ {fprintf(stderr,"TIME:%s:%s <?>\n",__FUNCTION__,x);} \ else \ {fprintf(stderr,"TIME:%s:%s <%u.%u>\n",__FUNCTION__, x, (unsigned int) val.tv_sec, (unsigned int)val.tv_usec);} \ })
Definition at line 112 of file debug.h. Referenced by peer_fsm_bday_synack_flood(), peer_fsm_buddy_alloc(), peer_fsm_buddy_port(), peer_fsm_check_port_pred(), peer_fsm_conn_again(), peer_fsm_end_bday(), peer_fsm_forge_syn_ack(), peer_fsm_hello(), peer_fsm_reply_bday(), peer_fsm_start(), peer_fsm_start_bday(), peer_fsm_start_direct_conn(), and wait_and_join_find_synack(). |