diff options
author | John Crispin <blogic@openwrt.org> | 2013-11-11 19:28:13 +0100 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-11-12 10:32:32 +0100 |
commit | f9d31edb8938341b9217ee4c14eb58111414eb97 (patch) | |
tree | eeb48ec34c2f8a30df50de201b5f103e991466f0 /service.h | |
parent | cd4af8eb78c30718f999c487c93e257bbd969cb1 (diff) | |
download | unitd-f9d31edb8938341b9217ee4c14eb58111414eb97.tar unitd-f9d31edb8938341b9217ee4c14eb58111414eb97.zip |
add service_validator support
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'service.h')
-rw-r--r-- | service.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -17,15 +17,40 @@ #include <libubox/avl.h> #include <libubox/vlist.h> +#include <libubox/list.h> extern struct avl_tree services; +struct vrule { + struct avl_node avl; + char *option; + char *rule; +}; + +struct validate { + struct avl_node avl; + struct list_head list; + + char *package; + char *type; + + struct avl_tree rules; +}; + struct service { struct avl_node avl; const char *name; struct blob_attr *trigger; struct vlist_tree instances; + struct list_head validators; }; +void service_validate_add(struct service *s, struct blob_attr *attr); +void service_validate_dump(struct blob_buf *b, struct service *s); +void service_validate_dump_all(struct blob_buf *b, char *p, char *s); +void service_validate_del(struct service *s); +void service_validate_init(void); +void service_init(void); + #endif |