Next: , Up: Inetd-Style Components   [Contents][Index]


3.3.9.1 Built-in Inetd Services

Built-in or internal services are such inetd-style components that are supported internally by pies and do not require external programs. In pies version 1.8 those are:

echo

Send back any received data. Defined in RFC 862.

discard

Read the data and discard them. Defined in RFC 863.

time

Return a machine readable date and time as seconds since the Epoch. Defined in RFC 868.

daytime

Return current date and time in human-readable format. Defined in RFC 867.

chargen

Send a continuous stream of ASCII printable characters without regard to the input. Defined in RFC 864

qotd

Send a ‘quotation of the day’ text without regard to the input. Defined in RFC 865.

tcpmux

TCP Port Service Multiplexer. Defined in RFC 1078.

A definition of a built-in service component must have the internal flag (see flags) set. It may not contain command or program statements, as built-in services do not need external programs. Instead, a service declaration must be present:

Config: component: service name

Set the built-in service name. Its argument is one of the keywords listed in the above table.

For example, the following component declaration defines a standard TCP-based echo service:

component echo {
        socket "inet://0.0.0.0:echo";
        service echo;
        flags internal;
}

It corresponds to the following inetd.conf line:

echo stream  tcp     nowait  root    internal

Another built-in services are defined in the same manner, replacing ‘echo’ in the service field with the corresponding service name.

The ‘qotd’ service reads the contents of the qotd file and sends it back to the client. By default the ‘qotd’ file is located in the local state directory and named instance.qotd (where instance is the name of the pies instance; see instances). This default location can be changed using the following statement:

Config: qotd-file file-name

Set the name of the ‘quotation-of-the-day’ file.

The text read from the ‘qotd’ file is preprocessed, by replacing each LF character (ASCII 10) with two characters: CR (ASCII 13) followed by LF. The resulting text is truncated to 512 characters.

The use of ‘tcpmux’ services is covered below.


Next: , Up: Inetd-Style Components   [Contents][Index]