From c6bda689c2c94788e1e567463ce861d1f135857f Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Tue, 26 Apr 2011 18:26:01 +0200 Subject: batman-adv: add wrapper function to throw uevent in userspace Using throw_uevent() is now possible to trigger uevent signal that can be recognised in userspace. Uevents will be triggered through the /devices/virtual/net/{MESH_IFACE} kobject. A triggered uevent has three properties: - type: the event class. Who generates the event (only 'gw' is currently defined). Corresponds to the BATTYPE uevent variable. - action: the associated action with the event ('add'/'change'/'del' are currently defined). Corresponds to the BATACTION uevent variable. - data: any useful data for the userspace. Corresponds to the BATDATA uevent variable. Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann --- net/batman-adv/main.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'net/batman-adv/main.h') diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 8eae05e4dc1..f9e0e174b3f 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -91,6 +91,17 @@ enum mesh_state { #define BCAST_QUEUE_LEN 256 #define BATMAN_QUEUE_LEN 256 + +enum uev_action { + UEV_ADD = 0, + UEV_DEL, + UEV_CHANGE +}; + +enum uev_type { + UEV_GW = 0 +}; + /* * Debug Messages */ -- cgit v1.2.3