MCPcopy Create free account
hub / github.com/SNAS/openbmp / Config

Method Config

Server/src/Config.cpp:29–77  ·  view source on GitHub ↗

/ * Constructor for class ***********************************************************************/

Source from the content-addressed store, hash-verified

27 * Constructor for class
28 ***********************************************************************/
29Config::Config() {
30
31 // Initialize the defaults
32 bmp_port = 5000;
33 debug_general = false;
34 debug_bgp = false;
35 debug_bmp = false;
36 debug_msgbus = false;
37 bmp_buffer_size = 15 * 1024 * 1024; // 15MB
38 svr_ipv6 = false;
39 svr_ipv4 = true;
40 bind_ipv4 = "";
41 bind_ipv6 = "";
42 heartbeat_interval = 60 * 5; // Default is 5 minutes
43 kafka_brokers = "localhost:9092";
44 tx_max_bytes = 1000000;
45 rx_max_bytes = 100000000;
46 session_timeout = 30000; // Default is 30 seconds
47 socket_timeout = 60000; // Default is 60 seconds
48 q_buf_max_msgs = 100000;
49 q_buf_max_kbytes = 1048576;
50 q_buf_max_ms = 1000; // Default is 1 sec
51 msg_send_max_retry = 2;
52 retry_backoff_ms = 100;
53 compression = "snappy";
54 max_concurrent_routers = 2;
55 initial_router_time = 60;
56 calculate_baseline = true;
57 pat_enabled = false;
58 bzero(admin_id, sizeof(admin_id));
59
60 /*
61 * Initialized the kafka topic names
62 * The keys match the configuration node/vars. Topic name nodes will be ignored if
63 * not initialized here.
64 */
65 topic_names_map[MSGBUS_TOPIC_VAR_COLLECTOR] = MSGBUS_TOPIC_COLLECTOR;
66 topic_names_map[MSGBUS_TOPIC_VAR_ROUTER] = MSGBUS_TOPIC_ROUTER;
67 topic_names_map[MSGBUS_TOPIC_VAR_PEER] = MSGBUS_TOPIC_PEER;
68 topic_names_map[MSGBUS_TOPIC_VAR_BMP_STAT] = MSGBUS_TOPIC_BMP_STAT;
69 topic_names_map[MSGBUS_TOPIC_VAR_BMP_RAW] = MSGBUS_TOPIC_BMP_RAW;
70 topic_names_map[MSGBUS_TOPIC_VAR_BASE_ATTRIBUTE] = MSGBUS_TOPIC_BASE_ATTRIBUTE;
71 topic_names_map[MSGBUS_TOPIC_VAR_UNICAST_PREFIX] = MSGBUS_TOPIC_UNICAST_PREFIX;
72 topic_names_map[MSGBUS_TOPIC_VAR_LS_NODE] = MSGBUS_TOPIC_LS_NODE;
73 topic_names_map[MSGBUS_TOPIC_VAR_LS_LINK] = MSGBUS_TOPIC_LS_LINK;
74 topic_names_map[MSGBUS_TOPIC_VAR_LS_PREFIX] = MSGBUS_TOPIC_LS_PREFIX;
75 topic_names_map[MSGBUS_TOPIC_VAR_L3VPN] = MSGBUS_TOPIC_L3VPN;
76 topic_names_map[MSGBUS_TOPIC_VAR_EVPN] = MSGBUS_TOPIC_EVPN;
77}
78
79/*********************************************************************//**
80 * Load configuration from file in YAML format

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected