Esempio n. 1
0
File: umc.c Progetto: smallcapp/capp
static int
command(int argc, char *argv[])
{
    static cmd_table_t table[] = {
#if UM_USE_MONITOR
        CMD_ENTRY("enter",  cmd_enter),
        CMD_ENTRY("leave",  cmd_leave),
#endif
        CMD_ENTRY("bind",   cmd_bind),
        CMD_ENTRY("unbind", cmd_unbind),
        CMD_ENTRY("auth",   cmd_auth),
        CMD_ENTRY("reauth", cmd_reauth),
        CMD_ENTRY("deauth", cmd_deauth),
        CMD_ENTRY("show",   cmd_show),
        CMD_ENTRY("tag",    cmd_tag),
#if UM_USE_GC
        CMD_ENTRY("gc",     cmd_gc),
#endif
    };
    int err;

    err = cmd_argv_handle(table, os_count_of(table), argc, argv);
    if (err) {
        debug_error("%s error:%d", argv[0], err);

        return err;
    }
    
    return 0;
}
Esempio n. 2
0
static inline unsigned long 
part_begin(char *partition)
{
    int i;

    for (i=0; i<os_count_of(part_info); i++) {
        if (0==os_strcmp(partition, part_info[i].partition)) {
            partool_size = part_info[i].size;
            
            return part_info[i].addr;
        }
    }
    
    return ADDR_BAD;
}
Esempio n. 3
0
static int
command(int argc, char *argv[])
{
    static cmd_table_t table[] = {
        CMD_ENTRY("insert",  cmd_insert),
        CMD_ENTRY("remove",  cmd_remove),
        CMD_ENTRY("show",    cmd_show),
    };
    int err;
        
    err = cmd_argv_handle(table, os_count_of(table), argc, argv);
    if (err) {
        debug_error("%s error:%d", argv[0], err);

        return err;
    }
    
    return 0;
}
Esempio n. 4
0
        .wlan = {
            .param  = UM_PARAM_INITER(umc.policy.wlan),
            .cfg    = LIST_HEAD_INIT(umc.uci.wlan.cfg),
            .tmp    = LIST_HEAD_INIT(umc.uci.wlan.tmp),
            .uci_type = UM_UCI_INTF_WLAN,
        },
    },
    
    .obj = {
        .methods= um_user_object_methods,
        .type   = UBUS_OBJECT_TYPE("umd", um_user_object_methods),
        .object = {
        	.name = "user-manage",
        	.type = &umc.obj.type,
        	.methods = um_user_object_methods,
        	.n_methods = os_count_of(um_user_object_methods),
        }
    },
};



static void
handle_signal(int signo)
{
	uloop_end();
}

/*
* copy/change from netifd
*/
Esempio n. 5
0
#define _LINUX_LIST_H
#include <environment.h>

static at_ops_t __ops[]     = AT_DEFT_OPS;
static at_cache_t __cache[os_count_of(__ops)];
at_control_t at_control     = AT_CONTROL_DEFT(NULL, __ops, __cache);

extern env_t *env_ptr;
unsigned int *__AKID_DEBUG;

static void
at_boot_init(void)
{
    __at_control->env = (at_env_t *)(env_ptr->env);
    
    __AKID_DEBUG = at_mark_pointer(__at_mark_debug);
}

/******************************************************************************/