hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/dccp/dccp.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 #ifndef _DCCP_H
23 #define _DCCP_H
34 /*
....@@ -6,10 +7,6 @@
67 * An implementation of the DCCP protocol
78 * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
89 * 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.
1310 */
1411
1512 #include <linux/dccp.h>
....@@ -110,11 +107,6 @@
110107 #define TO_UNSIGNED48(x) (((x) >= 0)? (x) : COMPLEMENT48(-(x)))
111108 #define ADD48(a, b) (((a) + (b)) & UINT48_MAX)
112109 #define SUB48(a, b) ADD48((a), COMPLEMENT48(b))
113
-
114
-static inline void dccp_set_seqno(u64 *seqno, u64 value)
115
-{
116
- *seqno = value & UINT48_MAX;
117
-}
118110
119111 static inline void dccp_inc_seqno(u64 *seqno)
120112 {
....@@ -291,6 +283,7 @@
291283 int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
292284 const struct dccp_hdr *dh, const unsigned int len);
293285
286
+void dccp_destruct_common(struct sock *sk);
294287 int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized);
295288 void dccp_destroy_sock(struct sock *sk);
296289
....@@ -303,13 +296,7 @@
303296 int dccp_getsockopt(struct sock *sk, int level, int optname,
304297 char __user *optval, int __user *optlen);
305298 int dccp_setsockopt(struct sock *sk, int level, int optname,
306
- char __user *optval, unsigned int optlen);
307
-#ifdef CONFIG_COMPAT
308
-int compat_dccp_getsockopt(struct sock *sk, int level, int optname,
309
- char __user *optval, int __user *optlen);
310
-int compat_dccp_setsockopt(struct sock *sk, int level, int optname,
311
- char __user *optval, unsigned int optlen);
312
-#endif
299
+ sockptr_t optval, unsigned int optlen);
313300 int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg);
314301 int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
315302 int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,