summaryrefslogtreecommitdiff
path: root/sys/net/if_trunk.h
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2007-01-31 06:20:20 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2007-01-31 06:20:20 +0000
commit1d9519591e87ace4bba7e7aef4ec611f88b9d4cc (patch)
tree3bdc1862db862e144a0b3861bd3f5e6af15bea3f /sys/net/if_trunk.h
parent57f2b343dcf2b59e8b9cad0333ce1a803202c2be (diff)
handle the full duplex link state in trunk(4). load sharing trunks
with at least two ports are always handled as full fuplex links. this change will allow trunks as edge ports in a rstp bridge(4). ok brad@ pyr@
Diffstat (limited to 'sys/net/if_trunk.h')
-rw-r--r--sys/net/if_trunk.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/net/if_trunk.h b/sys/net/if_trunk.h
index 92a70187a26..0ab4ed719f2 100644
--- a/sys/net/if_trunk.h
+++ b/sys/net/if_trunk.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.h,v 1.10 2006/05/28 01:14:15 reyk Exp $ */
+/* $OpenBSD: if_trunk.h,v 1.11 2007/01/31 06:20:19 reyk Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@@ -115,7 +115,7 @@ struct trunk_port {
#define tp_capabilities tp_if->if_capabilities /* capabilities */
#define TRUNK_PORTACTIVE(_tp) ( \
- ((_tp)->tp_link_state != LINK_STATE_DOWN) && \
+ (LINK_STATE_IS_UP((_tp)->tp_link_state)) && \
((_tp)->tp_ifflags & IFF_UP) \
)
@@ -168,6 +168,9 @@ struct trunk_softc {
#define tr_ifname tr_ac.ac_if.if_xname /* name */
#define tr_capabilities tr_ac.ac_if.if_capabilities /* capabilities */
+#define IFCAP_TRUNK_MASK 0xffff0000 /* private capabilities */
+#define IFCAP_TRUNK_FULLDUPLEX 0x00010000 /* full duplex with >1 ports */
+
/* Private data used by the loadbalancing protocol */
#define TRUNK_LB_MAXKEYS 8
struct trunk_lb {