From 62ef459cf809ead66e67e77691423f3a5f6fb0e7 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 7 Sep 2009 17:39:38 +0200 Subject: Removed the previous "attempt" of IPv6 support, get_ipaddresses() --- python-ethtool/ethtool.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'python-ethtool/ethtool.c') diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c index 27e10f2..dce3067 100644 --- a/python-ethtool/ethtool.c +++ b/python-ethtool/ethtool.c @@ -220,35 +220,6 @@ static PyObject *get_ipaddress(PyObject *self __unused, PyObject *args) return PyString_FromString(ipaddr); } -static PyObject *get_ipaddresses(PyObject *self __unused, PyObject *args) { - PyObject *devlist = NULL; - struct etherinfo *ethptr = NULL; - struct etherinfo *ethernet_devices = NULL; - - ethernet_devices = get_etherinfo(); - - devlist = PyList_New(0); - for( ethptr = ethernet_devices; ethptr->next != NULL; ethptr = ethptr->next) { - if( ethptr->ipv4_address ) { - PyObject *dev = PyList_New(0); - PyList_Append(dev, PyString_FromString(ethptr->device)); - PyList_Append(dev, PyInt_FromLong(AF_INET)); - PyList_Append(dev, PyString_FromString(ethptr->ipv4_address)); - PyList_Append(devlist, dev); - } - if( ethptr->ipv6_address ) { - PyObject *dev = PyList_New(0); - PyList_Append(dev, PyString_FromString(ethptr->device)); - PyList_Append(dev, PyInt_FromLong(AF_INET6)); - PyList_Append(dev, PyString_FromString(ethptr->ipv6_address)); - PyList_Append(devlist, dev); - } - } - free_etherinfo(ethernet_devices); - - return devlist; -} - /** * Retrieves the current information about all interfaces. All interfaces will be @@ -858,11 +829,6 @@ static struct PyMethodDef PyEthModuleMethods[] = { .ml_meth = (PyCFunction)get_ipaddress, .ml_flags = METH_VARARGS, }, - { - .ml_name = "get_ipaddresses", - .ml_meth = (PyCFunction)get_ipaddresses, - .ml_flags = METH_VARARGS, - }, { .ml_name = "get_interface_info", .ml_meth = (PyCFunction)get_interfaceinfo, -- cgit