forked from the-tcpdump-group/libpcap
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update description fetching code for FreeBSD, fix code for OpenBSD.
Update from Jason (Xin) Li to reflect changes to the FreeBSD SIOCGIFDESCR implementation - it now doesn't return an error if the buffer is too short, it sets the buffer pointer to NULL. No FreeBSD release has SIOCGIFDESCR, so this doesn't break on any release. The loop, trying to increase the buffer size until it's big enough, works only on FreeBSD, as that's the only OS where you get told what length to use; OpenBSD clamps the description length at IFDESCRSIZE, so we just use that.
- Loading branch information
Showing
1 changed file
with
39 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters