diff options
| author | David Sommerseth <davids@redhat.com> | 2013-12-20 02:20:21 +0100 |
|---|---|---|
| committer | David Sommerseth <davids@redhat.com> | 2013-12-20 02:22:48 +0100 |
| commit | 54a6b0bea9e210c0377c3510d8819df59c009d64 (patch) | |
| tree | 7795a60a1e63de04e1f8d44680c26d75025d2990 /python-ethtool/etherinfo_struct.h | |
| parent | d4bc3a50bb6124a0000879f27d43e9685934d682 (diff) | |
| download | python-ethtool-54a6b0bea9e210c0377c3510d8819df59c009d64.tar.gz python-ethtool-54a6b0bea9e210c0377c3510d8819df59c009d64.tar.xz python-ethtool-54a6b0bea9e210c0377c3510d8819df59c009d64.zip | |
Merge struct etherinfo and etherinfo_py
Make things more "pythonic" and avoid another layer of wrapping
by removing the struct etherinfo. Move that information to the
main Python object instead.
This simplifies the object creation and handling too, as now
all strings are python objects.
Also update some of the documentation blocks along the way.
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'python-ethtool/etherinfo_struct.h')
| -rw-r--r-- | python-ethtool/etherinfo_struct.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/python-ethtool/etherinfo_struct.h b/python-ethtool/etherinfo_struct.h index 83d06fe..542a2b2 100644 --- a/python-ethtool/etherinfo_struct.h +++ b/python-ethtool/etherinfo_struct.h @@ -28,16 +28,6 @@ #include <netlink/route/addr.h> -/** - * Contains IP address information about a particular ethernet device - * - */ -struct etherinfo { - PyObject *device; /**< Device name */ - int index; /**< NETLINK index reference */ - PyObject *hwaddress; /**< string: HW address / MAC address of device */ -}; - /* Python object containing data baked from a (struct rtnl_addr) */ typedef struct PyNetlinkIPaddress { PyObject_HEAD @@ -56,8 +46,10 @@ extern PyTypeObject ethtool_netlink_ip_address_Type; */ typedef struct { PyObject_HEAD - struct etherinfo *ethinfo; /**< Information about the interface configuration */ - unsigned short nlc_active; /**< Is this instance using NETLINK? */ + PyObject *device; /**< Device name */ + int index; /**< NETLINK index reference */ + PyObject *hwaddress; /**< string: HW address / MAC address of device */ + unsigned short nlc_active; /**< Is this instance using NETLINK? */ } etherinfo_py; |
