]> git.proxmox.com Git - mirror_frr.git/blame - pimd/pim_neighbor.h
Merge pull request #632 from opensourcerouting/bgpd-show-segfaults
[mirror_frr.git] / pimd / pim_neighbor.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_NEIGHBOR_H
21#define PIM_NEIGHBOR_H
22
23#include <zebra.h>
24
25#include "if.h"
26#include "linklist.h"
bce0e645 27#include "prefix.h"
12e41d03
DL
28
29#include "pim_tlv.h"
30
31struct pim_neighbor {
32 int64_t creation; /* timestamp of creation */
33 struct in_addr source_addr;
34 pim_hello_options hello_options;
35 uint16_t holdtime;
36 uint16_t propagation_delay_msec;
37 uint16_t override_interval_msec;
38 uint32_t dr_priority;
39 uint32_t generation_id;
40 struct list *prefix_list; /* list of struct prefix */
41 struct thread *t_expire_timer;
42 struct interface *interface;
982bff89
DS
43
44 struct thread *jp_timer;
45 struct list *upstream_jp_agg;
ba4eb1bc 46 struct bfd_info *bfd_info;
12e41d03
DL
47};
48
49void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime);
50void pim_neighbor_free(struct pim_neighbor *neigh);
51struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
52 struct in_addr source_addr);
07b17d59
DS
53struct pim_neighbor *pim_neighbor_find_by_secondary (struct interface *ifp,
54 struct prefix *src);
99deb321
DS
55struct pim_neighbor *pim_neighbor_find_if (struct interface *ifp);
56
1148de0a
DS
57
58#define PIM_NEIGHBOR_SEND_DELAY 0
59#define PIM_NEIGHBOR_SEND_NOW 1
12e41d03
DL
60struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
61 struct in_addr source_addr,
62 pim_hello_options hello_options,
63 uint16_t holdtime,
64 uint16_t propagation_delay,
65 uint16_t override_interval,
66 uint32_t dr_priority,
67 uint32_t generation_id,
1148de0a
DS
68 struct list *addr_list,
69 int send_hello_now);
12e41d03
DL
70void pim_neighbor_delete(struct interface *ifp,
71 struct pim_neighbor *neigh,
72 const char *delete_message);
73void pim_neighbor_delete_all(struct interface *ifp,
74 const char *delete_message);
75void pim_neighbor_update(struct pim_neighbor *neigh,
76 pim_hello_options hello_options,
77 uint16_t holdtime,
78 uint32_t dr_priority,
79 struct list *addr_list);
80struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
07b17d59 81 struct prefix *addr);
dedccda6 82int pim_if_dr_election(struct interface *ifp);
12e41d03
DL
83
84#endif /* PIM_NEIGHBOR_H */