dccp.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. #ifndef _DCCP_H
  2. #define _DCCP_H
  3. /*
  4. * net/dccp/dccp.h
  5. *
  6. * An implementation of the DCCP protocol
  7. * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  8. * Copyright (c) 2005-6 Ian McDonald <ian.mcdonald@jandi.co.nz>
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <linux/dccp.h>
  15. #include <linux/ktime.h>
  16. #include <net/snmp.h>
  17. #include <net/sock.h>
  18. #include <net/tcp.h>
  19. #include "ackvec.h"
  20. /*
  21. * DCCP - specific warning and debugging macros.
  22. */
  23. #define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \
  24. __func__, ##a)
  25. #define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
  26. __FILE__, __LINE__, __func__)
  27. #define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
  28. #define DCCP_BUG_ON(cond) do { if (unlikely((cond) != 0)) \
  29. DCCP_BUG("\"%s\" holds (exception!)", \
  30. __stringify(cond)); \
  31. } while (0)
  32. #define DCCP_PRINTK(enable, fmt, args...) do { if (enable) \
  33. printk(fmt, ##args); \
  34. } while(0)
  35. #define DCCP_PR_DEBUG(enable, fmt, a...) DCCP_PRINTK(enable, KERN_DEBUG \
  36. "%s: " fmt, __func__, ##a)
  37. #ifdef CONFIG_IP_DCCP_DEBUG
  38. extern bool dccp_debug;
  39. #define dccp_pr_debug(format, a...) DCCP_PR_DEBUG(dccp_debug, format, ##a)
  40. #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a)
  41. #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
  42. #else
  43. #define dccp_pr_debug(format, a...)
  44. #define dccp_pr_debug_cat(format, a...)
  45. #define dccp_debug(format, a...)
  46. #endif
  47. extern struct inet_hashinfo dccp_hashinfo;
  48. extern struct percpu_counter dccp_orphan_count;
  49. extern void dccp_time_wait(struct sock *sk, int state, int timeo);
  50. /*
  51. * Set safe upper bounds for header and option length. Since Data Offset is 8
  52. * bits (RFC 4340, sec. 5.1), the total header length can never be more than
  53. * 4 * 255 = 1020 bytes. The largest possible header length is 28 bytes (X=1):
  54. * - DCCP-Response with ACK Subheader and 4 bytes of Service code OR
  55. * - DCCP-Reset with ACK Subheader and 4 bytes of Reset Code fields
  56. * Hence a safe upper bound for the maximum option length is 1020-28 = 992
  57. */
  58. #define MAX_DCCP_SPECIFIC_HEADER (255 * sizeof(uint32_t))
  59. #define DCCP_MAX_PACKET_HDR 28
  60. #define DCCP_MAX_OPT_LEN (MAX_DCCP_SPECIFIC_HEADER - DCCP_MAX_PACKET_HDR)
  61. #define MAX_DCCP_HEADER (MAX_DCCP_SPECIFIC_HEADER + MAX_HEADER)
  62. /* Upper bound for initial feature-negotiation overhead (padded to 32 bits) */
  63. #define DCCP_FEATNEG_OVERHEAD (32 * sizeof(uint32_t))
  64. #define DCCP_TIMEWAIT_LEN (60 * HZ) /* how long to wait to destroy TIME-WAIT
  65. * state, about 60 seconds */
  66. /* RFC 1122, 4.2.3.1 initial RTO value */
  67. #define DCCP_TIMEOUT_INIT ((unsigned int)(3 * HZ))
  68. /*
  69. * The maximum back-off value for retransmissions. This is needed for
  70. * - retransmitting client-Requests (sec. 8.1.1),
  71. * - retransmitting Close/CloseReq when closing (sec. 8.3),
  72. * - feature-negotiation retransmission (sec. 6.6.3),
  73. * - Acks in client-PARTOPEN state (sec. 8.1.5).
  74. */
  75. #define DCCP_RTO_MAX ((unsigned int)(64 * HZ))
  76. /*
  77. * RTT sampling: sanity bounds and fallback RTT value from RFC 4340, section 3.4
  78. */
  79. #define DCCP_SANE_RTT_MIN 100
  80. #define DCCP_FALLBACK_RTT (USEC_PER_SEC / 5)
  81. #define DCCP_SANE_RTT_MAX (3 * USEC_PER_SEC)
  82. /* sysctl variables for DCCP */
  83. extern int sysctl_dccp_request_retries;
  84. extern int sysctl_dccp_retries1;
  85. extern int sysctl_dccp_retries2;
  86. extern int sysctl_dccp_tx_qlen;
  87. extern int sysctl_dccp_sync_ratelimit;
  88. /*
  89. * 48-bit sequence number arithmetic (signed and unsigned)
  90. */
  91. #define INT48_MIN 0x800000000000LL /* 2^47 */
  92. #define UINT48_MAX 0xFFFFFFFFFFFFLL /* 2^48 - 1 */
  93. #define COMPLEMENT48(x) (0x1000000000000LL - (x)) /* 2^48 - x */
  94. #define TO_SIGNED48(x) (((x) < INT48_MIN)? (x) : -COMPLEMENT48( (x)))
  95. #define TO_UNSIGNED48(x) (((x) >= 0)? (x) : COMPLEMENT48(-(x)))
  96. #define ADD48(a, b) (((a) + (b)) & UINT48_MAX)
  97. #define SUB48(a, b) ADD48((a), COMPLEMENT48(b))
  98. static inline void dccp_set_seqno(u64 *seqno, u64 value)
  99. {
  100. *seqno = value & UINT48_MAX;
  101. }
  102. static inline void dccp_inc_seqno(u64 *seqno)
  103. {
  104. *seqno = ADD48(*seqno, 1);
  105. }
  106. /* signed mod-2^48 distance: pos. if seqno1 < seqno2, neg. if seqno1 > seqno2 */
  107. static inline s64 dccp_delta_seqno(const u64 seqno1, const u64 seqno2)
  108. {
  109. u64 delta = SUB48(seqno2, seqno1);
  110. return TO_SIGNED48(delta);
  111. }
  112. /* is seq1 < seq2 ? */
  113. static inline int before48(const u64 seq1, const u64 seq2)
  114. {
  115. return (s64)((seq2 << 16) - (seq1 << 16)) > 0;
  116. }
  117. /* is seq1 > seq2 ? */
  118. #define after48(seq1, seq2) before48(seq2, seq1)
  119. /* is seq2 <= seq1 <= seq3 ? */
  120. static inline int between48(const u64 seq1, const u64 seq2, const u64 seq3)
  121. {
  122. return (seq3 << 16) - (seq2 << 16) >= (seq1 << 16) - (seq2 << 16);
  123. }
  124. static inline u64 max48(const u64 seq1, const u64 seq2)
  125. {
  126. return after48(seq1, seq2) ? seq1 : seq2;
  127. }
  128. /**
  129. * dccp_loss_count - Approximate the number of lost data packets in a burst loss
  130. * @s1: last known sequence number before the loss ('hole')
  131. * @s2: first sequence number seen after the 'hole'
  132. * @ndp: NDP count on packet with sequence number @s2
  133. */
  134. static inline u64 dccp_loss_count(const u64 s1, const u64 s2, const u64 ndp)
  135. {
  136. s64 delta = dccp_delta_seqno(s1, s2);
  137. WARN_ON(delta < 0);
  138. delta -= ndp + 1;
  139. return delta > 0 ? delta : 0;
  140. }
  141. /**
  142. * dccp_loss_free - Evaluate condition for data loss from RFC 4340, 7.7.1
  143. */
  144. static inline bool dccp_loss_free(const u64 s1, const u64 s2, const u64 ndp)
  145. {
  146. return dccp_loss_count(s1, s2, ndp) == 0;
  147. }
  148. enum {
  149. DCCP_MIB_NUM = 0,
  150. DCCP_MIB_ACTIVEOPENS, /* ActiveOpens */
  151. DCCP_MIB_ESTABRESETS, /* EstabResets */
  152. DCCP_MIB_CURRESTAB, /* CurrEstab */
  153. DCCP_MIB_OUTSEGS, /* OutSegs */
  154. DCCP_MIB_OUTRSTS,
  155. DCCP_MIB_ABORTONTIMEOUT,
  156. DCCP_MIB_TIMEOUTS,
  157. DCCP_MIB_ABORTFAILED,
  158. DCCP_MIB_PASSIVEOPENS,
  159. DCCP_MIB_ATTEMPTFAILS,
  160. DCCP_MIB_OUTDATAGRAMS,
  161. DCCP_MIB_INERRS,
  162. DCCP_MIB_OPTMANDATORYERROR,
  163. DCCP_MIB_INVALIDOPT,
  164. __DCCP_MIB_MAX
  165. };
  166. #define DCCP_MIB_MAX __DCCP_MIB_MAX
  167. struct dccp_mib {
  168. unsigned long mibs[DCCP_MIB_MAX];
  169. };
  170. DECLARE_SNMP_STAT(struct dccp_mib, dccp_statistics);
  171. #define DCCP_INC_STATS(field) SNMP_INC_STATS(dccp_statistics, field)
  172. #define DCCP_INC_STATS_BH(field) SNMP_INC_STATS_BH(dccp_statistics, field)
  173. #define DCCP_DEC_STATS(field) SNMP_DEC_STATS(dccp_statistics, field)
  174. /*
  175. * Checksumming routines
  176. */
  177. static inline unsigned int dccp_csum_coverage(const struct sk_buff *skb)
  178. {
  179. const struct dccp_hdr* dh = dccp_hdr(skb);
  180. if (dh->dccph_cscov == 0)
  181. return skb->len;
  182. return (dh->dccph_doff + dh->dccph_cscov - 1) * sizeof(u32);
  183. }
  184. static inline void dccp_csum_outgoing(struct sk_buff *skb)
  185. {
  186. unsigned int cov = dccp_csum_coverage(skb);
  187. if (cov >= skb->len)
  188. dccp_hdr(skb)->dccph_cscov = 0;
  189. skb->csum = skb_checksum(skb, 0, (cov > skb->len)? skb->len : cov, 0);
  190. }
  191. extern void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb);
  192. extern int dccp_retransmit_skb(struct sock *sk);
  193. extern void dccp_send_ack(struct sock *sk);
  194. extern void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
  195. struct request_sock *rsk);
  196. extern void dccp_send_sync(struct sock *sk, const u64 seq,
  197. const enum dccp_pkt_type pkt_type);
  198. /*
  199. * TX Packet Dequeueing Interface
  200. */
  201. extern void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb);
  202. extern bool dccp_qpolicy_full(struct sock *sk);
  203. extern void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb);
  204. extern struct sk_buff *dccp_qpolicy_top(struct sock *sk);
  205. extern struct sk_buff *dccp_qpolicy_pop(struct sock *sk);
  206. extern bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param);
  207. /*
  208. * TX Packet Output and TX Timers
  209. */
  210. extern void dccp_write_xmit(struct sock *sk);
  211. extern void dccp_write_space(struct sock *sk);
  212. extern void dccp_flush_write_queue(struct sock *sk, long *time_budget);
  213. extern void dccp_init_xmit_timers(struct sock *sk);
  214. static inline void dccp_clear_xmit_timers(struct sock *sk)
  215. {
  216. inet_csk_clear_xmit_timers(sk);
  217. }
  218. extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu);
  219. extern const char *dccp_packet_name(const int type);
  220. extern void dccp_set_state(struct sock *sk, const int state);
  221. extern void dccp_done(struct sock *sk);
  222. extern int dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp,
  223. struct sk_buff const *skb);
  224. extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
  225. extern struct sock *dccp_create_openreq_child(struct sock *sk,
  226. const struct request_sock *req,
  227. const struct sk_buff *skb);
  228. extern int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb);
  229. extern struct sock *dccp_v4_request_recv_sock(struct sock *sk,
  230. struct sk_buff *skb,
  231. struct request_sock *req,
  232. struct dst_entry *dst);
  233. extern struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb,
  234. struct request_sock *req,
  235. struct request_sock **prev);
  236. extern int dccp_child_process(struct sock *parent, struct sock *child,
  237. struct sk_buff *skb);
  238. extern int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
  239. struct dccp_hdr *dh, unsigned int len);
  240. extern int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
  241. const struct dccp_hdr *dh, const unsigned int len);
  242. extern int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized);
  243. extern void dccp_destroy_sock(struct sock *sk);
  244. extern void dccp_close(struct sock *sk, long timeout);
  245. extern struct sk_buff *dccp_make_response(struct sock *sk,
  246. struct dst_entry *dst,
  247. struct request_sock *req);
  248. extern int dccp_connect(struct sock *sk);
  249. extern int dccp_disconnect(struct sock *sk, int flags);
  250. extern int dccp_getsockopt(struct sock *sk, int level, int optname,
  251. char __user *optval, int __user *optlen);
  252. extern int dccp_setsockopt(struct sock *sk, int level, int optname,
  253. char __user *optval, unsigned int optlen);
  254. #ifdef CONFIG_COMPAT
  255. extern int compat_dccp_getsockopt(struct sock *sk,
  256. int level, int optname,
  257. char __user *optval, int __user *optlen);
  258. extern int compat_dccp_setsockopt(struct sock *sk,
  259. int level, int optname,
  260. char __user *optval, unsigned int optlen);
  261. #endif
  262. extern int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg);
  263. extern int dccp_sendmsg(struct kiocb *iocb, struct sock *sk,
  264. struct msghdr *msg, size_t size);
  265. extern int dccp_recvmsg(struct kiocb *iocb, struct sock *sk,
  266. struct msghdr *msg, size_t len, int nonblock,
  267. int flags, int *addr_len);
  268. extern void dccp_shutdown(struct sock *sk, int how);
  269. extern int inet_dccp_listen(struct socket *sock, int backlog);
  270. extern unsigned int dccp_poll(struct file *file, struct socket *sock,
  271. poll_table *wait);
  272. extern int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr,
  273. int addr_len);
  274. extern struct sk_buff *dccp_ctl_make_reset(struct sock *sk,
  275. struct sk_buff *skb);
  276. extern int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code);
  277. extern void dccp_send_close(struct sock *sk, const int active);
  278. extern int dccp_invalid_packet(struct sk_buff *skb);
  279. extern u32 dccp_sample_rtt(struct sock *sk, long delta);
  280. static inline int dccp_bad_service_code(const struct sock *sk,
  281. const __be32 service)
  282. {
  283. const struct dccp_sock *dp = dccp_sk(sk);
  284. if (dp->dccps_service == service)
  285. return 0;
  286. return !dccp_list_has_service(dp->dccps_service_list, service);
  287. }
  288. /**
  289. * dccp_skb_cb - DCCP per-packet control information
  290. * @dccpd_type: one of %dccp_pkt_type (or unknown)
  291. * @dccpd_ccval: CCVal field (5.1), see e.g. RFC 4342, 8.1
  292. * @dccpd_reset_code: one of %dccp_reset_codes
  293. * @dccpd_reset_data: Data1..3 fields (depend on @dccpd_reset_code)
  294. * @dccpd_opt_len: total length of all options (5.8) in the packet
  295. * @dccpd_seq: sequence number
  296. * @dccpd_ack_seq: acknowledgment number subheader field value
  297. * This is used for transmission as well as for reception.
  298. */
  299. struct dccp_skb_cb {
  300. union {
  301. struct inet_skb_parm h4;
  302. #if IS_ENABLED(CONFIG_IPV6)
  303. struct inet6_skb_parm h6;
  304. #endif
  305. } header;
  306. __u8 dccpd_type:4;
  307. __u8 dccpd_ccval:4;
  308. __u8 dccpd_reset_code,
  309. dccpd_reset_data[3];
  310. __u16 dccpd_opt_len;
  311. __u64 dccpd_seq;
  312. __u64 dccpd_ack_seq;
  313. };
  314. #define DCCP_SKB_CB(__skb) ((struct dccp_skb_cb *)&((__skb)->cb[0]))
  315. /* RFC 4340, sec. 7.7 */
  316. static inline int dccp_non_data_packet(const struct sk_buff *skb)
  317. {
  318. const __u8 type = DCCP_SKB_CB(skb)->dccpd_type;
  319. return type == DCCP_PKT_ACK ||
  320. type == DCCP_PKT_CLOSE ||
  321. type == DCCP_PKT_CLOSEREQ ||
  322. type == DCCP_PKT_RESET ||
  323. type == DCCP_PKT_SYNC ||
  324. type == DCCP_PKT_SYNCACK;
  325. }
  326. /* RFC 4340, sec. 7.7 */
  327. static inline int dccp_data_packet(const struct sk_buff *skb)
  328. {
  329. const __u8 type = DCCP_SKB_CB(skb)->dccpd_type;
  330. return type == DCCP_PKT_DATA ||
  331. type == DCCP_PKT_DATAACK ||
  332. type == DCCP_PKT_REQUEST ||
  333. type == DCCP_PKT_RESPONSE;
  334. }
  335. static inline int dccp_packet_without_ack(const struct sk_buff *skb)
  336. {
  337. const __u8 type = DCCP_SKB_CB(skb)->dccpd_type;
  338. return type == DCCP_PKT_DATA || type == DCCP_PKT_REQUEST;
  339. }
  340. #define DCCP_PKT_WITHOUT_ACK_SEQ (UINT48_MAX << 2)
  341. static inline void dccp_hdr_set_seq(struct dccp_hdr *dh, const u64 gss)
  342. {
  343. struct dccp_hdr_ext *dhx = (struct dccp_hdr_ext *)((void *)dh +
  344. sizeof(*dh));
  345. dh->dccph_seq2 = 0;
  346. dh->dccph_seq = htons((gss >> 32) & 0xfffff);
  347. dhx->dccph_seq_low = htonl(gss & 0xffffffff);
  348. }
  349. static inline void dccp_hdr_set_ack(struct dccp_hdr_ack_bits *dhack,
  350. const u64 gsr)
  351. {
  352. dhack->dccph_reserved1 = 0;
  353. dhack->dccph_ack_nr_high = htons(gsr >> 32);
  354. dhack->dccph_ack_nr_low = htonl(gsr & 0xffffffff);
  355. }
  356. static inline void dccp_update_gsr(struct sock *sk, u64 seq)
  357. {
  358. struct dccp_sock *dp = dccp_sk(sk);
  359. if (after48(seq, dp->dccps_gsr))
  360. dp->dccps_gsr = seq;
  361. /* Sequence validity window depends on remote Sequence Window (7.5.1) */
  362. dp->dccps_swl = SUB48(ADD48(dp->dccps_gsr, 1), dp->dccps_r_seq_win / 4);
  363. /*
  364. * Adjust SWL so that it is not below ISR. In contrast to RFC 4340,
  365. * 7.5.1 we perform this check beyond the initial handshake: W/W' are
  366. * always > 32, so for the first W/W' packets in the lifetime of a
  367. * connection we always have to adjust SWL.
  368. * A second reason why we are doing this is that the window depends on
  369. * the feature-remote value of Sequence Window: nothing stops the peer
  370. * from updating this value while we are busy adjusting SWL for the
  371. * first W packets (we would have to count from scratch again then).
  372. * Therefore it is safer to always make sure that the Sequence Window
  373. * is not artificially extended by a peer who grows SWL downwards by
  374. * continually updating the feature-remote Sequence-Window.
  375. * If sequence numbers wrap it is bad luck. But that will take a while
  376. * (48 bit), and this measure prevents Sequence-number attacks.
  377. */
  378. if (before48(dp->dccps_swl, dp->dccps_isr))
  379. dp->dccps_swl = dp->dccps_isr;
  380. dp->dccps_swh = ADD48(dp->dccps_gsr, (3 * dp->dccps_r_seq_win) / 4);
  381. }
  382. static inline void dccp_update_gss(struct sock *sk, u64 seq)
  383. {
  384. struct dccp_sock *dp = dccp_sk(sk);
  385. dp->dccps_gss = seq;
  386. /* Ack validity window depends on local Sequence Window value (7.5.1) */
  387. dp->dccps_awl = SUB48(ADD48(dp->dccps_gss, 1), dp->dccps_l_seq_win);
  388. /* Adjust AWL so that it is not below ISS - see comment above for SWL */
  389. if (before48(dp->dccps_awl, dp->dccps_iss))
  390. dp->dccps_awl = dp->dccps_iss;
  391. dp->dccps_awh = dp->dccps_gss;
  392. }
  393. static inline int dccp_ackvec_pending(const struct sock *sk)
  394. {
  395. return dccp_sk(sk)->dccps_hc_rx_ackvec != NULL &&
  396. !dccp_ackvec_is_empty(dccp_sk(sk)->dccps_hc_rx_ackvec);
  397. }
  398. static inline int dccp_ack_pending(const struct sock *sk)
  399. {
  400. return dccp_ackvec_pending(sk) || inet_csk_ack_scheduled(sk);
  401. }
  402. extern int dccp_feat_signal_nn_change(struct sock *sk, u8 feat, u64 nn_val);
  403. extern int dccp_feat_finalise_settings(struct dccp_sock *dp);
  404. extern int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq);
  405. extern int dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*,
  406. struct sk_buff *skb);
  407. extern int dccp_feat_activate_values(struct sock *sk, struct list_head *fn);
  408. extern void dccp_feat_list_purge(struct list_head *fn_list);
  409. extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
  410. extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*);
  411. extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
  412. extern u32 dccp_timestamp(void);
  413. extern void dccp_timestamping_init(void);
  414. extern int dccp_insert_option(struct sk_buff *skb, unsigned char option,
  415. const void *value, unsigned char len);
  416. #ifdef CONFIG_SYSCTL
  417. extern int dccp_sysctl_init(void);
  418. extern void dccp_sysctl_exit(void);
  419. #else
  420. static inline int dccp_sysctl_init(void)
  421. {
  422. return 0;
  423. }
  424. static inline void dccp_sysctl_exit(void)
  425. {
  426. }
  427. #endif
  428. #endif /* _DCCP_H */