Merge to Fedora kernel-2.6.7-1.441
[linux-2.6.git] / include / net / tcp.h
index 45e5fdb..7aa687f 100644 (file)
@@ -878,7 +878,6 @@ extern void                 tcp_close(struct sock *sk,
                                          long timeout);
 extern struct sock *           tcp_accept(struct sock *sk, int flags, int *err);
 extern unsigned int            tcp_poll(struct file * file, struct socket *sock, struct poll_table_struct *wait);
-extern void                    tcp_write_space(struct sock *sk); 
 
 extern int                     tcp_getsockopt(struct sock *sk, int level, 
                                               int optname,
@@ -979,6 +978,9 @@ extern int tcp_sync_mss(struct sock *sk, u32 pmtu);
 
 extern const char timer_bug_msg[];
 
+/* tcp_diag.c */
+extern void tcp_get_info(struct sock *, struct tcp_info *);
+
 /* Read 'sendfile()'-style from a TCP socket */
 typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *,
                                unsigned int, size_t);
@@ -995,9 +997,7 @@ static inline void tcp_clear_xmit_timer(struct sock *sk, int what)
                tp->pending = 0;
 
 #ifdef TCP_CLEAR_TIMERS
-               if (timer_pending(&tp->retransmit_timer) &&
-                   del_timer(&tp->retransmit_timer))
-                       __sock_put(sk);
+               sk_stop_timer(sk, &tp->retransmit_timer);
 #endif
                break;
        case TCP_TIME_DACK:
@@ -1005,9 +1005,7 @@ static inline void tcp_clear_xmit_timer(struct sock *sk, int what)
                tp->ack.pending = 0;
 
 #ifdef TCP_CLEAR_TIMERS
-               if (timer_pending(&tp->delack_timer) &&
-                   del_timer(&tp->delack_timer))
-                       __sock_put(sk);
+               sk_stop_timer(sk, &tp->delack_timer);
 #endif
                break;
        default:
@@ -1036,15 +1034,13 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long
        case TCP_TIME_PROBE0:
                tp->pending = what;
                tp->timeout = jiffies+when;
-               if (!mod_timer(&tp->retransmit_timer, tp->timeout))
-                       sock_hold(sk);
+               sk_reset_timer(sk, &tp->retransmit_timer, tp->timeout);
                break;
 
        case TCP_TIME_DACK:
                tp->ack.pending |= TCP_ACK_TIMER;
                tp->ack.timeout = jiffies+when;
-               if (!mod_timer(&tp->delack_timer, tp->ack.timeout))
-                       sock_hold(sk);
+               sk_reset_timer(sk, &tp->delack_timer, tp->ack.timeout);
                break;
 
        default:
@@ -1207,21 +1203,6 @@ struct tcp_skb_cb {
 
 #include <net/tcp_ecn.h>
 
-
-/*
- *     Compute minimal free write space needed to queue new packets. 
- */
-static inline int tcp_min_write_space(struct sock *sk)
-{
-       return sk->sk_wmem_queued / 2;
-}
-static inline int tcp_wspace(struct sock *sk)
-{
-       return sk->sk_sndbuf - sk->sk_wmem_queued;
-}
-
-
 /* This determines how many packets are "in the network" to the best
  * of our knowledge.  In many cases it is conservative, but where
  * detailed information is available from the receiver (via SACK
@@ -1891,7 +1872,7 @@ static inline void tcp_acceptq_queue(struct sock *sk, struct open_request *req,
        struct tcp_opt *tp = tcp_sk(sk);
 
        req->sk = child;
-       tcp_acceptq_added(sk);
+       sk_acceptq_added(sk);
 
        if (!tp->accept_queue_tail) {
                tp->accept_queue = req;
@@ -2030,12 +2011,6 @@ static inline void tcp_free_skb(struct sock *sk, struct sk_buff *skb)
        __kfree_skb(skb);
 }
 
-static inline void tcp_charge_skb(struct sock *sk, struct sk_buff *skb)
-{
-       sk->sk_wmem_queued += skb->truesize;
-       sk->sk_forward_alloc -= skb->truesize;
-}
-
 extern void __tcp_mem_reclaim(struct sock *sk);
 extern int tcp_mem_schedule(struct sock *sk, int size, int kind);