Skip to content

Support IP layer mode on FreeBSD and merge Mac with BSD send code#778

Merged
zakird merged 4 commits intozmap:mainfrom
droe:droe/iplayer-freebsd
Feb 16, 2024
Merged

Support IP layer mode on FreeBSD and merge Mac with BSD send code#778
zakird merged 4 commits intozmap:mainfrom
droe:droe/iplayer-freebsd

Conversation

@droe
Copy link
Contributor

@droe droe commented Feb 11, 2024

  • Add support for IP layer mode (--iplayer / -X) on FreeBSD, based on the macOS implementation
  • Move src/send-mac.h code over to src/send-bsd.h and merge, as I think keeping the implementations separate is not worth the code duplication
  • Updated sendmmsg comments re: FreeBSD

Originally I set out to port the sendmmsg code to BSD, but turns out that FreeBSD's sendmmsg is just a libc wrapper around sendmsg, which had escaped my attention when I initially looked into sendmmsg availability. Which of course means sendmmsg would work, but without the perf benefit of less syscall overhead. NetBSD on the other hand does have a proper sendmmsg syscall, but since I do not use NetBSD, I did not undertake the porting.

Tested on macOS Sonoma and FreeBSD 14.

Copy link
Contributor

@phillip-stephens phillip-stephens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just two comments.
cc: @droe

@droe droe removed their assignment Feb 15, 2024
@zakird zakird merged commit 430c8e8 into zmap:main Feb 16, 2024
@droe droe deleted the droe/iplayer-freebsd branch March 11, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants