diff options
author | David Sommerseth <davids@redhat.com> | 2010-04-28 17:04:26 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2010-04-28 17:04:26 +0200 |
commit | 4f0295fca2cfd933f4b9b539d5505cb24e4d420c (patch) | |
tree | dd765ba839c30cbf45217983bbc39533c575c695 /python-ethtool/etherinfo_struct.h | |
parent | d3fd6b84f461a4d7ffbf3f3eae37381150b69e82 (diff) | |
download | python-ethtool-4f0295fca2cfd933f4b9b539d5505cb24e4d420c.tar.gz python-ethtool-4f0295fca2cfd933f4b9b539d5505cb24e4d420c.tar.xz python-ethtool-4f0295fca2cfd933f4b9b539d5505cb24e4d420c.zip |
Updated to fetch the interface information when the "getter" function triggers
Diffstat (limited to 'python-ethtool/etherinfo_struct.h')
-rw-r--r-- | python-ethtool/etherinfo_struct.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/python-ethtool/etherinfo_struct.h b/python-ethtool/etherinfo_struct.h index 641dcb4..b09b49c 100644 --- a/python-ethtool/etherinfo_struct.h +++ b/python-ethtool/etherinfo_struct.h @@ -10,14 +10,39 @@ #ifndef _ETHERINFO_STRUCT_H #define _ETHERINFO_STRUCT_H + +struct etherinfo { + char *device; + int index; + char *hwaddress; + char *ipv4_address; + int ipv4_netmask; + char *ipv4_broadcast; + char *ipv6_address; + int ipv6_netmask; +}; + +/* + * NETLINK connection handle and related information to be shared + * among all the instantiated etherinfo objects. + */ +struct _nlconnection { + struct nl_handle *nlrt_handle; +}; + /** * Contains the internal data structure of the * ethtool.etherinfo object. * */ +struct etherinfo_obj_data { + struct _nlconnection *nlc; /**< Contains NETLINK connection info */ + struct etherinfo *ethinfo; /**< Contains info about our current interface */ +}; + typedef struct { - PyObject_HEAD - struct etherinfo *info; /**< Contains information about one ethernet device */ + PyObject_HEAD + struct etherinfo_obj_data *data; } etherinfo_py; #endif |