]> git.proxmox.com Git - mirror_frr.git/blame - pimd/pim_pim.h
Merge pull request #7669 from ranjanyash54/2370
[mirror_frr.git] / pimd / pim_pim.h
CommitLineData
12e41d03 1/*
896014f4
DL
2 * PIM for Quagga
3 * Copyright (C) 2008 Everton da Silva Marques
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
12e41d03
DL
19
20#ifndef PIM_PIM_H
21#define PIM_PIM_H
22
23#include <zebra.h>
24
25#include "if.h"
26
27#define PIM_PIM_BUFSIZE_READ (20000)
28#define PIM_PIM_BUFSIZE_WRITE (20000)
29
12e41d03
DL
30#define PIM_DEFAULT_HELLO_PERIOD (30) /* seconds, RFC 4601: 4.11 */
31#define PIM_DEFAULT_TRIGGERED_HELLO_DELAY (5) /* seconds, RFC 4601: 4.11 */
32#define PIM_DEFAULT_DR_PRIORITY (1) /* RFC 4601: 4.3.1 */
33#define PIM_DEFAULT_PROPAGATION_DELAY_MSEC (500) /* RFC 4601: 4.11. Timer Values */
34#define PIM_DEFAULT_OVERRIDE_INTERVAL_MSEC (2500) /* RFC 4601: 4.11. Timer Values */
35#define PIM_DEFAULT_CAN_DISABLE_JOIN_SUPPRESSION (0) /* boolean */
36#define PIM_DEFAULT_T_PERIODIC (60) /* RFC 4601: 4.11. Timer Values */
37
7643f0a1 38enum pim_msg_type {
d62a17ae 39 PIM_MSG_TYPE_HELLO = 0,
40 PIM_MSG_TYPE_REGISTER,
41 PIM_MSG_TYPE_REG_STOP,
42 PIM_MSG_TYPE_JOIN_PRUNE,
43 PIM_MSG_TYPE_BOOTSTRAP,
44 PIM_MSG_TYPE_ASSERT,
45 PIM_MSG_TYPE_GRAFT,
46 PIM_MSG_TYPE_GRAFT_ACK,
47 PIM_MSG_TYPE_CANDIDATE
7643f0a1 48};
12e41d03 49
12e41d03
DL
50void pim_ifstat_reset(struct interface *ifp);
51void pim_sock_reset(struct interface *ifp);
52int pim_sock_add(struct interface *ifp);
53void pim_sock_delete(struct interface *ifp, const char *delete_message);
54void pim_hello_restart_now(struct interface *ifp);
55void pim_hello_restart_triggered(struct interface *ifp);
56
57int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len);
58
d62a17ae 59int pim_msg_send(int fd, struct in_addr src, struct in_addr dst,
60 uint8_t *pim_msg, int pim_msg_size, const char *ifname);
12e41d03 61
b279f95c 62int pim_hello_send(struct interface *ifp, uint16_t holdtime);
12e41d03 63#endif /* PIM_PIM_H */