From 54a6b0bea9e210c0377c3510d8819df59c009d64 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 20 Dec 2013 02:20:21 +0100 Subject: 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 --- python-ethtool/etherinfo_struct.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'python-ethtool/etherinfo_struct.h') 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 -/** - * 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; -- cgit