aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2026-05-29 16:23:17 +0000
committerEd Maste <emaste@FreeBSD.org>2026-06-15 12:36:16 +0000
commit21a75a85f0e0cc328b6e9b437d783ef0c25dc52e (patch)
treebe2d36f742ec4c5f60808f6dc59a143fb3144d90
parent03676cafa882c471a29436aae76c8751d451dd07 (diff)
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
-rw-r--r--share/man/man4/rtnetlink.417
-rw-r--r--sys/netlink/route/interface.h4
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 */
};