Page MenuHomeFreeBSD

libifconfig: Add netlink based link and address helper functions
AbandonedPublic

Authored by saheed on Aug 19 2025, 4:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 10:34 PM
Unknown Object (File)
Fri, Oct 10, 10:34 PM
Unknown Object (File)
Fri, Oct 10, 4:32 PM
Unknown Object (File)
Wed, Sep 24, 10:04 PM
Unknown Object (File)
Sep 16 2025, 9:58 AM
Unknown Object (File)
Sep 11 2025, 12:35 PM
Unknown Object (File)
Sep 8 2025, 5:02 PM
Unknown Object (File)
Sep 7 2025, 5:12 PM
Subscribers

Details

Reviewers
getz
obiwac
Summary

Adds the following RTM_*LINK related functions:

  • ifconfig_if_up and ifconfig_if_down to bring an interface up or down
  • ifconfig_get_mac and ifconfig_set_mac to retrieve and set MAC address

ifconfig_set_mac depends on https://reviews.freebsd.org/D51922

and the following RTM_*ADDR related functions:

  • ifconfig_add_inet and ifconfig_del_inet to add and remove IPv4 addresses
  • ifconfig_add_inet6 and ifconfig_del_inet6 to add and remove IPv6 addresses

The RTM_*ADDR related functions are derived from ifconfig

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 66347
Build 63230: arc lint + arc unit

Event Timeline

overall looks good. will look at this deeper and do a proper review later - I need to get the netlink snl stuff back into my mental context window :)

lib/libifconfig/libifconfig_nl.c
1–27

Someone can correct me if I'm wrong but I believe it's preferred not to include the whole license text in new files (i.e. just keep SPDX tag and copyright line)

Since the changes are quite large, I'll split them into smaller revisions :)

lib/libifconfig/libifconfig_nl.c
1–27

You're right. I'll replace it with just SPDX tag and copyright line