packets/packet_tcpdump.c File Reference

#include "packet_tcpdump.h"
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  dump_pcap_pkthdr
struct  dump_pcap_file_header

Defines

#define DUMP_PCAP_VERSION_MAJOR   2
#define DUMP_PCAP_VERSION_MINOR   4

Functions

int OpenInterfaceTCPDump (int InterfaceID)
int ReadPacketTCPDump (int InterfaceID)
int WritePacketTCPDump (int InterfaceID, unsigned char *Packet, int PacketLen)
void * TCPDumpLoopFunc (void *v)
int LoopThreadTCPDump (int InterfaceID)

Variables

GlobalVars Globals


Define Documentation

#define DUMP_PCAP_VERSION_MAJOR   2

Definition at line 17 of file packet_tcpdump.c.

#define DUMP_PCAP_VERSION_MINOR   4

Definition at line 18 of file packet_tcpdump.c.


Function Documentation

int LoopThreadTCPDump ( int  InterfaceID  ) 

Definition at line 172 of file packet_tcpdump.c.

References FALSE, Globals, global_vars::Interfaces, interface_rec::Name, NULL, TCPDumpLoopFunc(), interface_rec::Thread, and interface_rec::ThreadID.

Referenced by StartInterfaceThread().

int OpenInterfaceTCPDump ( int  InterfaceID  ) 

Definition at line 39 of file packet_tcpdump.c.

References FALSE, interface_rec::FD, Globals, global_vars::Interfaces, interface_rec::IsPollable, interface_rec::MTU, interface_rec::Name, and TRUE.

Referenced by OpenInterface().

int ReadPacketTCPDump ( int  InterfaceID  ) 

Definition at line 82 of file packet_tcpdump.c.

References AddPacketToPending(), global_vars::Done, FALSE, interface_rec::FD, GetEmptyPacket(), Globals, packet_rec::InterfaceNum, global_vars::Interfaces, packet_rec::PacketLen, global_vars::Packets, packet_rec::RawPacket, ReturnEmptyPacket(), TRUE, and packet_rec::tv.

Referenced by ReadPacket(), and TCPDumpLoopFunc().

void* TCPDumpLoopFunc ( void *  v  ) 

Definition at line 154 of file packet_tcpdump.c.

References global_vars::Done, Globals, NULL, and ReadPacketTCPDump().

Referenced by LoopThreadTCPDump().

int WritePacketTCPDump ( int  InterfaceID,
unsigned char *  Packet,
int  PacketLen 
)

Definition at line 143 of file packet_tcpdump.c.

References FALSE.

Referenced by WritePacket().


Variable Documentation

GlobalVars Globals

Definition at line 41 of file hlbr.c.


Generated on Sat Jul 7 23:33:11 2007 for HLBR by  doxygen 1.5.2