+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Zebra Vrf Header
* Copyright (C) 2016 Cumulus Networks
* Donald Sharp
- *
- * This file is part of Quagga.
- *
- * Quagga is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * Quagga is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined(__ZEBRA_VRF_H__)
#define __ZEBRA_VRF_H__
#include <zebra/zebra_ns.h>
#include <zebra/zebra_pw.h>
+#include <zebra/rtadv.h>
#include <lib/vxlan.h>
#ifdef __cplusplus
struct table_manager *tbl_mgr;
-#if defined(HAVE_RTADV)
struct rtadv rtadv;
-#endif /* HAVE_RTADV */
bool zebra_rnh_ip_default_route;
bool zebra_rnh_ipv6_default_route;
/*
* special macro to allow us to get the correct zebra_vrf
*/
-#define ZEBRA_DECLVAR_CONTEXT(A, B) \
- struct vrf *A; \
- if (vty->node == CONFIG_NODE) \
- A = vrf_lookup_by_id(VRF_DEFAULT); \
- else \
- A = VTY_GET_CONTEXT(vrf); \
- VTY_CHECK_CONTEXT(A); \
- struct zebra_vrf *B = A->info
+#define ZEBRA_DECLVAR_CONTEXT_VRF(vrfptr, zvrfptr) \
+ VTY_DECLVAR_CONTEXT_VRF(vrfptr); \
+ struct zebra_vrf *zvrfptr = vrfptr->info; \
+ MACRO_REQUIRE_SEMICOLON() /* end */
static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
{