aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index a1449144848a..18c246c9b009 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -464,7 +464,7 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb,
464 __u16 *mss); 464 __u16 *mss);
465 465
466extern __u32 cookie_init_timestamp(struct request_sock *req); 466extern __u32 cookie_init_timestamp(struct request_sock *req);
467extern void cookie_check_timestamp(struct tcp_options_received *tcp_opt); 467extern bool cookie_check_timestamp(struct tcp_options_received *tcp_opt);
468 468
469/* From net/ipv6/syncookies.c */ 469/* From net/ipv6/syncookies.c */
470extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb); 470extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb);
@@ -602,6 +602,17 @@ extern u32 __tcp_select_window(struct sock *sk);
602 */ 602 */
603#define tcp_time_stamp ((__u32)(jiffies)) 603#define tcp_time_stamp ((__u32)(jiffies))
604 604
605#define tcp_flag_byte(th) (((u_int8_t *)th)[13])
606
607#define TCPHDR_FIN 0x01
608#define TCPHDR_SYN 0x02
609#define TCPHDR_RST 0x04
610#define TCPHDR_PSH 0x08
611#define TCPHDR_ACK 0x10
612#define TCPHDR_URG 0x20
613#define TCPHDR_ECE 0x40
614#define TCPHDR_CWR 0x80
615
605/* This is what the send packet queuing engine uses to pass 616/* This is what the send packet queuing engine uses to pass
606 * TCP per-packet control information to the transmission 617 * TCP per-packet control information to the transmission
607 * code. We also store the host-order sequence numbers in 618 * code. We also store the host-order sequence numbers in
@@ -620,19 +631,6 @@ struct tcp_skb_cb {
620 __u32 end_seq; /* SEQ + FIN + SYN + datalen */ 631 __u32 end_seq; /* SEQ + FIN + SYN + datalen */
621 __u32 when; /* used to compute rtt's */ 632 __u32 when; /* used to compute rtt's */
622 __u8 flags; /* TCP header flags. */ 633 __u8 flags; /* TCP header flags. */
623
624 /* NOTE: These must match up to the flags byte in a
625 * real TCP header.
626 */
627#define TCPCB_FLAG_FIN 0x01
628#define TCPCB_FLAG_SYN 0x02
629#define TCPCB_FLAG_RST 0x04
630#define TCPCB_FLAG_PSH 0x08
631#define TCPCB_FLAG_ACK 0x10
632#define TCPCB_FLAG_URG 0x20
633#define TCPCB_FLAG_ECE 0x40
634#define TCPCB_FLAG_CWR 0x80
635
636 __u8 sacked; /* State flags for SACK/FACK. */ 634 __u8 sacked; /* State flags for SACK/FACK. */
637#define TCPCB_SACKED_ACKED 0x01 /* SKB ACK'd by a SACK block */ 635#define TCPCB_SACKED_ACKED 0x01 /* SKB ACK'd by a SACK block */
638#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ 636#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */
@@ -1413,7 +1411,8 @@ struct tcp_iter_state {
1413 sa_family_t family; 1411 sa_family_t family;
1414 enum tcp_seq_states state; 1412 enum tcp_seq_states state;
1415 struct sock *syn_wait_sk; 1413 struct sock *syn_wait_sk;
1416 int bucket, sbucket, num, uid; 1414 int bucket, offset, sbucket, num, uid;
1415 loff_t last_pos;
1417}; 1416};
1418 1417
1419extern int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo); 1418extern int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo);