diff options
author | David Sommerseth <davids@redhat.com> | 2013-12-17 21:07:36 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2013-12-17 21:15:24 +0100 |
commit | 4c301d903dfc3d011e673a8772d4ac75e99bbd2a (patch) | |
tree | 379b0bd747c1ab4330d7641df5d1a108ca27604f /python-ethtool/etherinfo.h | |
parent | e9784985e3f7b72cc5f3210d60a88014625b2660 (diff) | |
download | python-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.h')
-rw-r--r-- | python-ethtool/etherinfo.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python-ethtool/etherinfo.h b/python-ethtool/etherinfo.h index 1997807..5b8c874 100644 --- a/python-ethtool/etherinfo.h +++ b/python-ethtool/etherinfo.h @@ -19,10 +19,11 @@ typedef enum {NLQRY_LINK, NLQRY_ADDR4, NLQRY_ADDR6} nlQuery; /**< Supported query types in the etherinfo code */ -int get_etherinfo(struct etherinfo_obj_data *data, nlQuery query); +int get_etherinfo(etherinfo_py *data, nlQuery query); void free_etherinfo(struct etherinfo *ptr); -int open_netlink(struct etherinfo_obj_data *); -void close_netlink(struct etherinfo_obj_data *); +int open_netlink(etherinfo_py *); +struct nl_sock * get_nlc(); +void close_netlink(etherinfo_py *); #endif |