6f0dd4408ef93474b6b6e2b9b67c1df9aac3325f
[openwrt/staging/neocturne.git] / package / network / services / hostapd / src / src / utils / ucode.h
1 #ifndef __HOSTAPD_UTILS_UCODE_H
2 #define __HOSTAPD_UTILS_UCODE_H
3
4 #include "utils/includes.h"
5 #include "utils/common.h"
6 #include <ucode/lib.h>
7 #include <ucode/vm.h>
8
9 #define HOSTAPD_UC_PATH "/usr/share/hostap/"
10
11 extern uc_value_t *uc_registry;
12 uc_vm_t *wpa_ucode_create_vm(void);
13 int wpa_ucode_run(const char *script);
14 int wpa_ucode_call_prepare(const char *fname);
15 uc_value_t *wpa_ucode_call(size_t nargs);
16 void wpa_ucode_free_vm(void);
17
18 uc_value_t *wpa_ucode_global_init(const char *name, uc_resource_type_t *global_type);
19
20 void wpa_ucode_registry_add(uc_value_t *reg, uc_value_t *val, int *idx);
21 uc_value_t *wpa_ucode_registry_get(uc_value_t *reg, int idx);
22 uc_value_t *wpa_ucode_registry_remove(uc_value_t *reg, int idx);
23
24 uc_value_t *uc_wpa_printf(uc_vm_t *vm, size_t nargs);
25 uc_value_t *uc_wpa_getpid(uc_vm_t *vm, size_t nargs);
26 uc_value_t *uc_wpa_sha1(uc_vm_t *vm, size_t nargs);
27 uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs);
28
29 #endif