source: rtems/cpukit/telnetd/telnetd.h @ df40cc9

4.115
Last change on this file since df40cc9 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

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