linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Donovan <alienresidents@gmail.com>
To: Randi <nightdecoder@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: UDP data
Date: Fri, 11 Feb 2011 07:49:15 +1100	[thread overview]
Message-ID: <AANLkTim1gLHdVNWVADCi=TEFtyTfPKiwV0AyP8F_JeVK@mail.gmail.com> (raw)
In-Reply-To: <1297314869.2205.48.camel@godart>

I don't know libc, so I don't know what functions libc has to compute
(if any) the checksum.

I did find this page, that has some sample code though...
http://stackoverflow.com/questions/3737612/raw-socket-sendto-failed-using-c-on-linux

Chris-

On Thu, Feb 10, 2011 at 4:14 PM, Randi <nightdecoder@gmail.com> wrote:
> Chris, optional means it can be enable or not, how to enable it and get
> the header to verify the checksum.
>
>
> On Thu, 2011-02-10 at 15:14 +1100, Chris Donovan wrote:
>> Yes the checksum is for the header and data.
>> Keep in mind that the checksum value is optional in ipv4, but required in ipv6.
>>
>> Chris-
>>
>> On Thu, Feb 10, 2011 at 2:41 PM, Randi <nightdecoder@gmail.com> wrote:
>> > Hi All,
>> >
>> >        Since UDP socket is not reliable, what the common way in user level to
>> > check UDP communication's data for error (eg. malformed, corrupted,
>> > etc.)? is the checksum field in the UDP header (struct udphdr) intended
>> > to this problem?
>> >
>> >        Randi
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-02-10 20:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTimck7ar6JPzSnNZo_baTz1usHLeUFxkL8GaqriV@mail.gmail.com>
2011-02-03 14:50 ` dynamic shared library ratheesh k
2011-02-03 14:59   ` Michal Nazarewicz
2011-02-10  3:41     ` UDP data Randi
2011-02-10  4:14       ` Chris Donovan
2011-02-10  5:14         ` Randi
2011-02-10 15:41           ` Glynn Clements
2011-02-10 18:43             ` David Astua
2011-02-10 20:49           ` Chris Donovan [this message]
2011-03-19 21:57     ` dynamic shared library Hendrik Visage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTim1gLHdVNWVADCi=TEFtyTfPKiwV0AyP8F_JeVK@mail.gmail.com' \
    --to=alienresidents@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=nightdecoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).