]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
1fdc9eae | 2 | /* Header file exported by if_netlink.c to zebra. |
3 | * Copyright (C) 1997, 98, 99 Kunihiro Ishiguro | |
1fdc9eae | 4 | */ |
5 | ||
6 | #ifndef _ZEBRA_IF_NETLINK_H | |
7 | #define _ZEBRA_IF_NETLINK_H | |
8 | ||
9 | #ifdef HAVE_NETLINK | |
10 | ||
51e94aa7 EDP |
11 | #ifdef __cplusplus |
12 | extern "C" { | |
13 | #endif | |
14 | ||
2414abd3 DS |
15 | extern int netlink_interface_addr(struct nlmsghdr *h, ns_id_t ns_id, |
16 | int startup); | |
e7c2c198 MS |
17 | |
18 | /* | |
19 | * Parse an incoming interface address change message, generate a dplane | |
20 | * context object for processing. | |
21 | */ | |
22 | int netlink_interface_addr_dplane(struct nlmsghdr *h, ns_id_t ns_id, | |
23 | int startup); | |
24 | ||
2414abd3 | 25 | extern int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup); |
d62a17ae | 26 | extern int interface_lookup_netlink(struct zebra_ns *zns); |
1fdc9eae | 27 | |
a26daa77 SW |
28 | extern int netlink_vlan_change(struct nlmsghdr *h, ns_id_t ns_id, int startup); |
29 | extern int netlink_vlan_read(struct zebra_ns *zns); | |
30 | ||
5d414138 SW |
31 | extern ssize_t netlink_intf_msg_encode(uint16_t cmd, |
32 | const struct zebra_dplane_ctx *ctx, | |
33 | void *buf, size_t buflen); | |
62b4b7e4 PG |
34 | extern enum netlink_msg_status |
35 | netlink_put_gre_set_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx); | |
36 | ||
67e3369e JU |
37 | extern enum netlink_msg_status |
38 | netlink_put_address_update_msg(struct nl_batch *bth, | |
39 | struct zebra_dplane_ctx *ctx); | |
40 | ||
acc8e687 | 41 | extern int netlink_tunneldump_read(struct zebra_ns *zns); |
5d414138 SW |
42 | extern enum netlink_msg_status |
43 | netlink_put_intf_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx); | |
44 | ||
45 | #define FRR_PROTODOWN_REASON_DEFAULT_BIT 7 | |
c40e1b1c SW |
46 | /* Protodown bit setter/getter |
47 | * | |
48 | * Allow users to change the bit if it conflicts with another | |
49 | * on their system. | |
50 | */ | |
51 | extern void if_netlink_set_frr_protodown_r_bit(uint8_t bit); | |
52 | extern void if_netlink_unset_frr_protodown_r_bit(void); | |
53 | extern bool if_netlink_frr_protodown_r_bit_is_set(void); | |
54 | extern uint8_t if_netlink_get_frr_protodown_r_bit(void); | |
55 | ||
51e94aa7 EDP |
56 | #ifdef __cplusplus |
57 | } | |
58 | #endif | |
59 | ||
1fdc9eae | 60 | #endif /* HAVE_NETLINK */ |
61 | ||
62 | #endif /* _ZEBRA_IF_NETLINK_H */ |