qpb.proto 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * qpb.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 Quagga Protobuf component.
  24. */
  25. package qpb;
  26. enum AddressFamily {
  27. UNKNOWN_AF = 0;
  28. IPV4 = 1; // IP version 4
  29. IPV6 = 2; // IP version 6
  30. };
  31. enum SubAddressFamily {
  32. UNKNOWN_SAF = 0;
  33. UNICAST = 1;
  34. MULTICAST = 2;
  35. };
  36. //
  37. // An IP version 4 address, such as 10.1.1.1.
  38. //
  39. message Ipv4Address {
  40. required fixed32 value = 1 ;
  41. };
  42. message Ipv6Address {
  43. // 16 bytes.
  44. required bytes bytes = 1;
  45. };
  46. //
  47. // An IP version 4 or IP version 6 address.
  48. //
  49. message L3Address {
  50. optional Ipv4Address v4 = 1;
  51. optional Ipv6Address v6 = 2;
  52. };
  53. //
  54. // An IP prefix, such as 10.1/16.
  55. // We use the message below to represent both IPv4 and IPv6 prefixes.
  56. message L3Prefix {
  57. required uint32 length = 1;
  58. required bytes bytes = 2;
  59. };
  60. //
  61. // Something that identifies an interface on a machine. It can either
  62. // be a name (for instance, 'eth0') or a number currently.
  63. //
  64. message IfIdentifier {
  65. optional uint32 index = 1;
  66. optional string name = 2;
  67. };
  68. enum Protocol {
  69. UNKNOWN_PROTO = 0;
  70. LOCAL = 1;
  71. CONNECTED = 2;
  72. KERNEL = 3;
  73. STATIC = 4;
  74. RIP = 5;
  75. RIPNG = 6;
  76. OSPF = 7;
  77. ISIS = 8;
  78. BGP = 9;
  79. OTHER = 10;
  80. }