Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame^] | 1 | // SPDX-FileCopyrightText: 2020 The Magma Authors. |
| 2 | // SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org> |
| 3 | // |
| 4 | // SPDX-License-Identifier: BSD-3-Clause |
| 5 | |
| 6 | syntax = "proto3"; |
| 7 | |
| 8 | import "orc8r/protos/common.proto"; |
| 9 | |
| 10 | package magma.mconfig; |
| 11 | option go_package = "magma/lte/cloud/go/protos/mconfig"; |
| 12 | |
| 13 | // -------------------------------------------------------------------------- |
| 14 | // SentryConfig stores the network-wide Sentry.io configuration |
| 15 | // -------------------------------------------------------------------------- |
| 16 | message SentryConfig { |
| 17 | // url_python initializes the Sentry Python SDK and sets the remote URL. |
| 18 | // If set to empty string, Sentry Python SDK will not be initialized. |
| 19 | string url_python = 1; |
| 20 | // url_native initializes the Sentry Native SDK for C/C++ and sets the |
| 21 | // remote URL. If set to empty string, Sentry Native SDK will not be |
| 22 | // initialized. |
| 23 | string url_native = 2; |
| 24 | // upload_mme_log decides whether MME service log file (/var/log/mme.log) |
| 25 | // is uploaded along with MME crashreports |
| 26 | bool upload_mme_log = 3; |
| 27 | // sample_rate sets the rate at which Python error events are sampled. |
| 28 | // sample_rate should be a number between 0 (0% of errors sent) and 1 (100% |
| 29 | // of errors sent) |
| 30 | float sample_rate = 4; |
| 31 | } |
| 32 | |
| 33 | //------------------------------------------------------------------------------ |
| 34 | // EnodebD configs |
| 35 | //------------------------------------------------------------------------------ |
| 36 | message EnodebD { |
| 37 | enum CSFBRat { |
| 38 | CSFBRAT_2G = 0; |
| 39 | CSFBRAT_3G = 1; |
| 40 | } |
| 41 | |
| 42 | message FDDConfig { |
| 43 | int32 earfcndl = 1; |
| 44 | int32 earfcnul = 2; |
| 45 | } |
| 46 | message TDDConfig { |
| 47 | int32 earfcndl = 1; |
| 48 | // TDD subframe config parameter. See http://niviuk.free.fr/lte_tdd.php |
| 49 | int32 subframe_assignment = 2; |
| 50 | // TDD subframe config parameter. See http://niviuk.free.fr/lte_tdd.php |
| 51 | int32 special_subframe_pattern = 3; |
| 52 | } |
| 53 | message EnodebConfig { |
| 54 | // Device-unique serial ID. Used to identify the eNodeB, and ties the |
| 55 | // config to that device |
| 56 | int32 earfcndl = 1; |
| 57 | int32 subframe_assignment = 2; |
| 58 | int32 special_subframe_pattern = 3; |
| 59 | int32 pci = 4; |
| 60 | bool transmit_enabled = 5; |
| 61 | string device_class = 6; |
| 62 | int32 bandwidth_mhz = 7; |
| 63 | int32 tac = 8; |
| 64 | int32 cell_id = 9; |
| 65 | string ip_address = 10; |
| 66 | } |
| 67 | |
| 68 | orc8r.LogLevel log_level = 1; |
| 69 | |
| 70 | // Physical cell ID (0-504) |
| 71 | int32 pci = 2; |
| 72 | // Frequency channel number. See niviuk.free.fr/lte_band.php for mapping to |
| 73 | // frequency |
| 74 | int32 earfcndl = 3; |
| 75 | // Bandwidth in MHz, from set {1.4, 3, 5, 10, 15, 20} |
| 76 | int32 bandwidth_mhz = 4; |
| 77 | // Network operator identifier. |
| 78 | string plmnid_list = 5; |
| 79 | // TDD subframe config parameter. See http://niviuk.free.fr/lte_tdd.php |
| 80 | int32 subframe_assignment = 6; |
| 81 | // TDD subframe config parameter. See http://niviuk.free.fr/lte_tdd.php |
| 82 | int32 special_subframe_pattern = 7; |
| 83 | // Enable eNodeB |
| 84 | bool allow_enodeb_transmit = 8; |
| 85 | // Tracking area code. 16-bit |
| 86 | int32 tac = 9; |
| 87 | // RAT type (2G/3G), used by eNB |
| 88 | CSFBRat csfb_rat = 10; |
| 89 | // 2G RAT frequencies /ARFCNs for redirection, used by eNB |
| 90 | repeated int32 arfcn_2g = 11; |
| 91 | TDDConfig tdd_config = 12; |
| 92 | FDDConfig fdd_config = 13; |
| 93 | map<string, EnodebConfig> enb_configs_by_serial = 14; |
| 94 | } |
| 95 | |
| 96 | //------------------------------------------------------------------------------ |
| 97 | // PipelineD configs |
| 98 | //------------------------------------------------------------------------------ |
| 99 | message PipelineD { |
| 100 | enum NetworkServices { |
| 101 | METERING = 0 [deprecated=true]; // deprecated |
| 102 | DPI = 1; |
| 103 | ENFORCEMENT = 2; |
| 104 | } |
| 105 | orc8r.LogLevel log_level = 1; |
| 106 | // Range of IPs allocated to UEs |
| 107 | string ue_ip_block = 2; |
| 108 | // Whether NAT is enabled |
| 109 | bool nat_enabled = 3; |
| 110 | // repeated PolicyRule policy_rules = 5; // Policies have moved to policydb.proto |
| 111 | string default_rule_id = 6; // This should match a rule id in policy_rules |
| 112 | repeated NetworkServices services = 8; |
| 113 | message AllowedGrePeer { |
| 114 | string ip = 1; |
| 115 | uint32 key = 2; |
| 116 | } |
| 117 | repeated AllowedGrePeer allowed_gre_peers = 9; |
| 118 | message IPDRExportDst { |
| 119 | string ip = 1; |
| 120 | uint32 port = 2; |
| 121 | } |
| 122 | IPDRExportDst ipdr_export_dst = 10; |
| 123 | message LiUes { |
| 124 | repeated string imsis = 1; |
| 125 | repeated string msisdns = 2; |
| 126 | repeated string macs = 3; |
| 127 | repeated string ips = 4; |
| 128 | repeated string imeis = 5; |
| 129 | } |
| 130 | LiUes li_ues = 12; |
| 131 | |
| 132 | string sgi_management_iface_vlan = 13; |
| 133 | string sgi_management_iface_ip_addr = 14; |
| 134 | string sgi_management_iface_gw = 15; |
| 135 | |
| 136 | message HEConfig { |
| 137 | enum EncryptionAlgorithm { |
| 138 | RC4 = 0; |
| 139 | AES256_CBC_HMAC_MD5 = 1; |
| 140 | AES256_ECB_HMAC_MD5 = 2; |
| 141 | GZIPPED_AES256_ECB_SHA1 = 3; |
| 142 | } |
| 143 | enum HashFunction{ |
| 144 | MD5 = 0; |
| 145 | HEX = 1; |
| 146 | SHA256 = 2; |
| 147 | } |
| 148 | enum EncodingType { |
| 149 | BASE64 = 0; |
| 150 | HEX2BIN = 1; |
| 151 | } |
| 152 | |
| 153 | // enable_header_enrichment is true if header enrichment feature is |
| 154 | // enabled for gateway |
| 155 | bool enable_header_enrichment = 1; |
| 156 | bool enable_encryption = 2; |
| 157 | // encryption/hashing/encoding information for headers |
| 158 | EncryptionAlgorithm encryptionAlgorithm = 3; |
| 159 | HashFunction hashFunction = 4; |
| 160 | EncodingType encodingType = 5; |
| 161 | string encryption_key = 6; |
| 162 | string hmac_key = 7; |
| 163 | } |
| 164 | HEConfig he_config = 17; |
| 165 | |
| 166 | // Enables 5G Standalone (SA) at a network level |
| 167 | bool enable5g_features = 18; |
| 168 | string upf_node_identifier = 19; |
| 169 | |
| 170 | // SGi management IPv6 address with network mask |
| 171 | string sgi_management_iface_ipv6_addr = 20; |
| 172 | // IPv6 address of SGi management network GW |
| 173 | string sgi_management_iface_ipv6_gw = 21; |
| 174 | |
| 175 | // DEPRECATED |
| 176 | reserved 4, 11; |
| 177 | } |
| 178 | |
| 179 | //------------------------------------------------------------------------------ |
| 180 | // SessionD configs |
| 181 | //------------------------------------------------------------------------------ |
| 182 | message SessionD { |
| 183 | orc8r.LogLevel log_level = 1; |
| 184 | // DEPRECATED |
| 185 | // Enable forwarding S6a related requests to Federated GW |
| 186 | bool relay_enabled = 2 [deprecated = true]; |
| 187 | WalletExhaustDetection wallet_exhaust_detection = 3; |
| 188 | // Enable relaying Gx/Gy messages via FeG RPC |
| 189 | bool gx_gy_relay_enabled = 4; |
| 190 | // sentry_config stores the Sentry.io configuration for this service |
| 191 | SentryConfig sentry_config = 5; |
| 192 | |
| 193 | // Enables 5G Standalone (SA) at a network level |
| 194 | bool enable5g_features = 6; |
| 195 | } |
| 196 | |
| 197 | message WalletExhaustDetection { |
| 198 | // Enable the feature where session is terminated on wallet exhaust |
| 199 | bool terminate_on_exhaust = 1; |
| 200 | enum Method { |
| 201 | // If # of Gx Tracked Rules are > 0, then the wallet is still valid |
| 202 | GxTrackedRules = 0; |
| 203 | } |
| 204 | // How wallet exhast is detected on SessionD |
| 205 | Method method = 2; |
| 206 | // How long to wait before terminating a out-of-wallet subscriber on attach |
| 207 | uint32 timeout_ms = 3; |
| 208 | } |
| 209 | |
| 210 | //------------------------------------------------------------------------------ |
| 211 | // PolicyDB configs |
| 212 | //------------------------------------------------------------------------------ |
| 213 | message PolicyDB { |
| 214 | orc8r.LogLevel log_level = 1; |
| 215 | } |
| 216 | |
| 217 | //------------------------------------------------------------------------------ |
| 218 | // RedirectD configs |
| 219 | //------------------------------------------------------------------------------ |
| 220 | message RedirectD { |
| 221 | orc8r.LogLevel log_level = 1; |
| 222 | } |
| 223 | |
| 224 | //------------------------------------------------------------------------------ |
| 225 | // MobilityD configs |
| 226 | //------------------------------------------------------------------------------ |
| 227 | message MobilityD { |
| 228 | // UE allocator type. |
| 229 | enum IpAllocatorType { |
| 230 | IP_POOL = 0; |
| 231 | DHCP = 1; |
| 232 | } |
| 233 | orc8r.LogLevel log_level = 1; |
| 234 | // An IP block is a range of IP addresses specified by a network address and |
| 235 | // a prefix-length of the netmask. For example, |
| 236 | // IPv4 IP block: "192.168.0.0/24" |
| 237 | string ip_block = 2; |
| 238 | // ip allocation type, either dhcp or ip_pool |
| 239 | // default is ip_pool |
| 240 | IpAllocatorType ip_allocator_type = 3; |
| 241 | // Enable Static IP from subscriberDB |
| 242 | bool static_ip_enabled = 4; |
| 243 | // Enable multi APN IP allocation |
| 244 | bool multi_apn_ip_alloc = 5; |
| 245 | |
| 246 | // IPv6 block for IPv6 allocator, for example: |
| 247 | // IPv6 IP block: "fdee:5:6c::/48" |
| 248 | string ipv6_block = 10; |
| 249 | // Select ipv6 session prefix allocation type, example: |
| 250 | // "RANDOM", "HASH" |
| 251 | string ipv6_prefix_allocation_type = 11; |
| 252 | } |
| 253 | |
| 254 | //------------------------------------------------------------------------------ |
| 255 | // MME configs |
| 256 | //------------------------------------------------------------------------------ |
| 257 | message MME { |
| 258 | // (0)Turning off NonEPS service, (1)Both CSFB and SMS, (2)only SMS |
| 259 | enum NonEPSServiceControl { |
| 260 | NON_EPS_SERVICE_CONTROL_OFF = 0; |
| 261 | NON_EPS_SERVICE_CONTROL_CSFB_SMS = 1; |
| 262 | NON_EPS_SERVICE_CONTROL_SMS = 2; |
| 263 | NON_EPS_SERVICE_CONTROL_SMS_ORC8R = 3; |
| 264 | } |
| 265 | |
| 266 | orc8r.LogLevel log_level = 1; |
| 267 | // Mobile country code |
| 268 | string mcc = 2; |
| 269 | // Mobile network code |
| 270 | string mnc = 3; |
| 271 | // [deprecated] Tracking area code. 16-bit |
| 272 | // Is overrideen by field 15 |
| 273 | int32 tac = 4; |
| 274 | // MME group identifier - unique within a PLMN. 16-bit |
| 275 | int32 mme_gid = 5; |
| 276 | // MME code - unique within an MME group. 8-bit |
| 277 | int32 mme_code = 6; |
| 278 | // Enable DNS Caching. Will be filled by DnsD |
| 279 | bool enable_dns_caching = 7; |
| 280 | // DEPRECATED |
| 281 | // Enable credit control tracking with OCS and forwarding S6a related |
| 282 | // requests to Federated GW |
| 283 | bool relay_enabled = 8; |
| 284 | // For indicating one of the four modes |
| 285 | NonEPSServiceControl non_eps_service_control = 9; |
| 286 | // Mobile country code for CSFB |
| 287 | string csfb_mcc = 10; |
| 288 | // Mobile network code for CSFB |
| 289 | string csfb_mnc = 11; |
| 290 | // Location area code. 16-bit |
| 291 | int32 lac = 12; |
| 292 | // If relay_enabled is false, this determines whether cloud subscriberdb |
| 293 | // or local subscriberdb is used for authentication requests. |
| 294 | bool cloud_subscriberdb_enabled = 14; |
| 295 | // The Tracking Area Code of every connected eNodeB needs to be |
| 296 | // registered the MME. |
| 297 | // Overrides field 4 if this is not empty. Field 4 is in the process of |
| 298 | // being deprecated |
| 299 | repeated int32 attached_enodeb_tacs = 15; |
| 300 | // MME relative capacity - capacity within an MME group. 8-bit |
| 301 | int32 mme_relative_capacity = 16; |
| 302 | |
| 303 | // DEPRECATED |
| 304 | // Use relay_enabled instead |
| 305 | // bool s6a_relay_enabled = 13; |
| 306 | |
| 307 | // Primary DNS server |
| 308 | string dns_primary = 20; |
| 309 | // Secondary DNS server |
| 310 | string dns_secondary = 21; |
| 311 | // Whether NAT is enabled |
| 312 | bool nat_enabled = 22; |
| 313 | |
| 314 | // Enable relaying S6a messages via FeG RPC |
| 315 | bool hss_relay_enabled = 23; |
| 316 | |
| 317 | // Apn Correction feature |
| 318 | bool enable_apn_correction = 24; |
| 319 | message ApnCorrectionMap { |
| 320 | string imsi_prefix = 1; |
| 321 | string apn_override = 2; |
| 322 | } |
| 323 | repeated ApnCorrectionMap apn_correction_map_list = 25; |
| 324 | |
| 325 | // P_CSCF IP address configs |
| 326 | string ipv4_p_cscf_address = 26; |
| 327 | string ipv6_p_cscf_address = 27; |
| 328 | |
| 329 | // IPv6 DNS server |
| 330 | string ipv6_dns_address = 30; |
| 331 | |
| 332 | // SGW S1U endpoint on AGW |
| 333 | string ipv4_sgw_s1u_addr = 31; |
| 334 | |
| 335 | // PLMN restriction configs |
| 336 | message PlmnConfig { |
| 337 | string mcc = 1; |
| 338 | string mnc = 2; |
| 339 | } |
| 340 | repeated PlmnConfig restricted_plmns = 32; |
| 341 | |
| 342 | message TacList { |
| 343 | repeated uint32 tac = 1; |
| 344 | } |
| 345 | map<string, TacList> service_area_maps = 33; |
| 346 | |
| 347 | FederatedModeMap federated_mode_map = 34; |
| 348 | |
| 349 | // IMEI restriction configs |
| 350 | message ImeiConfig { |
| 351 | string tac = 1; |
| 352 | string snr = 2; |
| 353 | } |
| 354 | repeated ImeiConfig restricted_imeis = 35; |
| 355 | |
| 356 | // MME congestion control configs |
| 357 | bool congestion_control_enabled = 40; |
| 358 | |
| 359 | // sentry_config stores the Sentry.io configuration for this service |
| 360 | SentryConfig sentry_config = 45; |
| 361 | |
| 362 | // Enables 5G Standalone (SA) at a network level |
| 363 | bool enable5g_features = 46; |
| 364 | |
| 365 | // AMF Slice Service Type (SST) |
| 366 | string default_slice_service_type = 47; |
| 367 | |
| 368 | // AMF Slice Descriptor (SD) |
| 369 | string default_slice_differentiator = 48; |
| 370 | |
| 371 | // AMF Name |
| 372 | string amf_name = 50; |
| 373 | |
| 374 | // AMF Region ID |
| 375 | string amf_region_id = 51; |
| 376 | |
| 377 | // AMF Set ID |
| 378 | string amf_set_id = 52; |
| 379 | |
| 380 | // AMF pointer |
| 381 | string amf_pointer = 53; |
| 382 | } |
| 383 | |
| 384 | message FederatedModeMap { |
| 385 | bool enabled = 1; |
| 386 | repeated ModeMapItem mapping = 2; |
| 387 | } |
| 388 | |
| 389 | message ModeMapItem { |
| 390 | enum FederatedMode { |
| 391 | SPGW_SUBSCRIBER = 0; // default mode is HSS + spgw_task |
| 392 | LOCAL_SUBSCRIBER = 1; // will use subscriberDb + policydb |
| 393 | S8_SUBSCRIBER = 2; // will use HSS (feg) + s8_task |
| 394 | } |
| 395 | FederatedMode mode = 1; |
| 396 | string plmn = 2; |
| 397 | string imsi_range = 3; |
| 398 | string apn = 4; |
| 399 | } |
| 400 | |
| 401 | //------------------------------------------------------------------------------ |
| 402 | // SubscriberDB configs |
| 403 | //------------------------------------------------------------------------------ |
| 404 | message SubscriberDB { |
| 405 | orc8r.LogLevel log_level = 1; |
| 406 | // Operator configuration field for LTE |
| 407 | bytes lte_auth_op = 2; |
| 408 | // Authentication management field for LTE |
| 409 | bytes lte_auth_amf = 3; |
| 410 | |
| 411 | message SubscriptionProfile { |
| 412 | // Maximum uplink bit rate (AMBR-UL) |
| 413 | uint64 max_ul_bit_rate = 1; |
| 414 | // Maximum downlink bit rate (AMBR-DL) |
| 415 | uint64 max_dl_bit_rate = 2; |
| 416 | } |
| 417 | map<string, SubscriptionProfile> sub_profiles = 4; |
| 418 | |
| 419 | // DEPRECATED |
| 420 | // Enable forwarding S6a related requests to Federated GW |
| 421 | bool relay_enabled = 5; |
| 422 | |
| 423 | // Enable relaying S6a messages via FeG RPC |
| 424 | bool hss_relay_enabled = 6; |
| 425 | |
| 426 | // Interval in seconds between gateway and cloud sync |
| 427 | uint32 sync_interval = 7; |
| 428 | |
| 429 | // Enables 5G Standalone (SA) at a network level |
| 430 | bool enable5g_features = 8; |
| 431 | } |
| 432 | |
| 433 | //------------------------------------------------------------------------------ |
| 434 | // LighttpD configs |
| 435 | //------------------------------------------------------------------------------ |
| 436 | message LighttpD { |
| 437 | orc8r.LogLevel log_level = 1; |
| 438 | bool enable_caching = 2; |
| 439 | } |
| 440 | |
| 441 | //------------------------------------------------------------------------------ |
| 442 | // MonitorD configs |
| 443 | //------------------------------------------------------------------------------ |
| 444 | message MonitorD { |
| 445 | orc8r.LogLevel log_level = 1; |
| 446 | int32 polling_interval = 60; |
| 447 | } |
| 448 | |
| 449 | //------------------------------------------------------------------------------ |
| 450 | // DPID configs |
| 451 | //------------------------------------------------------------------------------ |
| 452 | message DPID { |
| 453 | orc8r.LogLevel log_level = 1; |
| 454 | } |
| 455 | |
| 456 | //------------------------------------------------------------------------------ |
| 457 | // ConnectionD configs |
| 458 | //------------------------------------------------------------------------------ |
| 459 | message ConnectionD { |
| 460 | orc8r.LogLevel log_level = 1; |
| 461 | } |
| 462 | |
| 463 | //------------------------------------------------------------------------------ |
| 464 | // LIAgentD configs |
| 465 | //------------------------------------------------------------------------------ |
| 466 | message LIAgentD { |
| 467 | orc8r.LogLevel log_level = 1; |
| 468 | repeated NProbeTask nprobe_tasks = 2; |
| 469 | } |
| 470 | |
| 471 | message NProbeTask { |
| 472 | string task_id = 1; |
| 473 | string target_id = 2; |
| 474 | string target_type = 3; |
| 475 | string delivery_type = 4; |
| 476 | uint64 correlation_id = 5; |
| 477 | string domain_id = 6; |
| 478 | } |
| 479 | |
| 480 | //------------------------------------------------------------------------------ |
| 481 | // DnsD configs |
| 482 | //------------------------------------------------------------------------------ |
| 483 | message DnsD { |
| 484 | orc8r.LogLevel log_level = 1; |
| 485 | bool enable_caching = 2; |
| 486 | int32 localTTL = 3; |
| 487 | repeated GatewayDNSConfigRecordsItems records = 4; |
| 488 | bool dhcp_server_enabled = 5; |
| 489 | } |
| 490 | |
| 491 | message GatewayDNSConfigRecordsItems { |
| 492 | repeated string a_record = 1; |
| 493 | repeated string aaaa_record = 2; |
| 494 | repeated string cname_record = 3; |
| 495 | string domain = 4; |
| 496 | } |
| 497 | |
| 498 | //---------------------------------------------------------------------------- |
| 499 | // AgwD configs |
| 500 | //---------------------------------------------------------------------------- |
| 501 | message AgwD { |
| 502 | enum LogLevel { |
| 503 | UNSET = 0; |
| 504 | DEBUG = 1; |
| 505 | INFO = 2; |
| 506 | WARN = 3; |
| 507 | ERROR = 4; |
| 508 | } |
| 509 | LogLevel log_level = 1; |
| 510 | |
| 511 | string sctpd_downstream_service_target = 2; |
| 512 | string sctpd_upstream_service_target = 3; |
| 513 | string mme_sctpd_downstream_service_target = 4; |
| 514 | string mme_sctpd_upstream_service_target = 5; |
| 515 | } |