Subject: Re: confused about in_cksum()
To: None <firstname.lastname@example.org>
From: Manuel Bouyer <email@example.com>
Date: 04/30/2003 21:17:57
On Wed, Apr 30, 2003 at 08:54:51AM +0200, Christoph Kaegi wrote:
> I am writing a monitoring probe, which, among other things,
> sends out an icmp echo request. I'm doing that with the help
> of Richard Stevens Book "Unix Network Programming", as I am
> a beginner.
> Now, with raw sockets, there seems to be the need
> to calculate checksums for the icmp header.
> Stevens uses a in_cksum() function, which he
> implements himself.
> There is a manpage in_cksum(9) which seems to be
> what is needed, but there is no library or header
> files specified in it.
> Is in_cksum(9) only available for the kernel (as section 9 is
> the kernel manual) and am I supposed to write my own in_cksum()?
> (I mean: copy it from stevens...)
Yes, it's only for kernel. It has to optimisations which may not work in
Manuel Bouyer <firstname.lastname@example.org>
NetBSD: 24 ans d'experience feront toujours la difference