]>
Commit | Line | Data |
---|---|---|
1 | // SPDX-License-Identifier: GPL-2.0-or-later | |
2 | /* | |
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. | |
6 | */ | |
7 | ||
8 | #ifndef _ZEBRA_RULE_NETLINK_H | |
9 | #define _ZEBRA_RULE_NETLINK_H | |
10 | ||
11 | #ifdef HAVE_NETLINK | |
12 | ||
13 | #ifdef __cplusplus | |
14 | extern "C" { | |
15 | #endif | |
16 | ||
17 | /* | |
18 | * Handle netlink notification informing a rule add or delete. | |
19 | */ | |
20 | extern int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup); | |
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 | ||
27 | extern enum netlink_msg_status | |
28 | netlink_put_rule_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx); | |
29 | ||
30 | #ifdef __cplusplus | |
31 | } | |
32 | #endif | |
33 | ||
34 | #endif /* HAVE_NETLINK */ | |
35 | ||
36 | #endif /* _ZEBRA_RULE_NETLINK_H */ |