Commit graph

106 commits

Author SHA1 Message Date
Olof hagsand
69eaf98913 Remove extra lines 2024-12-05 17:35:05 +01:00
Olof hagsand
0a37cf31ab New version string on the form: 7.1.0-1+11+g2b25294 2024-10-18 17:33:25 +02:00
Olof hagsand
f0bd103e79 Added new DOMAIN level in YANG spec structure 2024-10-06 10:51:26 +02:00
Olof hagsand
43bfc82942 Break out init of orig-ptr to yang_start() to be made after options 2024-09-28 18:04:04 +02:00
Olof hagsand
f1d9e26755 Restconf: Notify ssl version on start
SNMP: rm unused variables
2024-09-15 11:58:44 +02:00
Olof hagsand
dfe5c1bac1 Refactoring of schema mount-points
Add new top-level `Y_MOUNTS` and add top-level yangs and mountpoints in yspecs
2024-08-29 17:24:44 +02:00
Kristofer Hallin
3b45cf9f4d Fixed: [Handle missing SOCK_NONBLOCK on MacOS](https://github.com/clicon/clixon/issues/540) 2024-08-20 09:37:54 +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
62a4b5feff Restconf native+http/1 + tls
Added command-line timeout -t <sec> to restconf
Example: Added programmable timeout to backend example
Test: updated for fcgi and native using internal timeouts
2024-05-13 23:13:05 +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
a1badc312e Fixes after coverity static analysis 2024-03-03 17:05: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
Olof hagsand
121cd3ed2e Debug: ensured all exit logs are on the format: retval:%s 2024-01-24 10:03:28 +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
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
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
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
Philip Prindeville
6e314dd96f Log if restconf started w/o configuration 2023-10-21 18:29:23 +02:00
Philip Prindeville
959e060995 Use clicon_err() consistently and drop perror() 2023-10-21 18:29:23 +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
c101799e74 New command-line option for dumping configuration options for all clixon applications after load
Removed -s dump
2023-08-22 12:41:36 +02:00
Olof hagsand
da2edceb7e * Added new functions: xml_tree_equal and xpath2xml
* RFC 8528 yang schema mount-points:
  * Made expand_dbvar and cli_dbxml mountpoint-aware (RFC 8528)
  * autocli supportgenerate
  * Made api_path2xml and xml2api_path mount-point-aware
  * Temporar fix in clixon_custom.h: XPATH_CANONICAL_SKIP_CHECK
* `xml2xpath()`: Added `apostrophe` as 4th parameter, default 0
* removed extra assert.h includes
2023-03-23 22:16:33 +01:00
Olof hagsand
5822c1a72a * clicon_msg_rcv: Added intr parameter for interrupting on ^C (default 0)
* Internal NETCONF (client <-> backend)
  * Ensure message-id increments
  * Separated rpc from notification socket in same session
* Removed coverage icon from homepage since it stopped working some time ago
2023-03-08 21:41:29 +01:00
Olof Hagsand
ecd60fbcfe
Merge pull request #418 from kernelkit/kkit
Misc. build fixes encountered when cross-compiling
2023-02-17 09:52:42 +01:00
Olof hagsand
585823a609 Memory leaks 2023-02-14 16:42:43 +01:00
Joachim Wiberg
726394d97c apps/restconf: fix compiler warning 'addr' may be used uninitialized
Natvie build with GCC 11.3 generates the following warning.  The patch
is silly and the code path should never be reached, but it silences the
compiler.

restconf_main_native.c:572:9: warning: ‘addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-09 15:53:52 +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
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
c1e4595949 Refactoring of RESTCONF/TLS close code
Single closing function: restconf_close_ssl_socket
Added constant HTTP_ON_HTTPS_REPLY for http request on https socket
2022-09-13 23:01:19 +02:00
Olof hagsand
743076b171 With-defaults CLI support
Extended cli_auto_show() with with-defaults argument, also changing its signature
Example: Added with-defaults argument to clispec
C-API: Added with-defaults argument to clicon_rpc_get_config
Replaced with-defaults prefix/namespace with constants
2022-09-09 13:46:20 +02:00
Olof hagsand
ba9b313295 Restconf callhome: idle-timeout for periodic callhome 2022-08-22 11:27:02 +02:00
Olof hagsand
b748d68912 RESTCONF callhome, periodic and persistent connection-types, multiple clients 2022-08-18 16:38:24 +02:00
Olof hagsand
7e783952eb Restconf callhome: Added YANG connection-type, test: added NACM 2022-08-12 15:05:18 +02:00
Olof hagsand
3a9b276deb Fixed struct sockaddr memory issues
Test: fixed docker yang repo copy
Test: disable restconf-callhome for fcgi
2022-07-31 11:33:02 +02:00
Olof hagsand
7d8ddf7697 Restconf RFC8071 call-home first working prototype 2022-07-31 09:59:52 +02:00
Olof hagsand
89f8567f75 Refactoring of if-feature parse code
Moved if-feature sub-parser to clixon_yang_parse_sub.[ch]
2022-07-20 22:48:09 +02:00
Olof hagsand
0b16797a45 * Added: [Feature Request: Log SSL events](https://github.com/clicon/clixon/issues/331)
* Added syslog NOTICE on failed user certs
2022-06-08 13:22:38 +02:00
Olof hagsand
463aa15544 Restconf compile warnings and docs 2022-05-02 10:28:24 +02:00
Olof hagsand
5551d753ef Logging fixes
* Fixed: [Error message seen twice in some cases](https://github.com/clicon/clixon/issues/325)
* Extended `-l` command-line option to all clixon commands with a `none` option, eg `-l n` directs logging to `dev/null`
2022-04-30 11:31:51 +02:00
Olof hagsand
12695c5d87 * Unit test ifdef for restconf http1 parser
* test: fix cli-union test
2022-02-17 09:16:01 +01:00
Olof hagsand
6ae749c9dd * New clixon-config@2022-02-11.yang revision
* Added option: `CLICON_LOG_STRING_LIMIT`
2022-02-12 21:45:50 +01:00