summaryrefslogtreecommitdiff
path: root/include/mcast.h
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-04-16 19:08:42 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-04-16 19:08:42 +0000
commit5eb3bc6d5594fccfff26329a26225f999e971652 (patch)
tree242b74bb06e32ef6d9621a73a0010b1c2ab7da4a /include/mcast.h
parentad31f852c3454136bdbfeb7f222cb9c175f13c1c (diff)
downloadconntrack-tools-5eb3bc6d5594fccfff26329a26225f999e971652.tar.gz
conntrack-tools-5eb3bc6d5594fccfff26329a26225f999e971652.zip
first step forward to merge conntrackd and conntrack into the same building chain
Diffstat (limited to 'include/mcast.h')
-rw-r--r--include/mcast.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/mcast.h b/include/mcast.h
new file mode 100644
index 0000000..0f3e3cd
--- /dev/null
+++ b/include/mcast.h
@@ -0,0 +1,48 @@
+#ifndef _MCAST_H_
+#define _MCAST_H_
+
+#include <netinet/in.h>
+
+struct mcast_conf {
+ int ipproto;
+ int backlog;
+ int reuseaddr;
+ unsigned short port;
+ union {
+ struct in_addr inet_addr;
+ struct in6_addr inet_addr6;
+ } in;
+ union {
+ struct in_addr interface_addr;
+ struct in6_addr interface_addr6;
+ } ifa;
+};
+
+struct mcast_stats {
+ u_int64_t bytes;
+ u_int64_t messages;
+ u_int64_t error;
+};
+
+struct mcast_sock {
+ int fd;
+ union {
+ struct sockaddr_in ipv4;
+ struct sockaddr_in6 ipv6;
+ } addr;
+ struct mcast_stats stats;
+};
+
+struct mcast_sock *mcast_server_create(struct mcast_conf *conf);
+void mcast_server_destroy(struct mcast_sock *m);
+
+struct mcast_sock *mcast_client_create(struct mcast_conf *conf);
+void mcast_client_destroy(struct mcast_sock *m);
+
+int mcast_send(struct mcast_sock *m, void *data, int size);
+int mcast_recv(struct mcast_sock *m, void *data, int size);
+
+struct mcast_stats *mcast_get_stats(struct mcast_sock *m);
+void mcast_dump_stats(int fd, struct mcast_sock *s, struct mcast_sock *r);
+
+#endif