summaryrefslogtreecommitdiff
path: root/pcap.h
blob: fc1c63aae8e47013b55c6db1fe4d1fecb822db37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdlib.h>
#include <stdbool.h>

typedef struct pcap_file pcap_file;

/**
 * Open a pcap file for writing
 */
pcap_file *pcap_open(const char *fn);

/**
 * Close a pcap file.
 * Accepts NULL (does nothing)
 */
void pcap_close(pcap_file *pcap);

/**
 * Write a raw IP packet to the pcap file
 */
bool pcap_write_ip(pcap_file *pcap,
		   const void *raw_ip, size_t len);