summaryrefslogtreecommitdiffstats
path: root/include/mcast.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 18:03:52 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 18:03:52 +0100
commit7ae054f8aae252ee9c57e26327675e466fc1d15d (patch)
tree8014a333b430477e336afd4621f49097c8d17435 /include/mcast.h
parentd581381870486687586dea4ebf4b7065ae408cd0 (diff)
src: support for redundant dedicated links
This patch adds support for redundant dedicated links. You can add a pool of dedicated links that can be used if the current active fails. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/mcast.h')
-rw-r--r--include/mcast.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/include/mcast.h b/include/mcast.h
index 7c4b1d6..623f390 100644
--- a/include/mcast.h
+++ b/include/mcast.h
@@ -19,6 +19,7 @@ struct mcast_conf {
unsigned int interface_index6;
} ifa;
int mtu;
+ int interface_idx;
int sndbuf;
int rcvbuf;
char iface[IFNAMSIZ];
@@ -37,19 +38,42 @@ struct mcast_sock {
struct sockaddr_in6 ipv6;
} addr;
socklen_t sockaddr_len;
+ int interface_idx;
struct mcast_stats stats;
};
+#define MCAST_LINKS_MAX 4
+
+struct mcast_sock_multi {
+ int num_links;
+ int max_mtu;
+ struct mcast_sock *current_link;
+ struct mcast_sock *multi[MCAST_LINKS_MAX];
+};
+
struct mcast_sock *mcast_server_create(struct mcast_conf *conf);
void mcast_server_destroy(struct mcast_sock *m);
+struct mcast_sock_multi *mcast_server_create_multi(struct mcast_conf *conf, int conf_len);
+void mcast_server_destroy_multi(struct mcast_sock_multi *m);
struct mcast_sock *mcast_client_create(struct mcast_conf *conf);
void mcast_client_destroy(struct mcast_sock *m);
+struct mcast_sock_multi *mcast_client_create_multi(struct mcast_conf *conf, int conf_len);
+void mcast_client_destroy_multi(struct mcast_sock_multi*m);
ssize_t mcast_send(struct mcast_sock *m, void *data, int size);
ssize_t 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);
+int mcast_get_fd(struct mcast_sock *m);
+int mcast_get_ifidx(struct mcast_sock_multi *m, int i);
+int mcast_get_current_ifidx(struct mcast_sock_multi *m);
+
+struct mcast_sock *mcast_get_current_link(struct mcast_sock_multi *m);
+void mcast_set_current_link(struct mcast_sock_multi *m, int i);
+
+void mcast_dump_stats(int fd, const struct mcast_sock_multi *s, const struct mcast_sock_multi *r);
+
+struct nlif_handle;
+void mcast_dump_stats_extended(int fd, const struct mcast_sock_multi *s, const struct mcast_sock_multi *r, const struct nlif_handle *h);
#endif