| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | #ifndef _DCCP_H |
|---|
| 2 | 3 | #define _DCCP_H |
|---|
| 3 | 4 | /* |
|---|
| .. | .. |
|---|
| 6 | 7 | * An implementation of the DCCP protocol |
|---|
| 7 | 8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
|---|
| 8 | 9 | * 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 | 10 | */ |
|---|
| 14 | 11 | |
|---|
| 15 | 12 | #include <linux/dccp.h> |
|---|
| .. | .. |
|---|
| 110 | 107 | #define TO_UNSIGNED48(x) (((x) >= 0)? (x) : COMPLEMENT48(-(x))) |
|---|
| 111 | 108 | #define ADD48(a, b) (((a) + (b)) & UINT48_MAX) |
|---|
| 112 | 109 | #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 | | -} |
|---|
| 118 | 110 | |
|---|
| 119 | 111 | static inline void dccp_inc_seqno(u64 *seqno) |
|---|
| 120 | 112 | { |
|---|
| .. | .. |
|---|
| 303 | 295 | int dccp_getsockopt(struct sock *sk, int level, int optname, |
|---|
| 304 | 296 | char __user *optval, int __user *optlen); |
|---|
| 305 | 297 | 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 |
|---|
| 298 | + sockptr_t optval, unsigned int optlen); |
|---|
| 313 | 299 | int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
|---|
| 314 | 300 | int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size); |
|---|
| 315 | 301 | int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, |
|---|