Network Component  
MDK Middleware for IPv4 and IPv6 Networking
 
Loading...
Searching...
No Matches
NetTeln: Telnet Server

Events generated by the Network - Telnet Server functions. More...

Functions

__STATIC_INLINE void EvrNetTeln_InitServer (uint32_t num_sessions, uint16_t port, uint16_t idle_tout)
 Event on Telnet server initialize (Op)
 
__STATIC_INLINE void EvrNetTeln_GetSocketFailed (uint8_t session)
 Event on Telnet server failed to allocate TCP socket (Error)
 
__STATIC_INLINE void EvrNetTeln_SetUsername (const char *username, uint32_t length)
 Event on Telnet server netTELNETs_SetUsername (API)
 
__STATIC_INLINE void EvrNetTeln_SetPassword (const char *password, uint32_t length)
 Event on Telnet server netTELNETs_SetPassword (API)
 
__STATIC_INLINE void EvrNetTeln_StartService (uint16_t port)
 Event on Telnet server start service (Op)
 
__STATIC_INLINE void EvrNetTeln_StopService (void)
 Event on Telnet server stop service (Op)
 
__STATIC_INLINE void EvrNetTeln_CloseSession (uint8_t session)
 Event on Telnet server session close (Op)
 
__STATIC_INLINE void EvrNetTeln_ProcessData (uint8_t session, uint32_t length)
 Event on Telnet server process client data (Op)
 
__STATIC_INLINE void EvrNetTeln_ProcessCommand (const char *command, uint32_t length)
 Event on Telnet server process client command (Op)
 
__STATIC_INLINE void EvrNetTeln_EchoBackspace (uint8_t session)
 Event on Telnet server echo backspace (Op)
 
__STATIC_INLINE void EvrNetTeln_CommandHistory (const char *command, uint32_t length)
 Event on Telnet server process command history (Op)
 
__STATIC_INLINE void EvrNetTeln_EchoCharacters (uint8_t *line_buffer, uint32_t num_char)
 Event on Telnet server echo the characters from command line buffer (Op)
 
__STATIC_INLINE void EvrNetTeln_LineBufferUsage (uint8_t session, uint32_t num_char)
 Event on Telnet server display command line buffer usage (Op)
 
__STATIC_INLINE void EvrNetTeln_SendAuthorizationRequest (uint8_t session)
 Event on Telnet server send authorization request to the client (Op)
 
__STATIC_INLINE void EvrNetTeln_SendInitialHeader (uint8_t session)
 Event on Telnet server send initial telnet header to the client (Op)
 
__STATIC_INLINE void EvrNetTeln_LoginTimeoutExpired (uint8_t session)
 Event on Telnet server login timeout expired (Op)
 
__STATIC_INLINE void EvrNetTeln_ShowPassword (const char *password, uint32_t length)
 Event on Telnet server display password of the client (Op)
 
__STATIC_INLINE void EvrNetTeln_AuthenticationFailed (uint8_t session)
 Event on Telnet server user authentication failed, invalid credentials (Error)
 
__STATIC_INLINE void EvrNetTeln_UserLoginSuccess (uint8_t session)
 Event on Telnet server user login successful (Op)
 
__STATIC_INLINE void EvrNetTeln_ShowUsername (const char *username, uint32_t length)
 Event on Telnet server display username of the client (Op)
 
__STATIC_INLINE void EvrNetTeln_NegotiateStart (uint8_t session)
 Event on Telnet server option negotiation start (Op)
 
__STATIC_INLINE void EvrNetTeln_NegotiateFailed (uint8_t session)
 Event on Telnet server option negotiation failed (Error)
 
__STATIC_INLINE void EvrNetTeln_UserAccessDenied (const void *net_addr)
 Event on Telnet server user denied access (Error)
 
__STATIC_INLINE void EvrNetTeln_SessionOpen (uint8_t session)
 Event on Telnet server session open (Op)
 
__STATIC_INLINE void EvrNetTeln_SocketAborted (uint8_t session)
 Event on Telnet server socket aborted (Op)
 
__STATIC_INLINE void EvrNetTeln_SocketClosed (uint8_t session)
 Event on Telnet server socket closed (Op)
 
__STATIC_INLINE void EvrNetTeln_ReceiveFrame (uint8_t session, uint32_t length)
 Event on Telnet server receive frame (Op)
 
__STATIC_INLINE void EvrNetTeln_NegotiateSuccess (uint8_t session)
 Event on Telnet server option negotiation success (Op)
 
__STATIC_INLINE void EvrNetTeln_UninitServer (void)
 Event on Telnet server de-initialize (Op)
 

Description

Events generated by the Network - Telnet Server functions.

The Telnet server functions generate events that make it easier to troubleshoot errors, and allow the user to understand how the Telnet server works.

Function Documentation

◆ EvrNetTeln_AuthenticationFailed()

__STATIC_INLINE void EvrNetTeln_AuthenticationFailed ( uint8_t  session)

Event on Telnet server user authentication failed, invalid credentials (Error)

Parameters
sessionsession number

The event AuthenticationFailed is created when the Telnet server failed to authenticate the user, which means that the username and/or password was invalid.

Value in the Event Recorder shows:

  • session: Telnet server session for authentication.

◆ EvrNetTeln_CloseSession()

__STATIC_INLINE void EvrNetTeln_CloseSession ( uint8_t  session)

Event on Telnet server session close (Op)

Parameters
sessionsession number

The event CloseSession is created when the Telnet server closes the active user session. When the session ends, the user is disconnected from the Telnet server.

Value in the Event Recorder shows:

  • session: Telnet server session.

◆ EvrNetTeln_CommandHistory()

__STATIC_INLINE void EvrNetTeln_CommandHistory ( const char *  command,
uint32_t  length 
)

Event on Telnet server process command history (Op)

Parameters
commandcommand from the command history
lengthlength of the command string

The event CommandHistory is created each time the user presses the UP or DOWN arrow key on the keyboard and recalls recently saved history commands. The event notifies you of the invoked command.

Value in the Event Recorder shows:

  • command: command retrieved from command history.

◆ EvrNetTeln_EchoBackspace()

__STATIC_INLINE void EvrNetTeln_EchoBackspace ( uint8_t  session)

Event on Telnet server echo backspace (Op)

Parameters
sessionsession number

The event EchoBackspace is created each time the user presses the Backspace key on the keyboard while editing the command.

Value in the Event Recorder shows:

  • session: Telnet server command edit session.

◆ EvrNetTeln_EchoCharacters()

__STATIC_INLINE void EvrNetTeln_EchoCharacters ( uint8_t *  line_buffer,
uint32_t  num_char 
)

Event on Telnet server echo the characters from command line buffer (Op)

Parameters
line_buffercommand line buffer
num_charnumber of characters to echo

The event EchoCharacters is created each time the user presses a key on the keyboard and Echo mode is active on the server. The event informs you of the echoes.

Value in the Event Recorder shows:

  • line_buff: recently entered echo characters.

◆ EvrNetTeln_GetSocketFailed()

__STATIC_INLINE void EvrNetTeln_GetSocketFailed ( uint8_t  session)

Event on Telnet server failed to allocate TCP socket (Error)

Parameters
sessionsession number

The event GetSocketFailed is created when the Telnet server is initialized, that is, when the function netInitialize is executed, and the service could not assign the TCP socket. To resolve this error, you must increase the number of available TCP sockets in the TCP socket configuration.

Value in the Event Recorder shows:

  • session: session that failed to allocate the socket.

◆ EvrNetTeln_InitServer()

__STATIC_INLINE void EvrNetTeln_InitServer ( uint32_t  num_sessions,
uint16_t  port,
uint16_t  idle_tout 
)

Event on Telnet server initialize (Op)

Parameters
num_sessionsnumber of available Telnet sessions
portlistening port number
idle_toutidle timeout in seconds (0= permanent connection)

The event InitServer is created when the Telnet server is initialized, that is, when the function netInitialize is executed.

Value in the Event Recorder shows:

  • sessions: number of Telnet sessions available.
  • port: port number to be used.
  • tout: duration of inactivity to close the session.

◆ EvrNetTeln_LineBufferUsage()

__STATIC_INLINE void EvrNetTeln_LineBufferUsage ( uint8_t  session,
uint32_t  num_char 
)

Event on Telnet server display command line buffer usage (Op)

Parameters
sessionsession number
num_charnumber of characters in command line buffer

The event LineBufferUsage is created to inform you about using the command line buffer, which is the number of characters stored in the line buffer.

Value in the Event Recorder shows:

  • session: Telnet server command line edit session.
  • num_char: number of characters in the line buffer.

◆ EvrNetTeln_LoginTimeoutExpired()

__STATIC_INLINE void EvrNetTeln_LoginTimeoutExpired ( uint8_t  session)

Event on Telnet server login timeout expired (Op)

Parameters
sessionsession number

The event LoginTimeoutExpired is created when the Telnet server failed to authenticate the user. The user did not provide credentials, so the authentication time has expired.

Value in the Event Recorder shows:

  • session: Telnet server session for authentication.

◆ EvrNetTeln_NegotiateFailed()

__STATIC_INLINE void EvrNetTeln_NegotiateFailed ( uint8_t  session)

Event on Telnet server option negotiation failed (Error)

Parameters
sessionsession number

The event NegotiateFailed is created when the Telnet server fails negotiating Telnet parameters. This happens when a Telnet client tries to connect to a server.

Value in the Event Recorder shows:

  • session: Telnet server negotiation session.

◆ EvrNetTeln_NegotiateStart()

__STATIC_INLINE void EvrNetTeln_NegotiateStart ( uint8_t  session)

Event on Telnet server option negotiation start (Op)

Parameters
sessionsession number

The event NegotiateStart is created when the Telnet server starts negotiating Telnet parameters such as echo, suppress-go-ahead, and so on. This happens when a Telnet client tries to connect to a server.

Value in the Event Recorder shows:

  • session: Telnet server negotiation session.

◆ EvrNetTeln_NegotiateSuccess()

__STATIC_INLINE void EvrNetTeln_NegotiateSuccess ( uint8_t  session)

Event on Telnet server option negotiation success (Op)

Parameters
sessionsession number

The event NegotiateSuccess is created when the Telnet server successfully negotiate Telnet parameters. The connect procedure will then move on to the next step. This happens when a Telnet client tries to connect to a server.

Value in the Event Recorder shows:

  • session: Telnet server negotiation session.

◆ EvrNetTeln_ProcessCommand()

__STATIC_INLINE void EvrNetTeln_ProcessCommand ( const char *  command,
uint32_t  length 
)

Event on Telnet server process client command (Op)

Parameters
commanduser entered command to process
lengthlength of the command string

The event ProcessCommand is created each time the user presses ENTER on the keyboard and finishes editing the command. The event notifies you of the entered command.

Value in the Event Recorder shows:

  • command: command entered by the user.

◆ EvrNetTeln_ProcessData()

__STATIC_INLINE void EvrNetTeln_ProcessData ( uint8_t  session,
uint32_t  length 
)

Event on Telnet server process client data (Op)

Parameters
sessionsession number
lengthlength of client data to process

The event ProcessData is created each time the user enters data, for example by pressing a key on the keyboard, and notifies the length of the data received. The telnet command is processed when you press ENTER.

Value in the Event Recorder shows:

  • session: Telnet server session.
  • len: length of the user data.

◆ EvrNetTeln_ReceiveFrame()

__STATIC_INLINE void EvrNetTeln_ReceiveFrame ( uint8_t  session,
uint32_t  length 
)

Event on Telnet server receive frame (Op)

Parameters
sessionsession number
lengthframe length in bytes

The event ReceiveFrame is created when the Telnet server receives the frame.

Value in the Event Recorder shows:

  • session: Telnet server session.
  • len: length of the received frame in bytes.

◆ EvrNetTeln_SendAuthorizationRequest()

__STATIC_INLINE void EvrNetTeln_SendAuthorizationRequest ( uint8_t  session)

Event on Telnet server send authorization request to the client (Op)

Parameters
sessionsession number

The event SendAuthorizationRequest is created when a welcome message is sent to the user requesting authorization. This happens when authentication is enabled for the server.

Value in the Event Recorder shows:

  • session: Telnet server session that opens.

◆ EvrNetTeln_SendInitialHeader()

__STATIC_INLINE void EvrNetTeln_SendInitialHeader ( uint8_t  session)

Event on Telnet server send initial telnet header to the client (Op)

Parameters
sessionsession number

The event SendInitialHeader is created when a welcome message is sent to the user. This happens when authentication for the server is disabled.

Value in the Event Recorder shows:

  • session: Telnet server session that opens.

◆ EvrNetTeln_SessionOpen()

__STATIC_INLINE void EvrNetTeln_SessionOpen ( uint8_t  session)

Event on Telnet server session open (Op)

Parameters
sessionsession number

The event SessionOpen is created when the Telnet server accepts a request to connect from the client and opens a server session to handle this connection. This happens when the Telnet client attempts to connect to the server.

Value in the Event Recorder shows:

  • session: Telnet server session for opening.

◆ EvrNetTeln_SetPassword()

__STATIC_INLINE void EvrNetTeln_SetPassword ( const char *  password,
uint32_t  length 
)

Event on Telnet server netTELNETs_SetPassword (API)

Parameters
passwordnew password
lengthlength of the password string

The event SetPassword is created when the Telnet server changes the password for the administrator account. This happens when the netTELNETs_SetPassword function is executed.

Value in the Event Recorder shows:

  • password: password to be set.

◆ EvrNetTeln_SetUsername()

__STATIC_INLINE void EvrNetTeln_SetUsername ( const char *  username,
uint32_t  length 
)

Event on Telnet server netTELNETs_SetUsername (API)

Parameters
usernamenew username
lengthlength of the username string

The event SetUsername is created when the Telnet server changes the username for the administrator account. This happens when the netTELNETs_SetUsername function is executed.

Value in the Event Recorder shows:

  • username: username to be set.

◆ EvrNetTeln_ShowPassword()

__STATIC_INLINE void EvrNetTeln_ShowPassword ( const char *  password,
uint32_t  length 
)

Event on Telnet server display password of the client (Op)

Parameters
passwordpassword entered by the client
lengthlength of the password string

The event ShowPassword is created when the Telnet server wants to display the password entered to authenticate the user.

Value in the Event Recorder shows:

  • password: password for the Telnet access.

◆ EvrNetTeln_ShowUsername()

__STATIC_INLINE void EvrNetTeln_ShowUsername ( const char *  username,
uint32_t  length 
)

Event on Telnet server display username of the client (Op)

Parameters
usernameusername entered by the client
lengthlength of the username string

The event ShowUsername is created when the Telnet server wants to display the user name entered to authenticate the user.

Value in the Event Recorder shows:

  • username: user name for the Telnet access.

◆ EvrNetTeln_SocketAborted()

__STATIC_INLINE void EvrNetTeln_SocketAborted ( uint8_t  session)

Event on Telnet server socket aborted (Op)

Parameters
sessionsession number

The event SocketAborted is created when the Telnet server connection is unexpectedly terminated from the client. The corresponding server session is then closed.

Value in the Event Recorder shows:

  • session: Telnet server session for closing.

◆ EvrNetTeln_SocketClosed()

__STATIC_INLINE void EvrNetTeln_SocketClosed ( uint8_t  session)

Event on Telnet server socket closed (Op)

Parameters
sessionsession number

The event SocketClosed is created when the Telnet server connection is unexpectedly closed from the client. The corresponding server session is then closed.

Value in the Event Recorder shows:

  • session: Telnet server session for closing.

◆ EvrNetTeln_StartService()

__STATIC_INLINE void EvrNetTeln_StartService ( uint16_t  port)

Event on Telnet server start service (Op)

Parameters
portlistening port number

The event StartService is created when the network library starts the Telnet server service. This happens automatically if the auto-start services are enabled, or when the netTELNETs_Start function is executed.

Value in the Event Recorder shows:

  • port: port number to be used.

◆ EvrNetTeln_StopService()

__STATIC_INLINE void EvrNetTeln_StopService ( void  )

Event on Telnet server stop service (Op)

The event StopService is created when the network library stops the Telnet server service. This happens when the netTELNETs_Stop function is executed.

◆ EvrNetTeln_UninitServer()

__STATIC_INLINE void EvrNetTeln_UninitServer ( void  )

Event on Telnet server de-initialize (Op)

The event UninitServer is created when the function netUninitialize is executed.

Value in the Event Recorder shows:

  • telnet

◆ EvrNetTeln_UserAccessDenied()

__STATIC_INLINE void EvrNetTeln_UserAccessDenied ( const void *  net_addr)

Event on Telnet server user denied access (Error)

Parameters
net_addrpointer to NET_ADDR address structure

The event UserAccessDenied is created when the Telnet server rejects the pending connection request for the client, because the user application has denied connection for this client. This happens when the netTELNETs_AcceptClient function returns false.

Value in the Event Recorder shows:

  • ip: IPv4 or IPv6 address of the client.
  • port: port number of the client.

◆ EvrNetTeln_UserLoginSuccess()

__STATIC_INLINE void EvrNetTeln_UserLoginSuccess ( uint8_t  session)

Event on Telnet server user login successful (Op)

Parameters
sessionsession number

The event UserLoginSuccess is created when the Telnet server successfully authenticates the user.

Value in the Event Recorder shows:

  • session: Telnet server session for authentication.