[lkml]   [2000]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectWhy is TCP checksum calc split between init & complete fns?

I'm doing some work on TCP and can't work out why calcuation of the
TCP checksum is split between tcp_v4_checksum_init (net/ipv4/tcp_ipv4.c)
and tcp_checksum_complete (net/ipv4/tcp.c), at least for packets >= 68
bytes (why this threshold?).

If I want to run a TCP checksum (pseudo header + TCP header + data)
independently of the current TCP code, should I just do:

tcp_v4_check( skb->,skb->len,skb->nh.iph->saddr,skb->nh.iph->daddr,
csum_partial((char *)skb->, skb->len, 0))

or do I need to call tcp_v4_checksum_init followed by tcp_checksum_complete?

Thanks -- Mark
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:37    [W:0.021 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site