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

Re: [Libvir] RFC: Broadcast our presence with avahi



On Fri, Sep 14, 2007 at 08:29:47AM +0100, Richard W.M. Jones wrote:
> I'll test the patch out later, just a couple of things though:
> 
> +struct qemud_mdns {
> +//
> +};
> +
> 
> Hmm?
> 
>  #define LIBVIRTD_TLS_PORT "16514"
> +#define LIBVIRTD_TLS_PORT_NUM 16514
>  #define LIBVIRTD_TCP_PORT "16509"
> +#define LIBVIRTD_TCP_PORT_NUM 16509
> 
> In theory the current remote code allows you to use named services 
> instead of port numbers, which is why they are strings.  So this might 
> (although almost vanishingly unlikely) break existing configuration files.

Indeeed. This was a quick hack. The correct thing approach is to call the
getnameinfo() API on the socket FD, using AI_NUMERIC to reverse resolve
the actual address we're listening on back  into a port number

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


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