]> git.proxmox.com Git - mirror_frr.git/blob - fpm/fpm.proto
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / fpm / fpm.proto
1 //
2 // fpm.proto
3 //
4 // @copyright Copyright (C) 2016 Sproute Networks, Inc.
5 //
6 // @author Avneesh Sachdev <avneesh@sproute.com>
7 //
8 // 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 syntax = "proto2";
24
25 //
26 // Protobuf definitions pertaining to the Forwarding Plane Manager component.
27 //
28
29 package fpm;
30
31 import "qpb/qpb.proto";
32
33 //
34 // A Nexthop for a route. It indicates how packets to a given prefix
35 // should be forwarded (for instance, send them out of a specified
36 // interface to a specified address).
37 //
38 message Nexthop {
39 optional qpb.IfIdentifier if_id = 2;
40 optional qpb.L3Address address = 3;
41 }
42
43 message RouteKey {
44 optional qpb.L3Prefix prefix = 1;
45 }
46
47 message DeleteRoute {
48 required uint32 vrf_id = 1;
49 required qpb.AddressFamily address_family = 2;
50 required qpb.SubAddressFamily sub_address_family = 3;
51 required RouteKey key = 4;
52 }
53
54 enum RouteType {
55 UNKNOWN = 0;
56 NORMAL = 1;
57 UNREACHABLE = 2;
58 BLACKHOLE = 3;
59 }
60
61 message AddRoute {
62 required uint32 vrf_id = 1;
63 required qpb.AddressFamily address_family = 2;
64 required qpb.SubAddressFamily sub_address_family = 3;
65 required RouteKey key = 4;
66
67 optional RouteType route_type = 5;
68
69 required qpb.Protocol protocol = 6;
70
71 required int32 metric = 8;
72
73 repeated Nexthop nexthops = 9;
74 }
75
76 //
77 // Any message from the FPM.
78 //
79 message Message {
80 enum Type {
81 UNKNOWN_MSG = 0;
82 ADD_ROUTE = 1;
83 DELETE_ROUTE = 2;
84 };
85
86 optional Type type = 1;
87
88 optional AddRoute add_route = 2;
89 optional DeleteRoute delete_route = 3;
90 }