]>
Commit | Line | Data |
---|---|---|
1 | // SPDX-License-Identifier: ISC | |
2 | /* | |
3 | * qpb.proto | |
4 | * | |
5 | * @copyright Copyright (C) 2016 Sproute Networks, Inc. | |
6 | * | |
7 | * @author Avneesh Sachdev <avneesh@sproute.com> | |
8 | * | |
9 | * Permission to use, copy, modify, and/or distribute this software | |
10 | * for any purpose with or without fee is hereby granted, provided | |
11 | * that the above copyright notice and this permission notice appear | |
12 | * in all copies. | |
13 | * | |
14 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | |
15 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | |
16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | |
17 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR | |
18 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | |
19 | * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | |
20 | * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |
21 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
22 | */ | |
23 | ||
24 | syntax = "proto2"; | |
25 | ||
26 | /* | |
27 | * Protobuf definitions pertaining to the Quagga/FRR Protobuf component. | |
28 | */ | |
29 | package qpb; | |
30 | ||
31 | enum AddressFamily { | |
32 | UNKNOWN_AF = 0; | |
33 | IPV4 = 1; // IP version 4 | |
34 | IPV6 = 2; // IP version 6 | |
35 | }; | |
36 | ||
37 | enum SubAddressFamily { | |
38 | UNKNOWN_SAF = 0; | |
39 | UNICAST = 1; | |
40 | MULTICAST = 2; | |
41 | }; | |
42 | ||
43 | // | |
44 | // An IP version 4 address, such as 10.1.1.1. | |
45 | // | |
46 | message Ipv4Address { | |
47 | required fixed32 value = 1 ; | |
48 | }; | |
49 | ||
50 | message Ipv6Address { | |
51 | ||
52 | // 16 bytes. | |
53 | required bytes bytes = 1; | |
54 | }; | |
55 | ||
56 | // | |
57 | // An IP version 4 or IP version 6 address. | |
58 | // | |
59 | message L3Address { | |
60 | optional Ipv4Address v4 = 1; | |
61 | optional Ipv6Address v6 = 2; | |
62 | }; | |
63 | ||
64 | // | |
65 | // An IP prefix, such as 10.1/16. | |
66 | // We use the message below to represent both IPv4 and IPv6 prefixes. | |
67 | message L3Prefix { | |
68 | required uint32 length = 1; | |
69 | required bytes bytes = 2; | |
70 | }; | |
71 | ||
72 | // | |
73 | // Something that identifies an interface on a machine. It can either | |
74 | // be a name (for instance, 'eth0') or a number currently. | |
75 | // | |
76 | message IfIdentifier { | |
77 | optional uint32 index = 1; | |
78 | optional string name = 2; | |
79 | }; | |
80 | ||
81 | enum Protocol { | |
82 | UNKNOWN_PROTO = 0; | |
83 | LOCAL = 1; | |
84 | CONNECTED = 2; | |
85 | KERNEL = 3; | |
86 | STATIC = 4; | |
87 | RIP = 5; | |
88 | RIPNG = 6; | |
89 | OSPF = 7; | |
90 | ISIS = 8; | |
91 | BGP = 9; | |
92 | OTHER = 10; | |
93 | } |