How cesnet/netopeer2 works
Netopeer2 is a NETCONF server backed by sysrepo, with a companion interactive CLI. The main workflow is a client connecting over NETCONF, issuing configuration or operational requests, and receiving replies or subscribed notifications; server handlers use sysrepo for datastore access. The README documents SSH/TLS listen and call-home modes, NACM, URL transfers, monitoring, NMDA, confirmed commit, and notification subscriptions. Some feature paths are represented by their enclosing source files based on the tree and README; excerpts do not show every runtime call.
Main entry points: netconf.c RPC handling · main.c Server entry · common.c Shared operations · netconf_subscribed_notifications.c Subscriptions
Components 19
Server runtime
- Server entry
src/main.c - RPC handling
src/netconf.c - Shared operations
src/common.c
NETCONF features
- Confirmed commit
src/netconf_confirmed_commit.c - Session monitoring
src/netconf_monitoring.c - NMDA operations
src/netconf_nmda.c - Subscriptions
src/netconf_subscribed_notifications.c - Server schemas
modules
CLI client
- CLI entry
cli/main.c - CLI commands
cli/commands.c - CLI configuration
cli/configuration.c - CLI schema
cli/netopeer2_cli_yang.h
External services
- Sysrepo datastore
- libnetconf2 transport
- libyang schemas
- URL services
- SSH / TLS
Other components
- Operator
- NETCONF client
Connections 25
- Operator → CLI entry: enters commands
- CLI entry → CLI commands: dispatches commands
- CLI entry → CLI configuration: loads settings
- CLI commands → libnetconf2 transport: creates client RPCs
- libnetconf2 transport → NETCONF client: connects to
- NETCONF client → Server entry: sends NETCONF
- Server entry → libnetconf2 transport: initializes transport
- libnetconf2 transport → SSH / TLS: secures sessions
- Server entry → RPC handling: dispatches requests
- RPC handling → Shared operations: uses operations
- RPC handling → Sysrepo datastore: reads and writes data
- RPC handling → libyang schemas: validates data
- RPC handling → Confirmed commit: handles commit requests
- RPC handling → Session monitoring: serves monitoring
- RPC handling → NMDA operations: handles NMDA requests
- RPC handling → Subscriptions: handles subscriptions
- Subscriptions → Sysrepo datastore: registers datastore events
- Subscriptions → libnetconf2 transport: sends notifications
- Confirmed commit → Sysrepo datastore: manages commit state
- Session monitoring → Sysrepo datastore: reads session data
- NMDA operations → Sysrepo datastore: accesses datastores
- Shared operations → Sysrepo datastore: accesses configuration
- Shared operations → URL services: transfers URL data
- Server schemas → libyang schemas: defines data models
- CLI schema → CLI configuration: defines CLI settings