| 1 | syntax = "proto3"; |
| 2 | |
| 3 | package bio.ris; |
| 4 | |
| 5 | import "net/api/net.proto"; |
| 6 | import "route/api/route.proto"; |
| 7 | option go_package = "github.com/bio-routing/bio-rd/cmd/ris/api"; |
| 8 | |
| 9 | service RoutingInformationService { |
| 10 | rpc LPM(LPMRequest) returns (LPMResponse) {}; |
| 11 | rpc Get(GetRequest) returns (GetResponse) {}; |
| 12 | rpc GetRouters(GetRoutersRequest) returns (GetRoutersResponse) {}; |
| 13 | rpc GetLonger(GetLongerRequest) returns (GetLongerResponse) {}; |
| 14 | rpc ObserveRIB(ObserveRIBRequest) returns (stream RIBUpdate); |
| 15 | rpc DumpRIB(DumpRIBRequest) returns (stream DumpRIBReply); |
| 16 | } |
| 17 | |
| 18 | message LPMRequest { |
| 19 | string router = 1; |
| 20 | uint64 vrf_id = 2; |
| 21 | string vrf = 4; |
| 22 | bio.net.Prefix pfx = 3; |
| 23 | } |
| 24 | |
| 25 | message LPMResponse { |
| 26 | repeated bio.route.Route routes = 1; |
| 27 | } |
| 28 | |
| 29 | message GetRequest { |
| 30 | string router = 1; |
| 31 | uint64 vrf_id = 2; |
| 32 | string vrf = 4; |
| 33 | bio.net.Prefix pfx = 3; |
| 34 | } |
| 35 | |
| 36 | message GetResponse { |
| 37 | repeated bio.route.Route routes = 1; |
| 38 | } |
| 39 | |
| 40 | message GetLongerRequest { |
| 41 | string router = 1; |
| 42 | uint64 vrf_id = 2; |
| 43 | string vrf = 4; |
| 44 | bio.net.Prefix pfx = 3; |
| 45 | } |
| 46 | |
| 47 | message GetLongerResponse { |
| 48 | repeated bio.route.Route routes = 1; |
| 49 | } |
| 50 | |
| 51 | message ObserveRIBRequest { |
| 52 | string router = 1; |
| 53 | uint64 vrf_id = 2; |
| 54 | string vrf = 4; |
| 55 | enum AFISAFI { |
| 56 | IPv4Unicast = 0; |
| 57 | IPv6Unicast = 1; |
| 58 | } |
| 59 | AFISAFI afisafi = 3; |
| 60 | bool allow_unready_rib = 5; |
| 61 | } |
| 62 | |
| 63 | message RIBFilter { |
| 64 | uint32 originating_asn = 1; |
| 65 | uint32 min_length = 2; |
| 66 | uint32 max_length = 3; |
| 67 | } |
| 68 | |
| 69 | message RIBUpdate { |
| 70 | bool advertisement = 1; |
| 71 | bool is_initial_dump = 3; |
| 72 | bool end_of_rib = 4; |
| 73 | bio.route.Route route = 2; |
| 74 | } |
| 75 | |
| 76 | |
| 77 | message DumpRIBRequest { |
| 78 | string router = 1; |
| 79 | uint64 vrf_id = 2; |
| 80 | string vrf = 4; |
| 81 | enum AFISAFI { |
| 82 | IPv4Unicast = 0; |
| 83 | IPv6Unicast = 1; |
| 84 | } |
| 85 | AFISAFI afisafi = 3; |
| 86 | RIBFilter filter = 5; |
| 87 | } |
| 88 | |
| 89 | message DumpRIBReply { |
| 90 | bio.route.Route route = 1; |
| 91 | } |
| 92 | |
| 93 | message GetRoutersRequest { |
| 94 | |
| 95 | } |
| 96 | |
| 97 | message Router { |
| 98 | string sys_name = 1; |
| 99 | repeated uint64 vrf_ids = 2; |
| 100 | string address = 3; |
| 101 | } |
| 102 | |
| 103 | message GetRoutersResponse { |
| 104 | repeated Router routers = 1; |
| 105 | } |