OONF Telnet Plugin

From OLSR.org Wiki
Jump to: navigation, search

The OONF Telnet Plugin is a lightweight telnet server.

It uses the OONF Packet Socket Plugin to provide both IPv4 and IPv6 access to the webpages.

Each telnet command has a callback that is triggered when the command is sent to the telnet server.

All plugins that add telnet commands are listed in the Telnet Commands category.

Chaining telnet command

Instead of telnet commands line by line, multiple of them can be put into a single line by beginning the input with "/" and putting another "/" between each command.

This is typically used for easy scripting.

echo "/echo help for repeat command/help repeat" | nc 2009

Built in commands

While many plugins add new telnet commands, there are a couple of built in commands that are always available.


This command ends the telnet session. Not necessary when chaining commands.


This command outputs a generic help text with a list of known commands.

When the name of a command is provided as a parameter, the help commands prints a help text about the specific command.


This command prints its parameter(s) back to the telnet output. Its normally used for scripting to provide some fixed text before or after a command.


This commands repeats a different telnet command every x seconds until the user sends a new line.

It is not available for chained commands.


This command sets the timeout of the telnet session measured in seconds.


This commands outputs the version of the API and the linked plugins.


The plugin defines the telnet configuration section with three settings.

Key Default Type Limits
acl default_accept ACL ipv4, ipv6
bindto, ::1, default_reject ACL ipv4, ipv6
port 2009 integer 1-65535, no fractions
allowed_sessions 3 integer 3-1024
timeout 120 clock

acl defines the IP addresses that are allowed to use the Telnet socket.

bindto defines the IP addresses which the Telnet socket will be bound to.

port defines the TCP port number of the Telnet socket. The value must be between 1 and 65535 without fractional digits.

allowed_sessions defines the maximum number of open concurrent sessions.

timeout defines the time interval until an idle session is closed.