version 1.1.1.1, 2013/07/22 08:44:29
|
version 1.1.1.3, 2021/03/17 00:39:23
|
Line 16
|
Line 16
|
* DEFINITIONS |
* DEFINITIONS |
*/ |
*/ |
|
|
#define CMD_SUBMENU ((int (*)(Context ctx, int ac, char *av[], void *arg)) 1) | #define CMD_SUBMENU ((int (*)(Context ctx, int ac, const char *const av[], const void *arg)) 1) |
|
|
#define CMD_ERR_USAGE -1 |
#define CMD_ERR_USAGE -1 |
#define CMD_ERR_UNDEF -2 |
#define CMD_ERR_UNDEF -2 |
Line 31
|
Line 31
|
#ifdef USE_WRAP |
#ifdef USE_WRAP |
GLOBAL_CONF_TCPWRAPPER, /* enable tcp-wrapper */ |
GLOBAL_CONF_TCPWRAPPER, /* enable tcp-wrapper */ |
#endif |
#endif |
GLOBAL_CONF_ONESHOT /* enable OneShot mode */ | GLOBAL_CONF_ONESHOT, /* enable OneShot mode */ |
| GLOBAL_CONF_AGENT_CID, /* enable display Agent CID in show session */ |
| GLOBAL_CONF_SESS_TIME /* enable display uptime in show session */ |
}; |
}; |
|
|
struct globalconf { |
struct globalconf { |
Line 44
|
Line 46
|
{ |
{ |
const char *name; |
const char *name; |
const char *desc; |
const char *desc; |
int (*func)(Context ctx, int ac, char *av[], void *arg); | int (*func)(Context ctx, int ac, const char *const av[], const void *arg); |
int (*admit)(Context ctx, CmdTab cmd); |
int (*admit)(Context ctx, CmdTab cmd); |
int priv; |
int priv; |
void *arg; | const void *arg; |
}; |
}; |
|
|
extern const struct cmdtab gCommands[]; |
extern const struct cmdtab gCommands[]; |
Line 57
|
Line 59
|
*/ |
*/ |
|
|
extern int DoConsole(void); |
extern int DoConsole(void); |
extern int DoCommand(Context ctx, int ac, char *av[], const char *file, int line); | extern int DoCommand(Context ctx, int ac, const char *const av[], const char *file, int line); |
extern int DoCommandTab(Context ctx, CmdTab cmdlist, int ac, char *av[]); | extern int DoCommandTab(Context ctx, CmdTab cmdlist, int ac, const char *const av[]); |
extern int HelpCommand(Context ctx, int ac, char *av[], void *arg); | extern int HelpCommand(Context ctx, int ac, const char *const av[], const void *arg); |
extern int FindCommand(Context ctx, CmdTab cmds, char* str, CmdTab *cp); | extern int FindCommand(Context ctx, CmdTab cmds, const char* str, CmdTab *cp); |
extern int AdmitBund(Context ctx, CmdTab cmd); |
extern int AdmitBund(Context ctx, CmdTab cmd); |
extern int AdmitLink(Context ctx, CmdTab cmd); |
extern int AdmitLink(Context ctx, CmdTab cmd); |
extern int AdmitRep(Context ctx, CmdTab cmd); |
extern int AdmitRep(Context ctx, CmdTab cmd); |