summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-11-28 19:21:17 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-11-28 19:21:17 +0000
commit42dc4672e2746e5183c5a29733c654f4a9644cce (patch)
treedf76318348d55acb95fe86483447a0ed376640df /sys/net
parent0e1919712e2589382b2029732a09c5ce9488a2cb (diff)
add additional link states to report the half duplex / full duplex
state, if known by the driver. this is required to check the full duplex state without depending on the ifmedia ioctl which can't be called in the kernel without process context. ok henning@, brad@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index ddc6f8d76a8..5c6026faba0 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.84 2006/11/16 13:09:27 henning Exp $ */
+/* $OpenBSD: if.h,v 1.85 2006/11/28 19:21:15 reyk Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -150,6 +150,9 @@ struct ifqueue {
#define LINK_STATE_UNKNOWN 0 /* link invalid/unknown */
#define LINK_STATE_DOWN 1 /* link is down */
#define LINK_STATE_UP 2 /* link is up */
+#define LINK_STATE_HALF_DUPLEX 3 /* link is up and half duplex */
+#define LINK_STATE_FULL_DUPLEX 4 /* link is up and full duplex */
+#define LINK_STATE_IS_UP(_s) ((_s) >= LINK_STATE_UP)
/*
* Structure defining a queue for a network interface.