[libvirt] [PATCH 1/2] util: add wrapper function to check if address string is an ip
Daniel Veillard
veillard at redhat.com
Tue Aug 10 13:09:20 UTC 2010
On Tue, Aug 10, 2010 at 02:02:09PM +0100, Daniel P. Berrange wrote:
> On Tue, Aug 10, 2010 at 02:03:27PM +0200, Daniel Veillard wrote:
> > On Tue, Aug 10, 2010 at 07:42:49PM +1000, Justin Clift wrote:
> >
> > Hum ... I think that it's better to allow virSocketParseAddr() to
> > take a NULL Addr pointer it's very simple, I'm attaching the patch
> > and then virIsNumericIPAddr(foo) can be replaced by
> >
> > virSocketParseAddr(foo, NULL, 0)
> >
> > it also has the extensibility of being able to cope with IPv4 or
> > IPv6 only if one need, just by adjusting the hint.
> > Am I right ? I see you do more initializations on hints.ai_family
> > but the memset means the two functions are just the same for
> > ai_socktype and ai_protocol,
>
> Yep, AI_NUMERICHOST is the only one that really matters here.
[...]
>
> ACK
Okay, pushed, thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list