25RCSIDH(pcap_h,
"$Id: a6333f5f7983f2b88bfe05812748c14601feff75 $")
33#include <freeradius-devel/build.h>
34#include <freeradius-devel/missing.h>
35#include <freeradius-devel/util/net.h>
41#define SNAPLEN ETHER_HDR_LEN + IP_HDR_LEN + sizeof(udp_header_t) + MAX_RADIUS_LEN
42#define PCAP_BUFFER_DEFAULT (10000)
47# define PCAP_NONBLOCK_TIMEOUT (0)
49# define PCAP_NONBLOCK_TIMEOUT (-1)
53# define BIOCIMMEDIATE (2147762800)
59#ifndef PCAP_NETMASK_UNKNOWN
60# define PCAP_NETMASK_UNKNOWN 0
77typedef struct fr_pcap fr_pcap_t;
79 char errbuf[PCAP_ERRBUF_SIZE];
92 pcap_dumper_t *dumper;
97 struct pcap_stat pstats;
102int fr_pcap_if_link_layer(pcap_if_t *dev);
103fr_pcap_t *fr_pcap_init(TALLOC_CTX *ctx,
char const *
name, fr_pcap_type_t
type);
104int fr_pcap_open(fr_pcap_t *handle);
105int fr_pcap_apply_filter(fr_pcap_t *handle,
char const *expression);
106char *fr_pcap_device_names(TALLOC_CTX *ctx, fr_pcap_t *handle,
char c);
107int fr_pcap_mac_addr(
uint8_t *macaddr,
char *ifname);
108bool fr_pcap_link_layer_supported(
int link_layer);
fr_aka_sim_id_type_t type