| syntax = "proto3"; |
| package ix; |
| |
| message GetIXMembersRequest { |
| // IX ID from PeeringDB |
| int64 id = 1; |
| } |
| |
| message PeeringDBMember { |
| int64 asn = 1; |
| // AS/network name. |
| string name = 2; |
| |
| message Router { |
| // Per PeeringDB, at least one of the following two address families |
| // will be set. |
| string ipv4 = 1; |
| string ipv6 = 2; |
| } |
| repeated Router routers = 3; |
| } |
| |
| message GetIXMembersResponse { |
| repeated PeeringDBMember members = 1; |
| } |
| |
| service PeeringDBProxy { |
| // GetIXMembers returns information about membership of a given PeeringDB IX. |
| rpc GetIXMembers(GetIXMembersRequest) returns (GetIXMembersResponse); |
| } |
| |
| message IRRQueryRequest { |
| // AS to query for. This needs be the AS number of the AS, possibly |
| // prefixed with 'as'/'AS'. |
| string as = 1; |
| } |
| |
| message IRRAttribute { |
| message ImportExport { |
| message Expression { |
| string peering = 1; |
| string router_us = 2; |
| string router_them = 3; |
| repeated string actions = 4; |
| } |
| string protocol_from = 1; |
| string protocol_into = 2; |
| repeated Expression expressions = 3; |
| string filter = 4; |
| } |
| |
| oneof value { |
| string remarks = 1; |
| ImportExport import = 2; |
| ImportExport export = 3; |
| } |
| } |
| |
| message IRRQueryResponse { |
| enum Source { |
| SOURCE_INVALID = 0; |
| SOURCE_RIPE = 1; |
| SOURCE_ARIN = 2; |
| } |
| Source source = 1; |
| repeated IRRAttribute attributes = 2; |
| } |
| |
| service IRR { |
| // Query returns parsed RPSL data from supported IRRs for a given aut-num. |
| rpc Query(IRRQueryRequest) returns (IRRQueryResponse); |
| } |
| |
| message ProcessorStatusRequest { |
| } |
| |
| message ProcessorStatusResponse { |
| message Processor { |
| enum Status { |
| STATUS_INVALID = 0; |
| STATUS_OK = 1; |
| STATUS_ERROR = 2; |
| } |
| string name = 1; |
| Status status = 2; |
| int64 last_run = 3; |
| int64 next_run = 4; |
| } |
| repeated Processor processors = 1; |
| } |
| |
| message PeerSummaryRequest { |
| } |
| |
| message PeerSummaryResponse { |
| PeeringDBMember peeringdb_info = 1; |
| enum Status { |
| STATUS_INVALID = 0; |
| STATUS_OK = 1; |
| STATUS_FAILED = 2; |
| STATUS_UNKNOWN = 3; |
| } |
| Status check_status = 2; |
| } |
| |
| message PeerDetailsRequest { |
| int64 asn = 1; |
| } |
| |
| message PeerDetailsResponse { |
| message Check { |
| enum Status { |
| STATUS_INVALID = 0; |
| STATUS_OK = 1; |
| STATUS_FAILED = 2; |
| }; |
| string name = 1; |
| Status status = 2; |
| int64 time = 3; |
| string msg = 4; |
| }; |
| repeated Check checks = 1; |
| |
| message AllowedPrefix { |
| string prefix = 1; |
| int64 max_length = 2; |
| string ta = 3; |
| }; |
| repeated AllowedPrefix allowed_prefixes = 2; |
| PeeringDBMember peeringdb_info = 3; |
| } |
| |
| message RouterHeartbeatRequest { |
| string name = 1; |
| string current_version = 2; |
| } |
| |
| message RouterHeartbeatResponse { |
| message ASConfig { |
| int64 asn = 1; |
| message Router { |
| string ipv6 = 1; |
| string ipv4 = 2; |
| string password = 3; |
| }; |
| repeated Router routers = 2; |
| message AllowedPrefix { |
| string prefix = 1; |
| int64 max_length = 2; |
| }; |
| repeated AllowedPrefix prefixes = 3; |
| }; |
| repeated ASConfig as_configs = 1; |
| string version = 2; |
| uint64 call_again = 3; |
| } |
| |
| message PeerSecretsRequest { |
| int64 asn = 1; |
| } |
| |
| message PeerSecretsResponse { |
| bytes pgp_data = 1; |
| } |
| |
| service Verifier { |
| rpc ProcessorStatus(ProcessorStatusRequest) returns (ProcessorStatusResponse); |
| rpc PeerSummary(PeerSummaryRequest) returns (stream PeerSummaryResponse); |
| rpc PeerDetails(PeerDetailsRequest) returns (PeerDetailsResponse); |
| rpc RouterHeartbeat(RouterHeartbeatRequest) returns (RouterHeartbeatResponse); |
| rpc PeerSecrets(PeerSecretsRequest) returns (PeerSecretsResponse); |
| } |
| |
| message KeyInfoRequest { |
| // Public key fingerprint. 20 bytes. |
| bytes fingerprint = 1; |
| enum Caching { |
| CACHING_INVALID = 0; |
| // Contact keyservers only if not locally (positively or negatively) cached. |
| CACHING_AUTO = 1; |
| // Force contacting keyservers. |
| CACHING_FORCE_REMOTE = 2; |
| // Force not contacting keyservers. |
| CACHING_FORCE_LOCAL = 3; |
| }; |
| Caching caching = 2; |
| } |
| |
| message KeyInfoResponse { |
| // Currently no data is returned. An error will be returned if the key doesn't exist. |
| } |
| |
| message EncryptRequest { |
| // A chunk of plaintext data. Small enough to fit in gRPC message (<<2 MiB). |
| bytes data = 1; |
| enum ChunkInfo { |
| CHUNK_INFO_INVALID = 0; |
| // More data to come after this chunked. |
| CHUNK_INFO_MORE = 1; |
| // Last chunk. |
| CHUNK_LAST = 2; |
| }; |
| ChunkInfo info = 2; |
| // Fingerprint of key to encrypt with. Only the first chunk is consulted, |
| // the key in the rest of the chunks are ignored. 20 bytes. |
| bytes fingerprint = 3; |
| } |
| |
| message EncryptResponse { |
| // A chunk of encrypted data. Small enough to fit in gRPC message (<<2 MiB). |
| bytes data = 1; |
| enum ChunkInfo { |
| CHUNK_INFO_INVALID = 0; |
| // More data to come after this chunked. |
| CHUNK_INFO_MORE = 1; |
| // Last chunk. |
| CHUNK_LAST = 2; |
| }; |
| ChunkInfo info = 2; |
| } |
| |
| service PGPEncryptor { |
| // KeyInfo returns information about a given key from the public keyserver infrastructure. |
| // If key doesn't exist, error (NotFound). |
| rpc KeyInfo(KeyInfoRequest) returns (KeyInfoResponse); |
| // Encrypt encrypts a given data blob with a given key from public keyserver infrastructure. |
| // If key doesn't exist, error (NotFound). |
| rpc Encrypt(stream EncryptRequest) returns (stream EncryptResponse); |
| } |