0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 10:11:53 +00:00
bird/sysdep/unix/mkrt.h

52 lines
1.1 KiB
C
Raw Normal View History

2016-05-27 00:40:27 +00:00
/*
* BIRD -- UNIX Kernel Multicast Routing
2016-05-27 00:40:27 +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
*
* Can be freely distributed and used under the terms of the GNU GPL.
2016-05-27 00:40:27 +00:00
*/
#ifndef _BIRD_MKRT_H_
#define _BIRD_MKRT_H_
2016-05-27 00:40:27 +00:00
#include "nest/bird.h"
#include "nest/iface.h"
2016-05-27 00:40:27 +00:00
#include "nest/protocol.h"
#include "nest/route.h"
2016-05-27 00:40:27 +00:00
#include "lib/socket.h"
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 {
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;
ip4_addr addr;
2016-05-27 00:40:27 +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;
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
struct fib mfc_groups; /* MFC entries/groups managed by protocol */
2016-05-27 00:40:27 +00:00
};
struct proto_config *mkrt_init_config(int class);
2016-05-27 00:40:27 +00:00
#endif