Re: checksum computation in ip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2002-03-05 at 05:45, Ravi Kiran wrote:
> hi all,
> 
> i have a basic doubt w.r.tthe checksum computation for an ip header that iam constructing.
> 
> currently i am following the steps given below:
> 
> STEP 1. construct header (with zero in checksum)
> STEP 2. convert 16-bit values in header to network byte order
>    (ip addresses are already in network byte order)
> STEP 3. compute checksum on the header 
> STEP 4. convert checksum to network byte order and send the packet
> 
> i am not sure whether i need to do STEP 4 above.
> could some one clarify  please?
The checksum is actually byte-order-invariant; so you don't need to do
steps 2 and 4.  Check out RFC 1071 "Computing the Internet Checksum" for
more detail and justification.

>  
> thanks,
> ravi.
> 
> 
> -
> : send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Casey Carter
Casey@Carter.net
ccarter@uiuc.edu
AIM: cartec69

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux