Page MenuHomeFreeBSD

pflogd: Move struct definitions out of header file
ClosedPublic

Authored by jrm on Oct 4 2024, 1:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 12:17 AM
Unknown Object (File)
Sat, Nov 2, 9:44 PM
Unknown Object (File)
Sat, Nov 2, 10:53 AM
Unknown Object (File)
Mon, Oct 28, 3:05 PM
Unknown Object (File)
Wed, Oct 9, 5:15 PM
Unknown Object (File)
Oct 7 2024, 4:40 PM
Unknown Object (File)
Oct 5 2024, 7:35 AM
Unknown Object (File)
Oct 5 2024, 7:23 AM
Subscribers

Details

Summary

In libpcap 1.10.5, two structures that we rely on, pcap_timeval and
pcap_sf_pkthdr, were made private. As a workaround, we initially
defined the structures in pflogd.h. After further investigation, mostly
by kp@, we concluded that it is reasonable to define these structures
ourselves since they represent a file format and thus are unlikely to
change from under us. We will stick with this solution but move the
definitions out of the header file to prevent others from using pflogd.h
to access them.

Another solution that was considered was using libpcap's pcap_dump()
function to write packets, but there are blockers. For example, pflogd
writes to a memory buffer, and libpcap lacks support for this.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable