aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/dccp.h
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2006-11-15 18:27:47 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:49 -0500
commit3c6952624a8f600f9a0fbc1f5db5560a7ef9b13e (patch)
tree294924e950000cd786b0cdaf026ed58b2f81102d /net/dccp/dccp.h
parent6bb100b9fc8f1ce330231b360028ab705a9f0378 (diff)
[DCCP]: Introduce DCCP_{BUG{_ON},CRIT} macros, use enum:8 for the ccid3 states
This patch tackles the following problem: * the ccid3_hc_{t,r}x_sock define ccid3hc{t,r}x_state as `u8', but in reality there can only be a few, pre-defined enum names * this necessitates addiditional checking for unexpected values which would otherwise be caught by the compiler Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r--net/dccp/dccp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 363fa520056e..ecb4e7bd1a84 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -18,6 +18,14 @@
18#include <net/tcp.h> 18#include <net/tcp.h>
19#include "ackvec.h" 19#include "ackvec.h"
20 20
21#define DCCP_CRIT(fmt, a...) LIMIT_NETDEBUG(KERN_CRIT fmt " at %s:%d/%s()\n", \
22 ##a, __FILE__, __LINE__, __FUNCTION__)
23#define DCCP_BUG(fmt, a...) do { DCCP_CRIT(fmt, ##a); dump_stack(); } while (0)
24#define DCCP_BUG_ON(cond) do { if (unlikely((cond) == 0)) \
25 DCCP_BUG("BUG: condition \"%s\" fails",\
26 __stringify((cond))); \
27 } while (0)
28
21#ifdef CONFIG_IP_DCCP_DEBUG 29#ifdef CONFIG_IP_DCCP_DEBUG
22extern int dccp_debug; 30extern int dccp_debug;
23 31