source: rtems/cpukit/telnetd/telnetd.h @ 2649eef

4.104.11
Last change on this file since 2649eef was 8a775c27, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 27, 2009 at 1:45:31 PM

2009-03-27 Sebastian Huber <sebastian.huber@…>

  • Makefile.am, preinstall.am, libmisc/Makefile.am, libmisc/shell/shell.c, libmisc/shell/shell.h, telnetd/check_passwd.c, telnetd/telnetd.c, telnetd/telnetd.h: Generalized login check.
  • libmisc/shell/login.h, libmisc/shell/login_check.c, libmisc/shell/login_prompt.c: New files.
  • libmisc/stackchk/check.c: Changed format for blown stack message.
  • libcsupport/src/libio_sockets.c: Removed superfluous cast.
  • libnetworking/rtems/ftpfs.h: Documentation.
  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 *  Original Author: Fernando RUIZ CASAS (fernando.ruiz@ctv.es)
3 *  May 2001
4 *  Reworked by Till Straumann and .h overhauled by Joel Sherrill.
5 *
6 * Copyright (c) 2009
7 * embedded brains GmbH
8 * Obere Lagerstr. 30
9 * D-82178 Puchheim
10 * Germany
11 * <rtems@embedded-brains.de>
12 *
13 * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>.
14 *
15 * The license and distribution terms for this file may be
16 * found in the file LICENSE in this distribution or at
17 * http://www.rtems.com/license/LICENSE.
18 *
19 * $Id$
20 */
21
22#ifndef _RTEMS_TELNETD_H
23#define _RTEMS_TELNETD_H
24
25#include <rtems.h>
26#include <rtems/login.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32bool rtems_telnetd_login_check(
33  const char *user,
34  const char *passphrase
35);
36
37/**
38 * @brief Telnet command type.
39 */
40typedef void (*rtems_telnetd_command)(
41  char * /* device name */,
42  void * /* arg */
43);
44
45/**
46 * @brief Telnet configuration structure.
47 */
48typedef struct {
49  /**
50   * @brief Function invoked for each Telnet connection.
51   *
52   * The first parameter contains the device name.  The second parameter
53   * contains the argument pointer of this configuration table.
54   */
55  rtems_telnetd_command command;
56
57  /**
58   * @brief Argument for command function.
59   */
60  void *arg;
61
62  /**
63   * @brief Task priority.
64   *
65   * If this parameter is equal to zero, then the priority of network task is
66   * used or 100 if this priority is less than two.
67   */
68  rtems_task_priority priority;
69
70  /**
71   * @brief Task stack size.
72   */
73  size_t stack_size;
74
75  /**
76   * @brief Login check function.
77   *
78   * Method used for login checks.  Use @c NULL to disable a login check.
79   */
80  rtems_login_check login_check;
81
82  /**
83   * @brief Keep standard IO of the caller.
84   *
85   * Telnet takes over the standard input, output and error associated with
86   * task, if this parameter is set to @c true.  In this case, it will @b not
87   * listen on any sockets.  When this parameter is @c false, Telnet will
88   * create other tasks for the shell which listen on sockets.
89   */
90  bool keep_stdio;
91} rtems_telnetd_config_table;
92
93/**
94 * @brief Telnet configuration.
95 *
96 * The application must provide this configuration table.  It is used by
97 * rtems_telnetd_initialize() to configure the Telnet subsystem.  Do not modify
98 * the entries after the intialization since it is used internally.
99 */
100extern rtems_telnetd_config_table rtems_telnetd_config;
101
102/**
103 * @brief Initializes the Telnet subsystem.
104 *
105 * Uses the application provided @ref rtems_telnetd_config configuration table.
106 */
107rtems_status_code rtems_telnetd_initialize( void);
108
109#ifdef __cplusplus
110}
111#endif
112
113#endif
Note: See TracBrowser for help on using the repository browser.