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

Add Ipv{4,6}PacketInfo support to ControlMessage for send{m,}msg. #1222

Merged
merged 1 commit into from Jun 27, 2020
Merged

Add Ipv{4,6}PacketInfo support to ControlMessage for send{m,}msg. #1222

merged 1 commit into from Jun 27, 2020

Commits on Jun 26, 2020

  1. Add Ipv{4,6}PacketInfo support to ControlMessage for send{m,}msg

    This adds Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage,
    allowing these to be used with sendmsg/sendmmsg.
    
    This change contains the following squashed commits:
    
    Add Ipv{4,6}PacketInfo to ControlMessage.
    
    Add documentation links to Ipv{4,6}PacketInfo
    
    Add changelog entry for Ipv{4,6}PacketInfo
    
    Add link to PR in the Changelog.
    
    Add extra build environments.
    
    Add tests for Ipv{4,6}PacketInfo.
    
    Swap #[test] and #[cfg]
    
    The CI appears to be running the test, even though it's not cfg'd for
    that platform.  I _think_ this might be due to these being in the wrong
    order.  So lets try swapping them.
    
    s/freebsd/netbsd/ for Ipv4PacketInfo
    
    netbsd supports in_pktinfo, not freebsd.
    
    Fix the cfg for Ipv{4,6}PacketInfo usage.
    
    Ah, I see what I did wrong.  I had fixed the definitions, but I had the
    wrong cfg() in the usage.  This has the usage match the definitions.
    
    Change SOL_IPV6 to IPPROTO_IPV6.
    
    FreeBSD doesn't have SOL_IPV6, but does have IPPROTO_IPV6, and the two
    constants are defined as being equal.  So change to use IPPROTO_IPV6.
    
    Skip Ipv6PacketInfo test if v6 is not available.
    
    If IPv6 is not available, then when we try and bind to ip6-localhost,
    we'll get a EADDRNOTAVAIL, so skip the test.
    
    This should mean that the test will run on any machine that has a v6
    loopback address.
    
    More architecture cfg() fixes.
    
    These all need to be the same, and they were not.  Make them them all
    the same.  Attempt III.
    
    Fix up mismatched cfg's again.
    
    Take IV.  Make sure the cfg's that use a enum variant match the enum
    definition.
    isomer authored and tazjin committed Jun 26, 2020
    Copy the full SHA
    78347d1 View commit details
    Browse the repository at this point in the history