[ECOS] Ecos-Socket Error

Jonathan Larmour jlarmour@redhat.com
Thu Oct 11 06:34:00 GMT 2001


Andrew Lunn wrote:
> 
> On Thu, Oct 11, 2001 at 03:41:36PM +0530, Anagha Anil Bhopale wrote:
> > The error  is:
> > Socket error: No error
> > bind error: Can't assign requested address
> >
> > I've have used
> > iSocket_Descriptor=socket(PF_INET,SOCK_STREAM,6)
> > to create the socket.
> 
> Why pass 6 as the protocol? My linux man page tcp(7) says the protocol
> should be 0.

0 means "default" so for IP, TCP will be the default for
PF_INIT/SOCK_STREAM. More precisely it is 6 though, as per /etc/protocols.
The ip(7) man page sez:
"The only valid values for protocol are 0 and IPPROTO_TCP  for TCP  sockets
and 0 and IPPROTO_UDP for UDP sockets." IPPROTO_TCP is indeed 6.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine



More information about the Ecos-discuss mailing list