summaryrefslogtreecommitdiffstats
path: root/python-ethtool/etherinfo.h
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2010-04-28 17:04:26 +0200
committerDavid Sommerseth <davids@redhat.com>2010-04-28 17:04:26 +0200
commit4f0295fca2cfd933f4b9b539d5505cb24e4d420c (patch)
treedd765ba839c30cbf45217983bbc39533c575c695 /python-ethtool/etherinfo.h
parentd3fd6b84f461a4d7ffbf3f3eae37381150b69e82 (diff)
downloadpython-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.h')
-rw-r--r--python-ethtool/etherinfo.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/python-ethtool/etherinfo.h b/python-ethtool/etherinfo.h
index bda5185..1b8c425 100644
--- a/python-ethtool/etherinfo.h
+++ b/python-ethtool/etherinfo.h
@@ -17,18 +17,16 @@
#ifndef _ETHERINFO_H
#define _ETHERINFO_H
-struct etherinfo {
- int index;
- char *device;
- char *hwaddress;
- char *ipv4_address;
- int ipv4_netmask;
- char *ipv4_broadcast;
- char *ipv6_address;
- int ipv6_netmask;
-};
+#include <netlink/addr.h>
+#include <netlink/netlink.h>
+#include <netlink/handlers.h>
+#include <netlink/route/link.h>
+#include <netlink/route/addr.h>
+#include <arpa/inet.h>
-struct etherinfo *get_etherinfo();
+typedef enum {NLQRY_LINK, NLQRY_ADDR} nlQuery;
+
+int get_etherinfo(struct etherinfo *ethinf, struct _nlconnection *nlc, nlQuery query);
void free_etherinfo(struct etherinfo *ptr);
void dump_etherinfo(FILE *, struct etherinfo *);