]> git.proxmox.com Git - mirror_frr.git/blame - zebra/rule_netlink.h
Merge pull request #3502 from donaldsharp/socket_to_me_baby
[mirror_frr.git] / zebra / rule_netlink.h
CommitLineData
fd71d73e 1/*
942bf97b 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/*
30 * Handle netlink notification informing a rule add or delete.
31 */
2414abd3 32extern int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup);
942bf97b 33
34/*
35 * Get to know existing PBR rules in the kernel - typically called at startup.
36 */
37extern int netlink_rules_read(struct zebra_ns *zns);
38
39#endif /* HAVE_NETLINK */
40
41#endif /* _ZEBRA_RULE_NETLINK_H */