The command getpeer expects a socket as its stdin, and prints out the peer IP address and port numbers. It is simply a command line equivalent for the getpeername socket library function. It works with both TCP and UDP sockets.
Both HTTP and RTSP use a zero-length line, ie. one matching /^$/, to demarkate the data from the request or response header fields. This can be correctly handled in perl or a stream editor like awk or sed, but not by a shell. The command getparams echos stdin to stdout until it hits a zero-length line, and can be used to parse HTTP and RTSP messages. It understands and silently deletes carriage-returns.
The tool crlf echos stdin to stdout, inserting carriage-returns appropriately. It is to be used only when outputting a text file. In our RTSP server, it is used to output the $Out file generated by the application do_method functions (see the server API).
Usage: atomic file [+-] [delta]Note that the Unix semaphores can be directly used in perl, as well as by invoking the syscall command.
Upsh creates a Unix domain socket pipe and executes shell commands received on that pipe. CGI programs echo the background shell commands to the pipe using upsend. The approach is Unix-friendly, portable (works on BSD, System V and other flavors without ado), and can be adequately secured, because the commands do not go on the network and the pipe is protected by Unix permissions.
The command hmsadd adds command line time arguments in HH.MM.SS format and prints the result.
The two tools are generally sufficient for performing time conversions in the RTSP server application interface (see API). See also the Utime class in the Real Time Scheduler library, which can be used to move the time conversions to C/C++ code.
[ Research home page | IBM home page | Search | ContactIBM | Legal | Author ]