summaryrefslogtreecommitdiffstats
path: root/python-ethtool/etherinfo.h
blob: 996bd452b81c3dc353cb7f2df71c08d8fc9625e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* 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 free_etherinfo(struct etherinfo *ptr);
void dump_etherinfo(FILE *, struct etherinfo *);

#endif