]> git.proxmox.com Git - mirror_frr.git/blame - pimd/pim_neighbor.h
pimd: Cleanup the headers.
[mirror_frr.git] / pimd / pim_neighbor.h
CommitLineData
12e41d03
DL
1/*
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
16 along with this program; see the file COPYING; if not, write to the
17 Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
18 MA 02110-1301 USA
12e41d03
DL
19*/
20
21#ifndef PIM_NEIGHBOR_H
22#define PIM_NEIGHBOR_H
23
24#include <zebra.h>
25
26#include "if.h"
27#include "linklist.h"
bce0e645 28#include "prefix.h"
12e41d03
DL
29
30#include "pim_tlv.h"
31
32struct pim_neighbor {
33 int64_t creation; /* timestamp of creation */
34 struct in_addr source_addr;
35 pim_hello_options hello_options;
36 uint16_t holdtime;
37 uint16_t propagation_delay_msec;
38 uint16_t override_interval_msec;
39 uint32_t dr_priority;
40 uint32_t generation_id;
41 struct list *prefix_list; /* list of struct prefix */
42 struct thread *t_expire_timer;
43 struct interface *interface;
44};
45
46void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime);
47void pim_neighbor_free(struct pim_neighbor *neigh);
48struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
49 struct in_addr source_addr);
1148de0a 50
99deb321
DS
51struct pim_neighbor *pim_neighbor_find_if (struct interface *ifp);
52
1148de0a
DS
53
54#define PIM_NEIGHBOR_SEND_DELAY 0
55#define PIM_NEIGHBOR_SEND_NOW 1
12e41d03
DL
56struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
57 struct in_addr source_addr,
58 pim_hello_options hello_options,
59 uint16_t holdtime,
60 uint16_t propagation_delay,
61 uint16_t override_interval,
62 uint32_t dr_priority,
63 uint32_t generation_id,
1148de0a
DS
64 struct list *addr_list,
65 int send_hello_now);
12e41d03
DL
66void pim_neighbor_delete(struct interface *ifp,
67 struct pim_neighbor *neigh,
68 const char *delete_message);
69void pim_neighbor_delete_all(struct interface *ifp,
70 const char *delete_message);
71void pim_neighbor_update(struct pim_neighbor *neigh,
72 pim_hello_options hello_options,
73 uint16_t holdtime,
74 uint32_t dr_priority,
75 struct list *addr_list);
76struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
77 struct in_addr addr);
dedccda6 78int pim_if_dr_election(struct interface *ifp);
12e41d03
DL
79
80#endif /* PIM_NEIGHBOR_H */