summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/ifconfig/ifconfig.c17
-rw-r--r--sys/net/trunklacp.h24
2 files changed, 28 insertions, 13 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index a76a90c71fe..586830b626e 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.365 2018/04/26 12:50:07 pirofti Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.366 2018/05/12 02:02:34 ccardenas Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -84,6 +84,7 @@
#include <net/if_pflow.h>
#include <net/if_pppoe.h>
#include <net/if_trunk.h>
+#include <net/trunklacp.h>
#include <net/if_sppp.h>
#include <net/ppp_defs.h>
@@ -3957,6 +3958,20 @@ trunk_status(void)
}
for (i = 0; i < ra.ra_ports; i++) {
+ lp = (struct lacp_opreq *)&(rpbuf[i].rp_lacpreq);
+ if (ra.ra_proto == TRUNK_PROTO_LACP) {
+ printf("\t\ttrunkport %s lacp_state actor ",
+ rpbuf[i].rp_portname);
+ printb_status(lp->actor_state,
+ LACP_STATE_BITS);
+ putchar('\n');
+ printf("\t\ttrunkport %s lacp_state partner ",
+ rpbuf[i].rp_portname);
+ printb_status(lp->partner_state,
+ LACP_STATE_BITS);
+ putchar('\n');
+ }
+
printf("\t\ttrunkport %s ", rpbuf[i].rp_portname);
printb_status(rpbuf[i].rp_flags, TRUNK_PORT_BITS);
putchar('\n');
diff --git a/sys/net/trunklacp.h b/sys/net/trunklacp.h
index 98ba86157ff..869076aa4ea 100644
--- a/sys/net/trunklacp.h
+++ b/sys/net/trunklacp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: trunklacp.h,v 1.12 2017/10/29 08:36:10 mpi Exp $ */
+/* $OpenBSD: trunklacp.h,v 1.13 2018/05/12 02:02:34 ccardenas Exp $ */
/* $NetBSD: ieee8023ad_impl.h,v 1.2 2005/12/10 23:21:39 elad Exp $ */
/*
@@ -110,6 +110,17 @@ struct lacp_markerinfo {
u_int8_t mi_pad[2];
} __packed;
+#define LACP_STATE_BITS \
+ "\020" \
+ "\001ACTIVITY" \
+ "\002TIMEOUT" \
+ "\003AGGREGATION" \
+ "\004SYNC" \
+ "\005COLLECTING" \
+ "\006DISTRIBUTING" \
+ "\007DEFAULTED" \
+ "\010EXPIRED"
+
#ifdef _KERNEL
/*
@@ -142,17 +153,6 @@ struct lacp_markerinfo {
#define LACP_PORT_NTT 0x00000001
#define LACP_PORT_MARK 0x00000002
-#define LACP_STATE_BITS \
- "\020" \
- "\001ACTIVITY" \
- "\002TIMEOUT" \
- "\003AGGREGATION" \
- "\004SYNC" \
- "\005COLLECTING" \
- "\006DISTRIBUTING" \
- "\007DEFAULTED" \
- "\010EXPIRED"
-
struct markerdu {
struct ether_header mdu_eh;
struct slowprothdr mdu_sph;