Subject: confused about in_cksum()
To: None <netbsd-users@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: netbsd-users
Date: 04/30/2003 08:54:51
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...)

Thanks for helping

Chris

-- 
----------------------------------------------------------------------
Christoph Kaegi                                           kgc@zhwin.ch
----------------------------------------------------------------------