Index | Thread | Search

From:
Jonathan Gray <jsg@jsg.id.au>
Subject:
make ifconfig build without trunklacp.h
To:
tech@openbsd.org
Date:
Sun, 26 Apr 2026 10:13:07 +1000

Download raw body.

Thread
The only use of trunklacp.h in ifconfig is LACP_STATE_BITS.

After this change trunklacp.h can be removed.

Index: sys/net/if_trunk.h
===================================================================
RCS file: /cvs/src/sys/net/if_trunk.h,v
diff -u -p -r1.33 if_trunk.h
--- sys/net/if_trunk.h	24 Nov 2025 23:40:00 -0000	1.33
+++ sys/net/if_trunk.h	25 Apr 2026 23:55:37 -0000
@@ -88,6 +88,17 @@ struct lacp_opreq {
 	u_int8_t		partner_state;
 };
 
+#define	LACP_STATE_BITS		\
+	"\020"			\
+	"\001ACTIVITY"		\
+	"\002TIMEOUT"		\
+	"\003AGGREGATION"	\
+	"\004SYNC"		\
+	"\005COLLECTING"	\
+	"\006DISTRIBUTING"	\
+	"\007DEFAULTED"		\
+	"\010EXPIRED"
+
 /* Trunk port settings */
 struct trunk_reqport {
 	char			rp_ifname[IFNAMSIZ];	/* name of the trunk */
Index: sbin/ifconfig/ifconfig.c
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
diff -u -p -r1.480 ifconfig.c
--- sbin/ifconfig/ifconfig.c	3 Dec 2025 10:19:27 -0000	1.480
+++ sbin/ifconfig/ifconfig.c	25 Apr 2026 23:56:20 -0000
@@ -83,7 +83,6 @@
 #include <net/if_pppoe.h>
 #include <net/if_trunk.h>
 #include <net/if_wg.h>
-#include <net/trunklacp.h>
 #include <net/if_sppp.h>
 #include <net/ppp_defs.h>