tcpflow
1.6.1
About: tcpflow is a TCP/IP packet demultiplexer that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis and debugging.
![]() ![]() |
#include <sys/cdefs.h>
#include <stdint.h>
#include <sys/time.h>
#include <stdio.h>
Go to the source code of this file.
Classes | |
struct | pcap_file_header |
struct | pcap_pkthdr |
struct | bpf_program |
Macros | |
#define | PCAP_VERSION_MAJOR 2 |
#define | PCAP_VERSION_MINOR 4 |
#define | PCAP_ERRBUF_SIZE 256 |
#define | DLT_NULL 0 /* BSD loopback encapsulation */ |
#define | DLT_EN10MB 1 /* Ethernet (10Mb) */ |
#define | DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ |
#define | DLT_AX25 3 /* Amateur Radio AX.25 */ |
#define | DLT_PRONET 4 /* Proteon ProNET Token Ring */ |
#define | DLT_CHAOS 5 /* Chaos */ |
#define | DLT_IEEE802 6 /* 802.5 Token Ring */ |
#define | DLT_ARCNET 7 /* ARCNET, with BSD-style header */ |
#define | DLT_SLIP 8 /* Serial Line IP */ |
#define | DLT_PPP 9 /* Point-to-point Protocol */ |
#define | DLT_FDDI 10 /* FDDI */ |
#define | DLT_RAW 101 /* just packets */ |
Typedefs | |
typedef struct pcap | pcap_t |
typedef void(* | pcap_handler) (uint8_t *, const struct pcap_pkthdr *, const uint8_t *) |
Functions | |
char * | pcap_lookupdev (char *) |
pcap_t * | pcap_open_live (const char *, int, int, int, char *) |
pcap_t * | pcap_open_offline (const char *, char *) |
pcap_t * | pcap_fopen_offline (FILE *fp, char *errbuf) |
void | pcap_close (pcap_t *) |
int | pcap_loop (pcap_t *, int, pcap_handler, uint8_t *) |
int | pcap_datalink (pcap_t *) |
int | pcap_setfilter (pcap_t *, struct bpf_program *) |
int | pcap_compile (pcap_t *, struct bpf_program *, const char *, int, uint32_t) |
char * | pcap_geterr (pcap_t *) |
#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ |
Definition at line 75 of file pcap_fake.h.
#define DLT_AX25 3 /* Amateur Radio AX.25 */ |
Definition at line 71 of file pcap_fake.h.
#define DLT_CHAOS 5 /* Chaos */ |
Definition at line 73 of file pcap_fake.h.
#define DLT_EN10MB 1 /* Ethernet (10Mb) */ |
Definition at line 69 of file pcap_fake.h.
#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ |
Definition at line 70 of file pcap_fake.h.
#define DLT_FDDI 10 /* FDDI */ |
Definition at line 78 of file pcap_fake.h.
#define DLT_IEEE802 6 /* 802.5 Token Ring */ |
Definition at line 74 of file pcap_fake.h.
#define DLT_NULL 0 /* BSD loopback encapsulation */ |
Definition at line 68 of file pcap_fake.h.
#define DLT_PPP 9 /* Point-to-point Protocol */ |
Definition at line 77 of file pcap_fake.h.
#define DLT_PRONET 4 /* Proteon ProNET Token Ring */ |
Definition at line 72 of file pcap_fake.h.
#define DLT_RAW 101 /* just packets */ |
Definition at line 79 of file pcap_fake.h.
#define DLT_SLIP 8 /* Serial Line IP */ |
Definition at line 76 of file pcap_fake.h.
#define PCAP_ERRBUF_SIZE 256 |
Definition at line 23 of file pcap_fake.h.
#define PCAP_VERSION_MAJOR 2 |
Definition at line 21 of file pcap_fake.h.
#define PCAP_VERSION_MINOR 4 |
Definition at line 22 of file pcap_fake.h.
typedef void(* pcap_handler) (uint8_t *, const struct pcap_pkthdr *, const uint8_t *) |
Definition at line 48 of file pcap_fake.h.
Definition at line 12 of file pcap_fake.h.
void pcap_close | ( | pcap_t * | p | ) |
Definition at line 218 of file pcap_fake.cpp.
References pcap::fp, pcap::must_close, and pcap::pktbuf.
Referenced by Wifipcap::InitNext(), and process_infile().
int pcap_compile | ( | pcap_t * | p, |
struct bpf_program * | program, | ||
const char * | expression, | ||
int | optimize, | ||
uint32_t | mask | ||
) |
Definition at line 150 of file pcap_fake.cpp.
References bpf_program::valid.
Referenced by process_infile(), and Wifipcap::SetFilter().
int pcap_datalink | ( | pcap_t * | p | ) |
Definition at line 159 of file pcap_fake.cpp.
References pcap::linktype.
Referenced by Wifipcap::Init(), and process_infile().
pcap_t* pcap_fopen_offline | ( | FILE * | fp, |
char * | errbuf | ||
) |
Definition at line 87 of file pcap_fake.cpp.
References pcap::fp, pcap::linktype, pcap_file_header::linktype, pcap_file_header::magic, PCAP_ERRBUF_SIZE, PCAP_VERSION_MAJOR, PCAP_VERSION_MINOR, pcap::pktbuf, SET_BINMODE, pcap_file_header::sigfigs, pcap_file_header::snaplen, swap2(), swap4(), pcap::swapped, pcap_file_header::thiszone, pcap_file_header::version_major, and pcap_file_header::version_minor.
Referenced by Wifipcap::Init(), and pcap_open_offline().
char* pcap_geterr | ( | pcap_t * | p | ) |
Definition at line 35 of file pcap_fake.cpp.
References pcap::err_buf.
Referenced by process_infile().
char* pcap_lookupdev | ( | char * | ) |
Definition at line 59 of file pcap_fake.cpp.
Referenced by process_infile().
int pcap_loop | ( | pcap_t * | p, |
int | cnt, | ||
pcap_handler | callback, | ||
uint8_t * | user | ||
) |
Definition at line 169 of file pcap_fake.cpp.
References pcap::break_loop, pcap_pkthdr::caplen, pcap::fp, pcap_pkthdr::len, pcap::pktbuf, swap4(), pcap::swapped, and pcap_pkthdr::ts.
Referenced by process_infile(), and Wifipcap::Run().
pcap_t* pcap_open_live | ( | const char * | , |
int | , | ||
int | , | ||
int | , | ||
char * | |||
) |
Definition at line 65 of file pcap_fake.cpp.
Referenced by Wifipcap::Init(), and process_infile().
pcap_t* pcap_open_offline | ( | const char * | fname, |
char * | errbuf | ||
) |
pcap_open_offline() – "The name "-" is a synonym for stdin" (pcap manual) – allocate the pcap_t structure – open a pcap capture file.
Definition at line 47 of file pcap_fake.cpp.
References pcap::fp, pcap::must_close, PCAP_ERRBUF_SIZE, and pcap_fopen_offline().
Referenced by process_infile().
int pcap_setfilter | ( | pcap_t * | p, |
struct bpf_program * | prog | ||
) |
Definition at line 163 of file pcap_fake.cpp.
References bpf_program::valid.
Referenced by process_infile(), and Wifipcap::SetFilter().