#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>
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) |
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 | ) |
void ctrl_z | ( | __attribute__((__unused__)) int | unused | ) |
void debug_packet | ( | const u_int8_t *const | raw, | |
const u_int | bytes | |||
) |
double diff_time | ( | struct timeval * | start, | |
struct timeval * | end | |||
) |
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 | ) |
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().
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().
void parse_debug | ( | char * | optarg | ) |
u_char parse_flags | ( | char * | user_flags | ) |
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().
int reg_name | ( | char * | arg0 | ) |
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().
void version | ( | void | ) |
Definition at line 383 of file tp_miscfunc.c.
References PACKAGE, RELEASE_DATE, and VERSION.
Referenced by main().