network.proto 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. syntax = "proto3";
  2. package pbmessages;
  3. message NetworkChange {
  4. message NetworkChangeMetadata {
  5. string trace_id = 1;
  6. string controller_id = 2;
  7. }
  8. message IPRange {
  9. string start_ip = 1; // Start of the IP range
  10. string end_ip = 2; // End of the IP range
  11. }
  12. message Route {
  13. string target = 1; // Target IP or network
  14. optional string via = 2; // Optional next hop IP
  15. }
  16. message DNS {
  17. string domain = 1; // Search domain
  18. repeated string nameservers = 2; // List of nameservers
  19. }
  20. message IPV4AssignMode {
  21. bool zt = 1; // Whether ZeroTier is used for IPv4 assignment
  22. }
  23. message IPV6AssignMode {
  24. bool six_plane = 1; // Whether 6plane is used for IPv6 assignment
  25. bool rfc4193 = 2; // Whether RFC 4193 is used for IPv6 assignment
  26. bool zt = 3; // Whether ZeroTier is used for IPv6 assignment
  27. }
  28. message Network {
  29. string network_id = 1;
  30. string capabilities = 2; // JSON string of capabilities
  31. uint64 creation_time = 3; // Unix timestamp in milliseconds
  32. bool enable_broadcast = 4; // Whether broadcast is enabled
  33. repeated IPRange assignment_pools = 5; // List of IP ranges for assignment
  34. uint32 mtu = 6; // Maximum Transmission Unit
  35. uint32 multicast_limit = 7; // Limit for multicast messages
  36. optional string name = 8; // Name of the network
  37. bool is_private = 9; // Whether the network is private
  38. uint32 remote_trace_level = 10; // Remote trace level
  39. optional string remote_trace_target = 11; // Remote trace target
  40. uint64 revision = 12; // Revision number
  41. repeated Route routes = 13; // List of routes
  42. string rules = 14; // JSON string of rules
  43. optional string tags = 15; // JSON string of tags
  44. IPV4AssignMode ipv4_assign_mode = 16; // IPv4 assignment mode
  45. IPV6AssignMode ipv6_assign_mode = 17; // IPv6 assignment mode
  46. optional DNS dns = 18; // DNS configuration
  47. bool sso_enabled = 19; // Whether Single Sign-On is enabled
  48. optional string sso_client_id = 20; // SSO client ID
  49. optional string sso_authorization_endpoint = 21; // SSO authorization endpoint
  50. optional string sso_issuer = 22; // SSO issuer
  51. optional string sso_provider = 23; // SSO provider
  52. string rules_source = 24; // source code for rules
  53. }
  54. enum ChangeSource {
  55. UNKNOWN = 0;
  56. CV1 = 1;
  57. CV2 = 2;
  58. CONTROLLER = 3;
  59. }
  60. optional Network old = 1;
  61. optional Network new = 2;
  62. optional NetworkChangeMetadata metadata = 3;
  63. optional ChangeSource change_source = 4;
  64. }