1 /* 2 * Copyright (C) 2013 Felix Fietkau <nbd@openwrt.org> 3 * Copyright (C) 2013 John Crispin <blogic@openwrt.org> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU Lesser General Public License version 2.1 7 * as published by the Free Software Foundation 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 */ 14 15 #ifndef __PROCD_H 16 #define __PROCD_H 17 18 #include <libubox/uloop.h> 19 #include <libubox/utils.h> 20 #include <libubus.h> 21 #include <udebug.h> 22 23 #include <stdio.h> 24 #include <syslog.h> 25 26 #include "log.h" 27 28 #define __init __attribute__((constructor)) 29 30 extern const char *init_d_path; 31 extern const char *rc_d_path; 32 33 extern const char *ubus_socket; 34 35 void procd_connect_ubus(void); 36 void procd_reconnect_ubus(int reconnect); 37 void ubus_init_hotplug(struct ubus_context *ctx); 38 void ubus_init_service(struct ubus_context *ctx); 39 void ubus_init_system(struct ubus_context *ctx); 40 #ifndef DISABLE_INIT 41 void hotplug_ubus_event(struct blob_attr *data); 42 #else 43 static inline void hotplug_ubus_event(struct blob_attr *data) 44 { 45 } 46 #endif 47 48 void procd_state_next(void); 49 void procd_state_ubus_connect(void); 50 void procd_shutdown(int event); 51 void procd_early(void); 52 void procd_preinit(void); 53 void procd_signal(void); 54 void procd_signal_preinit(void); 55 void procd_inittab(void); 56 void procd_inittab_run(const char *action); 57 void procd_inittab_kill(void); 58 void procd_bcast_event(char *event, struct blob_attr *msg); 59 60 struct trigger; 61 void trigger_event(const char *type, struct blob_attr *data); 62 void trigger_add(struct blob_attr *rule, void *id); 63 void trigger_del(void *id); 64 65 void watch_add(const char *_name, void *id); 66 void watch_del(void *id); 67 void watch_ubus(struct ubus_context *ctx); 68 69 void procd_udebug_printf(const char *format, ...); 70 void procd_udebug_set_enabled(bool val); 71 72 #endif 73
This page was automatically generated by LXR 0.3.1. • OpenWrt