1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 2016 Cumulus Networks, Inc.
7 #if !defined(__ZEBRA_NS_H__)
13 #include "zebra/rib.h"
14 #include "zebra/zebra_vrf.h"
21 /* Socket interface to kernel */
25 struct sockaddr_nl snl
;
35 char name
[VRF_NAMSIZ
];
41 struct nlsock netlink
; /* kernel messages */
42 struct nlsock netlink_cmd
; /* command channel */
44 /* dplane system's channels: one for outgoing programming,
45 * for the FIB e.g., and one for incoming events from the OS.
47 struct nlsock netlink_dplane_out
;
48 struct nlsock netlink_dplane_in
;
49 struct event
*t_netlink
;
52 struct route_table
*if_table
;
58 struct zebra_ns
*zebra_ns_lookup(ns_id_t ns_id
);
60 int zebra_ns_init(void);
61 int zebra_ns_enable(ns_id_t ns_id
, void **info
);
62 int zebra_ns_disabled(struct ns
*ns
);
63 int zebra_ns_early_shutdown(struct ns
*ns
,
64 void *param_in
__attribute__((unused
)),
65 void **param_out
__attribute__((unused
)));
66 int zebra_ns_final_shutdown(struct ns
*ns
,
67 void *param_in
__attribute__((unused
)),
68 void **param_out
__attribute__((unused
)));
69 int zebra_ns_config_write(struct vty
*vty
, struct ns
*ns
);