Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD portability for Control Messages and tests #452

Closed
wants to merge 1 commit into from

Conversation

vdukhovni
Copy link

  • Just like Darwin, FreeBSD returns IP_RECVTL, not IP_TTL in the
    control message when IP_RECVTTL is requested.
  • Ditto for IP_RECVTOS
  • FreeBSD does not have IP_PKTINFO
  • FreeBSD does have IPV6_PKTINFO, but just case don't assume.
  • The loopback interface on FreeBSD is called lo0, and is not
    necessarily at index 1. Just make sure that ifNameToIndex
    and ifIndexToName round-trip without assuming index 1.

- Just like Darwin, FreeBSD returns IP_RECVTL, not IP_TTL in the
  control message when IP_RECVTTL is requested.
- Ditto for IP_RECVTOS
- FreeBSD does not have IP_PKTINFO
- FreeBSD does have IPV6_PKTINFO, but just case don't assume.
- The loopback interface on FreeBSD is called lo0, and is not
  necessarily at index 1.  Just make sure that ifNameToIndex
  and ifIndexToName round-trip without assuming index 1.
@kazu-yamamoto kazu-yamamoto self-requested a review May 15, 2020 00:27
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

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

Nice work!

kazu-yamamoto added a commit to kazu-yamamoto/network that referenced this pull request May 15, 2020
@kazu-yamamoto
Copy link
Collaborator

Rebased and merged. Thank you for your contribution!

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