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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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