blob: 318e80a92e8dbe420005be24f49d73b44ca4ad2a [file] [log] [blame]
Avneesh Sachdevef20ef72016-04-04 10:54:57 -07001//
2// fpm.proto
3//
4// @copyright Copyright (C) 2016 Sproute Networks, Inc.
5//
6// @author Avneesh Sachdev <avneesh@sproute.com>
7//
Avneesh Sachdevef20ef72016-04-04 10:54:57 -07008// Permission to use, copy, modify, and/or distribute this software
9// for any purpose with or without fee is hereby granted, provided
10// that the above copyright notice and this permission notice appear
11// in all copies.
12//
13// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
14// WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
15// WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
16// AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
17// CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
18// OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
19// NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21//
22
23//
24// Protobuf definitions pertaining to the Forwarding Plane Manager component.
25//
26
27package fpm;
28
29import "qpb/qpb.proto";
30
31//
32// A Nexthop for a route. It indicates how packets to a given prefix
33// should be forwarded (for instance, send them out of a specified
34// interface to a specified address).
35//
36message Nexthop {
37 optional qpb.IfIdentifier if_id = 2;
38 optional qpb.L3Address address = 3;
39}
40
41message RouteKey {
42 optional qpb.L3Prefix prefix = 1;
43}
44
45message DeleteRoute {
46 required uint32 vrf_id = 1;
47 required qpb.AddressFamily address_family = 2;
48 required qpb.SubAddressFamily sub_address_family = 3;
49 required RouteKey key = 4;
50}
51
52enum RouteType {
53 UNKNOWN = 0;
54 NORMAL = 1;
55 UNREACHABLE = 2;
56 BLACKHOLE = 3;
57}
58
59message AddRoute {
60 required uint32 vrf_id = 1;
61 required qpb.AddressFamily address_family = 2;
62 required qpb.SubAddressFamily sub_address_family = 3;
63 required RouteKey key = 4;
64
65 optional RouteType route_type = 5;
66
67 required qpb.Protocol protocol = 6;
68
69 required int32 metric = 8;
70
71 repeated Nexthop nexthops = 9;
72}
73
74//
75// Any message from the FPM.
76//
77message Message {
78 enum Type {
79 UNKNOWN_MSG = 0;
80 ADD_ROUTE = 1;
81 DELETE_ROUTE = 2;
82 };
83
84 optional Type type = 1;
85
86 optional AddRoute add_route = 2;
87 optional DeleteRoute delete_route = 3;
88}