]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
fd71d73e | 2 | /* |
942bf97b | 3 | * Zebra Policy Based Routing (PBR) interaction with the kernel using |
4 | * netlink - public definitions and function declarations. | |
5 | * Copyright (C) 2018 Cumulus Networks, Inc. | |
942bf97b | 6 | */ |
7 | ||
8 | #ifndef _ZEBRA_RULE_NETLINK_H | |
9 | #define _ZEBRA_RULE_NETLINK_H | |
10 | ||
11 | #ifdef HAVE_NETLINK | |
12 | ||
51e94aa7 EDP |
13 | #ifdef __cplusplus |
14 | extern "C" { | |
15 | #endif | |
16 | ||
942bf97b | 17 | /* |
18 | * Handle netlink notification informing a rule add or delete. | |
19 | */ | |
2414abd3 | 20 | extern int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup); |
942bf97b | 21 | |
22 | /* | |
23 | * Get to know existing PBR rules in the kernel - typically called at startup. | |
24 | */ | |
25 | extern int netlink_rules_read(struct zebra_ns *zns); | |
26 | ||
67e3369e JU |
27 | extern enum netlink_msg_status |
28 | netlink_put_rule_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx); | |
29 | ||
51e94aa7 EDP |
30 | #ifdef __cplusplus |
31 | } | |
32 | #endif | |
33 | ||
942bf97b | 34 | #endif /* HAVE_NETLINK */ |
35 | ||
36 | #endif /* _ZEBRA_RULE_NETLINK_H */ |