| /* |
| * qpb.proto |
| * |
| * @copyright Copyright (C) 2016 Sproute Networks, Inc. |
| * |
| * @author Avneesh Sachdev <avneesh@sproute.com> |
| * |
| * Permission is granted to use, copy, modify and/or distribute this |
| * software under either one of the licenses below. |
| * |
| * Note that if you use other files from the Quagga tree directly or |
| * indirectly, then the licenses in those files still apply. |
| * |
| * Please retain both licenses below when modifying this code in the |
| * Quagga tree. |
| */ |
| |
| /* |
| * License Option 1: GPL |
| * |
| * This program is free software; you can redistribute it and/or modify it |
| * under the terms of the GNU General Public License as published by the Free |
| * Software Foundation; either version 2 of the License, or (at your option) |
| * any later version. |
| * |
| * This program is distributed in the hope that it will be useful,but WITHOUT |
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| * more details. |
| * |
| * You should have received a copy of the GNU General Public License along |
| * with this program; if not, write to the Free Software Foundation, Inc., |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| */ |
| |
| /* |
| * License Option 2: ISC License |
| * |
| * Permission to use, copy, modify, and/or distribute this software |
| * for any purpose with or without fee is hereby granted, provided |
| * that the above copyright notice and this permission notice appear |
| * in all copies. |
| * |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR |
| * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS |
| * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
| * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| */ |
| |
| /* |
| * Protobuf definitions pertaining to the Quagga Protobuf component. |
| */ |
| package qpb; |
| |
| enum AddressFamily { |
| UNKNOWN_AF = 0; |
| IPV4 = 1; // IP version 4 |
| IPV6 = 2; // IP version 6 |
| }; |
| |
| enum SubAddressFamily { |
| UNKNOWN_SAF = 0; |
| UNICAST = 1; |
| MULTICAST = 2; |
| }; |
| |
| // |
| // An IP version 4 address, such as 10.1.1.1. |
| // |
| message Ipv4Address { |
| required fixed32 value = 1 ; |
| }; |
| |
| message Ipv6Address { |
| |
| // 16 bytes. |
| required bytes bytes = 1; |
| }; |
| |
| // |
| // An IP version 4 or IP version 6 address. |
| // |
| message L3Address { |
| optional Ipv4Address v4 = 1; |
| optional Ipv6Address v6 = 2; |
| }; |
| |
| // |
| // An IP prefix, such as 10.1/16. |
| // We use the message below to represent both IPv4 and IPv6 prefixes. |
| message L3Prefix { |
| required uint32 length = 1; |
| required bytes bytes = 2; |
| }; |
| |
| // |
| // Something that identifies an interface on a machine. It can either |
| // be a name (for instance, 'eth0') or a number currently. |
| // |
| message IfIdentifier { |
| optional uint32 index = 1; |
| optional string name = 2; |
| }; |
| |
| enum Protocol { |
| UNKNOWN_PROTO = 0; |
| LOCAL = 1; |
| CONNECTED = 2; |
| KERNEL = 3; |
| STATIC = 4; |
| RIP = 5; |
| RIPNG = 6; |
| OSPF = 7; |
| ISIS = 8; |
| BGP = 9; |
| OTHER = 10; |
| } |