IODP - input/output descriptors protocol
This text documents version 1.0 of the
input/output descriptors protocol,
a protocol designed to describe file, socket or pipe descriptors
to ease their transfer between programs.
IODP is not meant to describe every possible state of a socket
or file.
IODP uses environment variables to describe i/o descriptors.
This limits the use of the protocol to systems having proper
environment semantics, for example unixoid systems.
The following table lists the environment variables defined as of
the time of writing. n stands for a number. m stands
for another number.
- IODP
-
It holds a list of file descriptors for which descriptions are available.
The comma character is used to separate list elements.
If this variable is not set or is set to an empty value then the IODP
protocol is not used and any environment variables starting with the
string IODP must be ignored.
Example:
IODP=5,10
Other environment variables start with IODP_, the file descriptor
number and another underscore. Example:
the names of environment variables describing
file descriptor 6 all start with IODP_6_.
Environment variables with names containing
file descriptors which are not included in $IODP must be ignored.
- IODP_n_PROTO
-
Describes the kind of descriptor n. This environment variable
must exist for every descriptor listed in $IODP.
IODP protocol descriptons are documented seperately, see below.
- IODP_n_SYMNAME
-
a symbolic name for the file descriptor. This variable is
optional. The client may use it as it pleases.
- IODP_n_LOCALNAME
-
a protocol dependant name for the file descriptor, usually a
host or file name. This variable is optional.
- IODP_n_LOCALADDRm
-
a protocol specified address for the local part of a connection.
This will quite often simply be a file name. This variable is
optional but mandatory for some protocols.
m stands for a number and starts with 1.
- IODP_n_FLAGS
-
a string of characters. Values include:
- r
-
file descriptor may be read from.
- w
-
file descriptor may be written to.
- a
-
file descriptor may be used as argument to the accept
system call (that means that n is a file descriptor
in listen state).
- C
-
the file descriptor is connected (useful for sockets).
In that case IODP_n_REMOTEADDR and/or
IODP_n_REMOTENAME may be set.
- S
-
file descriptor is seekable.
- T
-
file descriptor points to a terminal device (or pseudo terminal).
- IODP-TCP4
-
describes IODP for TCP over ip version 4 connections.
- IODP-UDP4
-
describes IODP for UDP over ip version 4.
- IODP-UXSTREAM
-
describes IODP for unix domain stream sockets.
- IODP-UXDGRAM
-
describes IODP for unix domain datagram sockets.
- IODP-FILE
-
describes IODP for normal files, including pipes.
IODP over UDP/IP version 4: iodp-udp4(5),
IODP over TCP/IP version 4: iodp-tcp4(5),
IODP over unix domain stream sockets: iodp-uxstream(5),
IODP over unix domain datagram sockets: iodp-uxdgram(5),
and
IODP for file handles: iodp-file(5).