]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zebra_ns.h
isisd: implement the 'lsp-too-large' notification
[mirror_frr.git] / zebra / zebra_ns.h
CommitLineData
fe18ee2d
DS
1/*
2 * Zebra NS header
3 * Copyright (C) 2016 Cumulus Networks, Inc.
4 * Donald Sharp
5 *
6 * This file is part of Quagga.
7 *
8 * Quagga 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 * Quagga 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 *
896014f4
DL
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
fe18ee2d
DS
21 */
22#if !defined(__ZEBRA_NS_H__)
23#define __ZEBRA_NS_H__
24
13460c44 25#include <lib/ns.h>
942bf97b 26#include <lib/vrf.h>
13460c44 27
bf094f69
QY
28#include "zebra/rib.h"
29#include "zebra/zebra_vrf.h"
30
fe18ee2d
DS
31#ifdef HAVE_NETLINK
32/* Socket interface to kernel */
d62a17ae 33struct nlsock {
34 int sock;
35 int seq;
36 struct sockaddr_nl snl;
37 char name[64];
fe18ee2d
DS
38};
39#endif
40
d62a17ae 41struct zebra_ns {
42 /* net-ns name. */
43 char name[VRF_NAMSIZ];
fe18ee2d 44
d62a17ae 45 /* Identifier. */
46 ns_id_t ns_id;
fe18ee2d
DS
47
48#ifdef HAVE_NETLINK
62b8bb7a
MS
49 struct nlsock netlink; /* kernel messages */
50 struct nlsock netlink_cmd; /* command channel */
51 struct nlsock netlink_dplane; /* dataplane channel */
d62a17ae 52 struct thread *t_netlink;
fe18ee2d
DS
53#endif
54
d62a17ae 55 struct route_table *if_table;
fe18ee2d 56
3347430b
PG
57 /* Back pointer */
58 struct ns *ns;
fe18ee2d
DS
59};
60
d62a17ae 61struct zebra_ns *zebra_ns_lookup(ns_id_t ns_id);
fe18ee2d 62
d62a17ae 63int zebra_ns_init(void);
64int zebra_ns_enable(ns_id_t ns_id, void **info);
ff705b15 65int zebra_ns_disabled(struct ns *ns);
62b8bb7a
MS
66int zebra_ns_early_shutdown(struct ns *ns);
67int zebra_ns_final_shutdown(struct ns *ns);
5335613b 68
b95c1883 69int zebra_ns_config_write(struct vty *vty, struct ns *ns);
47a08aa9 70
fe18ee2d 71#endif