The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=21a75a85f0e0cc328b6e9b437d783ef0c25dc52e
commit 21a75a85f0e0cc328b6e9b437d783ef0c25dc52e Author: Ed Maste <[email protected]> AuthorDate: 2026-05-29 16:23:17 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-06-15 12:36:16 +0000 netlink: Indicate that ifinfomsg uses IFT_* types On Linux struct ifinfomsg uses ARPHRD_* values, while we used IFT_* types (which derive from SNMP ifType definitions in RFC 1573). Update the header to reflect this. PR: 272144 Reviewed by: pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57334 --- share/man/man4/rtnetlink.4 | 17 +++++++++++++++-- sys/netlink/route/interface.h | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/share/man/man4/rtnetlink.4 b/share/man/man4/rtnetlink.4 index 2161db157234..d756cd031145 100644 --- a/share/man/man4/rtnetlink.4 +++ b/share/man/man4/rtnetlink.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 15, 2026 +.Dd June 15, 2026 .Dt RTNETLINK 4 .Os .Sh NAME @@ -275,12 +275,25 @@ All interface configuration messages share the common header: struct ifinfomsg { unsigned char ifi_family; /* not used, set to 0 */ unsigned char __ifi_pad; - unsigned short ifi_type; /* ARPHRD_* */ + unsigned short ifi_type; /* IFT_* */ int ifi_index; /* Interface index */ unsigned ifi_flags; /* IFF_* flags */ unsigned ifi_change; /* IFF_* change mask */ }; .Ed +.Pp +.Sy Note : +On +.Fx +the +.Va ifi_type +field uses +.Dv IFT_* +constants from +.In net/if_types.h +rather than +.Dv ARPHRD_* +as on Linux. .Ss RTM_NEWLINK Creates a new interface. The only mandatory TLV is diff --git a/sys/netlink/route/interface.h b/sys/netlink/route/interface.h index 0bd06ff1f6d5..e6aef3d702d8 100644 --- a/sys/netlink/route/interface.h +++ b/sys/netlink/route/interface.h @@ -36,8 +36,8 @@ struct ifinfomsg { unsigned char ifi_family; /* not used */ unsigned char __ifi_pad; - unsigned short ifi_type; /* ARPHRD_* */ - int ifi_index; /* Inteface index */ + unsigned short ifi_type; /* IFT_* (net/if_types.h) */ + int ifi_index; /* Interface index */ unsigned ifi_flags; /* IFF_* flags */ unsigned ifi_change; /* IFF_* change mask */ };
