2 * transsip - the telephony network
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 * Swiss federal institute of technology (ETH Zurich)
6 * Subject to the GPL, version 2.
12 #include <readline/readline.h>
14 #define MAX_MENU_ELEMS 100
16 extern int cmd_help(char *args
);
17 extern int cmd_quit(char *args
);
18 extern int cmd_stat(char *args
);
19 extern int cmd_yack(char *args
);
21 static inline int show_config(char *args
) { return 0; }
25 rl_icpfunc_t
*callback
;
27 struct shell_cmd
*sub_cmd
;
30 struct shell_cmd call_node
[] = {
31 { "sip", cmd_help
, "Make a SIP call.", NULL
, },
32 { "yack", cmd_yack
, "Make a yack call.", NULL
, },
33 { NULL
, NULL
, NULL
, NULL
, },
36 struct shell_cmd show_node
[] = {
37 { "stun", cmd_help
, "Show STUN probe result.", NULL
, },
38 { "conf", show_config
, "Show parsed config.", NULL
, },
39 { NULL
, NULL
, NULL
, NULL
, },
42 struct shell_cmd cmd_tree
[] = {
43 { "help", cmd_help
, "Show help.", NULL
, },
44 { "quit", cmd_quit
, "Exit netyack shell.", NULL
, },
45 { "ret", cmd_stat
, "Show return status.", NULL
, },
46 { "call", NULL
, "Perform a call.", call_node
, },
47 { "take", cmd_stat
, "Take a call.", NULL
, },
48 { "show", NULL
, "Show information.", show_node
, },
49 { NULL
, NULL
, NULL
, NULL
, },
52 #endif /* CLI_CMDS_H */