summaryrefslogtreecommitdiff
path: root/mcast/common/.svn/text-base/interfaces.h.svn-base
diff options
context:
space:
mode:
authorLars Heer <l.heer@gmx.de>2013-09-18 05:50:03 +0200
committerLars Heer <l.heer@gmx.de>2013-09-18 05:50:03 +0200
commitccf6e0f9c6b0481ed13e0f4794e3fbead750f385 (patch)
treeed86efb54f7ee41edfba5c89ca519b5fd10aa0d5 /mcast/common/.svn/text-base/interfaces.h.svn-base
downloadvdr-plugin-mcli-ccf6e0f9c6b0481ed13e0f4794e3fbead750f385.tar.gz
vdr-plugin-mcli-ccf6e0f9c6b0481ed13e0f4794e3fbead750f385.tar.bz2
added vdr-plugin-mcli-0.0.1+svn20120927
Diffstat (limited to 'mcast/common/.svn/text-base/interfaces.h.svn-base')
-rw-r--r--mcast/common/.svn/text-base/interfaces.h.svn-base52
1 files changed, 52 insertions, 0 deletions
diff --git a/mcast/common/.svn/text-base/interfaces.h.svn-base b/mcast/common/.svn/text-base/interfaces.h.svn-base
new file mode 100644
index 0000000..8ef942c
--- /dev/null
+++ b/mcast/common/.svn/text-base/interfaces.h.svn-base
@@ -0,0 +1,52 @@
+/*
+ * (c) BayCom GmbH, http://www.baycom.de, info@baycom.de
+ *
+ * See the COPYING file for copyright information and
+ * how to reach the author.
+ *
+ */
+
+#ifndef __INTERFACES_H
+#define __INTERFACES_H
+
+#define INTNODE_MAXIPV4 4 /* Maximum number of IPv4 aliases */
+#define bool int
+
+/*
+ * The list of interfaces we do multicast on
+ * These are discovered on the fly, very handy ;)
+ */
+struct intnode
+{
+ unsigned int ifindex; /* The ifindex */
+ char name[IFNAMSIZ]; /* Name of the interface */
+ unsigned int groupcount; /* Number of groups this interface joined */
+ unsigned int mtu; /* The MTU of this interface (mtu = 0 -> invalid interface) */
+
+ struct sockaddr hwaddr; /* Hardware bytes */
+
+ struct in6_addr linklocal; /* Link local address */
+ struct in6_addr global; /* Global unicast address */
+
+ /* Per interface statistics */
+ uint32_t stat_packets_received; /* Number of packets received */
+ uint32_t stat_packets_sent; /* Number of packets sent */
+ uint32_t stat_bytes_received; /* Number of bytes received */
+ uint32_t stat_bytes_sent; /* Number of bytes sent */
+ uint32_t stat_icmp_received; /* Number of ICMP's received */
+ uint32_t stat_icmp_sent; /* Number of ICMP's sent */
+};
+
+/* Node functions */
+struct intnode *int_create (unsigned int ifindex);
+void int_destroy (struct intnode *intn);
+void update_interfaces (struct intnode *intn);
+
+/* List functions */
+struct intnode *int_find (unsigned int ifindex);
+struct intnode *int_find_name (char *ifname);
+struct intnode *int_find_first (void);
+#if defined WIN32 || ! defined __CYGWIN__
+unsigned if_nametoindex (const char *ifname);
+#endif
+#endif