summaryrefslogtreecommitdiffstats
path: root/python-ethtool/ethtool.c
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-09-07 17:39:38 +0200
committerDavid Sommerseth <davids@redhat.com>2009-09-07 17:39:38 +0200
commit62ef459cf809ead66e67e77691423f3a5f6fb0e7 (patch)
tree5e9c65535f7f10aaa050a63eb3cc7f294e170d3d /python-ethtool/ethtool.c
parentb74c47dc5ea7211460bfa700bf8ee910f5a27dc6 (diff)
downloadpython-ethtool-62ef459cf809ead66e67e77691423f3a5f6fb0e7.tar.gz
python-ethtool-62ef459cf809ead66e67e77691423f3a5f6fb0e7.tar.xz
python-ethtool-62ef459cf809ead66e67e77691423f3a5f6fb0e7.zip
Removed the previous "attempt" of IPv6 support, get_ipaddresses()
Diffstat (limited to 'python-ethtool/ethtool.c')
-rw-r--r--python-ethtool/ethtool.c34
1 files changed, 0 insertions, 34 deletions
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
@@ -859,11 +830,6 @@ static struct PyMethodDef PyEthModuleMethods[] = {
.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,
.ml_flags = METH_VARARGS,