aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/sctp.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index e6b95bc4d8e6..d8e37ecea691 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -83,16 +83,6 @@
83#include <net/sctp/structs.h> 83#include <net/sctp/structs.h>
84#include <net/sctp/constants.h> 84#include <net/sctp/constants.h>
85 85
86
87/* Set SCTP_DEBUG flag via config if not already set. */
88#ifndef SCTP_DEBUG
89#ifdef CONFIG_SCTP_DBG_MSG
90#define SCTP_DEBUG 1
91#else
92#define SCTP_DEBUG 0
93#endif /* CONFIG_SCTP_DBG */
94#endif /* SCTP_DEBUG */
95
96#ifdef CONFIG_IP_SCTP_MODULE 86#ifdef CONFIG_IP_SCTP_MODULE
97#define SCTP_PROTOSW_FLAG 0 87#define SCTP_PROTOSW_FLAG 0
98#else /* static! */ 88#else /* static! */
@@ -270,61 +260,6 @@ static inline void sctp_max_rto(struct sctp_association *asoc,
270 } 260 }
271} 261}
272 262
273/* Print debugging messages. */
274#if SCTP_DEBUG
275extern int sctp_debug_flag;
276#define SCTP_DEBUG_PRINTK(fmt, args...) \
277do { \
278 if (sctp_debug_flag) \
279 printk(KERN_DEBUG pr_fmt(fmt), ##args); \
280} while (0)
281#define SCTP_DEBUG_PRINTK_CONT(fmt, args...) \
282do { \
283 if (sctp_debug_flag) \
284 pr_cont(fmt, ##args); \
285} while (0)
286#define SCTP_DEBUG_PRINTK_IPADDR(fmt_lead, fmt_trail, \
287 args_lead, addr, args_trail...) \
288do { \
289 const union sctp_addr *_addr = (addr); \
290 if (sctp_debug_flag) { \
291 if (_addr->sa.sa_family == AF_INET6) { \
292 printk(KERN_DEBUG \
293 pr_fmt(fmt_lead "%pI6" fmt_trail), \
294 args_lead, \
295 &_addr->v6.sin6_addr, \
296 args_trail); \
297 } else { \
298 printk(KERN_DEBUG \
299 pr_fmt(fmt_lead "%pI4" fmt_trail), \
300 args_lead, \
301 &_addr->v4.sin_addr.s_addr, \
302 args_trail); \
303 } \
304 } \
305} while (0)
306#define SCTP_ENABLE_DEBUG { sctp_debug_flag = 1; }
307#define SCTP_DISABLE_DEBUG { sctp_debug_flag = 0; }
308
309#define SCTP_ASSERT(expr, str, func) \
310 if (!(expr)) { \
311 SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \
312 str, (#expr), __FILE__, __func__, __LINE__); \
313 func; \
314 }
315
316#else /* SCTP_DEBUG */
317
318#define SCTP_DEBUG_PRINTK(whatever...)
319#define SCTP_DEBUG_PRINTK_CONT(fmt, args...)
320#define SCTP_DEBUG_PRINTK_IPADDR(whatever...)
321#define SCTP_ENABLE_DEBUG
322#define SCTP_DISABLE_DEBUG
323#define SCTP_ASSERT(expr, str, func)
324
325#endif /* SCTP_DEBUG */
326
327
328/* 263/*
329 * Macros for keeping a global reference of object allocations. 264 * Macros for keeping a global reference of object allocations.
330 */ 265 */
@@ -597,16 +532,6 @@ static inline int param_type2af(__be16 type)
597 } 532 }
598} 533}
599 534
600/* Perform some sanity checks. */
601static inline int sctp_sanity_check(void)
602{
603 SCTP_ASSERT(sizeof(struct sctp_ulpevent) <=
604 sizeof(((struct sk_buff *)0)->cb),
605 "SCTP: ulpevent does not fit in skb!\n", return 0);
606
607 return 1;
608}
609
610/* Warning: The following hash functions assume a power of two 'size'. */ 535/* Warning: The following hash functions assume a power of two 'size'. */
611/* This is the hash function for the SCTP port hash table. */ 536/* This is the hash function for the SCTP port hash table. */
612static inline int sctp_phashfn(struct net *net, __u16 lport) 537static inline int sctp_phashfn(struct net *net, __u16 lport)