diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tcp.h | 5 | ||||
-rw-r--r-- | include/net/tcp.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 7f59ee946983..46a85c9e1f25 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -238,6 +238,11 @@ struct tcp_sack_block { | |||
238 | u32 end_seq; | 238 | u32 end_seq; |
239 | }; | 239 | }; |
240 | 240 | ||
241 | /*These are used to set the sack_ok field in struct tcp_options_received */ | ||
242 | #define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */ | ||
243 | #define TCP_FACK_ENABLED (1 << 1) /*1 = FACK is enabled locally*/ | ||
244 | #define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/ | ||
245 | |||
241 | struct tcp_options_received { | 246 | struct tcp_options_received { |
242 | /* PAWS/RTTM data */ | 247 | /* PAWS/RTTM data */ |
243 | long ts_recent_stamp;/* Time we stored ts_recent (for aging) */ | 248 | long ts_recent_stamp;/* Time we stored ts_recent (for aging) */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index a4f52e154843..0118ea999f67 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -773,12 +773,12 @@ static inline int tcp_is_reno(const struct tcp_sock *tp) | |||
773 | 773 | ||
774 | static inline int tcp_is_fack(const struct tcp_sock *tp) | 774 | static inline int tcp_is_fack(const struct tcp_sock *tp) |
775 | { | 775 | { |
776 | return tp->rx_opt.sack_ok & 2; | 776 | return tp->rx_opt.sack_ok & TCP_FACK_ENABLED; |
777 | } | 777 | } |
778 | 778 | ||
779 | static inline void tcp_enable_fack(struct tcp_sock *tp) | 779 | static inline void tcp_enable_fack(struct tcp_sock *tp) |
780 | { | 780 | { |
781 | tp->rx_opt.sack_ok |= 2; | 781 | tp->rx_opt.sack_ok |= TCP_FACK_ENABLED; |
782 | } | 782 | } |
783 | 783 | ||
784 | static inline unsigned int tcp_left_out(const struct tcp_sock *tp) | 784 | static inline unsigned int tcp_left_out(const struct tcp_sock *tp) |