Rene Fichtmueller 344ee15338 feat(bio-rd): add local RIB integration via bio-rd gRPC client
Adds real-time local BGP RIB data as a complement to external APIs
(RIPE Stat, bgproutes.io) which have rate limits and 15min+ delays.

- bio-rd-client.js: gRPC client for bio-routing/bio-rd RIS service
  - LPM, Get, GetLonger, GetRouters, DumpRIB, ObserveRIB methods
  - IPv4/IPv6 encoding as uint64 pair (bio.net format)
  - Full BGP path decode: AS paths, communities, large communities
  - Graceful fallback if RIS unavailable (null/empty returns)
- protos/: bio-rd proto definitions (ris, bgp, session, route, net)
- server.js: three new endpoints + WebSocket stream
  - GET /api/rib/prefix — LPM + more-specifics via GetLonger
  - GET /api/rib/routers — list BMP-monitored routers
  - GET /api/rib/dump — full RIB dump with ASN filter + limit
  - WS /ws/rib — live ObserveRIB stream (add/withdraw events)
- package.json: @grpc/grpc-js + @grpc/proto-loader dependencies
2026-04-05 11:44:50 +02:00

35 lines
787 B
Protocol Buffer

syntax = "proto3";
package bio.bgp;
import "net/api/net.proto";
import "route/api/route.proto";
import "protocols/bgp/api/session.proto";
option go_package = "github.com/bio-routing/bio-rd/protocols/bgp/api";
message ListSessionsRequest {
SessionFilter filter = 1;
}
message SessionFilter {
bio.net.IP neighbor_ip = 1;
string vrf_name = 2;
}
message ListSessionsResponse {
repeated Session sessions = 1;
}
message DumpRIBRequest {
bio.net.IP peer = 1;
uint32 afi = 2;
uint32 safi = 3;
string vrf_name = 4;
}
service BgpService {
rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {}
rpc DumpRIBIn(DumpRIBRequest) returns (stream bio.route.Route) {}
rpc DumpRIBOut(DumpRIBRequest) returns (stream bio.route.Route) {}
}