1 // Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) 2 // This Source Code Form is subject to the terms of the Mozilla Public 3 // License, v. 2.0. If a copy of the MPL was not distributed with this 4 // file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 6 #ifndef VSOMEIP_V3_CFG_CONFIGURATION_IMPL_HPP 7 #define VSOMEIP_V3_CFG_CONFIGURATION_IMPL_HPP 8 9 #include <map> 10 #include <memory> 11 #include <mutex> 12 #include <vector> 13 #include <unordered_set> 14 #include <list> 15 16 #include <boost/property_tree/ptree.hpp> 17 18 #include "trace.hpp" 19 #include "configuration.hpp" 20 #include "configuration_element.hpp" 21 #include "watchdog.hpp" 22 #include "service_instance_range.hpp" 23 #include "../../e2e_protection/include/e2exf/config.hpp" 24 #include "e2e.hpp" 25 #include "debounce.hpp" 26 #include "../../security/include/policy.hpp" 27 28 namespace vsomeip_v3 { 29 namespace cfg { 30 31 struct client; 32 struct service; 33 struct servicegroup; 34 struct event; 35 struct eventgroup; 36 struct watchdog; 37 38 class configuration_impl: 39 public configuration, 40 public std::enable_shared_from_this<configuration_impl> { 41 public: 42 VSOMEIP_EXPORT configuration_impl(); 43 VSOMEIP_EXPORT configuration_impl(const configuration_impl &_other); 44 VSOMEIP_EXPORT virtual ~configuration_impl(); 45 46 VSOMEIP_EXPORT bool load(const std::string &_name); 47 VSOMEIP_EXPORT bool remote_offer_info_add(service_t _service, 48 instance_t _instance, 49 std::uint16_t _port, 50 bool _reliable, 51 bool _magic_cookies_enabled); 52 VSOMEIP_EXPORT bool remote_offer_info_remove(service_t _service, 53 instance_t _instance, 54 std::uint16_t _port, 55 bool _reliable, 56 bool _magic_cookies_enabled, 57 bool* _still_offered_remote); 58 59 VSOMEIP_EXPORT const std::string &get_network() const; 60 61 VSOMEIP_EXPORT void set_configuration_path(const std::string &_path); 62 63 VSOMEIP_EXPORT const boost::asio::ip::address & get_unicast_address() const; 64 VSOMEIP_EXPORT const boost::asio::ip::address& get_netmask() const; 65 VSOMEIP_EXPORT const std::string &get_device() const; 66 VSOMEIP_EXPORT unsigned short get_diagnosis_address() const; 67 VSOMEIP_EXPORT std::uint16_t get_diagnosis_mask() const; 68 VSOMEIP_EXPORT bool is_v4() const; 69 VSOMEIP_EXPORT bool is_v6() const; 70 71 VSOMEIP_EXPORT bool has_console_log() const; 72 VSOMEIP_EXPORT bool has_file_log() const; 73 VSOMEIP_EXPORT bool has_dlt_log() const; 74 VSOMEIP_EXPORT const std::string & get_logfile() const; 75 VSOMEIP_EXPORT vsomeip_v3::logger::level_e get_loglevel() const; 76 77 VSOMEIP_EXPORT std::string get_unicast_address(service_t _service, instance_t _instance) const; 78 79 VSOMEIP_EXPORT uint16_t get_reliable_port(service_t _service, instance_t _instance) const; 80 VSOMEIP_EXPORT bool has_enabled_magic_cookies(std::string _address, uint16_t _port) const; 81 VSOMEIP_EXPORT uint16_t get_unreliable_port(service_t _service, 82 instance_t _instance) const; 83 84 VSOMEIP_EXPORT major_version_t get_major_version(service_t _service, 85 instance_t _instance) const; 86 VSOMEIP_EXPORT minor_version_t get_minor_version(service_t _service, 87 instance_t _instance) const; 88 VSOMEIP_EXPORT ttl_t get_ttl(service_t _service, 89 instance_t _instance) const; 90 91 VSOMEIP_EXPORT void get_configured_timing_requests( 92 service_t _service, std::string _ip_target, 93 std::uint16_t _port_target, method_t _method, 94 std::chrono::nanoseconds *_debounce_time, 95 std::chrono::nanoseconds *_max_retention_time) const; 96 VSOMEIP_EXPORT void get_configured_timing_responses( 97 service_t _service, std::string _ip_service, 98 std::uint16_t _port_service, method_t _method, 99 std::chrono::nanoseconds *_debounce_time, 100 std::chrono::nanoseconds *_max_retention_time) const; 101 102 VSOMEIP_EXPORT bool is_someip(service_t _service, instance_t _instance) const; 103 104 VSOMEIP_EXPORT bool get_client_port(service_t _service, instance_t _instance, 105 uint16_t _remote_port, bool _reliable, 106 std::map<bool, std::set<uint16_t> > &_used_client_ports, uint16_t &_client_port) const; 107 108 VSOMEIP_EXPORT const std::string & get_routing_host() const; 109 110 VSOMEIP_EXPORT client_t get_id(const std::string &_name) const; 111 VSOMEIP_EXPORT bool is_configured_client_id(client_t _id) const; 112 113 VSOMEIP_EXPORT std::size_t get_max_dispatchers(const std::string &_name) const; 114 VSOMEIP_EXPORT std::size_t get_max_dispatch_time(const std::string &_name) const; 115 VSOMEIP_EXPORT std::size_t get_io_thread_count(const std::string &_name) const; 116 VSOMEIP_EXPORT int get_io_thread_nice_level(const std::string &_name) const; 117 VSOMEIP_EXPORT std::size_t get_request_debouncing(const std::string &_name) const; 118 VSOMEIP_EXPORT bool has_session_handling(const std::string &_name) const; 119 120 VSOMEIP_EXPORT std::set<std::pair<service_t, instance_t> > get_remote_services() const; 121 122 VSOMEIP_EXPORT bool get_multicast(service_t _service, instance_t _instance, 123 eventgroup_t _eventgroup, std::string &_address, uint16_t &_port) const; 124 125 VSOMEIP_EXPORT uint8_t get_threshold(service_t _service, instance_t _instance, 126 eventgroup_t _eventgroup) const; 127 128 VSOMEIP_EXPORT std::uint32_t get_max_message_size_local() const; 129 VSOMEIP_EXPORT std::uint32_t get_max_message_size_reliable(const std::string& _address, 130 std::uint16_t _port) const; 131 VSOMEIP_EXPORT std::uint32_t get_max_message_size_unreliable() const; 132 VSOMEIP_EXPORT std::uint32_t get_buffer_shrink_threshold() const; 133 134 VSOMEIP_EXPORT bool supports_selective_broadcasts(boost::asio::ip::address _address) const; 135 136 VSOMEIP_EXPORT bool is_offered_remote(service_t _service, instance_t _instance) const; 137 138 VSOMEIP_EXPORT bool log_version() const; 139 VSOMEIP_EXPORT uint32_t get_log_version_interval() const; 140 141 VSOMEIP_EXPORT bool is_local_service(service_t _service, instance_t _instance) const; 142 143 VSOMEIP_EXPORT reliability_type_e get_event_reliability( 144 service_t _service, instance_t _instance, event_t _event) const; 145 146 VSOMEIP_EXPORT reliability_type_e get_service_reliability( 147 service_t _service, instance_t _instance) const; 148 149 // Service Discovery configuration 150 VSOMEIP_EXPORT bool is_sd_enabled() const; 151 152 VSOMEIP_EXPORT const std::string & get_sd_multicast() const; 153 VSOMEIP_EXPORT uint16_t get_sd_port() const; 154 VSOMEIP_EXPORT const std::string & get_sd_protocol() const; 155 156 VSOMEIP_EXPORT uint32_t get_sd_initial_delay_min() const; 157 VSOMEIP_EXPORT uint32_t get_sd_initial_delay_max() const; 158 VSOMEIP_EXPORT int32_t get_sd_repetitions_base_delay() const; 159 VSOMEIP_EXPORT uint8_t get_sd_repetitions_max() const; 160 VSOMEIP_EXPORT ttl_t get_sd_ttl() const; 161 VSOMEIP_EXPORT int32_t get_sd_cyclic_offer_delay() const; 162 VSOMEIP_EXPORT int32_t get_sd_request_response_delay() const; 163 VSOMEIP_EXPORT std::uint32_t get_sd_offer_debounce_time() const; 164 165 // Trace configuration 166 VSOMEIP_EXPORT std::shared_ptr<cfg::trace> get_trace() const; 167 168 VSOMEIP_EXPORT bool is_watchdog_enabled() const; 169 VSOMEIP_EXPORT uint32_t get_watchdog_timeout() const; 170 VSOMEIP_EXPORT uint32_t get_allowed_missing_pongs() const; 171 172 VSOMEIP_EXPORT std::uint32_t get_permissions_uds() const; 173 VSOMEIP_EXPORT std::uint32_t get_permissions_shm() const; 174 175 VSOMEIP_EXPORT bool check_routing_credentials(client_t _client, uint32_t _uid, uint32_t _gid) const; 176 177 VSOMEIP_EXPORT std::map<plugin_type_e, std::set<std::string>> get_plugins( 178 const std::string &_name) const; 179 // E2E 180 VSOMEIP_EXPORT std::map<e2exf::data_identifier_t, std::shared_ptr<cfg::e2e>> get_e2e_configuration() const; 181 VSOMEIP_EXPORT bool is_e2e_enabled() const; 182 183 VSOMEIP_EXPORT bool log_memory() const; 184 VSOMEIP_EXPORT uint32_t get_log_memory_interval() const; 185 186 VSOMEIP_EXPORT bool log_status() const; 187 VSOMEIP_EXPORT uint32_t get_log_status_interval() const; 188 189 VSOMEIP_EXPORT ttl_map_t get_ttl_factor_offers() const; 190 VSOMEIP_EXPORT ttl_map_t get_ttl_factor_subscribes() const; 191 192 VSOMEIP_EXPORT std::shared_ptr<debounce> get_debounce( 193 service_t _service, instance_t _instance, event_t _event) const; 194 195 VSOMEIP_EXPORT endpoint_queue_limit_t get_endpoint_queue_limit( 196 const std::string& _address, std::uint16_t _port) const; 197 VSOMEIP_EXPORT endpoint_queue_limit_t get_endpoint_queue_limit_local() const; 198 199 VSOMEIP_EXPORT std::uint32_t get_max_tcp_restart_aborts() const; 200 VSOMEIP_EXPORT std::uint32_t get_max_tcp_connect_time() const; 201 202 VSOMEIP_EXPORT bool is_protected_device( 203 const boost::asio::ip::address& _address) const; 204 VSOMEIP_EXPORT bool is_protected_port( 205 const boost::asio::ip::address& _address, 206 std::uint16_t _port, bool _reliable) const; 207 VSOMEIP_EXPORT bool is_secure_port( 208 const boost::asio::ip::address& _address, 209 std::uint16_t _port, bool _reliable) const; 210 211 VSOMEIP_EXPORT void set_sd_acceptance_rule( 212 const boost::asio::ip::address& _address, 213 port_range_t _port_range, port_type_e _type, 214 const std::string& _path, bool _reliable, bool _enable, bool _default); 215 VSOMEIP_EXPORT void set_sd_acceptance_rules( 216 const sd_acceptance_rules_t& _rules, bool _enable); 217 VSOMEIP_EXPORT sd_acceptance_rules_t get_sd_acceptance_rules(); 218 VSOMEIP_EXPORT void set_sd_acceptance_rules_active( 219 const boost::asio::ip::address& _address, bool _enable); 220 221 VSOMEIP_EXPORT bool is_secure_service(service_t _service, instance_t _instance) const; 222 223 VSOMEIP_EXPORT int get_udp_receive_buffer_size() const; 224 225 VSOMEIP_EXPORT bool has_overlay(const std::string &_name) const; 226 VSOMEIP_EXPORT void load_overlay(const std::string &_name); 227 228 VSOMEIP_EXPORT bool tp_segment_messages_client_to_service( 229 service_t _service, std::string _ip_target, 230 std::uint16_t _port_target, method_t _method) const; 231 VSOMEIP_EXPORT bool tp_segment_messages_service_to_client( 232 service_t _service, std::string _ip_service, 233 std::uint16_t _port_service, method_t _method) const; 234 235 VSOMEIP_EXPORT std::uint32_t get_shutdown_timeout() const; 236 237 VSOMEIP_EXPORT bool log_statistics() const; 238 VSOMEIP_EXPORT uint32_t get_statistics_interval() const; 239 VSOMEIP_EXPORT uint32_t get_statistics_min_freq() const; 240 VSOMEIP_EXPORT uint32_t get_statistics_max_messages() const; 241 242 VSOMEIP_EXPORT uint8_t get_max_remote_subscribers() const; 243 244 VSOMEIP_EXPORT partition_id_t get_partition_id( 245 service_t _service, instance_t _instance) const; 246 247 private: 248 void read_data(const std::set<std::string> &_input, 249 std::vector<configuration_element> &_elements, 250 std::set<std::string> &_failed, 251 bool _mandatory_only); 252 253 bool load_data(const std::vector<configuration_element> &_elements, 254 bool _load_mandatory, bool _load_optional); 255 256 bool load_logging(const configuration_element &_element, 257 std::set<std::string> &_warnings); 258 bool load_routing(const configuration_element &_element); 259 bool load_routing_credentials(const configuration_element &_element); 260 261 bool load_applications(const configuration_element &_element); 262 void load_application_data(const boost::property_tree::ptree &_tree, 263 const std::string &_file_name); 264 265 std::map<plugin_type_e, std::set<std::string>> load_plugins( 266 const boost::property_tree::ptree &_tree, 267 const std::string& _application_name); 268 269 struct plugin_config_data_t { 270 std::string name_; 271 std::string type_; 272 }; 273 274 void add_plugin(std::map<plugin_type_e, std::set<std::string>> &_plugins, 275 const plugin_config_data_t &_plugin_data, 276 const std::string& _application_name); 277 278 void load_tracing(const configuration_element &_element); 279 void load_trace_channels(const boost::property_tree::ptree &_tree); 280 void load_trace_channel(const boost::property_tree::ptree &_tree); 281 void load_trace_filters(const boost::property_tree::ptree &_tree); 282 void load_trace_filter(const boost::property_tree::ptree &_tree); 283 void load_trace_filter_expressions( 284 const boost::property_tree::ptree &_tree, 285 std::string &_criteria, 286 std::shared_ptr<trace_filter> &_filter); 287 void load_trace_filter_match( 288 const boost::property_tree::ptree &_data, 289 std::tuple<service_t, instance_t, method_t> &_match); 290 291 void load_network(const configuration_element &_element); 292 void load_device(const configuration_element &_element); 293 294 void load_unicast_address(const configuration_element &_element); 295 void load_netmask(const configuration_element &_element); 296 void load_diagnosis_address(const configuration_element &_element); 297 void load_shutdown_timeout(const configuration_element &_element); 298 299 void load_service_discovery(const configuration_element &_element); 300 void load_delays(const boost::property_tree::ptree &_tree); 301 302 void load_npdu_default_timings(const configuration_element &_element); 303 void load_services(const configuration_element &_element); 304 void load_servicegroup(const boost::property_tree::ptree &_tree); 305 void load_service(const boost::property_tree::ptree &_tree, 306 const std::string &_unicast_address); 307 void load_event(std::shared_ptr<service> &_service, 308 const boost::property_tree::ptree &_tree); 309 void load_eventgroup(std::shared_ptr<service> &_service, 310 const boost::property_tree::ptree &_tree); 311 312 void load_internal_services(const configuration_element &_element); 313 314 void load_clients(const configuration_element &_element); 315 void load_client(const boost::property_tree::ptree &_tree); 316 317 std::set<uint16_t> load_client_ports(const boost::property_tree::ptree &_tree); 318 std::pair<uint16_t, uint16_t> load_client_port_range(const boost::property_tree::ptree &_tree); 319 320 void load_watchdog(const configuration_element &_element); 321 322 void load_payload_sizes(const configuration_element &_element); 323 void load_permissions(const configuration_element &_element); 324 325 void load_security(const configuration_element &_element); 326 327 void load_selective_broadcasts_support(const configuration_element &_element); 328 329 void load_debounce(const configuration_element &_element); 330 void load_service_debounce(const boost::property_tree::ptree &_tree); 331 void load_events_debounce(const boost::property_tree::ptree &_tree, 332 std::map<event_t, std::shared_ptr<debounce>> &_debounces); 333 void load_event_debounce(const boost::property_tree::ptree &_tree, 334 std::map<event_t, std::shared_ptr<debounce>> &_debounces); 335 void load_event_debounce_ignore(const boost::property_tree::ptree &_tree, 336 std::map<std::size_t, byte_t> &_ignore); 337 void load_acceptances(const configuration_element &_element); 338 void load_acceptance_data(const boost::property_tree::ptree &_tree); 339 void load_udp_receive_buffer_size(const configuration_element &_element); 340 bool load_npdu_debounce_times_configuration( 341 const std::shared_ptr<service>& _service, 342 const boost::property_tree::ptree &_tree); 343 bool load_npdu_debounce_times_for_service( 344 const std::shared_ptr<service>& _service, bool _is_request, 345 const boost::property_tree::ptree &_tree); 346 void load_someip_tp(const std::shared_ptr<service>& _service, 347 const boost::property_tree::ptree &_tree); 348 void load_someip_tp_for_service( 349 const std::shared_ptr<service>& _service, 350 const boost::property_tree::ptree &_tree, bool _is_request); 351 352 servicegroup *find_servicegroup(const std::string &_name) const; 353 std::shared_ptr<client> find_client(service_t _service, 354 instance_t _instance) const; 355 std::shared_ptr<service> find_service(service_t _service, instance_t _instance) const; 356 std::shared_ptr<service> find_service_unlocked(service_t _service, instance_t _instance) const; 357 service * find_service_by_ip_port(service_t _service, const std::string& _ip, 358 std::uint16_t _port) const; 359 std::shared_ptr<eventgroup> find_eventgroup(service_t _service, 360 instance_t _instance, eventgroup_t _eventgroup) const; 361 bool find_port(uint16_t &_port, uint16_t _remote, bool _reliable, 362 std::map<bool, std::set<uint16_t> > &_used_client_ports) const; 363 bool find_specific_port(uint16_t &_port, service_t _service, 364 instance_t _instance, bool _reliable, 365 std::map<bool, std::set<uint16_t> > &_used_client_ports) const; 366 367 void set_magic_cookies_unicast_address(); 368 369 bool is_mandatory(const std::string &_name) const; 370 bool is_remote(const std::shared_ptr<service>& _service) const; 371 bool is_internal_service(service_t _service, instance_t _instance) const; 372 bool is_in_port_range(uint16_t _port, std::pair<uint16_t, uint16_t> _port_range) const; 373 374 void set_mandatory(const std::string &_input); 375 void trim(std::string &_s); 376 377 void load_e2e(const configuration_element &_element); 378 void load_e2e_protected(const boost::property_tree::ptree &_tree); 379 380 void load_ttl_factors(const boost::property_tree::ptree &_tree, 381 ttl_map_t* _target); 382 383 void load_endpoint_queue_sizes(const configuration_element &_element); 384 385 void load_tcp_restart_settings(const configuration_element &_element); 386 387 void load_secure_services(const configuration_element &_element); 388 void load_secure_service(const boost::property_tree::ptree &_tree); 389 390 void load_partitions(const configuration_element &_element); 391 void load_partition(const boost::property_tree::ptree &_tree); 392 393 private: 394 std::mutex mutex_; 395 396 const std::string default_unicast_; 397 bool is_loaded_; 398 bool is_logging_loaded_; 399 bool is_overlay_; 400 401 std::set<std::string> mandatory_; 402 403 protected: 404 // Configuration data 405 boost::asio::ip::address unicast_; 406 boost::asio::ip::address netmask_; 407 std::string device_; 408 diagnosis_t diagnosis_; 409 diagnosis_t diagnosis_mask_; 410 411 bool has_console_log_; 412 bool has_file_log_; 413 bool has_dlt_log_; 414 std::string logfile_; 415 vsomeip_v3::logger::level_e loglevel_; 416 417 std::map<std::string, 418 std::tuple< 419 client_t, 420 std::size_t, // max dispatchers 421 std::size_t, // max dispatch time 422 std::size_t, // thread count 423 std::size_t, // request debouncing 424 std::map< 425 plugin_type_e, 426 std::set<std::string> 427 >, // plugins 428 int, // nice level 429 std::string // overlay 430 #ifdef VSOMEIP_HAS_SESSION_HANDLING_CONFIG 431 , bool // has session handling? 432 #endif // VSOMEIP_HAS_SESSION_HANDLING_CONFIG 433 > 434 > applications_; 435 std::set<client_t> client_identifiers_; 436 437 mutable std::mutex services_mutex_; 438 std::map<service_t, 439 std::map<instance_t, 440 std::shared_ptr<service> > > services_; 441 442 std::map<std::string, // IP 443 std::map<std::uint16_t, // port 444 std::map<service_t, 445 std::shared_ptr<service>>>> services_by_ip_port_; 446 447 std::list< std::shared_ptr<client> > clients_; 448 449 std::string routing_host_; 450 451 bool is_sd_enabled_; 452 std::string sd_protocol_; 453 std::string sd_multicast_; 454 uint16_t sd_port_; 455 456 uint32_t sd_initial_delay_min_; 457 uint32_t sd_initial_delay_max_; 458 int32_t sd_repetitions_base_delay_; 459 uint8_t sd_repetitions_max_; 460 ttl_t sd_ttl_; 461 int32_t sd_cyclic_offer_delay_; 462 int32_t sd_request_response_delay_; 463 std::uint32_t sd_offer_debounce_time_; 464 465 std::map<std::string, std::set<uint16_t> > magic_cookies_; 466 467 std::map<std::string, std::map<std::uint16_t, std::uint32_t>> message_sizes_; 468 std::uint32_t max_configured_message_size_; 469 std::uint32_t max_local_message_size_; 470 std::uint32_t max_reliable_message_size_; 471 std::uint32_t max_unreliable_message_size_; 472 std::uint32_t buffer_shrink_threshold_; 473 474 std::shared_ptr<trace> trace_; 475 476 std::unordered_set<std::string> supported_selective_addresses; 477 478 std::shared_ptr<watchdog> watchdog_; 479 480 std::vector<service_instance_range> internal_service_ranges_; 481 482 bool log_version_; 483 uint32_t log_version_interval_; 484 485 enum element_type_e { 486 ET_NETWORK, 487 ET_UNICAST, 488 ET_DEVICE, 489 ET_DIAGNOSIS, 490 ET_DIAGNOSIS_MASK, 491 ET_LOGGING_CONSOLE, 492 ET_LOGGING_FILE, 493 ET_LOGGING_DLT, 494 ET_LOGGING_LEVEL, 495 ET_ROUTING, 496 ET_SERVICE_DISCOVERY_ENABLE, 497 ET_SERVICE_DISCOVERY_PROTOCOL, 498 ET_SERVICE_DISCOVERY_MULTICAST, 499 ET_SERVICE_DISCOVERY_PORT, 500 ET_SERVICE_DISCOVERY_INITIAL_DELAY_MIN, 501 ET_SERVICE_DISCOVERY_INITIAL_DELAY_MAX, 502 ET_SERVICE_DISCOVERY_REPETITION_BASE_DELAY, 503 ET_SERVICE_DISCOVERY_REPETITION_MAX, 504 ET_SERVICE_DISCOVERY_TTL, 505 ET_SERVICE_DISCOVERY_CYCLIC_OFFER_DELAY, 506 ET_SERVICE_DISCOVERY_REQUEST_RESPONSE_DELAY, 507 ET_WATCHDOG_ENABLE, 508 ET_WATCHDOG_TIMEOUT, 509 ET_WATCHDOG_ALLOWED_MISSING_PONGS, 510 ET_TRACING_ENABLE, 511 ET_TRACING_SD_ENABLE, 512 ET_SERVICE_DISCOVERY_OFFER_DEBOUNCE_TIME, 513 ET_SERVICE_DISCOVERY_TTL_FACTOR_OFFERS, 514 ET_SERVICE_DISCOVERY_TTL_FACTOR_SUBSCRIPTIONS, 515 ET_ENDPOINT_QUEUE_LIMITS, 516 ET_ENDPOINT_QUEUE_LIMIT_EXTERNAL, 517 ET_ENDPOINT_QUEUE_LIMIT_LOCAL, 518 ET_TCP_RESTART_ABORTS_MAX, 519 ET_TCP_CONNECT_TIME_MAX, 520 ET_SD_ACCEPTANCE_REQUIRED, 521 ET_NETMASK, 522 ET_UDP_RECEIVE_BUFFER_SIZE, 523 ET_NPDU_DEFAULT_TIMINGS, 524 ET_PLUGIN_NAME, 525 ET_PLUGIN_TYPE, 526 ET_ROUTING_CREDENTIALS, 527 ET_SHUTDOWN_TIMEOUT, 528 ET_MAX_REMOTE_SUBSCRIBERS, 529 ET_PARTITIONS, 530 ET_MAX = 44 531 }; 532 533 bool is_configured_[ET_MAX]; 534 std::uint32_t permissions_shm_; 535 std::uint32_t permissions_uds_; 536 537 std::string network_; 538 std::string configuration_path_; 539 540 bool e2e_enabled_; 541 std::map<e2exf::data_identifier_t, std::shared_ptr<cfg::e2e>> e2e_configuration_; 542 543 bool log_memory_; 544 uint32_t log_memory_interval_; 545 546 bool log_status_; 547 uint32_t log_status_interval_; 548 549 ttl_map_t ttl_factors_offers_; 550 ttl_map_t ttl_factors_subscriptions_; 551 552 std::map<service_t, std::map<instance_t, std::map<event_t, std::shared_ptr<debounce>>>> debounces_; 553 554 std::map<std::string, std::map<std::uint16_t, endpoint_queue_limit_t>> endpoint_queue_limits_; 555 endpoint_queue_limit_t endpoint_queue_limit_external_; 556 endpoint_queue_limit_t endpoint_queue_limit_local_; 557 558 uint32_t tcp_restart_aborts_max_; 559 uint32_t tcp_connect_time_max_; 560 561 mutable std::mutex sd_acceptance_required_ips_mutex_; 562 sd_acceptance_rules_t sd_acceptance_rules_; 563 std::set<boost::asio::ip::address> sd_acceptance_rules_active_; 564 565 bool has_issued_methods_warning_; 566 bool has_issued_clients_warning_; 567 568 int udp_receive_buffer_size_; 569 570 std::chrono::nanoseconds npdu_default_debounce_requ_; 571 std::chrono::nanoseconds npdu_default_debounce_resp_; 572 std::chrono::nanoseconds npdu_default_max_retention_requ_; 573 std::chrono::nanoseconds npdu_default_max_retention_resp_; 574 575 std::uint32_t shutdown_timeout_; 576 577 mutable std::mutex secure_services_mutex_; 578 std::map<service_t, std::set<instance_t> > secure_services_; 579 580 bool log_statistics_; 581 uint32_t statistics_interval_; 582 uint32_t statistics_min_freq_; 583 uint32_t statistics_max_messages_; 584 uint8_t max_remote_subscribers_; 585 586 mutable std::mutex partitions_mutex_; 587 std::map<service_t, 588 std::map<instance_t, 589 partition_id_t 590 > 591 > partitions_; 592 }; 593 594 } // namespace cfg 595 } // namespace vsomeip_v3 596 597 #endif // VSOMEIP_V3_CFG_CONFIGURATION_IMPL_HPP 598