summaryrefslogtreecommitdiffstats
path: root/isys/nl.h
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-05-26 16:50:57 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-05-26 16:50:57 +0000
commitcb3d3f225cb1c8ade3fb89d6c4c5502f037a50b5 (patch)
tree9a08f972528fc9258b89ee4ada4bb615124dd219 /isys/nl.h
parenta9fd6bdf6b3dedb7fcd44fd076f9fe1b5e989504 (diff)
downloadanaconda-cb3d3f225cb1c8ade3fb89d6c4c5502f037a50b5.tar.gz
anaconda-cb3d3f225cb1c8ade3fb89d6c4c5502f037a50b5.tar.xz
anaconda-cb3d3f225cb1c8ade3fb89d6c4c5502f037a50b5.zip
* isys/nl.c (netlink_format_ip_addr): Rewrote to malloc for space
in the function and handle IPv4 and IPv6 address lengths more gracefully. * isys/nl.c (netlink_interfaces_ip2str): Added function to return the IP address of the specified device name. If you have an IPv4 address for the device, that's returned. If you only have an IPv6 address, that's returned. The string returned is the human-readable IP addr. * isys/nl.c (_netlink_interfaces_elem_find): Renamed the _netlink_interfaces_elem_mac2str function since it's a generic intf search routine. * isys/nl.c (netlink_init_interfaces_list): If there is no IPv6 address, memset intfinfo->ip6_addr to all zeros. * isys/nl.h: Prototype updates.
Diffstat (limited to 'isys/nl.h')
-rw-r--r--isys/nl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/isys/nl.h b/isys/nl.h
index 723cad9e0..72c8bd11a 100644
--- a/isys/nl.h
+++ b/isys/nl.h
@@ -34,7 +34,8 @@ int netlink_get_interface_ip(int index, int family, void *addr);
int netlink_init_interfaces_list(void);
void netlink_interfaces_list_free(void);
char *netlink_interfaces_mac2str(char *ifname);
+char *netlink_interfaces_ip2str(char *ifname);
/* Private function prototypes -- used by the functions above */
void _netlink_interfaces_elem_free(gpointer data, gpointer user_data);
-gint _netlink_interfaces_elem_mac2str(gconstpointer a, gconstpointer b);
+gint _netlink_interfaces_elem_find(gconstpointer a, gconstpointer b);