]> git.proxmox.com Git - mirror_frr.git/blob - pimd/pim_pim.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / pimd / pim_pim.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * PIM for Quagga
4 * Copyright (C) 2008 Everton da Silva Marques
5 */
6
7 #ifndef PIM_PIM_H
8 #define PIM_PIM_H
9
10 #include <zebra.h>
11
12 #include "if.h"
13
14 #define PIM_PIM_BUFSIZE_READ (20000)
15 #define PIM_PIM_BUFSIZE_WRITE (20000)
16
17 #define PIM_DEFAULT_HELLO_PERIOD (30) /* seconds, RFC 4601: 4.11 */
18 #define PIM_DEFAULT_TRIGGERED_HELLO_DELAY (5) /* seconds, RFC 4601: 4.11 */
19 #define PIM_DEFAULT_DR_PRIORITY (1) /* RFC 4601: 4.3.1 */
20 #define PIM_DEFAULT_PROPAGATION_DELAY_MSEC (500) /* RFC 4601: 4.11. Timer Values */
21 #define PIM_DEFAULT_OVERRIDE_INTERVAL_MSEC (2500) /* RFC 4601: 4.11. Timer Values */
22 #define PIM_DEFAULT_CAN_DISABLE_JOIN_SUPPRESSION (0) /* boolean */
23 #define PIM_DEFAULT_T_PERIODIC (60) /* RFC 4601: 4.11. Timer Values */
24
25 enum pim_msg_type {
26 PIM_MSG_TYPE_HELLO = 0,
27 PIM_MSG_TYPE_REGISTER,
28 PIM_MSG_TYPE_REG_STOP,
29 PIM_MSG_TYPE_JOIN_PRUNE,
30 PIM_MSG_TYPE_BOOTSTRAP,
31 PIM_MSG_TYPE_ASSERT,
32 PIM_MSG_TYPE_GRAFT,
33 PIM_MSG_TYPE_GRAFT_ACK,
34 PIM_MSG_TYPE_CANDIDATE
35 };
36
37 void pim_ifstat_reset(struct interface *ifp);
38 void pim_sock_reset(struct interface *ifp);
39 int pim_sock_add(struct interface *ifp);
40 void pim_sock_delete(struct interface *ifp, const char *delete_message);
41 void pim_hello_restart_now(struct interface *ifp);
42 void pim_hello_restart_triggered(struct interface *ifp);
43
44 int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len,
45 pim_sgaddr sg);
46
47 int pim_msg_send(int fd, pim_addr src, pim_addr dst, uint8_t *pim_msg,
48 int pim_msg_size, struct interface *ifp);
49
50 int pim_hello_send(struct interface *ifp, uint16_t holdtime);
51 #endif /* PIM_PIM_H */