2016-05-27 00:40:27 +00:00
|
|
|
/*
|
2018-03-03 12:08:38 +00:00
|
|
|
* BIRD -- UNIX Kernel Multicast Routing
|
2016-05-27 00:40:27 +00:00
|
|
|
*
|
2018-03-03 12:08:38 +00:00
|
|
|
* (c) 2016 Ondrej Hlavaty <aearsis@eideo.cz>
|
|
|
|
* (c) 2018 Ondrej Zajicek <santiago@crfreenet.org>
|
|
|
|
* (c) 2018 CZ.NIC z.s.p.o.
|
2016-05-27 00:40:27 +00:00
|
|
|
*
|
2018-03-03 12:08:38 +00:00
|
|
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
2016-05-27 00:40:27 +00:00
|
|
|
*/
|
|
|
|
|
2018-03-03 12:08:38 +00:00
|
|
|
#ifndef _BIRD_MKRT_H_
|
|
|
|
#define _BIRD_MKRT_H_
|
|
|
|
|
2016-05-27 00:40:27 +00:00
|
|
|
#include "nest/bird.h"
|
2018-03-03 12:08:38 +00:00
|
|
|
#include "nest/iface.h"
|
2016-05-27 00:40:27 +00:00
|
|
|
#include "nest/protocol.h"
|
2018-03-03 12:08:38 +00:00
|
|
|
#include "nest/route.h"
|
2016-05-27 00:40:27 +00:00
|
|
|
#include "lib/socket.h"
|
|
|
|
|
|
|
|
|
2018-03-03 12:08:38 +00:00
|
|
|
extern struct protocol proto_unix_mkrt;
|
2016-05-27 00:40:27 +00:00
|
|
|
|
|
|
|
struct mkrt_config {
|
|
|
|
struct proto_config cf;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mkrt_mfc_group {
|
2018-03-03 12:08:38 +00:00
|
|
|
list sources; /* List of MFC entries (struct mkrt_mfc_source) */
|
|
|
|
struct fib_node n;
|
2016-05-27 00:40:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct mkrt_mfc_source {
|
|
|
|
node n;
|
2018-03-03 12:08:38 +00:00
|
|
|
ip4_addr addr;
|
2016-05-27 00:40:27 +00:00
|
|
|
|
2018-03-03 12:08:38 +00:00
|
|
|
int parent; /* MIF index of valid incoming iface */
|
|
|
|
u32 iifs, oifs; /* Values from the multicast route */
|
2016-05-27 00:40:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct mkrt_proto {
|
|
|
|
struct proto p;
|
|
|
|
|
2018-03-03 12:08:38 +00:00
|
|
|
struct mif_group *mif_group; /* Associated MIF group for multicast routes */
|
|
|
|
sock *mrt_sock; /* MRT control socket */
|
2016-05-27 00:40:27 +00:00
|
|
|
|
2018-03-03 12:08:38 +00:00
|
|
|
struct fib mfc_groups; /* MFC entries/groups managed by protocol */
|
2016-05-27 00:40:27 +00:00
|
|
|
};
|
|
|
|
|
2018-03-03 12:08:38 +00:00
|
|
|
struct proto_config *mkrt_init_config(int class);
|
2016-05-27 00:40:27 +00:00
|
|
|
|
2018-03-03 12:08:38 +00:00
|
|
|
#endif
|