Go to the documentation of this file.
37 #ifndef lib_pcap_pcap_h
38 #define lib_pcap_pcap_h
43 #include <sys/types.h>
44 #include <sys/socket.h>
46 #include <sys/types.h>
50 #ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
62 #define SOCKET unsigned int
73 #define PCAP_VERSION_MAJOR 2
74 #define PCAP_VERSION_MINOR 4
76 #define PCAP_ERRBUF_SIZE 256
82 #if BPF_RELEASE - 0 < 199406
145 #define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000)
146 #define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28)
147 #define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000)
191 struct pcap_stat_ex {
204 u_long rx_length_errors;
205 u_long rx_over_errors;
206 u_long rx_crc_errors;
207 u_long rx_frame_errors;
208 u_long rx_fifo_errors;
209 u_long rx_missed_errors;
212 u_long tx_aborted_errors;
213 u_long tx_carrier_errors;
214 u_long tx_fifo_errors;
215 u_long tx_heartbeat_errors;
216 u_long tx_window_errors;
231 #define PCAP_IF_LOOPBACK 0x00000001
253 #define PCAP_ERROR -1
254 #define PCAP_ERROR_BREAK -2
255 #define PCAP_ERROR_NOT_ACTIVATED -3
256 #define PCAP_ERROR_ACTIVATED -4
257 #define PCAP_ERROR_NO_SUCH_DEVICE -5
258 #define PCAP_ERROR_RFMON_NOTSUP -6
259 #define PCAP_ERROR_NOT_RFMON -7
260 #define PCAP_ERROR_PERM_DENIED -8
261 #define PCAP_ERROR_IFACE_NOT_UP -9
268 #define PCAP_WARNING 1
269 #define PCAP_WARNING_PROMISC_NOTSUP 2
288 #if !defined(LIBPCAP_EXPORTS)
289 #define pcap_fopen_offline(f,b) \
290 pcap_hopen_offline(_get_osfhandle(_fileno(f)), b)
365 int pcap_setbuff(
pcap_t *p,
int dim);
367 int pcap_setmintocopy(
pcap_t *p,
int size);
385 void pcap_set_wait (
pcap_t *p,
void (*yield)(
void),
int wait);
386 u_long pcap_mac_packets (
void);
int bpf_validate(const struct bpf_insn *f, int len)
struct sockaddr * dstaddr
struct sockaddr * netmask
void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *)
int pcap_loop(pcap_t *, int, pcap_handler, u_char *)
void pcap_close(pcap_t *)
struct pcap_stat * pcap_stats_ex(pcap_t *p, int *pcap_stat_size)
const char * pcap_statustostr(int)
int pcap_minor_version(pcap_t *)
int pcap_datalink_ext(pcap_t *)
int pcap_stats(pcap_t *, struct pcap_stat *)
int pcap_activate(pcap_t *)
int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *, const u_char *)
char * bpf_image(const struct bpf_insn *, int)
const char * pcap_datalink_val_to_description(int)
int pcap_getnonblock(pcap_t *, char *)
long pcap_dump_ftell(pcap_dumper_t *)
pcap_t * pcap_open_live(const char *, int, int, int, char *)
int pcap_setnonblock(pcap_t *, int, char *)
int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **)
int pcap_datalink(pcap_t *)
void pcap_free_datalinks(int *)
int pcap_compile_nopcap(int, int, struct bpf_program *, const char *, int, bpf_u_int32)
int pcap_set_timeout(pcap_t *, int)
int pcap_datalink_name_to_val(const char *)
void bpf_dump(const struct bpf_program *, int)
int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *)
A single BPF pseudo-instruction.
int pcap_dump_flush(pcap_dumper_t *)
int pcap_get_selectable_fd(pcap_t *)
pcap_t * pcap_create(const char *, char *)
struct pcap_addr * addresses
pcap_dumper_t * pcap_dump_open(pcap_t *, const char *)
void pcap_perror(pcap_t *, char *)
int pcap_list_datalinks(pcap_t *, int **)
int pcap_sendpacket(pcap_t *, const u_char *, int)
u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int)
void pcap_freecode(struct bpf_program *)
void pcap_breakloop(pcap_t *)
pcap_t * pcap_fopen_offline(FILE *, char *)
int pcap_set_rfmon(pcap_t *, int)
int pcap_inject(pcap_t *, const void *, size_t)
void(* pcap_handler)(u_char *, const struct pcap_pkthdr *, const u_char *)
int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, bpf_u_int32)
int pcap_set_promisc(pcap_t *, int)
const char * pcap_datalink_val_to_name(int)
FILE * pcap_file(pcap_t *)
const char * pcap_strerror(int)
const char * pcap_lib_version(void)
int pcap_can_set_rfmon(pcap_t *)
void pcap_dump_close(pcap_dumper_t *)
int pcap_setfilter(pcap_t *, struct bpf_program *)
pcap_t * pcap_open_dead(int, int)
int pcap_major_version(pcap_t *)
pcap_dumper_t * pcap_dump_fopen(pcap_t *, FILE *fp)
char * pcap_geterr(pcap_t *)
struct pcap_dumper pcap_dumper_t
int pcap_set_datalink(pcap_t *, int)
int pcap_fileno(pcap_t *)
int pcap_snapshot(pcap_t *)
void pcap_freealldevs(pcap_if_t *)
int pcap_set_snaplen(pcap_t *, int)
A BPF pseudo-assembly program.
int pcap_set_buffer_size(pcap_t *, int)
const u_char * pcap_next(pcap_t *, struct pcap_pkthdr *)
struct sockaddr * broadaddr
pcap_t * pcap_open_offline(const char *, char *)
int pcap_is_swapped(pcap_t *)
FILE * pcap_dump_file(pcap_dumper_t *)
int pcap_findalldevs(pcap_if_t **, char *)
int pcap_setdirection(pcap_t *, pcap_direction_t)
char * pcap_lookupdev(char *)
int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *)
soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49