Page MenuHomeFreeBSD

netlink: Indicate that ifinfomsg uses IFT_* types
AcceptedPublic

Authored by emaste on Fri, May 29, 4:29 PM.
Tags
None
Referenced Files
F159365438: D57334.id.diff
Sat, Jun 13, 8:21 AM
Unknown Object (File)
Wed, Jun 10, 6:51 AM
Unknown Object (File)
Tue, Jun 9, 9:38 AM
Unknown Object (File)
Mon, Jun 8, 8:23 AM
Unknown Object (File)
Mon, Jun 8, 8:17 AM
Unknown Object (File)
Sat, Jun 6, 9:17 PM
Unknown Object (File)
Sat, Jun 6, 9:12 PM
Unknown Object (File)
Sat, Jun 6, 2:26 PM
Subscribers

Details

Reviewers
bz
pouria
melifaro
Group Reviewers
network
Summary
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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

netlink specs clearly want to use arp types (ARPHRD_*). (See include/uapi/linux/rtnetlink.h of linux)
However, IMO, using arp types are not appropriate here, because we actually want to get the actual interface type ifp->if_type.
therefore our current implementation (IFT_*) is correct.

We also provide compatibility for linux.
For example we map our IFT_ETHER to ARPHDR_ETHER type in sys/compat/linux/linux_netlink.c:366.

This should be enough reasoning/evidence for PR272144.
Please add a note here to clarify that NOT using ARPHRD_* is intentional.
This should also close that PR too.

This revision is now accepted and ready to land.Fri, May 29, 9:21 PM

Don't forget to update the comment on the man page for rtnetlink(4).