pflogd: Define structures removed in libpcap-1.10.5

In libpcap-1.10.5, two structures that we rely on, pcap_timeval and
pcap_sf_pkthdr, were made private.

c2d8cbb977

Temporarily define them here to fix the build.  kp and I will
investigate a permanent solution at EuroBSDCon in Dublin.

Reviewed by:	kp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D46676
This commit is contained in:
Joseph Mingrone 2024-09-14 16:52:36 -03:00
parent 77864b545b
commit f0bcebe67e
No known key found for this signature in database
GPG Key ID: 36A40C83B0D6EF9E
1 changed files with 13 additions and 0 deletions

View File

@ -40,6 +40,19 @@ int priv_open_log(void);
int priv_move_log(void);
pcap_t *pcap_open_live_fd(int fd, int snaplen, char *ebuf);
/* XXX TODO: Investigate a permanent solution, rather than defining these two
structures here. */
struct pcap_timeval {
bpf_u_int32 tv_sec; /* seconds */
bpf_u_int32 tv_usec; /* microseconds */
};
struct pcap_sf_pkthdr {
struct pcap_timeval ts; /* time stamp */
bpf_u_int32 caplen; /* length of portion present */
bpf_u_int32 len; /* length of this packet (off wire) */
};
void set_pcap_filter(void);
/* File descriptor send/recv */
void send_fd(int, int);