Skip to content

FreeBSD portability for Control Messages and tests#452

Closed
vdukhovni wants to merge 1 commit into
haskell:masterfrom
vdukhovni:freebsd-portability
Closed

FreeBSD portability for Control Messages and tests#452
vdukhovni wants to merge 1 commit into
haskell:masterfrom
vdukhovni:freebsd-portability

Conversation

@vdukhovni

Copy link
Copy Markdown
  • 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

@kazu-yamamoto kazu-yamamoto left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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.

4 participants