History

batman-adv: Prepare framework for vlan 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. Beside the mesh/soft-interface specific configuration, the VLANs on top of the mesh/soft-interface have configuration settings. The genl interface reflects this by allowing to get/set it using the vlan specific commands BATADV_CMD_GET_VLAN/BATADV_CMD_SET_VLAN. The set command BATADV_CMD_SET_MESH will also notify interested userspace listeners of the "config" mcast group using the BATADV_CMD_SET_VLAN command message type that settings might have been changed and what the current values are.

Sven Eckelmann committed 7 years ago

Commit 49e7e371 parent 5c55a402 files · +206 −2Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/batman_adv.h+17−0
@@ -345,6 +345,11 @@ enum batadv_nl_attrs { · 344 unmodified lines
345345 */
346346 BATADV_ATTR_MCAST_FLAGS_PRIV,
347347
348+ /**
349+ * @BATADV_ATTR_VLANID: VLAN id on top of soft interface
350+ */
351+ BATADV_ATTR_VLANID,
352+
348353 /* add attributes above here, update the policy in netlink.c */
349354
350355 /**
@@ -465,6 +470,18 @@ enum batadv_nl_commands { · 114 unmodified lines
465470 */
466471 BATADV_CMD_SET_HARDIF,
467472
473+ /**
474+ * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the
475+ * current softif
476+ */
477+ BATADV_CMD_GET_VLAN,
478+
479+ /**
480+ * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the
481+ * current softif
482+ */
483+ BATADV_CMD_SET_VLAN,
484+
468485 /* add new commands above here */
469486
470487 /**