RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
telnetd.c File Reference

The telnet DAEMON. More...

#include <sys/queue.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <inttypes.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <rtems.h>
#include <rtems/pty.h>
#include <rtems/shell.h>
#include <rtems/telnetd.h>
#include <rtems/thread.h>
#include <rtems/userenv.h>

Data Structures

struct  telnetd_session
 
struct  telnetd_context
 
union  telnetd_address
 

Macros

#define TELNETD_EVENT_SUCCESS   RTEMS_EVENT_0
 
#define TELNETD_EVENT_ERROR   RTEMS_EVENT_1
 

Typedefs

typedef struct telnetd_context telnetd_context
 
typedef struct telnetd_session telnetd_session
 

Functions

rtems_status_code rtems_telnetd_start (const rtems_telnetd_config_table *config)
 Starts the Telnet server using the provided configuration.
 

Detailed Description

The telnet DAEMON.

After start the net you can start this daemon. It uses the previously inited pseudo-terminales (pty.c) getting a new terminal with getpty(). This function gives a terminal name passing a opened socket like parameter.

With register_telnetd() you add a new command in the shell to start this daemon interactively. (Login in /dev/console of course)

Sorry but OOB is not still implemented. (This is the first version)

Function Documentation

◆ rtems_telnetd_start()

rtems_status_code rtems_telnetd_start ( const rtems_telnetd_config_table config)

Starts the Telnet server using the provided configuration.

Return values
RTEMS_SUCCESSFULSuccessful operation.
RTEMS_INVALID_ADDRESSThe command function in the configuration is NULL.
RTEMS_RESOURCE_IN_USEThe server port is already in use.
RTEMS_NOT_IMPLEMENTEDThe keep stdio configuration option is true.
RTEMS_UNSATISFIEDNot enough resources to start the Telnet server or task priority in configuration is invalid.