[libvirt] [PATCH 09/11] Remove all use of inet_pton and inet_ntop

Eric Blake eblake at redhat.com
Thu Oct 21 20:43:18 UTC 2010


On 10/21/2010 12:17 PM, Daniel P. Berrange wrote:
> The  inet_pton and inet_ntop functions are obsolete, replaced
> by getaddrinfo+getnameinfo with the AI_NUMERICHOST flag set.
> These can be accessed via the virSocket APIs.
>
> The bridge.c code had methods for fetching the IP address of
> a bridge which used inet_ntop. Aside from the use of inet_ntop
> these methods are broken, because a NIC can have multiple
> addresses and this only returns one address. Since the methods
> are never used, just remove them.
>
> * src/conf/network_conf.c, src/nwfilter/nwfilter_learnipaddr.c:
>    Replace inet_pton and inet_ntop with virSocket APIs
> * src/util/bridge.c, src/util/bridge.h: Remove unused methods
>    which called inet_ntop.
> ---
>   src/conf/network_conf.c             |   36 +++++++-------
>   src/nwfilter/nwfilter_learnipaddr.c |   36 +++++++------
>   src/util/bridge.c                   |   95 ++---------------------------------
>   src/util/bridge.h                   |    8 ---
>   4 files changed, 43 insertions(+), 132 deletions(-)
>

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list