8 Commits

Author SHA1 Message Date
Arne Kappen
b22f83d752 handler: add mechanism to generate external device handler stubs
Parse JSON files in a given directory and pass the information on to a callback
function for creation of an external device handler stub.
The description contains:
 - 'name': the name of the device type,
 - 'ubus_name': the name of the external device handler daemon on ubus,
 - 'bridge': a flag indicating whether the devices are bridge-like,
 - optionally 'br_prefix': a prefix for created devices
   (only for bridge-like, defaults to type name),
 - 'config': the UCI config options for devices of this type, and
 - optionally 'info' and 'stats': the format of calls to info() and dump().

Signed-off-by: Arne Kappen <arne.kappen@hhi.fraunhofer.de>
2021-03-31 01:19:55 +01:00
John Crispin
45fd905c98 netifd: fixes for json-c 0.12
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-03-06 15:25:44 +01:00
Steven Barth
e9d2014a47 handler: replace calls to deprecated json_object_object_get
Signed-off-by: Steven Barth <steven@midlink.org>
2014-12-23 14:29:47 +01:00
Felix Fietkau
4716798f0c handler: explicitly include json.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-13 23:07:24 +02:00
Felix Fietkau
98ffa13315 handler: include config.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-22 14:10:33 +02:00
Felix Fietkau
72adf25cf2 proto-shell: move more core to handler.c
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-22 14:10:33 +02:00
Felix Fietkau
f88b0173d2 proto-shell: move script handler config parse code to handler.c
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-22 14:10:33 +02:00
Felix Fietkau
f16a15c39c proto-shell: move script handler dump code to handler.c
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-22 14:10:33 +02:00