On Wednesday, 9 February 2022 17:43:54 CET Marek Lindner wrote:
The 'server status' call exports the 'mode' as well as interface status via IPC. Both parameters can be modified at runtime via the IPC and as such, the current configuration is dynamic and not necessarily obvious.
The server status 'request' and 'reply' packet types are added to allow the IPC client to initiate the status retrieval. The server will respond with the 'reply' message.
The information is encapsulated in TLV data chunks allowing for future backward compatible extension of the server status call.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
v3:
- close client socket at the end of unix_sock_server_status()
Things I've noticed are:
* there are no safety checks for the buffer size in the server code * the packet/tlv type definitions don't include the header (unlike the rest of the code) * version checks for the "sub tlv" types is missing
Attached is a rough sketch of potential changes.
Kind regards, Sven