linux/include/uapi/linux/tcp.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 * INET		An implementation of the TCP/IP protocol suite for the LINUX
 *		operating system.  INET is implemented using the  BSD Socket
 *		interface as the means of communication with the user level.
 *
 *		Definitions for the TCP protocol.
 *
 * Version:	@(#)tcp.h	1.0.2	04/28/93
 *
 * Author:	Fred N. van Kempen, <[email protected]>
 *
 *		This program is free software; you can redistribute it and/or
 *		modify it under the terms of the GNU General Public License
 *		as published by the Free Software Foundation; either version
 *		2 of the License, or (at your option) any later version.
 */
#ifndef _UAPI_LINUX_TCP_H
#define _UAPI_LINUX_TCP_H

#include <linux/types.h>
#include <asm/byteorder.h>
#include <linux/socket.h>

struct tcphdr {};

/*
 *	The union cast uses a gcc extension to avoid aliasing problems
 *  (union is compatible to any of its members)
 *  This means this part of the code is -fstrict-aliasing safe now.
 */
tcp_word_hdr;

#define tcp_flag_word(tp)

enum {};

/*
 * TCP general constants
 */
#define TCP_MSS_DEFAULT
#define TCP_MSS_DESIRED

/* TCP socket options */
#define TCP_NODELAY
#define TCP_MAXSEG
#define TCP_CORK
#define TCP_KEEPIDLE
#define TCP_KEEPINTVL
#define TCP_KEEPCNT
#define TCP_SYNCNT
#define TCP_LINGER2
#define TCP_DEFER_ACCEPT
#define TCP_WINDOW_CLAMP
#define TCP_INFO
#define TCP_QUICKACK
#define TCP_CONGESTION
#define TCP_MD5SIG
#define TCP_THIN_LINEAR_TIMEOUTS
#define TCP_THIN_DUPACK
#define TCP_USER_TIMEOUT
#define TCP_REPAIR
#define TCP_REPAIR_QUEUE
#define TCP_QUEUE_SEQ
#define TCP_REPAIR_OPTIONS
#define TCP_FASTOPEN
#define TCP_TIMESTAMP
#define TCP_NOTSENT_LOWAT
#define TCP_CC_INFO
#define TCP_SAVE_SYN
#define TCP_SAVED_SYN
#define TCP_REPAIR_WINDOW
#define TCP_FASTOPEN_CONNECT
#define TCP_ULP
#define TCP_MD5SIG_EXT
#define TCP_FASTOPEN_KEY
#define TCP_FASTOPEN_NO_COOKIE
#define TCP_ZEROCOPY_RECEIVE
#define TCP_INQ

#define TCP_CM_INQ

#define TCP_TX_DELAY

#define TCP_AO_ADD_KEY
#define TCP_AO_DEL_KEY
#define TCP_AO_INFO
#define TCP_AO_GET_KEYS
#define TCP_AO_REPAIR

#define TCP_IS_MPTCP

#define TCP_REPAIR_ON
#define TCP_REPAIR_OFF
#define TCP_REPAIR_OFF_NO_WP

struct tcp_repair_opt {};

struct tcp_repair_window {};

enum {};

/* why fastopen failed from client perspective */
enum tcp_fastopen_client_fail {};

/* for TCP_INFO socket option */
#define TCPI_OPT_TIMESTAMPS
#define TCPI_OPT_SACK
#define TCPI_OPT_WSCALE
#define TCPI_OPT_ECN
#define TCPI_OPT_ECN_SEEN
#define TCPI_OPT_SYN_DATA
#define TCPI_OPT_USEC_TS

/*
 * Sender's congestion state indicating normal or abnormal situations
 * in the last round of packets sent. The state is driven by the ACK
 * information and timer events.
 */
enum tcp_ca_state {};

struct tcp_info {};

/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
enum {};

/* for TCP_MD5SIG socket option */
#define TCP_MD5SIG_MAXKEYLEN

/* tcp_md5sig extension flags for TCP_MD5SIG_EXT */
#define TCP_MD5SIG_FLAG_PREFIX
#define TCP_MD5SIG_FLAG_IFINDEX

struct tcp_md5sig {};

/* INET_DIAG_MD5SIG */
struct tcp_diag_md5sig {};

#define TCP_AO_MAXKEYLEN

#define TCP_AO_KEYF_IFINDEX
#define TCP_AO_KEYF_EXCLUDE_OPT

struct tcp_ao_add {} __attribute__((aligned));

struct tcp_ao_del {} __attribute__((aligned));

struct tcp_ao_info_opt {} __attribute__((aligned));

struct tcp_ao_getsockopt {} __attribute__((aligned));

struct tcp_ao_repair {} __attribute__((aligned));

/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */

#define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT
struct tcp_zerocopy_receive {};
#endif /* _UAPI_LINUX_TCP_H */