summaryrefslogtreecommitdiffstats
path: root/isys/nl.h
diff options
context:
space:
mode:
Diffstat (limited to 'isys/nl.h')
-rw-r--r--isys/nl.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/isys/nl.h b/isys/nl.h
new file mode 100644
index 000000000..46e70313a
--- /dev/null
+++ b/isys/nl.h
@@ -0,0 +1,31 @@
+/*
+ * nl.h - Netlink helper functions, the header file
+ *
+ * Copyright 2006 Red Hat, Inc.
+ *
+ * David Cantrell <dcantrell@redhat.com>
+ *
+ * This software may be freely redistributed under the terms of the GNU
+ * general public license.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/* Information per interface */
+typedef struct _interface_info_t {
+ int i; /* interface index */
+ char *name; /* name (eth0, eth1, ...) */
+ struct in_addr ip_addr; /* IPv4 address (0=none) */
+ struct in6_addr ip6_addr; /* IPv6 address (0=none) */
+ unsigned char mac[8]; /* MAC address */
+} interface_info_t;
+
+/* Function prototypes */
+char *netlink_format_mac_addr(char *buf, unsigned char *mac);
+char *netlink_format_ip_addr(int family, interface_info_t *intf, char *buf);
+int netlink_create_socket(void);
+int netlink_send_dump_request(int sock, int type, int family);
+int netlink_get_interface_ip(int index, int family, void *addr);
+int netlink_init_interfaces_list(void);