]> git.proxmox.com Git - mirror_frr.git/blame - pimd/pim_pim.h
*: auto-convert to SPDX License IDs
[mirror_frr.git] / pimd / pim_pim.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
12e41d03 2/*
896014f4
DL
3 * PIM for Quagga
4 * Copyright (C) 2008 Everton da Silva Marques
896014f4 5 */
12e41d03
DL
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
12e41d03
DL
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
7643f0a1 25enum pim_msg_type {
d62a17ae 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
7643f0a1 35};
12e41d03 36
12e41d03
DL
37void pim_ifstat_reset(struct interface *ifp);
38void pim_sock_reset(struct interface *ifp);
39int pim_sock_add(struct interface *ifp);
40void pim_sock_delete(struct interface *ifp, const char *delete_message);
41void pim_hello_restart_now(struct interface *ifp);
42void pim_hello_restart_triggered(struct interface *ifp);
43
5e6e8a39
DL
44int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len,
45 pim_sgaddr sg);
12e41d03 46
29fd9fca 47int pim_msg_send(int fd, pim_addr src, pim_addr dst, uint8_t *pim_msg,
03c106bf 48 int pim_msg_size, struct interface *ifp);
12e41d03 49
b279f95c 50int pim_hello_send(struct interface *ifp, uint16_t holdtime);
12e41d03 51#endif /* PIM_PIM_H */