TCP_NODELAY level wrong?
Ron Alexander
rcalex at home.com
Tue May 2 17:33:53 GMT 2000
David,
I think I understand, but I have included the relevant snippets from the
header files to be sure I am not confusing you.
During execution, I get an error 'protocol not supported' (paraphrase, I
don't have a real sample)
My objective is to modify 0 lines of the Samba source. Other than
workarounds for bugs in VOS (that will be fixed soon), I have only 1 source
mod. That is the smb.h assert issue I posted earlier. (sure wish someone
from the Samba team would comment on it)
I am content for now to leave the TCP_NODELAY off.
>From your response, it sounds like a general 'fix' would be to change it to
SOL_SOCKET, but you are not sure if all os's are in conformance. Is that
correct?
Regards,
Ron
>From sys/socket.h
/*
* Option flags per-socket.
*/
#define SO_NODELAY 0x200 /* Forward data expediently */
/* This is added for compatibility with OS TCP/IP */
#define TCP_NODELAY 0x200 /* Forward data expediently */
/*
* Level number for (get/set)sockopt() to apply to socket itself.
*/
#define SOL_SOCKET 0xffff /* options for socket level */
>From netinet/in.h
#define IPPROTO_TCP 6 /* tcp */
-----Original Message-----
From: davecb at scot.Canada.Sun.COM [mailto:davecb at scot.Canada.Sun.COM]On
Behalf Of David Collier-Brown
Sent: May 2, 2000 12:42 PM
To: rcalex at home.com
Cc: Multiple recipients of list SAMBA-TECHNICAL
Subject: Re: TCP_NODELAY level wrong?
Ron Alexander wrote:
>
> The following code from util_sock.c causes a failure on VOS. The
> problem is, that the level of IPPROTO_TCP is wrong. It should be
> SOL_SOCKET like most of the other options.
On Solaris it's at the TCP level, but that isn't supposed
to matter:
"Options may exist at multiple protocol levels; they are
always present at the uppermost "socket" level"
If this is true of other OSs, we can promote it to
SOL_SOCKET, if not it would have to be conditionally
defined.
> As I understand it, the IPPROTO_TCP is a Berkley type and SOL_SOCKET is a
> Spider type.
Just a socket type as opposed to a protocol-specific type.
--dave
--
David Collier-Brown, | Always do right. This will gratify some people
185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
Willowdale, Ontario | //www.oreilly.com/catalog/samba/author.html
Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb at canada.sun.com
More information about the samba-technical
mailing list