38 #ifndef __wimaxll__cmd_h__
39 #define __wimaxll__cmd_h__
62 #define PLUGIN(_name, _version, _init, _exit) \
63 struct plugin plugin = { \
65 .version = _version, \
75 int argc,
char **argv);
83 void w_abort(
int result,
const char *fmt, ...)
84 __attribute__ ((format(printf, 2, 3)));
85 void w_msg(
unsigned, const
char *,
unsigned, const
char *fmt, ...)
86 __attribute__ ((format(printf, 4, 5)));
99 #define w_error(fmt...) w_msg(W_ERROR, __FILE__, __LINE__, "E: " fmt)
100 #define w_warn(fmt...) w_msg(W_WARN, __FILE__, __LINE__, "W: " fmt)
101 #define w_info(fmt...) w_msg(W_INFO, __FILE__, __LINE__, "I: " fmt)
102 #define w_print(fmt...) w_msg(W_PRINT, __FILE__, __LINE__, fmt)
103 #define w_d1(fmt...) w_msg(W_D1, __FILE__, __LINE__, "D1: " fmt)
104 #define w_d2(fmt...) w_msg(W_D2, __FILE__, __LINE__, "D2: " fmt)
105 #define w_d3(fmt...) w_msg(W_D3, __FILE__, __LINE__, "D3: " fmt)
const char * name
Definition: cmd.h:54
A WiMax control pipe handle.
Definition: internal.h:219
void w_cmd_need_if(struct wimaxll_handle *wmx)
Definition: wimaxll.c:126
const char * version
Definition: cmd.h:55
void w_msg(unsigned level, const char *file, unsigned line, const char *fmt,...)
Definition: wimaxll.c:79
char * name
Definition: cmd.h:72
int(* fn)(struct cmd *, struct wimaxll_handle *, int argc, char **argv)
Definition: cmd.h:74
void w_abort(int result, const char *fmt,...)
Definition: wimaxll.c:101
struct argp argp
Definition: cmd.h:73
int active
Definition: cmd.h:59
void * dl_handle
Definition: cmd.h:58
int(* init)(void)
Definition: cmd.h:56
void(* exit)(void)
Definition: cmd.h:57
void w_cmd_unregister(struct cmd *cmd)
Definition: wimaxll.c:121
int w_cmd_register(struct cmd *cmd)
Definition: wimaxll.c:115