diff options
author | David Sommerseth <davids@redhat.com> | 2009-09-07 17:24:42 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-09-07 17:24:42 +0200 |
commit | ec9e13c0da2e6ebfb16e60c19c11539fa8b81442 (patch) | |
tree | 628667947792eab472552930149bcd7ee164d4af /python-ethtool/etherinfo_obj.h | |
parent | 0be405b9c6245b59489b7e6987af0dc56ded1406 (diff) | |
download | python-ethtool-ec9e13c0da2e6ebfb16e60c19c11539fa8b81442.tar.gz python-ethtool-ec9e13c0da2e6ebfb16e60c19c11539fa8b81442.tar.xz python-ethtool-ec9e13c0da2e6ebfb16e60c19c11539fa8b81442.zip |
Completed implementing the new Python get_interface_info() function.
It will return a list of Python etherinfo objects. These objects
have the following properties:
.device - Device name
.mac_address - Hardware address
.ipv4_address
.ipv4_netmask
.ipv4_broadcast
.ipv6_address
.ipv6_netmask
In addition, it will produce a human readable output if these objects
are treated as strings.
It will not be possible to modify any of the properties in these objects.
Diffstat (limited to 'python-ethtool/etherinfo_obj.h')
-rw-r--r-- | python-ethtool/etherinfo_obj.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python-ethtool/etherinfo_obj.h b/python-ethtool/etherinfo_obj.h index dae5352..8ffdf7d 100644 --- a/python-ethtool/etherinfo_obj.h +++ b/python-ethtool/etherinfo_obj.h @@ -20,6 +20,7 @@ PyObject *_ethtool_etherinfo_new(PyTypeObject *, PyObject *, PyObject *); int _ethtool_etherinfo_init(etherinfo_py *, PyObject *, PyObject *); PyObject *_ethtool_etherinfo_getter(etherinfo_py *, PyObject *); int _ethtool_etherinfo_setter(etherinfo_py *, PyObject *, PyObject *); +PyObject *_ethtool_etherinfo_str(etherinfo_py *self); /** * This is required by Python, which lists all accessible methods @@ -73,7 +74,7 @@ PyTypeObject ethtool_etherinfoType = { 0, /*tp_as_mapping*/ 0, /*tp_hash */ 0, /*tp_call*/ - 0, /*tp_str*/ + (reprfunc)_ethtool_etherinfo_str, /*tp_str*/ (getattrofunc)_ethtool_etherinfo_getter, /*tp_getattro*/ (setattrofunc)_ethtool_etherinfo_setter, /*tp_setattro*/ 0, /*tp_as_buffer*/ |