source: rtems/cpukit/include/rtems/telnetd.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • 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.