default tcp host
Daniel P. Berrange
dan at berrange.com
Wed Jun 13 12:34:37 PDT 2007
On Wed, Jun 13, 2007 at 03:51:35PM -0400, Havoc Pennington wrote:
> Right now if you dbus_server_listen("tcp:port=0") it listens on localhost.
>
> But there's no way right now to listen on INADDR_ANY (all local interfaces).
>
> If we made a missing host= mean INADDR_ANY instead of localhost, there
> would be a problem however; the DBusServer would not have any way to
> report its own address. (Right? I'm not exactly an expert here.)
Actually it would - just report it as '0.0.0.0' or '::' as appropriate
for the protocol it ended up listening on. You can quite happily also
call connect() on '0.0.0.0' or '::' AFAICT - it'll just connect to anything
listening on that port.
> So here is a proposal, that we add to the tcp: address format the flag
> all_interfaces=true|false
>
> Which would mean to bind to INADDR_ANY (I believe that is equivalent to
> not binding at all, just listen()).
>
> The host= field would continue to default to localhost if missing, and
> will be the host the server will report if asked for its address.
I think this needs to change to reflect the actual address listened
on - as per above - fun escaping '::' if its a IPv6 address since we
use ':' as a field separator too :-( Do we already have a scheme for
escaping ':' in addresses ?
Regards,
Dan.
--
|=- GPG key: http://www.berrange.com/~dan/gpgkey.txt -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- berrange at redhat.com - Daniel Berrange - dan at berrange.com -=|
More information about the dbus
mailing list