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

[libc-0.2] Freebsd Netlink support backported #3555

Closed
wants to merge 3 commits into from

Commits on May 22, 2024

  1. freebsd: move net/if_mib.h contents to submodule

    There is a conflict of NETLINK_GENERIC definitions between
    net/if_mib.h and netlink/netlink.h.  netlink.h is already exported in
    the crate root for Linux (and those definitions are already used by at
    least crates neli and netlink-packet-route), and if_mib is not much
    used yet, so this moves if_mib contents into its own namespace to
    leave place for netlink support on FreeBSD (rust-lang#3194).
    
    Module definition moved to the end of file to avoid cryptic style.rs
    error "constant found after module when it belongs before".
    
    ctest as of 0.22 cannot be told a given header's symbols live in a
    submodule, so let the tests ignore all of them.
    
    Signed-off-by: Yann Dirson <[email protected]>
    ydirson committed May 22, 2024
    Configuration menu
    Copy the full SHA
    dc440c3 View commit details
    Browse the repository at this point in the history
  2. Netlink support for FreeBSD 13.2 and later

    This is an early subset of the Netlink interface, but it
    proves sufficient for monitoring changes in IP addresses,
    the coverage can be extended later as needed.
    
    Signed-off-by: Yann Dirson <[email protected]>
    ydirson committed May 22, 2024
    Configuration menu
    Copy the full SHA
    121aada View commit details
    Browse the repository at this point in the history
  3. freebsd/netlink: hide feature between "future-freebsd-netlink" flag

    To allow the "Netlink on FreeBSD" feature to be usable before 0.3 gets
    released, this builds on top of both the netlink feature patch from rust-lang#3201
    if explicitely requested through a feature flag, but by default
    provides the ifmib constants where they are located in previous 0.2
    releases.
    
    Since this relies on creating the netlink constants in a separate
    module, and it seems we cannot check those automatically, avoids
    testing them.
    
    Signed-off-by: Yann Dirson <[email protected]>
    ydirson committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f210e11 View commit details
    Browse the repository at this point in the history