1 /* srp-features.h 2 * 3 * Copyright (c) 2020-2024 Apple Inc. All rights reserved. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * https://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 * This file contains compile time feature flag which enables or disables 18 * different behavior of srp-mdns-proxy. 19 */ 20 21 #ifndef __SRP_FEATURES_H__ 22 #define __SRP_FEATURES_H__ 23 24 // SRP_FEATURE_COMBINED_SRP_DNSSD_PROXY: controls whether to initialize dnssd-proxy in srp-mdns-proxy. 25 #if defined(BUILD_SRP_MDNS_PROXY) && (BUILD_SRP_MDNS_PROXY == 1) 26 27 // SRP_TEST_SERVER always builds a full (simulated) Thread border router 28 # if defined(SRP_TEST_SERVER) 29 # define SRP_TEST_SERVER_OVERRIDE 1 30 # else 31 # define SRP_TEST_SERVER_OVERRIDE 0 32 # endif 33 34 // We can only have combined srp-dnssd-proxy if we are building srp-mdns-proxy 35 # define SRP_FEATURE_PUBLISH_SPECIFIC_ROUTES 0 36 # define SRP_FEATURE_DNSSD_PROXY_SHARED_CONNECTION 0 37 # define SRP_FEATURE_DYNAMIC_CONFIGURATION 1 38 #else 39 # ifndef SRP_FEATURE_REPLICATION 40 # define SRP_FEATURE_REPLICATION 1 41 # endif 42 # ifndef THREAD_BORDER_ROUTER 43 # define THREAD_BORDER_ROUTER 1 44 # endif 45 # define STUB_ROUTER 1 46 # ifndef SRP_FEATURE_COMBINED_SRP_DNSSD_PROXY 47 # define SRP_FEATURE_COMBINED_SRP_DNSSD_PROXY 1 48 # endif 49 # ifndef SRP_FEATURE_DYNAMIC_CONFIGURATION 50 # define SRP_FEATURE_DYNAMIC_CONFIGURATION 0 51 #endif 52 #endif 53 54 // SRP_FEATURE_CAN_GENERATE_TLS_CERT: controls whether to let srp-mdns-proxy generate the TLS certificate internally. 55 #if defined(__APPLE__) 56 // All the Apple platforms support security framework, so it can generate TLS certifcate internally. 57 #define SRP_FEATURE_CAN_GENERATE_TLS_CERT 1 58 #else 59 #define SRP_FEATURE_CAN_GENERATE_TLS_CERT 0 60 #endif 61 62 #if !defined(SRP_FEATURE_NAT64) 63 #define SRP_FEATURE_NAT64 0 64 #endif 65 66 #define SRP_ANALYTICS 0 67 68 69 // At present we never want this, but we're keeping the code around. 70 #define SRP_ALLOWS_MDNS_CONFLICTS 0 71 72 #endif // __SRP_FEATURES_H__ 73