Lost with UPD checksumming functions

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

 



Hello,

I am implementing a new transport protocol (basing on UDP
implementation) and I need to checksum every "datagram" I send
(using the same, TCP/UDP algorithm).

I am really lost in all those numerous checksumming functions in the
kernel and I'd like to know if there is any simple receipe to calculate
the checksum (I have the header, options and payload). I like the
function:

unsigned int csum_partial(const unsigned char * buff, int len, unsigned
int sum);

and I tried to call it aggainst my enitre (skb->data, skb->len, 0)
but the problem is it returns different value then the checkum calculated
by, say, UDP.
Please help.

-marek

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux