batman-adv: Prepare framework for mesh genl config
The batman-adv configuration interface was implemented solely using sysfs. This approach was condemned by non-batadv developers as "huge mistake". Instead a netlink/genl based implementation was suggested. The main objects for this configuration is the mesh/soft-interface object. Its actual object in memory already contains most of the available configuration settings. The genl interface reflects this by allowing to get/set it using the mesh specific commands. The BATADV_CMD_GET_MESH_INFO (or short version BATADV_CMD_GET_MESH) is reused as get command because it already provides the content of other information from the mesh/soft-interface which are not yet configuration specific. The set command BATADV_CMD_SET_MESH will also notify interested userspace listeners of the "config" mcast group using the BATADV_CMD_SET_MESH command message type that settings might have been changed and what the current values are. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
This commit is contained in:

committed by
Simon Wunderlich

parent
c4a7a8d9bb
commit
6004051353
@@ -27,6 +27,7 @@
|
||||
|
||||
#define BATADV_NL_NAME "batadv"
|
||||
|
||||
#define BATADV_NL_MCAST_GROUP_CONFIG "config"
|
||||
#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
|
||||
|
||||
/**
|
||||
@@ -372,10 +373,14 @@ enum batadv_nl_commands {
|
||||
BATADV_CMD_UNSPEC,
|
||||
|
||||
/**
|
||||
* @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv
|
||||
* device
|
||||
* @BATADV_CMD_GET_MESH: Get attributes from softif/mesh
|
||||
*/
|
||||
BATADV_CMD_GET_MESH_INFO,
|
||||
BATADV_CMD_GET_MESH,
|
||||
|
||||
/**
|
||||
* @BATADV_CMD_GET_MESH_INFO: Alias for @BATADV_CMD_GET_MESH
|
||||
*/
|
||||
BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH,
|
||||
|
||||
/**
|
||||
* @BATADV_CMD_TP_METER: Start a tp meter session
|
||||
@@ -443,6 +448,11 @@ enum batadv_nl_commands {
|
||||
*/
|
||||
BATADV_CMD_GET_MCAST_FLAGS,
|
||||
|
||||
/**
|
||||
* @BATADV_CMD_SET_MESH: Set attributes for softif/mesh
|
||||
*/
|
||||
BATADV_CMD_SET_MESH,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user