12745e
commit e83d72988d89378e7c70a1b7ba0b450a699ea70a
12745e
Author: David S. Miller <davem@davemloft.net>
12745e
Date:   Wed Jan 9 23:04:32 2013 -0800
12745e
12745e
    Sync netinet/tcp.h with upstream Linux kernel.
12745e
    
12745e
    	[BZ# 15003]
12745e
    	* sysdeps/gnu/netinet/tcp.h (TCP_COOKIE_TRANSACTIONS,
12745e
    	TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, TCP_USER_TIMEOUT,
12745e
    	TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS,
12745e
    	TCP_FASTOPEN): Define.
12745e
    	(tcp_repair_opt): New structure.
12745e
    	(TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR): New
12745e
    	enum values.
12745e
    	(TCP_COOKIE_MIN, TCP_COOKIE_MAX, TCP_COOKIE_PAIR_SIZE,
12745e
    	TCP_COOKIE_IN_ALWAYS, TCP_COOKIE_OUT_NEVER, TCP_S_DATA_IN,
12745e
    	TCP_S_DATA_OUT, TCP_MSS_DEFAULT, TCP_MSS_DESIRED): Define.
12745e
    	(tcp_cookie_transactions): New structure.
12745e
12745e
diff --git glibc-2.17-c758a686/sysdeps/gnu/netinet/tcp.h glibc-2.17-c758a686/sysdeps/gnu/netinet/tcp.h
12745e
index 278fc9d..b62a696 100644
12745e
--- glibc-2.17-c758a686/sysdeps/gnu/netinet/tcp.h
12745e
+++ glibc-2.17-c758a686/sysdeps/gnu/netinet/tcp.h
12745e
@@ -37,20 +37,29 @@
12745e
 /*
12745e
  * User-settable options (used with setsockopt).
12745e
  */
12745e
-#define	TCP_NODELAY	 1	/* Don't delay send to coalesce packets  */
12745e
-#define	TCP_MAXSEG	 2	/* Set maximum segment size  */
12745e
-#define TCP_CORK	 3	/* Control sending of partial frames  */
12745e
-#define TCP_KEEPIDLE	 4	/* Start keeplives after this period */
12745e
-#define TCP_KEEPINTVL	 5	/* Interval between keepalives */
12745e
-#define TCP_KEEPCNT	 6	/* Number of keepalives before death */
12745e
-#define TCP_SYNCNT	 7	/* Number of SYN retransmits */
12745e
-#define TCP_LINGER2	 8	/* Life time of orphaned FIN-WAIT-2 state */
12745e
-#define TCP_DEFER_ACCEPT 9	/* Wake up listener only when data arrive */
12745e
-#define TCP_WINDOW_CLAMP 10	/* Bound advertised window */
12745e
-#define TCP_INFO	 11	/* Information about this connection. */
12745e
-#define	TCP_QUICKACK	 12	/* Bock/reenable quick ACKs.  */
12745e
-#define TCP_CONGESTION	 13	/* Congestion control algorithm.  */
12745e
-#define TCP_MD5SIG	 14	/* TCP MD5 Signature (RFC2385) */
12745e
+#define	TCP_NODELAY		 1  /* Don't delay send to coalesce packets  */
12745e
+#define	TCP_MAXSEG		 2  /* Set maximum segment size  */
12745e
+#define TCP_CORK		 3  /* Control sending of partial frames  */
12745e
+#define TCP_KEEPIDLE		 4  /* Start keeplives after this period */
12745e
+#define TCP_KEEPINTVL		 5  /* Interval between keepalives */
12745e
+#define TCP_KEEPCNT		 6  /* Number of keepalives before death */
12745e
+#define TCP_SYNCNT		 7  /* Number of SYN retransmits */
12745e
+#define TCP_LINGER2		 8  /* Life time of orphaned FIN-WAIT-2 state */
12745e
+#define TCP_DEFER_ACCEPT	 9  /* Wake up listener only when data arrive */
12745e
+#define TCP_WINDOW_CLAMP	 10 /* Bound advertised window */
12745e
+#define TCP_INFO		 11 /* Information about this connection. */
12745e
+#define	TCP_QUICKACK		 12 /* Bock/reenable quick ACKs.  */
12745e
+#define TCP_CONGESTION		 13 /* Congestion control algorithm.  */
12745e
+#define TCP_MD5SIG		 14 /* TCP MD5 Signature (RFC2385) */
12745e
+#define TCP_COOKIE_TRANSACTIONS	 15 /* TCP Cookie Transactions */
12745e
+#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/
12745e
+#define TCP_THIN_DUPACK		 17 /* Fast retrans. after 1 dupack */
12745e
+#define TCP_USER_TIMEOUT	 18 /* How long for loss retry before timeout */
12745e
+#define TCP_REPAIR		 19 /* TCP sock is under repair right now */
12745e
+#define TCP_REPAIR_QUEUE	 20 /* Set TCP queue to repair */
12745e
+#define TCP_QUEUE_SEQ		 21 /* Set sequence number of repaired queue. */
12745e
+#define TCP_REPAIR_OPTIONS	 22 /* Repair TCP connection options */
12745e
+#define TCP_FASTOPEN		 23 /* Enable FastOpen on listeners */
12745e
 
12745e
 #ifdef __USE_MISC
12745e
 # include <sys/types.h>
12745e
@@ -243,6 +252,49 @@ struct tcp_md5sig
12745e
   u_int8_t	tcpm_key[TCP_MD5SIG_MAXKEYLEN];	/* Key (binary).  */
12745e
 };
12745e
 
12745e
+/* For socket repair options.  */
12745e
+struct tcp_repair_opt
12745e
+{
12745e
+  u_int32_t	opt_code;
12745e
+  u_int32_t	opt_val;
12745e
+};
12745e
+
12745e
+/* Queue to repair, for TCP_REPAIR_QUEUE.  */
12745e
+enum
12745e
+{
12745e
+  TCP_NO_QUEUE,
12745e
+  TCP_RECV_QUEUE,
12745e
+  TCP_SEND_QUEUE,
12745e
+  TCP_QUEUES_NR,
12745e
+};
12745e
+
12745e
+/* For cookie transactions socket options.  */
12745e
+#define TCP_COOKIE_MIN		8		/*  64-bits */
12745e
+#define TCP_COOKIE_MAX		16		/* 128-bits */
12745e
+#define TCP_COOKIE_PAIR_SIZE	(2*TCP_COOKIE_MAX)
12745e
+
12745e
+/* Flags for both getsockopt and setsockopt */
12745e
+#define TCP_COOKIE_IN_ALWAYS	(1 << 0)	/* Discard SYN without cookie */
12745e
+#define TCP_COOKIE_OUT_NEVER	(1 << 1)	/* Prohibit outgoing cookies,
12745e
+						 * supercedes everything. */
12745e
+
12745e
+/* Flags for getsockopt */
12745e
+#define TCP_S_DATA_IN		(1 << 2)	/* Was data received? */
12745e
+#define TCP_S_DATA_OUT		(1 << 3)	/* Was data sent? */
12745e
+
12745e
+#define TCP_MSS_DEFAULT		 536U	/* IPv4 (RFC1122, RFC2581) */
12745e
+#define TCP_MSS_DESIRED		1220U	/* IPv6 (tunneled), EDNS0 (RFC3226) */
12745e
+
12745e
+struct tcp_cookie_transactions
12745e
+{
12745e
+  u_int16_t	tcpct_flags;
12745e
+  u_int8_t	__tcpct_pad1;
12745e
+  u_int8_t	tcpct_cookie_desired;
12745e
+  u_int16_t	tcpct_s_data_desired;
12745e
+  u_int16_t	tcpct_used;
12745e
+  u_int8_t	tcpct_value[TCP_MSS_DEFAULT];
12745e
+};
12745e
+
12745e
 #endif /* Misc.  */
12745e
 
12745e
 #endif /* netinet/tcp.h */