Skip to content
Snippets Groups Projects
dongle.c 413 B
Newer Older
  • Learn to ignore specific revisions
  • #include "common.h"
    #include "dongle_apn.h"
    #include "dongle_pin.h"
    #include "dongle_network.h"
    
    struct ubus_context *ctx;
    
    void init_ubus(void)
    {
    	ctx = ubus_connect(NULL);
    	if (!ctx) {
    		perror("ubus");
    		exit(1);
    	}
    	ubus_add_uloop(ctx);
    }
    
    int main(int argc, char **argv)
    {
    	uloop_init();
    	init_ubus();
    	expose_apn_object(ctx);
    	expose_pin_object(ctx);
    	expose_network_object(ctx);
    	uloop_run();
    
    	return 0;
    }