Re: UDPCTL_CHECKSUM not found !!!

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

 



On Tue, Jan 23, 2001 at 11:24:25PM +0100, Oliver Kowalke wrote:
> Hi,
> 
> I tried code form the book "UNIX Network Programming Vol.1" from R.W.Stevens
> and it doesn't work - disappointing!
> I tried to check with sysctl function if UCP checksums are enabled. The
> UDPCTL_xxx constants should be defined in <netinet/udp_var.h> - but this
> file doesn't exists on Linux. Where does Linux define this constants? What
> are the main differences between Linux and UNIX ( BSD and SVR4)?

  In Linux you control it via socket option:

    int boolval = 1; /* 1 = no check, 0 = default = check */
    setsockopt(socknum, SOL_SOCKET, SO_NO_CHECK, &boolval, sizeof(boolval));

  That is, there is no GLOBAL flag to turn the thing on or off.

  Stevens wrote about BSD (and derived) stacks, Linux is its from ground up.

  For normal basic API there is no visible difference (Linux vs. BSD), for
  various odd corner cases (like this), something may be different.

> with regards,
> Oliver

/Matti Aarnio
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[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