summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2011-07-07 20:41:37 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2011-07-07 20:41:37 +0000
commitc2c49577053bdab156761ac49dc3b55fc92381ba (patch)
tree0c1a8258b9a2d27c3e4d1108f46b317adcc7e02c /sys
parent824a57c85d2c8d1319b63412b681410d105ef15c (diff)
provide IF_LEN and IFQ_LEN to access ifq_len on an ifqueue, ryan ok
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index 0a493f62cef..e3afe61778e 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.126 2011/07/05 00:58:27 henning Exp $ */
+/* $OpenBSD: if.h,v 1.127 2011/07/07 20:41:36 henning Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -418,6 +418,7 @@ do { \
m_freem(__m0); \
} \
} while (/* CONSTCOND */0)
+#define IF_LEN(ifq) ((ifq)->ifq_len)
#define IF_IS_EMPTY(ifq) ((ifq)->ifq_len == 0)
#define IFQ_MAXLEN 256
@@ -759,6 +760,7 @@ do { \
#endif /* ALTQ */
+#define IFQ_LEN(ifq) IF_LEN(ifq)
#define IFQ_IS_EMPTY(ifq) ((ifq)->ifq_len == 0)
#define IFQ_INC_LEN(ifq) ((ifq)->ifq_len++)
#define IFQ_DEC_LEN(ifq) (--(ifq)->ifq_len)