summaryrefslogtreecommitdiffstats
path: root/python-ethtool/etherinfo_struct.h
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2013-12-17 21:07:36 +0100
committerDavid Sommerseth <davids@redhat.com>2013-12-17 21:15:24 +0100
commit4c301d903dfc3d011e673a8772d4ac75e99bbd2a (patch)
tree379b0bd747c1ab4330d7641df5d1a108ca27604f /python-ethtool/etherinfo_struct.h
parente9784985e3f7b72cc5f3210d60a88014625b2660 (diff)
downloadpython-ethtool-4c301d903dfc3d011e673a8772d4ac75e99bbd2a.tar.gz
python-ethtool-4c301d903dfc3d011e673a8772d4ac75e99bbd2a.tar.xz
python-ethtool-4c301d903dfc3d011e673a8772d4ac75e99bbd2a.zip
Reduce the NETLINK pointer complexity
Make the NETLINK connection pointer and user counter local global variables inside netlink.c only. Where NETLINK calls via libnl is required, rather use get_nlc() to get a NETLINK connection. This also prepares the next step, to get rid of the struct etherinfo_obj_data wrapper. Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'python-ethtool/etherinfo_struct.h')
-rw-r--r--python-ethtool/etherinfo_struct.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/python-ethtool/etherinfo_struct.h b/python-ethtool/etherinfo_struct.h
index 6d2da36..31c71c0 100644
--- a/python-ethtool/etherinfo_struct.h
+++ b/python-ethtool/etherinfo_struct.h
@@ -56,9 +56,6 @@ extern PyTypeObject ethtool_netlink_ip_address_Type;
*
*/
struct etherinfo_obj_data {
- struct nl_sock **nlc; /**< Contains NETLINK connection info (global) */
- unsigned int *nlc_users; /**< Resource counter for the NETLINK connection (global) */
- unsigned short nlc_active; /**< Is this instance using NETLINK? */
struct etherinfo *ethinfo; /**< Contains info about our current interface */
};
@@ -69,6 +66,7 @@ struct etherinfo_obj_data {
typedef struct {
PyObject_HEAD
struct etherinfo_obj_data *data; /* IPv4 and IPv6 address information, only one element used */
+ unsigned short nlc_active; /**< Is this instance using NETLINK? */
} etherinfo_py;