diff options
author | David L. Cantrell Jr <dcantrell@redhat.com> | 2008-01-21 16:53:09 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-01-22 15:37:32 -1000 |
commit | bfe9aa425466ba782dc7c0b44e873bfdf6f1c659 (patch) | |
tree | f81cdb367f1dc5f2713ebaf330fd3c15ed4c2a00 /isys/isys.c | |
parent | bc4689be7c985b5a6f8047afa5d315383cbaf029 (diff) | |
download | anaconda-bfe9aa425466ba782dc7c0b44e873bfdf6f1c659.tar.gz anaconda-bfe9aa425466ba782dc7c0b44e873bfdf6f1c659.tar.xz anaconda-bfe9aa425466ba782dc7c0b44e873bfdf6f1c659.zip |
Use libnl to get interface MAC and IP addresses
Reduce nl.c to enough to communicate with libnl. We already have
libnl, so we might as well use it. Plus, the latest version has
a reasonable API, so I'm totally against using it.
The _isys module and loader have been updated to call the new
functions: nl_mac2str() and nl_ip2str() to get the MAC address or
IP address for the specified interface.
This patch also drops our need for glib for isys. Yeah, I added the
dep and I'm removing it.
Diffstat (limited to 'isys/isys.c')
-rw-r--r-- | isys/isys.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/isys/isys.c b/isys/isys.c index 1a373591d..9395f0f4c 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -1041,7 +1041,7 @@ static PyObject * doGetMacAddress(PyObject * s, PyObject * args) { if (!PyArg_ParseTuple(args, "s", &dev)) return NULL; - ret = netlink_interfaces_mac2str(dev); + ret = nl_mac2str(dev); return Py_BuildValue("s", ret); } @@ -1063,9 +1063,9 @@ static PyObject * doGetIPAddress(PyObject * s, PyObject * args) { char *ret = NULL; if (!PyArg_ParseTuple(args, "s", &dev)) - return NULL; + return NULL; - ret = netlink_interfaces_ip2str(dev); + ret = nl_ip2str(dev); return Py_BuildValue("s", ret); } |