fpm.proto 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. // Protobuf definitions pertaining to the Forwarding Plane Manager component.
  24. //
  25. package fpm;
  26. import "qpb/qpb.proto";
  27. //
  28. // A Nexthop for a route. It indicates how packets to a given prefix
  29. // should be forwarded (for instance, send them out of a specified
  30. // interface to a specified address).
  31. //
  32. message Nexthop {
  33. optional qpb.IfIdentifier if_id = 2;
  34. optional qpb.L3Address address = 3;
  35. }
  36. message RouteKey {
  37. optional qpb.L3Prefix prefix = 1;
  38. }
  39. message DeleteRoute {
  40. required uint32 vrf_id = 1;
  41. required qpb.AddressFamily address_family = 2;
  42. required qpb.SubAddressFamily sub_address_family = 3;
  43. required RouteKey key = 4;
  44. }
  45. enum RouteType {
  46. UNKNOWN = 0;
  47. NORMAL = 1;
  48. UNREACHABLE = 2;
  49. BLACKHOLE = 3;
  50. }
  51. message AddRoute {
  52. required uint32 vrf_id = 1;
  53. required qpb.AddressFamily address_family = 2;
  54. required qpb.SubAddressFamily sub_address_family = 3;
  55. required RouteKey key = 4;
  56. optional RouteType route_type = 5;
  57. required qpb.Protocol protocol = 6;
  58. required int32 metric = 8;
  59. repeated Nexthop nexthops = 9;
  60. }
  61. //
  62. // Any message from the FPM.
  63. //
  64. message Message {
  65. enum Type {
  66. UNKNOWN_MSG = 0;
  67. ADD_ROUTE = 1;
  68. DELETE_ROUTE = 2;
  69. };
  70. optional Type type = 1;
  71. optional AddRoute add_route = 2;
  72. optional DeleteRoute delete_route = 3;
  73. }