1 /*
2     pmacct (Promiscuous mode IP Accounting package)
3     pmacct is Copyright (C) 2003-2020 by Paolo Lucente
4 */
5 
6 /*
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11 
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16 
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 */
21 #ifndef CFG_H
22 #define CFG_H
23 
24 #include "cfg_handlers.h"
25 #include "bgp/bgp_prefix.h"
26 
27 /* defines */
28 #define CFG_LINE_LEN(x) (SRVBUFLEN-strlen(x))
29 #define MAX_CUSTOM_PRIMITIVES		64
30 #define MAX_CUSTOM_PRIMITIVE_NAMELEN	64
31 #define MAX_CUSTOM_PRIMITIVE_PD_PTRS	8
32 
33 /* structures */
34 struct _dictionary_line {
35   char key[SRVBUFLEN];
36   int (*func)(char *, char *, char *);
37 };
38 
39 struct packet_data_ptr {
40   s_uint8_t ptr_idx;
41   u_int16_t off;
42   s_uint16_t proto;
43 };
44 
45 struct custom_primitive_entry {
46   /* compiled from map */
47   char name[MAX_CUSTOM_PRIMITIVE_NAMELEN];
48   struct packet_data_ptr pd_ptr[MAX_CUSTOM_PRIMITIVE_PD_PTRS];
49   u_int32_t pen;
50   u_int16_t field_type;
51   u_int16_t len;
52   u_int16_t alloc_len;
53   u_int8_t semantics;
54   u_int8_t repeat_id;
55 
56   /* generated internally */
57   pm_cfgreg_t type;
58 };
59 
60 struct custom_primitives {
61   struct custom_primitive_entry primitive[MAX_CUSTOM_PRIMITIVES];
62   int num;
63 };
64 
65 struct custom_primitive_ptrs {
66   char *name;
67   u_int16_t off;
68   struct custom_primitive_entry *ptr;
69 };
70 
71 struct custom_primitives_ptrs {
72   struct custom_primitive_ptrs primitive[MAX_CUSTOM_PRIMITIVES];
73   int num;
74   int len;
75 };
76 
77 struct configuration {
78   pm_cfgreg_t what_to_count;	/* first registry */
79   pm_cfgreg_t what_to_count_2;	/* second registry */
80   pm_cfgreg_t nfprobe_what_to_count;
81   pm_cfgreg_t nfprobe_what_to_count_2;
82   char *aggregate_primitives;
83   struct custom_primitives_ptrs cpptrs;
84   char *name;
85   char *type;
86   int type_id;
87   int is_forked;
88   int pmacctd_nonroot;
89   char *proc_name;
90   int proc_priority;
91   char *cluster_name;
92   int cluster_id;
93   char *redis_host;
94   int redis_db;
95   int sock;
96   int bgp_sock;
97   int acct_type;
98   int data_type;
99   int pipe_homegrown;
100   u_int64_t pipe_size;
101   u_int64_t buffer_size;
102   int buffer_immediate;
103   int pipe_zmq;
104   int pipe_zmq_retry;
105   int pipe_zmq_profile;
106   int pipe_zmq_hwm;
107   int plugin_exit_any;
108   int files_umask;
109   int files_uid;
110   int files_gid;
111   int handle_fragments;
112   int handle_flows;
113   int frag_bufsz;
114   int flow_bufsz;
115   int flow_hashsz;
116   int conntrack_bufsz;
117   int flow_lifetime;
118   int flow_tcp_lifetime;
119   int num_protos;
120   int num_hosts;
121   char *imt_plugin_path;
122   char *imt_plugin_passwd;
123   char *sql_db;
124   char *sql_table;
125   char *sql_table_schema;
126   int sql_table_version;
127   char *sql_table_type;
128   char *sql_user;
129   char *sql_passwd;
130   char *sql_conn_ca_file;
131   char *sql_host;
132   int sql_port;
133   char *sql_data;
134   char *sql_backup_host;
135   int sql_optimize_clauses;
136   int sql_refresh_time;
137   int sql_history;
138   int sql_history_offset;
139   int sql_history_howmany; /* internal */
140   int sql_startup_delay;
141   int sql_cache_entries;
142   int sql_dont_try_update;
143   char *sql_history_roundoff;
144   int sql_trigger_time;
145   int sql_trigger_time_howmany; /* internal */
146   char *sql_trigger_exec;
147   int sql_max_queries;
148   char *sql_preprocess;
149   int sql_preprocess_type;
150   int sql_multi_values;
151   char *sql_locking_style;
152   int sql_use_copy;
153   char *sql_delimiter;
154   int timestamps_rfc3339;
155   int timestamps_utc;
156   int timestamps_secs;
157   int timestamps_since_epoch;
158   int mongo_insert_batch;
159   int message_broker_output;
160   int avro_buffer_size;
161   char *avro_schema_file;
162   char *amqp_exchange_type;
163   int amqp_persistent_msg;
164   u_int32_t amqp_frame_max;
165   u_int32_t amqp_heartbeat_interval;
166   char *amqp_vhost;
167   int amqp_routing_key_rr;
168   char *amqp_avro_schema_routing_key;
169   int amqp_avro_schema_refresh_time;
170   int kafka_broker_port;
171   int kafka_partition;
172   int kafka_partition_dynamic;
173   char *kafka_partition_key;
174   int kafka_partition_keylen;
175   char *kafka_avro_schema_topic;
176   int kafka_avro_schema_refresh_time;
177   char *kafka_avro_schema_registry;
178   char *kafka_config_file;
179   int print_cache_entries;
180   int print_markers;
181   int print_output;
182   int print_output_file_append;
183   int print_write_empty_file;
184   char *print_output_lock_file;
185   char *print_output_separator;
186   char *print_output_file;
187   char *print_output_custom_lib;
188   char *print_output_custom_cfg_file;
189   char *print_latest_file;
190   int nfacctd_port;
191   char *nfacctd_ip;
192   char *nfacctd_kafka_broker_host;
193   int nfacctd_kafka_broker_port;
194   char *nfacctd_kafka_topic;
195   char *nfacctd_kafka_config_file;
196   char *nfacctd_zmq_address;
197   char *nfacctd_allow_file;
198   int nfacctd_time;
199   int nfacctd_time_new;
200   int nfacctd_pro_rating;
201   char *nfacctd_templates_file;
202   char *nfacctd_templates_receiver;
203   int nfacctd_templates_port;
204   int nfacctd_templates_sock;
205   int nfacctd_account_options;
206   int nfacctd_stitching;
207   u_int32_t nfacctd_as;
208   u_int32_t nfacctd_net;
209   int nfacctd_pipe_size;
210   int sfacctd_renormalize;
211   int sfacctd_counter_output;
212   char *sfacctd_counter_file;
213   int sfacctd_counter_max_nodes;
214   char *sfacctd_counter_amqp_host;
215   char *sfacctd_counter_amqp_vhost;
216   char *sfacctd_counter_amqp_user;
217   char *sfacctd_counter_amqp_passwd;
218   char *sfacctd_counter_amqp_exchange;
219   char *sfacctd_counter_amqp_exchange_type;
220   char *sfacctd_counter_amqp_routing_key;
221   int sfacctd_counter_amqp_persistent_msg;
222   u_int32_t sfacctd_counter_amqp_frame_max;
223   u_int32_t sfacctd_counter_amqp_heartbeat_interval;
224   int sfacctd_counter_amqp_retry;
225   char *sfacctd_counter_kafka_broker_host;
226   char *sfacctd_counter_kafka_topic;
227   int sfacctd_counter_kafka_partition;
228   char *sfacctd_counter_kafka_partition_key;
229   int sfacctd_counter_kafka_partition_keylen;
230   int sfacctd_counter_kafka_broker_port;
231   int sfacctd_counter_kafka_retry;
232   char *sfacctd_counter_kafka_config_file;
233   int nfacctd_disable_checks;
234   int nfacctd_disable_opt_scope_check;
235   int telemetry_daemon;
236   int telemetry_sock;
237   int telemetry_port_tcp;
238   int telemetry_port_udp;
239   char *telemetry_ip;
240   char *telemetry_zmq_address;
241   char *telemetry_kafka_broker_host;
242   int telemetry_kafka_broker_port;
243   char *telemetry_kafka_topic;
244   char *telemetry_kafka_config_file;
245   char *telemetry_decoder;
246   int telemetry_decoder_id;
247   int telemetry_max_peers;
248   int telemetry_peer_timeout;
249   char *telemetry_allow_file;
250   int telemetry_pipe_size;
251   int telemetry_ipprec;
252   char *telemetry_msglog_file;
253   int telemetry_msglog_output;
254   char *telemetry_msglog_amqp_host;
255   char *telemetry_msglog_amqp_vhost;
256   char *telemetry_msglog_amqp_user;
257   char *telemetry_msglog_amqp_passwd;
258   char *telemetry_msglog_amqp_exchange;
259   char *telemetry_msglog_amqp_exchange_type;
260   char *telemetry_msglog_amqp_routing_key;
261   int telemetry_msglog_amqp_routing_key_rr;
262   int telemetry_msglog_amqp_persistent_msg;
263   u_int32_t telemetry_msglog_amqp_frame_max;
264   u_int32_t telemetry_msglog_amqp_heartbeat_interval;
265   int telemetry_msglog_amqp_retry;
266   char *telemetry_dump_file;
267   char *telemetry_dump_latest_file;
268   int telemetry_dump_output;
269   int telemetry_dump_refresh_time;
270   char *telemetry_dump_amqp_host;
271   char *telemetry_dump_amqp_vhost;
272   char *telemetry_dump_amqp_user;
273   char *telemetry_dump_amqp_passwd;
274   char *telemetry_dump_amqp_exchange;
275   char *telemetry_dump_amqp_exchange_type;
276   char *telemetry_dump_amqp_routing_key;
277   int telemetry_dump_amqp_routing_key_rr;
278   int telemetry_dump_amqp_persistent_msg;
279   u_int32_t telemetry_dump_amqp_frame_max;
280   u_int32_t telemetry_dump_amqp_heartbeat_interval;
281   char *telemetry_msglog_kafka_broker_host;
282   int telemetry_msglog_kafka_broker_port;
283   char *telemetry_msglog_kafka_topic;
284   int telemetry_msglog_kafka_topic_rr;
285   int telemetry_msglog_kafka_partition;
286   char *telemetry_msglog_kafka_partition_key;
287   int telemetry_msglog_kafka_partition_keylen;
288   int telemetry_msglog_kafka_retry;
289   char *telemetry_msglog_kafka_config_file;
290   char *telemetry_dump_kafka_broker_host;
291   int telemetry_dump_kafka_broker_port;
292   char *telemetry_dump_kafka_topic;
293   int telemetry_dump_kafka_topic_rr;
294   int telemetry_dump_kafka_partition;
295   char *telemetry_dump_kafka_partition_key;
296   int telemetry_dump_kafka_partition_keylen;
297   char *telemetry_dump_kafka_config_file;
298   int bgp_daemon;
299   int bgp_daemon_msglog_output;
300   char *bgp_daemon_msglog_file;
301   char *bgp_daemon_msglog_avro_schema_file;
302   char *bgp_daemon_msglog_amqp_host;
303   char *bgp_daemon_msglog_amqp_vhost;
304   char *bgp_daemon_msglog_amqp_user;
305   char *bgp_daemon_msglog_amqp_passwd;
306   char *bgp_daemon_msglog_amqp_exchange;
307   char *bgp_daemon_msglog_amqp_exchange_type;
308   char *bgp_daemon_msglog_amqp_routing_key;
309   int bgp_daemon_msglog_amqp_routing_key_rr;
310   int bgp_daemon_msglog_amqp_persistent_msg;
311   u_int32_t bgp_daemon_msglog_amqp_frame_max;
312   u_int32_t bgp_daemon_msglog_amqp_heartbeat_interval;
313   int bgp_daemon_msglog_amqp_retry;
314   char *bgp_daemon_msglog_kafka_broker_host;
315   char *bgp_daemon_msglog_kafka_topic;
316   int bgp_daemon_msglog_kafka_topic_rr;
317   int bgp_daemon_msglog_kafka_partition;
318   char *bgp_daemon_msglog_kafka_partition_key;
319   int bgp_daemon_msglog_kafka_partition_keylen;
320   int bgp_daemon_msglog_kafka_broker_port;
321   int bgp_daemon_msglog_kafka_retry;
322   char *bgp_daemon_msglog_kafka_config_file;
323   char *bgp_daemon_msglog_kafka_avro_schema_registry;
324   char *bgp_daemon_id;
325   char *bgp_daemon_ip;
326   as_t bgp_daemon_as;
327   int bgp_daemon_port;
328   int bgp_daemon_pipe_size;
329   int bgp_daemon_ipprec;
330   char *bgp_daemon_allow_file;
331   int bgp_daemon_max_peers;
332   int bgp_daemon_aspath_radius;
333   char *bgp_daemon_stdcomm_pattern;
334   char *bgp_daemon_extcomm_pattern;
335   char *bgp_daemon_lrgcomm_pattern;
336   char *bgp_daemon_stdcomm_pattern_to_asn;
337   char *bgp_daemon_lrgcomm_pattern_to_asn;
338   char *bgp_blackhole_stdcomm_list;
339   int bgp_daemon_peer_as_src_type;
340   int bgp_daemon_src_std_comm_type;
341   int bgp_daemon_src_ext_comm_type;
342   int bgp_daemon_src_lrg_comm_type;
343   int bgp_daemon_src_as_path_type;
344   int bgp_daemon_src_local_pref_type;
345   int bgp_daemon_src_med_type;
346   int bgp_daemon_src_roa_type;
347   int bgp_daemon_peer_as_skip_subas;
348   int bgp_daemon_batch;
349   int bgp_daemon_batch_interval;
350   char *bgp_daemon_peer_as_src_map;
351   char *bgp_daemon_src_local_pref_map;
352   char *bgp_daemon_src_med_map;
353   char *bgp_daemon_to_xflow_agent_map;
354   char *nfacctd_flow_to_rd_map;
355   int bgp_daemon_follow_default;
356   struct prefix bgp_daemon_follow_nexthop[FOLLOW_BGP_NH_ENTRIES];
357   int bgp_daemon_follow_nexthop_external;
358   char *bgp_daemon_neighbors_file;
359   char *bgp_daemon_md5_file;
360   int bgp_table_peer_buckets;
361   int bgp_table_per_peer_buckets;
362   int bgp_table_attr_hash_buckets;
363   int bgp_table_per_peer_hash;
364   int bgp_table_dump_output;
365   char *bgp_table_dump_file;
366   char *bgp_table_dump_latest_file;
367   char *bgp_table_dump_avro_schema_file;
368   int bgp_table_dump_refresh_time;
369   char *bgp_table_dump_amqp_host;
370   char *bgp_table_dump_amqp_vhost;
371   char *bgp_table_dump_amqp_user;
372   char *bgp_table_dump_amqp_passwd;
373   char *bgp_table_dump_amqp_exchange;
374   char *bgp_table_dump_amqp_exchange_type;
375   char *bgp_table_dump_amqp_routing_key;
376   int bgp_table_dump_amqp_routing_key_rr;
377   int bgp_table_dump_amqp_persistent_msg;
378   u_int32_t bgp_table_dump_amqp_frame_max;
379   u_int32_t bgp_table_dump_amqp_heartbeat_interval;
380   char *bgp_table_dump_kafka_broker_host;
381   char *bgp_table_dump_kafka_topic;
382   int bgp_table_dump_kafka_topic_rr;
383   int bgp_table_dump_kafka_partition;
384   char *bgp_table_dump_kafka_partition_key;
385   int bgp_table_dump_kafka_partition_keylen;
386   int bgp_table_dump_kafka_broker_port;
387   char *bgp_table_dump_kafka_config_file;
388   char *bgp_table_dump_kafka_avro_schema_registry;
389   int bgp_lg;
390   char *bgp_lg_ip;
391   int bgp_lg_port;
392   int bgp_lg_threads;
393   char *bgp_lg_user;
394   char *bgp_lg_passwd;
395   char *bgp_xconnect_map;
396   int bgp_disable_router_id_check;
397   int bmp_sock;
398   int bmp_daemon;
399   char *bmp_daemon_ip;
400   int bmp_daemon_port;
401   int bmp_daemon_pipe_size;
402   int bmp_daemon_max_peers;
403   char *bmp_daemon_allow_file;
404   int bmp_daemon_ipprec;
405   int bmp_daemon_batch;
406   int bmp_daemon_batch_interval;
407   int bmp_daemon_msglog_output;
408   char *bmp_daemon_msglog_file;
409   char *bmp_daemon_msglog_avro_schema_file;
410   char *bmp_daemon_msglog_amqp_host;
411   char *bmp_daemon_msglog_amqp_vhost;
412   char *bmp_daemon_msglog_amqp_user;
413   char *bmp_daemon_msglog_amqp_passwd;
414   char *bmp_daemon_msglog_amqp_exchange;
415   char *bmp_daemon_msglog_amqp_exchange_type;
416   char *bmp_daemon_msglog_amqp_routing_key;
417   int bmp_daemon_msglog_amqp_routing_key_rr;
418   int bmp_daemon_msglog_amqp_persistent_msg;
419   u_int32_t bmp_daemon_msglog_amqp_frame_max;
420   u_int32_t bmp_daemon_msglog_amqp_heartbeat_interval;
421   int bmp_daemon_msglog_amqp_retry;
422   char *bmp_daemon_msglog_kafka_broker_host;
423   char *bmp_daemon_msglog_kafka_topic;
424   int bmp_daemon_msglog_kafka_topic_rr;
425   int bmp_daemon_msglog_kafka_partition;
426   char *bmp_daemon_msglog_kafka_partition_key;
427   int bmp_daemon_msglog_kafka_partition_keylen;
428   int bmp_daemon_msglog_kafka_broker_port;
429   int bmp_daemon_msglog_kafka_retry;
430   char *bmp_daemon_msglog_kafka_config_file;
431   char *bmp_daemon_msglog_kafka_avro_schema_registry;
432   int bmp_table_peer_buckets;
433   int bmp_table_per_peer_buckets;
434   int bmp_table_attr_hash_buckets;
435   int bmp_table_per_peer_hash;
436   int bmp_dump_output;
437   char *bmp_dump_file;
438   char *bmp_dump_latest_file;
439   char *bmp_dump_avro_schema_file;
440   int bmp_dump_refresh_time;
441   char *bmp_dump_amqp_host;
442   char *bmp_dump_amqp_vhost;
443   char *bmp_dump_amqp_user;
444   char *bmp_dump_amqp_passwd;
445   char *bmp_dump_amqp_exchange;
446   char *bmp_dump_amqp_exchange_type;
447   char *bmp_dump_amqp_routing_key;
448   int bmp_dump_amqp_routing_key_rr;
449   int bmp_dump_amqp_persistent_msg;
450   u_int32_t bmp_dump_amqp_frame_max;
451   u_int32_t bmp_dump_amqp_heartbeat_interval;
452   char *bmp_dump_kafka_broker_host;
453   char *bmp_dump_kafka_topic;
454   int bmp_dump_kafka_topic_rr;
455   int bmp_dump_kafka_partition;
456   char *bmp_dump_kafka_partition_key;
457   int bmp_dump_kafka_partition_keylen;
458   int bmp_dump_kafka_broker_port;
459   char *bmp_dump_kafka_config_file;
460   char *bmp_dump_kafka_avro_schema_registry;
461   int nfacctd_isis;
462   char *nfacctd_isis_ip;
463   char *nfacctd_isis_net;
464   char *nfacctd_isis_iface;
465   int nfacctd_isis_mtu;
466   int nfacctd_isis_msglog;
467   char *igp_daemon_map;
468   char *igp_daemon_map_msglog;
469   char *geoip_ipv4_file;
470   char *geoip_ipv6_file;
471 #if defined WITH_GEOIP
472   GeoIP *geoip_ipv4;
473   GeoIP *geoip_ipv6;
474 #endif
475   char *geoipv2_file;
476 #if defined WITH_GEOIPV2
477   MMDB_s geoipv2_db;
478 #endif
479   int promisc; /* pcap_open_live() promisc parameter */
480   char *clbuf; /* pcap filter */
481   int pcap_protocol;
482   char *pcap_savefile;
483   int pcap_direction;
484   int pcap_ifindex;
485   char *pcap_interfaces_map;
486   char *pcap_if;
487   int pcap_if_wait;
488   int pcap_sf_wait;
489   int pcap_sf_delay;
490   int pcap_sf_replay;
491   int num_memory_pools;
492   int memory_pool_size;
493   int buckets;
494   int daemon;
495   int active_plugins;
496   char *logfile;
497   FILE *logfile_fd;
498   char *pidfile;
499   int networks_mask;
500   char *networks_file;
501   int networks_file_filter;
502   int networks_file_no_lpm;
503   int networks_no_mask_if_zero;
504   int networks_cache_entries;
505   char *ports_file;
506   char *a_filter;
507   int bpfp_a_num;
508   struct bpf_program *bpfp_a_table[AGG_FILTER_ENTRIES];
509   struct pretag_filter ptf;
510   struct pretag_filter pt2f;
511   struct pretag_label_filter ptlf;
512   int maps_refresh;
513   int maps_index;
514   int maps_entries;
515   int maps_row_len;
516   char *pre_tag_map;
517   struct id_table ptm;
518   int ptm_alloc;
519   int ptm_global;
520   int ptm_complex;
521   pm_id_t post_tag;
522   pm_id_t post_tag2;
523   int ext_sampling_rate;
524   int sampling_rate;
525   char *sampling_map;
526   char *syslog;
527   int debug;
528   int debug_internal_msg;
529   int snaplen;
530   char *classifiers_path;
531   int classifier_tentatives;
532   int classifier_table_num;
533   int classifier_ndpi;
534   u_int32_t ndpi_num_roots;
535   u_int32_t ndpi_max_flows;
536   int ndpi_proto_guess;
537   u_int32_t ndpi_idle_scan_period;
538   u_int32_t ndpi_idle_max_time;
539   u_int32_t ndpi_idle_scan_budget;
540   int ndpi_giveup_proto_tcp;
541   int ndpi_giveup_proto_udp;
542   int ndpi_giveup_proto_other;
543   char *nfprobe_timeouts;
544   int nfprobe_id;
545   int nfprobe_hoplimit;
546   int nfprobe_maxflows;
547   char *nfprobe_receiver;
548   int nfprobe_version;
549   char *nfprobe_engine;
550   int nfprobe_peer_as;
551   char *nfprobe_source_ip;
552   struct host_addr nfprobe_source_ha;
553   int nfprobe_ipprec;
554   int nfprobe_direction;
555   u_int32_t nfprobe_ifindex;
556   int nfprobe_ifindex_override;
557   int nfprobe_ifindex_type;
558   int nfprobe_dont_cache;
559   int nfprobe_tstamp_usec;
560   char *sfprobe_receiver;
561   char *sfprobe_agentip;
562   int sfprobe_agentsubid;
563   u_int64_t sfprobe_ifspeed;
564   int tee_transparent;
565   int tee_max_receivers;
566   int tee_max_receiver_pools;
567   char *tee_receivers;
568   int tee_pipe_size;
569   char *tee_kafka_config_file;
570   int uacctd_group;
571   int uacctd_nl_size;
572   int uacctd_threshold;
573   char *tunnel0;
574   int use_ip_next_hop;
575   int decode_arista_trailer;
576   int dump_max_writers;
577   int tmp_asa_bi_flow;
578   int tmp_bgp_lookup_compare_ports;
579   int tmp_bgp_daemon_route_refresh;
580   size_t thread_stack;
581   char *rpki_roas_file;
582   char *rpki_rtr_cache;
583   int rpki_rtr_cache_version;
584   int rpki_rtr_cache_pipe_size;
585   int rpki_rtr_cache_ipprec;
586 };
587 
588 /* prototypes */
589 extern void evaluate_configuration(char *, int);
590 extern int parse_configuration_file(char *);
591 extern int parse_plugin_names(char *, int, int);
592 extern void parse_core_process_name(char *, int, int);
593 extern void compose_default_plugin_name(char *, int, char *);
594 extern int create_plugin(char *, char *, char *);
595 extern int delete_plugin_by_id(int);
596 extern struct plugins_list_entry *search_plugin_by_pipe(int);
597 extern struct plugins_list_entry *search_plugin_by_pid(pid_t);
598 extern void sanitize_cfg(int, char *);
599 extern void set_default_values();
600 
601 /* global vars */
602 extern char *cfg[LARGEBUFLEN], *cfg_cmdline[SRVBUFLEN];
603 extern struct custom_primitives custom_primitives_registry;
604 extern pm_cfgreg_t custom_primitives_type;
605 extern int rows;
606 
607 extern char default_proc_name[];
608 
609 #endif //CFG_H
610