aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2020-06-14Use grecs with wordsplit v1.1HEADmasterSergey Poznyakoff1
2019-07-10Switch to grecs b06fb7d3Sergey Poznyakoff12
2015-03-01Switch to Texinfo 5.0Sergey Poznyakoff7
* doc/Config: Rewrite. * doc/Makefile.am: Use Makeinfo 5 instead of texi2htm * doc/gendocs_template: Ps is not built * grecs: Upgrade. * doc/slb.texi: Fix sectioning. * src/slb.c: Use proginfo.
2012-03-30Version 1.1release-1.1Sergey Poznyakoff2
2012-03-01Update docs.Sergey Poznyakoff1
2012-02-28Bugfixes.Sergey Poznyakoff2
* src/slb.c (slb_daemon): Wake-up exactly at the interval boundary. * src/snmploop.c (sess_init,srv_open_session): New functions. (send_requests): Skip already computed servers. Reuse already open sessions. (recv_loop): Increment slb_loop_serial and set slb_loop_ts. (snmploop): Call sess_init.
2012-02-22Version 1.0.94Sergey Poznyakoff2
2012-02-22Fix resolving of indexed variables.Sergey Poznyakoff2
* src/slb.h (SLB_SRV_DEBUG_OUTPUT): New flag. * src/snmploop.c (process_next): Use SLB_SRV_DEBUG_OUTPUT to suppress unnecessary debugging output. Resolve table entries immediately after obtaining the entire tree. (send_requests): Clear SLB_SRV_DEBUG_OUTPUT flag before sending the request. (resolve_tables): Remove. All callers updated.
2012-02-20Bugfixes.Sergey Poznyakoff2
* grecs: Upgrade. * src/config.c (parse_assert_argv): Fix diagnostic message. (server_kw)<table>: Mark as GRECS_MULT.
2012-02-20Introduce "assertion actions".Sergey Poznyakoff5
* src/config.c (parse_assertion): Handle "-prev" value. (cb_server_assert): Handle block statement. (cb_assertion_action): New callback. (server_kw) <assert>: Can be a block statement. * src/oidtab.c (oidtab_delete): New functions. * src/slb.c (slb_snmp_setup): Set the NETSNMP_DS_LIB_NUMERIC_TIMETICKS option. * src/slb.h (oidtab_delete): New proto. (SLB_ASSERT_PREV): New flag. (SLB_ASSERT_ABORT,SLB_ASSERT_WARN) (SLB_ASSERT_REINIT): New constants. (slb_assertion) <action>: New member. * src/snmploop.c (assertion_test): Handle "-prev" value (compare with previous value of the same OID, when available. (process_result): Handle different assertion actions. (_process_pdu): Call slb_server_init. (resolve_tabref): Call oidtab_delete.
2012-02-17Extend the functionality of assertions.Sergey Poznyakoff7
* NEWS: Update. * doc/config.texi: Update. * src/Makefile.am (slb_SOURCES): Add wildmat.c. * src/wildmat.c: New file. * src/config.c (cb_server_assert): Take a single string as argument, optionally allowing three distinct arguments as a kind of syntax sugar. Support various string and arithmetical comparisons. * src/slb.h (SLB_ASSERT_NEG,SLB_ASSERT_ICASE): New flags. (SLB_ASSERT_EQ,SLB_ASSERT_PREFIX,SLB_ASSERT_SUFFIX) (SLB_ASSERT_GLOB,SLB_ASSERT_EQUAL,SLB_ASSERT_LT) (SLB_ASSERT_LE): New opcodes. (slb_assertion) <opcode,vallen>: New members. (wildmatch): New proto. (SLB_ASSERT_NEG,SLB_ASSERT_ICASE): New flags. (SLB_ASSERT_EQ,SLB_ASSERT_PREFIX,SLB_ASSERT_SUFFIX) (SLB_ASSERT_GLOB,SLB_ASSERT_EQUAL,SLB_ASSERT_LT) (SLB_ASSERT_LE): New opcodes. (slb_assertion) <opcode,vallen>: New members. (wildmatch): New proto. * src/snmploop.c (assertion_test): Handle new opcodes. Revert the meaning of the return code. All uses updated.
2012-02-16Fix printing of oid values.Sergey Poznyakoff4
Don't print type prefixes, don't enclose octet strings in double quotes. * src/slb.c (slb_snmp_setup): Set NETSNMP_DS_LIB_QUICK_PRINT to 1. * src/slb.h (slb_format_cache): New struct. (SLB_FORMAT_CACHE_NULL): New define. (slb_format_cache_init,slb_format_oid_value): New protos. (slb_assertion) <buf,bufsize>: Remove. (slb_assertion) <cache>: New member. * src/snmploop.c (slb_format_cache_init) (slb_format_oid_value): New functions. (assertion_test): Call slb_format_oid_value. (slb_table_grow): Likewise. (slb_table_grow): Free temporary buffer after use. * doc/config.texi: Update.
2012-02-16Remove the index statement.Sergey Poznyakoff1
* src/config.c (cb_index): Remove. (server_kw) <index>: Remove.
2012-02-16Make the index statement optional.Sergey Poznyakoff7
Entries in conceptual rows can now be referenced as $table[value]. * src/config.c (parse_index): New function. (cb_server_variable): Use parse_index to parse table references. * NEWS: Update. * README: Update. * doc/config.texi: Update. * examples/complex-m4.conf: Use table references. * examples/complex.conf: Likewise. * src/cmdline.opt: Update copyright years.
2012-02-15Fix the docs.Sergey Poznyakoff2
* doc/Makefile.am (check-sub-config): Reflect the recent grecs upgrade. * doc/config.texi: Document new statements.
2012-02-15Improve table support. Allow for multiple table references.Sergey Poznyakoff3
* src/slb.h (slb_tabref): New struct. (slb_varinstance) <vi_index, vi_idxpos>: Remove. (slb_varinstance) <vi_tabref, vi_tabrefcnt> <vi_wordc, vi_wordv>: New members. (slb_idxnum) <idxnum_num>: Remove. <idxnum_strval,idxnum_strsiz>: New members. * src/config.c (cb_table): Fix memory allocation. (cb_server_variable): Don't parse MIB if it contains table references. This will be done later, when it will have been properly resolved. Save in slb_varinstance all information necessary for this. * src/snmploop.c (slb_table_grow): Rewrite. (resolve_varinst_index): Rewrite.
2012-02-15Implement simple indexing feature.Sergey Poznyakoff8
* NEWS: Update. * src/config.c (cb_table,cb_index): New callbacks. (cb_server_variable): Implement index replacements in MIBs. (cb_server_assert): Clone locus. (server_kw): New keywords: table, index. (server_kw) <variable>: Change base ptr. (slb_server_new): Allocate srv->tables and srv->indices. * src/oidtab.c (oidtab_install): New function. (_create_ref): Call oidtab_install. * src/slb.h (slb_varinstance) <vi_mib>: Remove const qualifier. <vi_index,vi_idxpos,vi_locus>: New members. (slb_server) <test_pdu>: Rename to pdu. All uses updated. (oidtab_install,table_lookup,table_lookupz) (idxnum_lookup,idxnum_lookupz) (index_lookup,index_lookupz): New protos. (slb_table,slb_idxnum,slb_index): New structs. (slb_server) <tables,indices>: New members. * src/snmploop.c (process_next,_process_pdu) (asynch_response_next): New functions. (server_process_pdu): Rewrite using new functions. (send_requests): Handle unresolved oids. Return number of ones waiting to be resolved. (resolve_tables): New function. (snmploop): Resolve tables as necessary. * src/symimp.c (table_lookup,table_lookupz) (index_lookup,index_lookupz) (idxnum_lookup,idxnum_lookupz): New functions.
2012-02-14Upgrade grecs.Sergey Poznyakoff3
2011-06-27Keep track of column numbers in expressions.Sergey Poznyakoff9
* grecs: Upgrade. * src/config.c (cb_define_expression): Get locus directly from the value. (config_init): Set grecs_adjust_string_locations. Set grecs_print_diag_fun. * src/logger.c (syslog_printer, stderr_printer) (log_printer,logmsg_at_locus): Locus is const. (grecs_print_diag): Move to config.c * src/slb.h (logmsg_at_locus): Change signature. * src/expr.y: Keep track of column numbers. Turn on verbose error messages. * src/logger.c (syslog_printer): Rewrite. (stderr_printer): Use YY_LOCATION_PRINT from grecs. * src/snmploop.c (process_result): Use new grecs_locus_t structure. * tests/intvar00.at: Update. * tests/intvar01.at: Update.
2011-06-23Update manpage. Version 1.0.92.Sergey Poznyakoff3
2011-06-23Update grecs.Sergey Poznyakoff2
2011-06-23Improve integer overflow detection.Sergey Poznyakoff5
* src/config.c (cb_server_variable): Accept order specification as optional 3rd argument. * src/slb.h (SLV_VIF_INCR,SLV_VIF_DECR): New flags. * src/snmploop.c (varinst_assign): Use the above flags to detect integer overflow. * tests/overflow.at: Update. * doc/config.texi: Document changes.
2011-06-22Implement comma operatorSergey Poznyakoff9
* src/expr.y: Allow for the use of comma operator on the topmost level. * src/exprtab.c (nodefixup): Handle node_list. (fixup_expression): Return error if grecs_error_count is not zero after nodefixup. * src/slb.h (node_list): New node type. * tests/comma.at: New testcase. * tests/Makefile.am: Add comma.at. * tests/testsuite.at: Include comma.at. * NEWS: Update. * doc/config.texi: Update. * doc/slb.texi: Update.
2011-06-22Fix handling of internal variables in eval mode.Sergey Poznyakoff2
* src/slb.c (test_eval): A variable name alone declares an uninitialized internal variable. * tests/intvar02.at: Use the new syntax.
2011-06-22Rename varinst_clear=>varinst_unset; varinst_reset=>varinst_clear.Sergey Poznyakoff4
New names describe what these functions actually do.
2011-06-22Make sure internal variables are used initialized.Sergey Poznyakoff10
* src/config.c (cb_server_variable): Set SLV_VIF_SNMP flag for SNMP variables. * src/exprtab.c (nodefixup): detect the use of uninitialized internal variables. * src/slb.h (SLV_VIF_SNMP): New flag. * src/snmploop.c (add_snmp_var): Operate only on variables with SLV_VIF_SNMP set. * src/symimp.c (_varinst_clear,_varinst_reset): Likewise. * tests/intvar00.at: New file. * tests/intvar01.at: New file. * tests/intvar02.at: New file. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Include new testcases.
2011-06-22New testcase.Sergey Poznyakoff3
* tests/overflow.at: New file. * tests/Makefile.am: Add overflow.at * tests/testsuite.at: Include overflow.at.
2011-06-22Allow for variable assignments in expressions. Handle overflows of SNMP ↵Sergey Poznyakoff10
counters. * NEWS: Version 1.0.91 * configure.ac: Likewise. * src/config.c (assert_n_strings): Accept minimal and maximal number of arguments. All callers updated. (cb_server_variable): A one-argument form defines a variable which is to be assigned within the expression. * src/expr.y (asgn): New rule. (expr): Allow for assignments within expressions. (evalnode, copy_node): Handle node_asgn node type. * src/exprtab.c (symtab_register_expression): New function. (symtab_expression_lookupz): New function. (symtab_expression_lookup): New function. (register_expression,expression_lookupz) (expression_lookup): Rewrite using the new functions above. (nodefixup): Handle node_asgn. * src/output.c (ref_drv): Register subexpressions in the per-server expression table. (collect_output_refs): Call format_srv for each registered server. (output_drv): Look up subexpressions in the per-server expression table. * src/slb.c (main): Do not free parse tree texttab. * src/slb.h (node_asgn): New node type. (slb_node.v)<n_asgn>: New member. (varinst_reset): New prototype. (symtab_register_expression) (symtab_expression_lookupz) (symtab_expression_lookup): New prototype. (slb_server)<exprtab>: New member. * src/snmploop.c (varinst_assign): Detect variable overflows. (process_result): If an overflow occurs, do not evaluate the expression. Clear saved values and evaluation count. * src/symimp.c (varinst_reset): New function.
2011-06-21Minor fix.Sergey Poznyakoff4
* src/config.c (slb_kw): Mark expression as GRECS_MULT. * src/expr.y (alloc_node): Set locus. * src/exprtab.c (nodefixup): Bugfix. * src/slb.h (slb_node) <n_locus>: New member.
2011-05-12Add SNMPv3 support.Sergey Poznyakoff6
* NEWS: Update. * doc/config.texi: Update. * doc/slb.texi: Update. * src/config.c: Add SNMPv3 support. * src/slb.h: Likewise. * src/snmploop.c: Likewise.
2011-05-12Minor cleanup in config.cSergey Poznyakoff2
* src/config.c (assert_string_value) (assert_n_strings): New functions. (cb_mib_directory,cb_define_expression) (cb_server_expression,cb_server_variable) (cb_server_constant,cb_server_assert) (cb_server_macro,cb_server_enable) (cb_server_snmpver,cb_syslog_facility): Use assert functions.
2011-05-12Configurable SNMP version.Sergey Poznyakoff5
* src/config.c (snmp_version): New variable. (server_kw)<version>: New statement. (slb_server_new): Set version to snmp_version. (slb_kw)<snmp-version>: New variable. (server_kw,syslog_kw,slb_kw): Mark statements with GRECS_MULT/GRECS_AGGR, where necessary. (config_finish): Reduce the tree, dump it if debugging category 'conf' is set. Set snmp_version prior to reducing the tree. Don't free the tree here. * src/slb.c (debug_trans) <conf>: New category. (main): Call grecs_tree_free after config_finish. * src/slb.h (SLB_DEBCAT_CONF): New category. (slb_server)<snmpver>: New member. * src/snmploop.c (send_requests): Set sess.version. * grecs: Update.
2011-05-11Update grecs.Sergey Poznyakoff12
2011-04-30Minor fixes.Sergey Poznyakoff2
2011-04-30Fix bootstrap.Sergey Poznyakoff1
2011-04-30Remove gnulib dependencies.Sergey Poznyakoff22
* bootstrap.conf: Remove. * gnulib: Remove submodule. * grecs: Upgrade to 3f39626. * src/symtab.c: Remove. * Makefile.am (ACLOCAL_AMFLAGS, SUBDIRS): Remove gnulib. * README-hacking: Update. * bootstrap: Rewrite. * configure.ac: Remove gnulib. * gnulib.modules: Remove. * src/Makefile.am (slb_SOURCES): Remove symtab.c * src/cmdline.opt (program_name): New variable. (set_program_name): New function. * src/config.c, src/expr.y, src/exprtab.c, src/logger.c, src/oidtab.c, src/output.c, src/slb.c, src/snmploop.c, src/symimp.c: Use grecs memory management and symtable functions. * src/slb.h: Update.
2011-04-30Upgrade to grecs a3599c1135.Sergey Poznyakoff5
* grecs: Update to a3599c1135. * bootstrap.conf: Don't read grecs/gnulib.modules. * src/expr.y (input): Don't advance curp if eof is hit. (unput): Do nothing if in eof state. * src/slb.c (main): Initialize grecs_malloc_fun, grecs_realloc_fun and grecs_alloc_die_fun. * src/slb.h: Remove unused includes.
2011-04-30Upgrade to grecs bd4a203ab4.Sergey Poznyakoff2
* src/config.c: Use grecs_list.
2011-04-30Minor fix in docs.Sergey Poznyakoff1
2011-04-29Minor fix.Sergey Poznyakoff1
* src/snmploop.c (process_result): Report assertion failure using LOG_NOTICE.
2011-04-26Add files for generating webpage docs.Sergey Poznyakoff2
2011-04-26Version 1.0release-1.0Sergey Poznyakoff2
2011-04-26Finish docs.Sergey Poznyakoff3
2011-04-26Minor fix.Sergey Poznyakoff1
2011-04-26Update docs.Sergey Poznyakoff4
* doc/config.texi, doc/slb.8, doc/slb.texi: Update. * src/output.c: Change default output format.
2011-04-25Improve docs.Sergey Poznyakoff6
* src/config.c: Implement the "default-expression" statement. Rename "daemon" statement to "standalone". * src/expr.y, src/slb.c, src/slb.h: Rename daemon_mode to standalone_mode. * doc/config.texi: Update. * doc/slb.texi: Improve the tutorial.
2011-04-25Update the docs.Sergey Poznyakoff3
2011-04-24Minor change.Sergey Poznyakoff2
* src/output.c (slb_set_output_defaults): Restore to its state before ddf46208. * src/slb.c (main): Prefer output_file_option in test mode.
2011-04-24Change the symtab_lookup_or_install convention.Sergey Poznyakoff6
* src/slb.h (symtab_lookup_or_install): Return the found (installed) entry. * src/symtab.c (symtab_lookup_or_install): Return the found (installed) entry. Store error code to errno. All uses changed.
2011-04-24Bugfixes.Sergey Poznyakoff8

Return to:

Send suggestions and report system problems to the System administrator.