1
0
mirror of https://github.com/osrg/gobgp.git synced 2024-05-11 05:55:10 +00:00
Files

110 lines
2.7 KiB
Protocol Buffer
Raw Permalink Normal View History

// Copyright (C) 2018 Nippon Telegraph and Telephone Corporation.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation files
// (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
syntax = "proto3";
package apipb;
option go_package = "github.com/osrg/gobgp/v3/api;apipb";
import "gobgp.proto";
message MultiProtocolCapability {
apipb.Family family = 1;
}
message RouteRefreshCapability {
}
message CarryingLabelInfoCapability {
}
message ExtendedNexthopCapabilityTuple {
apipb.Family nlri_family = 1;
// Nexthop AFI must be either
// gobgp.IPv4 or
// gobgp.IPv6.
apipb.Family nexthop_family = 2;
}
message ExtendedNexthopCapability {
repeated ExtendedNexthopCapabilityTuple tuples = 1;
}
message GracefulRestartCapabilityTuple {
apipb.Family family = 1;
uint32 flags = 2;
}
message GracefulRestartCapability {
uint32 flags = 1;
uint32 time = 2;
repeated GracefulRestartCapabilityTuple tuples = 3;
}
message FourOctetASNCapability {
uint32 asn = 1;
}
message AddPathCapabilityTuple {
apipb.Family family = 1;
enum Mode {
NONE = 0;
RECEIVE = 1;
SEND = 2;
BOTH = 3;
}
Mode mode = 2;
}
message AddPathCapability {
repeated AddPathCapabilityTuple tuples = 1;
}
message EnhancedRouteRefreshCapability {
}
message LongLivedGracefulRestartCapabilityTuple {
apipb.Family family = 1;
uint32 flags = 2;
uint32 time = 3;
}
message LongLivedGracefulRestartCapability {
repeated LongLivedGracefulRestartCapabilityTuple tuples = 1;
}
message RouteRefreshCiscoCapability {
}
message FqdnCapability {
string host_name = 1;
string domain_name = 2;
}
Add SoftwareVersion capability https://datatracker.ietf.org/doc/html/draft-abraitis-bgp-version-capability Working example with FRR ``` % ./gobgp neighbor 192.168.10.124 BGP neighbor is 192.168.10.124, remote AS 65001 BGP version 4, remote router ID 200.200.200.202 BGP state = ESTABLISHED, up for 00:01:14 BGP OutQ = 0, Flops = 0 Hold time is 3, keepalive interval is 1 seconds Configured hold time is 90, keepalive interval is 30 seconds Neighbor capabilities: multiprotocol: ipv6-unicast: advertised ipv4-unicast: advertised and received route-refresh: advertised and received extended-nexthop: advertised Local: nlri: ipv4-unicast, nexthop: ipv6 UnknownCapability(6): received UnknownCapability(9): received graceful-restart: advertised and received Local: restart time 10 sec ipv6-unicast ipv4-unicast Remote: restart time 120 sec, notification flag set ipv4-unicast, forward flag set 4-octet-as: advertised and received add-path: received Remote: ipv4-unicast: receive enhanced-route-refresh: received long-lived-graceful-restart: advertised and received Local: ipv6-unicast, restart time 10 sec ipv4-unicast, restart time 20 sec Remote: ipv4-unicast, restart time 0 sec, forward flag set fqdn: advertised and received Local: name: donatas-pc, domain: Remote: name: spine1-debian-11, domain: software-version: advertised and received Local: GoBGP/3.10.0 Remote: FRRouting/8.5-dev-MyOwnFRRVersion-gdc92f44a4 cisco-route-refresh: received Message statistics: ``` FRR side: ``` root@spine1-debian-11:~# vtysh -c 'show bgp neighbor 192.168.10.17 json' | \ > jq '."192.168.10.17".neighborCapabilities.softwareVersion.receivedSoftwareVersion' "GoBGP/3.10.0" root@spine1-debian-11:~# ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-27 23:01:30 +02:00
message SoftwareVersionCapability {
string software_version = 1;
}
message UnknownCapability {
uint32 code = 1;
bytes value = 2;
}