]> git.proxmox.com Git - mirror_frr.git/blob - zebra/rule_netlink.h
doc: Add `show ipv6 rpf X:X::X:X` command to docs
[mirror_frr.git] / zebra / rule_netlink.h
1 /*
2 * Zebra Policy Based Routing (PBR) interaction with the kernel using
3 * netlink - public definitions and function declarations.
4 * Copyright (C) 2018 Cumulus Networks, Inc.
5 *
6 * This file is part of FRR.
7 *
8 * FRR is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
11 * later version.
12 *
13 * FRR is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with FRR; see the file COPYING. If not, write to the Free
20 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23
24 #ifndef _ZEBRA_RULE_NETLINK_H
25 #define _ZEBRA_RULE_NETLINK_H
26
27 #ifdef HAVE_NETLINK
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /*
34 * Handle netlink notification informing a rule add or delete.
35 */
36 extern int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup);
37
38 /*
39 * Get to know existing PBR rules in the kernel - typically called at startup.
40 */
41 extern int netlink_rules_read(struct zebra_ns *zns);
42
43 extern enum netlink_msg_status
44 netlink_put_rule_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx);
45
46 #ifdef __cplusplus
47 }
48 #endif
49
50 #endif /* HAVE_NETLINK */
51
52 #endif /* _ZEBRA_RULE_NETLINK_H */