tp_packet.c File Reference

#include <libnet.h>
#include <pcap.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdio.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <ctype.h>
#include <netdb.h>
#include <netinet/in.h>
#include "traceproto.h"
#include "tp_miscfunc.h"
#include "tp_packet.h"

Include dependency graph for tp_packet.c:

Go to the source code of this file.

Functions

void build_packet (void)
int parse_tcp_packet (const u_char *raw_packet)
int parse_udp_packet (const u_char *raw_packet)
int parse_icmp_packet (const u_char *raw_packet)
int parse_packet (u_char *raw_packet)
void freelist_cleaner (void)
int tp_ntol (int n_order)
int send_tcp_reset (void)


Function Documentation

void build_packet ( void   ) 

Definition at line 45 of file tp_packet.c.

References behavior, packet, state, tixe(), and tixe_cleanup.

Referenced by main().

Here is the call graph for this function:

void freelist_cleaner ( void   ) 

Definition at line 345 of file tp_packet.c.

References debug, tp_align_ref::next, tp_align_ref::ref, tp_align_freelist, and YES.

Referenced by main().

int parse_icmp_packet ( const u_char *  raw_packet  ) 

Definition at line 193 of file tp_packet.c.

References account_packet(), behavior, packet, state, tp_ntol(), TP_OUT_HOP_INFO, TP_PACKET_DONE, TP_PACKET_MATCH, TP_PACKET_NO, TP_TYPE_ECHOREPLY, TP_TYPE_HOST_UNREACH, TP_TYPE_NET_UNREACH, TP_TYPE_OTHER, TP_TYPE_PORT_UNREACH, TP_TYPE_PROHIB, TP_TYPE_TIMXCEED, and YES.

Referenced by parse_packet().

Here is the call graph for this function:

int parse_packet ( u_char *  raw_packet  ) 

Definition at line 271 of file tp_packet.c.

References behavior, debug, debug_packet(), LINUX_OFFSET, tp_align_ref::next, parse_icmp_packet(), parse_tcp_packet(), parse_udp_packet(), state, tp_align(), tp_align_freelist, TP_PACKET_NO, and YES.

Referenced by main().

Here is the call graph for this function:

int parse_tcp_packet ( const u_char *  raw_packet  ) 

Definition at line 99 of file tp_packet.c.

References account_packet(), behavior, state, tp_align(), TP_OUT_HOP_INFO, TP_PACKET_DONE, TP_PACKET_NO, TP_TYPE_ACK, TP_TYPE_ACKRST, TP_TYPE_FIN, TP_TYPE_OTHER, TP_TYPE_RST, TP_TYPE_SEC, TP_TYPE_SYN, TP_TYPE_SYNACK, and YES.

Referenced by parse_packet().

Here is the call graph for this function:

int parse_udp_packet ( const u_char *  raw_packet  ) 

Definition at line 166 of file tp_packet.c.

References account_packet(), behavior, state, tp_align(), TP_OUT_HOP_INFO, TP_PACKET_DONE, TP_PACKET_NO, TP_TYPE_UDP, and YES.

Referenced by parse_packet().

Here is the call graph for this function:

int send_tcp_reset ( void   ) 

Definition at line 401 of file tp_packet.c.

References behavior, packet, and state.

Referenced by main().

int tp_ntol ( int  n_order  ) 

Definition at line 385 of file tp_packet.c.

Referenced by parse_icmp_packet().


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