udpsocket - create an UDP socket and run a program
udpsocket: [options] host port command [arguments]
udpsocket creates a UDP socket, binds it to host and port and runs program with the remaining arguments.
options is a is a series of getopt or getopt_long style options. See below for more information.
The socket is described by host and port. host may be 0, allowing connections to any local IP address; or a dotted-decimal IP address, allowing connections only to that address; or a host name, allowing connections to the first IP address for that host. Host names are fed through qualification using dns_ip4_qualify.
port may be a name from /etc/services or a number; if it is 0, udpsocket will choose a free UDP port.
`N' may be a whitespace or comma separated list. The default is to move it to 5. Note that moving the socket to file descriptor 2 may disturb the output of error messages.
udpsocket will switch to that group id after the socket has been set up. GID has to be a positive integer.
udpsocket will switch to that user id after the socket has been set up. UID has to be a positive integer.
Usually used together with envuidgid.
Do not look up the local host name in the DNS. This information is used to set the environment variable UDPLOCALHOST.
After preparing to receive connections, print the local port number to standard output.
This is the default.
The use with an argument shows the long helptext of that option, without an argument it will list all options.
The use with an argument shows the long help for this option, without arguments it shows the long description of all options.
udpsocket sets the environment variables PROTO (to UDP), UDPLOCALPORT and UDPLOCALIP, and will set UDPLOCALHOST if this information is available. If udpsocket bound the socket to any local IP address then UDPLOCALIP will be ``0.0.0.0'' and UDPLOCALHOST will be unset.
# start a remote log receiving demon udpsocket 0 514 setuidgid remotelog unsyslogd
# prepare for amanda udpsocket 0 10080 setuidgid amanda \ udpwaitserver /whereever/amanda
unknown.
Uwe Ohse