]> git.proxmox.com Git - mirror_frr.git/blame - qpb/qpb.proto
qpb: Add support for protobuf.
[mirror_frr.git] / qpb / qpb.proto
CommitLineData
dad253b4
AS
1/*
2 * qpb.proto
3 *
4 * @copyright Copyright (C) 2016 Sproute Networks, Inc.
5 *
6 * @author Avneesh Sachdev <avneesh@sproute.com>
7 *
8 * Permission is granted to use, copy, modify and/or distribute this
9 * software under either one of the licenses below.
10 *
11 * Note that if you use other files from the Quagga tree directly or
12 * indirectly, then the licenses in those files still apply.
13 *
14 * Please retain both licenses below when modifying this code in the
15 * Quagga tree.
16 */
17
18/*
19 * License Option 1: GPL
20 *
21 * This program is free software; you can redistribute it and/or modify it
22 * under the terms of the GNU General Public License as published by the Free
23 * Software Foundation; either version 2 of the License, or (at your option)
24 * any later version.
25 *
26 * This program is distributed in the hope that it will be useful,but WITHOUT
27 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
29 * more details.
30 *
31 * You should have received a copy of the GNU General Public License along
32 * with this program; if not, write to the Free Software Foundation, Inc.,
33 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 */
35
36/*
37 * License Option 2: ISC License
38 *
39 * Permission to use, copy, modify, and/or distribute this software
40 * for any purpose with or without fee is hereby granted, provided
41 * that the above copyright notice and this permission notice appear
42 * in all copies.
43 *
44 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
45 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
46 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
47 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
48 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
49 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
50 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
51 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
52 */
53
54/*
55 * Protobuf definitions pertaining to the Quagga Protobuf component.
56 */
57package qpb;
58
59enum AddressFamily {
60 UNKNOWN_AF = 0;
61 IPV4 = 1; // IP version 4
62 IPV6 = 2; // IP version 6
63};
64
65enum SubAddressFamily {
66 UNKNOWN_SAF = 0;
67 UNICAST = 1;
68 MULTICAST = 2;
69};
70
71//
72// An IP version 4 address, such as 10.1.1.1.
73//
74message Ipv4Address {
75 required fixed32 value = 1 ;
76};
77
78message Ipv6Address {
79
80 // 16 bytes.
81 required bytes bytes = 1;
82};
83
84//
85// An IP version 4 or IP version 6 address.
86//
87message L3Address {
88 optional Ipv4Address v4 = 1;
89 optional Ipv6Address v6 = 2;
90};
91
92//
93// An IP prefix, such as 10.1/16.
94// We use the message below to represent both IPv4 and IPv6 prefixes.
95message L3Prefix {
96 required uint32 length = 1;
97 required bytes bytes = 2;
98};
99
100//
101// Something that identifies an interface on a machine. It can either
102// be a name (for instance, 'eth0') or a number currently.
103//
104message IfIdentifier {
105 optional uint32 index = 1;
106 optional string name = 2;
107};
108
109enum Protocol {
110 UNKNOWN_PROTO = 0;
111 LOCAL = 1;
112 CONNECTED = 2;
113 KERNEL = 3;
114 STATIC = 4;
115 RIP = 5;
116 RIPNG = 6;
117 OSPF = 7;
118 ISIS = 8;
119 BGP = 9;
120 OTHER = 10;
121}