]>
Commit | Line | Data |
---|---|---|
4f52e9a6 QY |
1 | /* |
2 | * VRRP Neighbor Discovery. | |
3 | * Copyright (C) 2019 Cumulus Networks, Inc. | |
63d4bd12 | 4 | * Quentin Young |
4f52e9a6 QY |
5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | |
7 | * under the terms of the GNU General Public License as published by the Free | |
8 | * Software Foundation; either version 2 of the License, or (at your option) | |
9 | * any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
14 | * more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License along with | |
17 | * this program; see the file COPYING; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | */ | |
63d4bd12 QY |
20 | #ifndef __VRRP_NDISC_H__ |
21 | #define __VRRP_NDISC_H__ | |
4f52e9a6 QY |
22 | |
23 | #include <netinet/icmp6.h> | |
24 | #include <netinet/in.h> | |
25 | #include <netinet/ip6.h> | |
26 | ||
27 | #include "vrrp.h" | |
28 | ||
29 | /* | |
30 | * Initialize VRRP neighbor discovery. | |
31 | */ | |
32 | extern void vrrp_ndisc_init(void); | |
33 | ||
34 | /* | |
35 | * Check whether VRRP Neighbor Discovery is initialized. | |
36 | * | |
37 | * Returns: | |
38 | * True if initialized, false otherwise | |
39 | */ | |
40 | extern bool vrrp_ndisc_is_init(void); | |
41 | ||
42 | /* | |
43 | * Finish VRRP Neighbor Discovery. | |
44 | */ | |
45 | extern void vrrp_ndisc_fini(void); | |
46 | ||
47 | /* | |
48 | * Send VRRP Neighbor Advertisement. | |
49 | * | |
50 | * ifp | |
51 | * Interface to transmit on | |
52 | * | |
53 | * ip | |
54 | * IPv6 address to send Neighbor Advertisement for | |
55 | * | |
56 | * Returns: | |
57 | * -1 on failure | |
58 | * 0 otherwise | |
59 | */ | |
60 | extern int vrrp_ndisc_una_send(struct vrrp_router *r, struct ipaddr *ip); | |
61 | ||
62 | /* | |
63 | * Send VRRP Neighbor Advertisements for all virtual IPs. | |
64 | * | |
65 | * r | |
66 | * Virtual Router to send NA's for | |
67 | * | |
68 | * Returns: | |
69 | * -1 on failure | |
70 | * 0 otherwise | |
71 | */ | |
72 | extern int vrrp_ndisc_una_send_all(struct vrrp_router *r); | |
73 | ||
63d4bd12 | 74 | #endif /* __VRRP_NDISC_H__ */ |