Commit graph

50 commits

Author SHA1 Message Date
Olof hagsand
739d052383 Fixed: [SNMP: snmpwalk is slow and can timeout](https://github.com/clicon/clixon/issues/404) 2024-10-31 16:28:30 +01:00
Olof hagsand
4b9ee6740b C-API changes: Replace yn_each with yn_iter, add keyw argument to yang_stats() 2024-07-04 18:27:14 +02:00
Mico Micic
5c05748cfe Implement SNMP bits data type support 2024-04-03 10:19:34 +02:00
Olof hagsand
9f73014500 Added yspec parameter to api_path_fmt2api_path()
Added "%k" as extra flag character to api-path-fmt
2024-02-26 13:18:26 +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
Olof hagsand
9ecc7e0791 Refactor enum2int API 2024-01-29 10:59:04 +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
f25a77734e More updates for Error/Log/Debug API changes 2023-12-18 17:19:14 +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
978586a493 Fixed customized errors: fcgi and snmp 2023-10-26 15:32:25 +02:00
Olof hagsand
5bdad1870e New feature: [Customized NETCONF error message](https://github.com/clicon/clixon/issues/454)
* Added new callback `.ca_errmsg`
* Changed signature of `clicon_netconf_error()` and `netconf_err2cb()`
2023-10-26 14:59:51 +02: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
6335f810d3 C-API: clixon_xml2file and clixon_xml2cbuf added prefix argument
Added in-mem xml diff function: `xml_tree_diff_print`
2023-04-12 10:44:58 +02:00
Olof hagsand
af1f5a037d Fixed: [SNMP: snmpwalk is slow and can timeout #404 ](https://github.com/clicon/clixon/issues/404)
Optimized yang_extension_value
2023-02-01 14:57:51 +01: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
doronb
c0526fad9c Fixed: [Yang leaves without smiv2:oid directive are not shown well in snmpwalk] (https://https://github.com/clicon/clixon/issues/398) 2023-01-18 14:53:25 +02: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
83663d4d15 Fixed: [Trying to change the "read-only" node through snmpset](https://github.com/clicon/clixon/issues/376) 2022-10-09 17:02:08 +02:00
Olof hagsand
aff69127b6 Fixed: [Trying to change the "config false" node through snmpset](https://github.com/clicon/clixon/issues/377)
* Fixed by returning `SNMP_ERR_NOTWRITABLE` when trying to reserve object
2022-10-09 11:59:26 +02:00
Olof hagsand
d2c3b903f1 SNMP: set commit fail error 2022-10-09 11:11:17 +02:00
Olof hagsand
575429caa1 * Fixed: [Non-obvious behavior of clixon_snmp after snmpset command when transaction validation returns an error](https://github.com/clicon/clixon/issues/375)
* Changed `clicon_rpc_commit()` and `clicon_rpc_validate`: Added three-value return.
2022-10-08 17:17:04 +02:00
Olof hagsand
d29c81fce0 Fixed: [clixon_snmp module crashes on snmpwalk command](https://github.com/clicon/clixon/issues/378) 2022-10-07 17:54:42 +02:00
Olof hagsand
11eccd5478 Confirm commit:
- Removed confirm-commit 1.0 capability (only 1.1 present)
- Made startup capability conditional (as confirmed-commit)
- Fixed startup error when rollback did not exist
- Adjust snmp commit calls
- Move failsafe to lib
- Test: Minimized test application, test capability
2022-10-07 16:04:31 +02:00
Olof hagsand
6063d9a147 Fixed: [SNMP smiv2 yang extension doesn't work on augmented nodes](https://github.com/clicon/clixon/issues/366) 2022-09-27 15:47:48 +02:00
Jan-Olof Carlson
14cc88ca39 Added parameter defaults to library function clicon_rpc_get 2022-08-29 18:27:07 +02:00
Olof hagsand
e724dd7f40 Test: Added detail env var to sum.sh, Changed make test to include detailed test 2022-07-21 09:08:18 +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
5175cb8223 SNMP: Added rowstatus destroy logic 2022-07-10 12:17:01 +02:00
Olof hagsand
714e41c627 SNMP: rowstatus for go and wait
Remaining: destroy and internal state
2022-07-09 16:41:21 +02:00
Olof hagsand
cd5b68b0b8 Adapt to clixon master 2022-06-26 11:39:58 +02:00
Olof hagsand
f6fe9f6a64 SNMP: fix SNMP set access of table entries
[Conversion of ethernet address (PhysAddress) and IP address (IPAddress) crashes agent](https://github.com/clicon/clixon/issues/340)
Hwaddress and IP adress for scalar and table set should now work
2022-06-26 11:31:28 +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
ebfd173e0b SNMP: Dynamic table fixes 2022-06-26 11:30:29 +02:00
Olof hagsand
150ad3ab8b SNMP: Large refactorings and new dynamic table support 2022-06-26 11:30:29 +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
78c070b65b SNMP frontend: String table index 2022-06-26 11:29:40 +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
ff52cad3a8 SNMP frontend: Types and indexes
Added timestamp and inet address
First go at index names
2022-06-26 11:29:40 +02:00
Olof hagsand
b3a6700fd5 SNMP frontend, forgot add some files in last commit 2022-06-26 11:29:40 +02:00
Olof hagsand
7bcecc155a SNMP Frontend, fixed remaining types: phys-addr, timeticks, binary, objectid 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
05f3ebb59e SNMP frontend: SNMP2YANG type conversion for snmpset 2022-06-26 11:28:42 +02:00
Olof hagsand
aa95ead1cc SNMP frontend: Reworked types for GET types translation
YANG enum type, split up enum to int into two functions
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