@@ -220,35 +220,6 @@ static PyObject *get_ipaddress(PyObject *self __unused, PyObject *args)
220220 return PyString_FromString (ipaddr );
221221}
222222
223- static PyObject * get_ipaddresses (PyObject * self __unused , PyObject * args ) {
224- PyObject * devlist = NULL ;
225- struct etherinfo * ethptr = NULL ;
226- struct etherinfo * ethernet_devices = NULL ;
227-
228- ethernet_devices = get_etherinfo ();
229-
230- devlist = PyList_New (0 );
231- for ( ethptr = ethernet_devices ; ethptr -> next != NULL ; ethptr = ethptr -> next ) {
232- if ( ethptr -> ipv4_address ) {
233- PyObject * dev = PyList_New (0 );
234- PyList_Append (dev , PyString_FromString (ethptr -> device ));
235- PyList_Append (dev , PyInt_FromLong (AF_INET ));
236- PyList_Append (dev , PyString_FromString (ethptr -> ipv4_address ));
237- PyList_Append (devlist , dev );
238- }
239- if ( ethptr -> ipv6_address ) {
240- PyObject * dev = PyList_New (0 );
241- PyList_Append (dev , PyString_FromString (ethptr -> device ));
242- PyList_Append (dev , PyInt_FromLong (AF_INET6 ));
243- PyList_Append (dev , PyString_FromString (ethptr -> ipv6_address ));
244- PyList_Append (devlist , dev );
245- }
246- }
247- free_etherinfo (ethernet_devices );
248-
249- return devlist ;
250- }
251-
252223
253224/**
254225 * Retrieves the current information about all interfaces. All interfaces will be
@@ -858,11 +829,6 @@ static struct PyMethodDef PyEthModuleMethods[] = {
858829 .ml_meth = (PyCFunction )get_ipaddress ,
859830 .ml_flags = METH_VARARGS ,
860831 },
861- {
862- .ml_name = "get_ipaddresses" ,
863- .ml_meth = (PyCFunction )get_ipaddresses ,
864- .ml_flags = METH_VARARGS ,
865- },
866832 {
867833 .ml_name = "get_interface_info" ,
868834 .ml_meth = (PyCFunction )get_interfaceinfo ,
0 commit comments