[NET] Generalise TCP's struct open_request minisock infrastructure
[deliverable/linux.git] / include / net / tcp_ecn.h
index dc1456389a9727f54425ab18f875fd3c7d51b2da..94ad970e844af333c82d2d39557a361c9b87fcf8 100644 (file)
@@ -2,6 +2,7 @@
 #define _NET_TCP_ECN_H_ 1
 
 #include <net/inet_ecn.h>
+#include <net/request_sock.h>
 
 #define TCP_HP_BITS (~(TCP_RESERVED_BITS|TCP_FLAG_PSH))
 
@@ -40,7 +41,7 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp,
 static __inline__ void
 TCP_ECN_make_synack(struct open_request *req, struct tcphdr *th)
 {
-       if (req->ecn_ok)
+       if (inet_rsk(req)->ecn_ok)
                th->ece = 1;
 }
 
@@ -113,14 +114,14 @@ static inline int TCP_ECN_rcv_ecn_echo(struct tcp_sock *tp, struct tcphdr *th)
 static inline void TCP_ECN_openreq_child(struct tcp_sock *tp,
                                         struct open_request *req)
 {
-       tp->ecn_flags = req->ecn_ok ? TCP_ECN_OK : 0;
+       tp->ecn_flags = inet_rsk(req)->ecn_ok ? TCP_ECN_OK : 0;
 }
 
 static __inline__ void
 TCP_ECN_create_request(struct open_request *req, struct tcphdr *th)
 {
        if (sysctl_tcp_ecn && th->ece && th->cwr)
-               req->ecn_ok = 1;
+               inet_rsk(req)->ecn_ok = 1;
 }
 
 #endif
This page took 0.024131 seconds and 5 git commands to generate.