]> git.proxmox.com Git - mirror_frr.git/blob - zebra/connected.h
bgpd: Refactor subgroup_announce_table() to reuse an existing helpers
[mirror_frr.git] / zebra / connected.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Interface's address and mask.
4 * Copyright (C) 1997 Kunihiro Ishiguro
5 */
6
7 #ifndef _ZEBRA_CONNECTED_H
8 #define _ZEBRA_CONNECTED_H
9
10 #include <zebra.h>
11 #include <stdint.h>
12
13 #include "lib/if.h"
14 #include "lib/prefix.h"
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 extern struct connected *connected_check(struct interface *ifp,
21 union prefixconstptr p);
22 extern struct connected *connected_check_ptp(struct interface *ifp,
23 union prefixconstptr p,
24 union prefixconstptr d);
25
26 extern void connected_add_ipv4(struct interface *ifp, int flags,
27 const struct in_addr *addr, uint16_t prefixlen,
28 const struct in_addr *dest, const char *label,
29 uint32_t metric);
30
31 extern void connected_delete_ipv4(struct interface *ifp, int flags,
32 const struct in_addr *addr,
33 uint16_t prefixlen,
34 const struct in_addr *dest);
35
36 extern void connected_delete_ipv4_unnumbered(struct connected *ifc);
37
38 extern void connected_up(struct interface *ifp, struct connected *ifc);
39 extern void connected_down(struct interface *ifp, struct connected *ifc);
40
41 extern void connected_add_ipv6(struct interface *ifp, int flags,
42 const struct in6_addr *address,
43 const struct in6_addr *dest, uint16_t prefixlen,
44 const char *label, uint32_t metric);
45 extern void connected_delete_ipv6(struct interface *ifp,
46 const struct in6_addr *address,
47 const struct in6_addr *dest,
48 uint16_t prefixlen);
49
50 extern int connected_is_unnumbered(struct interface *);
51
52 #ifdef __cplusplus
53 }
54 #endif
55 #endif /*_ZEBRA_CONNECTED_H */