sockets: was: Re: [plug] CUPS remote administration

Russell Steicke r.steicke at bom.gov.au
Mon May 19 13:09:20 WST 2003


On Mon, May 19, 2003 at 12:46:51PM +0800, Tim Bowden wrote:
...
> > > I have tried playing around with the 'listen'
> > > config variable in cupsd.conf but I constantly get an error in the cups
> > > error log file: StartListening: Unable to bind socket - Cannot assign
> > > requested address.
> > 
> > Sounds like the problem is that it is unable to bind to a socket -- it
> > cannot assign the requested address ;-)
> > 
> Methinks perhaps I misunderstood this one, particularly as I don't
> really know anything about sockets. After all, I an an engineering
> surveyor and not from a cs background.  Anyone able to give a five line
> summary of the what & how of sockets?

How about this:

Sockets are a generic interface to a network.  A socket exists in an
"address family" (or protocol family).  This socket is in the AF_INET
(PF_INET) address family, for internet protocol version 4.  After a
server socket is created, it gets bound to an address, with bind(2).
(Sockets used by clients go through a different life cycle.)  In
AF_INET, the socket address includes a port number (generally the same
as a tcp or udp port number from /etc/services) and an IP address.

In this case, the bind() has failed either because some other process is
listening to that socket address, or the port number is below 1024 and
the calling process is not run by root.

SEE ALSO

  socket(2), bind(2), socket(7), ip(7).

More than 5 lines, sorry.



-- 
Russell Steicke

-- Fortune says:
Come live with me, and be my love,
And we will some new pleasures prove
Of golden sands, and crystal brooks,
With silken lines, and silver hooks.
		-- John Donne



More information about the plug mailing list