Commit graph

45 commits

Author SHA1 Message Date
Mico Micic
4920b9d32b Add support for snmp v2 traps 2024-08-01 06:51:28 +02:00
Olof hagsand
0234ed94bc Added CLICON_LOG_DESTINATION and CLICON_LOG_FILE for al applications 2024-06-19 12:46:09 +02:00
Olof hagsand
ca701b0c1a Changed intermediate version numbers to be git-style, eg 7.0.0-39 instead of 7.1.0-PRE
* Changed datastore modstate to be last in file, as prior to 7.0
2024-05-08 16:51:45 +02:00
Olof hagsand
c5b852f6b1 snmp: changed termination order causing error due to new logging 2024-02-22 14:17:36 +01:00
Olof hagsand
9bc60abe2e Fixed memory leaks at -V 2024-02-18 22:42:55 +01:00
Olof hagsand
ff171afd65 Added debug level INIT 2024-02-17 22:16:56 +01:00
Olof hagsand
3b0b734de1 Fix same -V version string
Restconf exit segv
2024-02-17 22:11:35 +01:00
Olof hagsand
4e3bd6fbdd Symbolic and combined debug names in cmd-line of all applications
New debug levels: BACKEND, CLI, NETCONF,RESTCONF, SNMP, STREAM
2024-02-02 11:54:12 +01:00
Philip Prindeville
cf2e27b43d Drop __FUNCTION__ from clixon_debug() calls 2024-01-11 17:29:37 +01:00
Philip Prindeville
0ec1e0a686 Discriminate APP debugging 2024-01-10 20:06:38 +01:00
Philip Prindeville
063c8d664f Messages can't be DETAIL alone so pair with DEFAULT 2024-01-10 20:06:38 +01:00
Olof hagsand
24a4991ec8 Restructured error,debug anf log API
Renamed functions clicon->clixon, replaced global variables w access functions
Unified clicon_netconf_error with clixon_err()
2023-12-18 08:29:14 +01:00
Olof hagsand
261469be16 Feature: [Add support for -V option to give version](https://github.com/clicon/clixon/issues/472) 2023-12-14 23:10:51 +01:00
Olof hagsand
62348fc9c7 C-style update: Unified comment, retvals in order, remove trailing spaces
Changed function name for `clicon_debug` functions
2023-10-23 09:58:13 +02:00
Olof hagsand
1698c6717e Fixed undeclared variables in SNMP 2023-08-23 11:18:32 +02:00
Olof hagsand
a7ef2c4f12 Rewrote parsing of extra config-files to work recursively over structured data
Fixed that modified config variables were not properly overwritten in XML
Added `pretty` parameter to clicon_options_dump
Added testcases for recursive and structure extra config files
2023-08-23 11:10:24 +02:00
Olof hagsand
124afb8788 Modified -C command-line handling and added to SNMP 2023-08-23 10:52:47 +02:00
Olof hagsand
da9bfcbb53 * Changed debug levels in clicon_debug() to be based on maskable flags
* Added flag names: `CLIXON_DBG_*`
  * Added maskable flags that can be combined when debugging:
    * `DEFAULT` = 1: Basic debug message, espcially initialization
    * `MSG` = 2: Input and output packets, read datastore
    * `DETAIL` = 4: Details: message dump in hex, xpath parse trees, etc
    * `EXTRA` = 8: Extra detailed logs
* Test: some errors in yang-lib where content-id was in wrong place
2023-01-27 14:56:58 +01:00
Olof hagsand
923b998774 * Fixed: Initialized session-id to 1 instead of 0 following ietf-netconf.yang
* Clearer debug levels `clicon_debug()`:
  1: Logical debug message
  2: Input and output packets
  3: Message dump in hex, xpath parse trees
2023-01-18 15:51:31 +01:00
Olof hagsand
3428f4d5ff Fixed: [snmpwalk doesn't show properly SNMP boolean values which equal false](https://github.com/clicon/clixon/issues/400) 2023-01-16 12:10:16 +01:00
Olof hagsand
000cb866c2 RFC 8525:
- Change from RFC 7805: Remove revision if empty instead of sending empty revision
RFC 6022
  - Added cli identity to RFC6022 transport
  - Added source-host for natove restconf, bit no other sessions
2023-01-15 22:44:00 +01:00
Olof hagsand
3916fa919c Netconf monitoring RFC 6022 Sessions (https://github.com/clicon/clixon/issues/370)
- statistics and transport/source-host parameters
  - extended internal NETCONF hello with transport and source-host attributes
clixon-lib,yang
  - Moved all extended internal NETCONF attributes to the clicon-lib namespace
C-API:
  - wrapped most attribute creation into new fn xml_add_attr()
2023-01-15 12:36:59 +01:00
Olof hagsand
d84c529ff1 [Code formatting: Change indentation style to space](https://github.com/clicon/clixon/issues/379)
* Applies to all c/h/y/l/sh files and .editorconfig
2022-10-27 14:21:17 +02:00
Olof hagsand
05b31508a1 * Fixed: [Non-obvious behavior of clixon_snmp after snmpset command when transaction validation returns an error](https://github.com/clicon/clixon/issues/375)
* Fixed by validating writes on ACTION instead of COMMIT since libnetsnmp seems not to accept commit errors
2022-10-25 16:32:48 +02:00
Olof hagsand
d2c3b903f1 SNMP: set commit fail error 2022-10-09 11:11:17 +02:00
Olof hagsand
49d19b263c SNMP: Internal cache handling for rowstatus
Test: prefix SN=0 instead of CS=0 for override clixon_snmp start
2022-07-11 10:07:48 +02:00
Olof hagsand
fa87b7d59f SNMP: Fixed leafref index issue and table min-column issue for mult index 2022-06-26 11:31:06 +02:00
Olof hagsand
94c00a2584 SNMP: Step towards dynamic tables 2022-06-26 11:30:29 +02:00
Olof hagsand
b5d17d643a SNMP: Started register table entries dynamically
Compile-time constant: SNMP_TABLE_DYNAMIC
Added MIB SNMP erroir handling
2022-06-26 11:30:29 +02:00
Olof hagsand
a0e6536bab Added Siklu sponsorship text 2022-06-26 11:29:40 +02:00
Olof hagsand
ef640772df SNMP Frontend, fix handling of snmpd down and memory leaks
If snmpd is down, clixon_snmp does not start
If snmpd stops, clixon_snmp quits
Mem leaks fixed
2022-06-26 11:29:40 +02:00
Olof hagsand
6f7a33d196 SNMP frontend, new preli table handling code
Skipped data set and use table-helper only
Specialized SNMP error handling
2022-06-26 11:28:42 +02:00
Olof hagsand
46cb21f3e8 SNMP frontend: Generalized type handling for set functions
SPlit scalar_handler into get and set subfunctions
2022-06-26 11:28:42 +02:00
Olof hagsand
ef604be610 SNMP frontend, restructure files
Split snmp_mib_yang.c into: snmp_register.[ch] and snmp_handler.[ch]
2022-06-26 11:28:42 +02:00
Olof hagsand
eb8d0c0b3a SNMP frontend: added -z zap command-line option and pid-file exclusive check, fixed mem check 2022-06-26 11:28:42 +02:00
Olof hagsand
42f21a309a SNMP frontend: conflict typos, snmp pidfile 2022-06-26 11:28:42 +02:00
Olof hagsand
4e0d9dd987 SNMP frontend
Fixed table/scalar collision issue
Made the CS variable change said to be in previous commit
2022-06-26 11:28:42 +02:00
Olof hagsand
df687f7180 Clixon SNMP frontend
Added two new config options to clixon-config.yang: `CLICON_HTTP_DATA_ROOT`
Added new files: apps/snmp/snmp_mib_yang.[ch] for generic MIB/YANG handling
Test: killall quiet
Test: added specific MIB for generic code: <CLICON_SNMP_MIB>NET-SNMP-EXAMPLES-MIB</CLICON_SNMP_MIB>
2022-06-26 11:28:42 +02:00
Olof hagsand
2699393c4a SNMP: replaced testhandler code to use only NET-SNMP-EXAMPLES-MIB for scalar and table 2022-06-26 11:27:54 +02:00
Kristofer Hallin
f443f4f9b3 Added example for tables. 2022-06-26 11:27:54 +02:00
Olof hagsand
28514c6750 Clixon SNMP frontend update
* Integration of testhandler.c gives proper callback handling
* YANG `clixon-config@2022-03-21.yang` changes:
    * Added option:
      * `CLICON_SNMP_AGENT_SOCK`
2022-06-26 11:27:54 +02:00
Kristofer Hallin
40d5f99694 Tell the agent to use a Unix socket for communication. 2022-06-26 11:26:04 +02:00
Olof hagsand
e32cb81b49 Clixon SNMP frontend update
Integrated netsnmp agent and clixon event handling, made a workaround of fdset:s
used in the netsnmp API with sockets used in Clixon
Added a hardcoded MIB OID handler as subagent
Added libnetsnmpagent to autotools dependency check
New OE_SNMP error code
2022-06-26 11:26:04 +02:00
Kristofer Hallin
16d21bbe3b Move include of signal.h 2022-06-26 11:26:04 +02:00
Olof hagsand
d72aa58f90 Initial Net-snmp frontend commit
Added apps/snmp with makefiles, autotools, docker adjustment
Minimal snmp_main program
2022-06-26 11:26:04 +02:00