diff options
author | 2011-07-07 20:41:36 +0000 | |
---|---|---|
committer | 2011-07-07 20:41:36 +0000 | |
commit | 8e4e4eed536c0f65c2953174ef9f6b6af00a9f61 (patch) | |
tree | 342b5bed4792cc8e965b059d00711420b9dfc70d | |
parent | no Pp before/after Ss/Sh; (diff) | |
download | wireguard-openbsd-8e4e4eed536c0f65c2953174ef9f6b6af00a9f61.tar.xz wireguard-openbsd-8e4e4eed536c0f65c2953174ef9f6b6af00a9f61.zip |
provide IF_LEN and IFQ_LEN to access ifq_len on an ifqueue, ryan ok
-rw-r--r-- | sys/net/if.h | 4 |
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) |