-int handle_exit_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static const struct command_registration telnet_command_handlers[] = {
+ {
+ .name = "exit",
+ .handler = &handle_exit_command,
+ .mode = COMMAND_EXEC,
+ .help = "exit telnet session",
+ },
+ {
+ .name = "telnet_port",
+ .handler = &handle_telnet_port_command,
+ .mode = COMMAND_ANY,
+ .help = "port on which to listen "
+ "for incoming telnet connections",
+ .usage = "<port>",
+ },
+ COMMAND_REGISTRATION_DONE
+};
+
+int telnet_register_commands(struct command_context *cmd_ctx)