+// SPDX-License-Identifier: GPL-2.0-or-later
/* BGP message definition header.
* Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra 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.
- *
- * GNU Zebra 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
*/
#ifndef _QUAGGA_BGPD_H
/* should be mpls_label_t? */
uint32_t tovpn_label; /* may be MPLS_LABEL_NONE */
uint32_t tovpn_zebra_vrf_label_last_sent;
+ char *tovpn_rd_pretty;
struct prefix_rd tovpn_rd;
struct prefix tovpn_nexthop; /* unset => set to 0 */
uint32_t flags;
/* RD for this VRF */
struct prefix_rd vrf_prd;
+ char *vrf_prd_pretty;
/* import rt list for the vrf instance */
struct list *vrf_import_rtl;
#define PEER_CAP_GRACEFUL_RESTART_N_BIT_RCV (1U << 24)
#define PEER_CAP_ROLE_ADV (1U << 25) /* role advertised */
#define PEER_CAP_ROLE_RCV (1U << 26) /* role received */
+#define PEER_CAP_SOFT_VERSION_ADV (1U << 27)
+#define PEER_CAP_SOFT_VERSION_RCV (1U << 28)
/* Capability flags (reset in bgp_stop) */
uint32_t af_cap[AFI_MAX][SAFI_MAX];
* so if a flag is unset, the corresponding override flag is unset too.
* However if a flag is set, the corresponding override flag is set.
*/
- uint32_t flags_override;
+ uint64_t flags_override;
/*
* Parallel array to flags that indicates whether the default behavior
* of *flags_override* should be inverted. If a flag is unset and the
* inversion state of the flag differs between peer and peer-group, the
* newly set value must equal to the inverted state of the peer-group.
*/
- uint32_t flags_invert;
+ uint64_t flags_invert;
/*
* Effective array for storing the peer/peer-group flags. In case of a
* peer-group, the peer-specific overrides (see flags_override and
* flags_invert) must be respected.
+ * When changing the structure of flags/af_flags, do not forget to
+ * change flags_invert/flags_override too.
*/
uint64_t flags;
#define PEER_FLAG_PASSIVE (1ULL << 0) /* passive mode */
#define PEER_FLAG_PORT (1ULL << 33)
#define PEER_FLAG_AIGP (1ULL << 34)
#define PEER_FLAG_GRACEFUL_SHUTDOWN (1ULL << 35)
+#define PEER_FLAG_CAPABILITY_SOFT_VERSION (1ULL << 36)
/*
*GR-Disabled mode means unset PEER_FLAG_GRACEFUL_RESTART
/* Path attributes discard */
bool discard_attrs[BGP_ATTR_MAX];
+ /* Path attributes treat-as-withdraw */
+ bool withdraw_attrs[BGP_ATTR_MAX];
+
+ /* BGP Software Version Capability */
+#define BGP_MAX_SOFT_VERSION 64
+ char *soft_version;
+
QOBJ_FIELDS;
};
DECLARE_QOBJ_TYPE(peer);
int outbound);
extern bool bgp_path_attribute_discard(struct peer *peer, char *buf,
size_t size);
+extern bool bgp_path_attribute_treat_as_withdraw(struct peer *peer, char *buf,
+ size_t size);
#ifdef _FRR_ATTRIBUTE_PRINTFRR
/* clang-format off */
#pragma FRR printfrr_ext "%pBP" (struct peer *)