Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 85 lines (61 sloc) 2.825 kb
b4734548 » Henning Rogge
2009-05-26 First version of new http/txt server for OLSR.
1 HTTP/Telnet services in olsrd
2 ===================================
3
4 Olsrd contains an integrated telnet and http server core, which is
5 used by plugins and the core to provide easy access the html pages
6 and text commands.
7
8
9 HTTP services
10 -------------------
11
12 The http server core supports both GET and POST parameter processing,
13 allows the plugin/provider to set up a ACL and provides http basic
14 password authentification (should be used together with an https proxy
15 for security).
16
17 Plugins use the function olsr_com_add_htmlsite() to set up a static
18 webpage for a filename or a whole path, the function
19 olsr_com_add_htmlhandler() can be used to set up a callback for dynamic
20 webpage generation.
21
22 olsr_com_set_htmlsite_acl_auth() can be used on the returned
23 olsr_html_site pointer from one of the "add" functions to set up an
24 ip ACL and/or a list of username/passwords. The username/password
25 strings must be base64 encoded as defined in the http basic
26 authentification standard.
27 (see http://en.wikipedia.org/wiki/Basic_access_authentication )
28
29
30 Telnet services
31 ---------------------
32
33 The telnet server implements a simple text interface to the olsr core,
34 which can be equipped with any number of commands.
35
36 The first way to use a telnet command is to enter the commands name,
37 followed by it's parameters (similar to a normal console). After the
38 command is finished, a new prompt will be displayed and you can
39 enter another command.
40
41 The second way is to prefix a command with a '/' character. No parameters
42 can be used in this mode, but multiple commands can be concatenated in
43 a single line. After the last command finished the telnet server will
44 hang up. This mode emulates the commands of the old txtinfo plugin.
45
46 Some commands will not stop after a predefined output but will continue
47 to output data to the console. They can be stopped by sending a single
48 character to the telnet server.
49
50 The server will hang up the connection if no input/output happens for
51 a certain period of time (default 120 seconds).
52
53
54 Builtin telnet commands
55 -----------------------------
56
57 "quit" or "exit":
58 Ends the telnet session and hangup the connection.
59
60 "help":
61 Displays a list of available commands.
62
63 "help <commandname>":
64 Displays a help text for a certain command (if available).
65
66 "csv":
67 Activates the csv (comma separated value) output mode. All
68 commands capable to use this flag will switch to a CSV output
69 format.
70
71 "csvoff"
72 Deactivates the csv output mode.
73
74 "timeout <seconds>":
75 Sets the telnet session timeout to a new value. A parameter
76 of '0' will deactivate the timeout.
77
78 "version"
79 Displays a version string of the olsrd.
80
81 "repeat <seconds> <command and parameters>":
82 Calls another internal command every few seconds. Of course
83 the other command must not be one with continous output
84 itself.
85
Something went wrong with that request. Please try again.