diff options
| author | David Sommerseth <davids@redhat.com> | 2009-08-24 13:18:49 +0200 |
|---|---|---|
| committer | David Sommerseth <davids@redhat.com> | 2009-08-24 13:18:49 +0200 |
| commit | 64d39e125d1ff823d248c0cce04d492d4a2688de (patch) | |
| tree | 7f7d9e5d279b7ae0ce6983c19d03de1061cfdc65 /python-ethtool/etherinfo.h | |
| parent | 9c6cd9c2e8a2269a9c9ef1c78af02501e5fd46d3 (diff) | |
| download | python-ethtool-64d39e125d1ff823d248c0cce04d492d4a2688de.tar.gz python-ethtool-64d39e125d1ff823d248c0cce04d492d4a2688de.tar.xz python-ethtool-64d39e125d1ff823d248c0cce04d492d4a2688de.zip | |
Imported functions for retrieving ethernet device info via AF_NETLINK
Diffstat (limited to 'python-ethtool/etherinfo.h')
| -rw-r--r-- | python-ethtool/etherinfo.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/python-ethtool/etherinfo.h b/python-ethtool/etherinfo.h new file mode 100644 index 0000000..6dfd8fa --- /dev/null +++ b/python-ethtool/etherinfo.h @@ -0,0 +1,36 @@ +/* etherinfo.h - Retrieve ethernet interface info via NETLINK + * + * Copyright (C) 2009 Red Hat Inc. + * + * David Sommerseth <davids@redhat.com> + * + * This application is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; version 2. + * + * This application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +#ifndef _ETHERINFO_H +#define _ETHERINFO_H + +struct etherinfo { + int index; + int type; + char *device; + char *hwaddress; + char *ipv4_address; + int ipv4_netmask; + char *ipv4_broadcast; + char *ipv6_address; + int ipv6_netmask; + struct etherinfo *next; +}; + +struct etherinfo *get_etherinfo(); +void dump_etherinfo(FILE *, struct etherinfo *); + +#endif |
