Hi,

I'm trying to hack together something which will run through the retransmit
queue looking at the tcp headers.

However, tcp_hdr() seems not to be returning anything useful.  Am I being
very naïve here expecting to be able to read the tcp header in this way or
have I made some other silly mistake?  The brief snippet below gets nowhere
as (*th) seems undefined, although (*scb) apparently is.  I'm calling the
function at the start of tcp_clean_rtx_queue().

Any enlightment welcomed.

Thanks,
Gavin

static void walk_rtx_queue(struct sock *sk)
{
    struct tcp_sock *tp = tcp_sk(sk);
    struct sk_buff *skb;

    tcp_for_write_queue(skb, sk) {
        struct tcp_skb_cb *scb = TCP_SKB_CB(skb);
        struct tcphdr *th = tcp_hdr(skb);
        if(th)
            printk(KERN_ERR "src: %u dest: 
%u\n",ntohs(th->source),ntohs(th->dest));
    }
}



-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to