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
20 lines
308 B
Protocol Buffer
20 lines
308 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package bio.net;
|
|
option go_package = "github.com/bio-routing/bio-rd/net/api";
|
|
|
|
message Prefix {
|
|
IP address = 1;
|
|
uint32 length = 2;
|
|
}
|
|
|
|
message IP {
|
|
uint64 higher = 1;
|
|
uint64 lower = 2;
|
|
enum Version {
|
|
IPv4 = 0;
|
|
IPv6 = 1;
|
|
}
|
|
Version version = 3;
|
|
}
|