tp_miscfunc.c File Reference

#include <libnet.h>
#include <pcap.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <stdio.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <ctype.h>
#include <time.h>
#include <assert.h>
#include "tp_miscfunc.h"
#include "traceproto.h"
#include "config.h"
#include "tp_as.h"
#include <sys/capability.h>

Include dependency graph for tp_miscfunc.c:

Go to the source code of this file.

Functions

int parse_skips (char *skip_ptr)
void ctrl_c (__attribute__((__unused__)) int unused)
void ctrl_z (__attribute__((__unused__)) int unused)
double diff_time (struct timeval *start, struct timeval *end)
int do_filter (void)
int account_packet (double return_time)
void hop_audit (void)
int reg_name (char *arg0)
void tixe (struct cleanup clean_list, int exit_status)
void version (void)
u_char parse_flags (char *user_flags)
int make_timestamp (char *str_buf)
u_char * tp_align (const u_char *buf, unsigned int offset, unsigned int size)
void dropexcesscapabilities (void)
void parse_debug (char *optarg)
void debug_packet (const u_int8_t *const raw, const u_int bytes)


Function Documentation

int account_packet ( double  return_time  ) 

Definition at line 209 of file tp_miscfunc.c.

References state.

Referenced by main(), parse_icmp_packet(), parse_tcp_packet(), and parse_udp_packet().

void ctrl_c ( __attribute__((__unused__)) int  unused  ) 

Definition at line 132 of file tp_miscfunc.c.

References behavior, and YES.

Referenced by main().

void ctrl_z ( __attribute__((__unused__)) int  unused  ) 

Definition at line 136 of file tp_miscfunc.c.

References behavior, and YES.

Referenced by main().

void debug_packet ( const u_int8_t *const   raw,
const u_int  bytes 
)

Definition at line 652 of file tp_miscfunc.c.

Referenced by main(), and parse_packet().

double diff_time ( struct timeval *  start,
struct timeval *  end 
)

Definition at line 144 of file tp_miscfunc.c.

Referenced by main().

int do_filter ( void   ) 

Definition at line 157 of file tp_miscfunc.c.

References behavior, debug, FILTERSIZE, packet, state, and YES.

Referenced by main().

void dropexcesscapabilities ( void   ) 

Definition at line 565 of file tp_miscfunc.c.

Referenced by main().

void hop_audit ( void   ) 

Definition at line 276 of file tp_miscfunc.c.

References behavior, NO, state, tixe(), tixe_cleanup, TP_ACCOUNT_FULL, TP_ACCOUNT_NONE, and YES.

Referenced by main(), report_classic(), report_none(), and report_std().

Here is the call graph for this function:

int make_timestamp ( char *  str_buf  ) 

Definition at line 447 of file tp_miscfunc.c.

References behavior, debug, tixe(), tixe_cleanup, TP_TIMESTAMP_DESCEND, TP_TIMESTAMP_EPOCH, TP_TIMESTAMP_LEN, TP_TIMESTAMP_STD, TP_TIMESTAMP_US, and YES.

Referenced by main().

Here is the call graph for this function:

void parse_debug ( char *  optarg  ) 

Definition at line 596 of file tp_miscfunc.c.

References debug, and YES.

Referenced by main().

u_char parse_flags ( char *  user_flags  ) 

Definition at line 392 of file tp_miscfunc.c.

Referenced by main().

int parse_skips ( char *  skip_ptr  ) 

Definition at line 59 of file tp_miscfunc.c.

References behavior, cleanup::skips_free, tixe(), tixe_cleanup, and YES.

Referenced by main().

Here is the call graph for this function:

int reg_name ( char *  arg0  ) 

Definition at line 333 of file tp_miscfunc.c.

References state.

Referenced by main().

void tixe ( struct cleanup  clean_list,
int  exit_status 
)

Definition at line 351 of file tp_miscfunc.c.

References cleanup::addrinfo_cleanup, behavior, cleanup::fake_psocket_free, cleanup::hop_record_free, cleanup::libnet_cleanup, packet, cleanup::payload_free, cleanup::pcap_cleanup, cleanup::skips_free, state, and YES.

Referenced by build_packet(), hop_audit(), main(), make_timestamp(), parse_skips(), and tp_align().

u_char* tp_align ( const u_char *  buf,
unsigned int  offset,
unsigned int  size 
)

Definition at line 524 of file tp_miscfunc.c.

References debug, tp_align_ref::next, tp_align_ref::ref, tixe(), tixe_cleanup, tp_align_freelist, and YES.

Referenced by parse_packet(), parse_tcp_packet(), and parse_udp_packet().

Here is the call graph for this function:

void version ( void   ) 

Definition at line 383 of file tp_miscfunc.c.

References PACKAGE, RELEASE_DATE, and VERSION.

Referenced by main().


Generated on Wed Sep 16 11:08:43 2009 for traceproto by  doxygen 1.5.4