-
-
Notifications
You must be signed in to change notification settings - Fork 3
udpclient.1
udpclient - log messages via UDP
udpclient -h host -p port -r responsesize -t timeout [message1] [message2] [...]
udpclient communicates with udplogger(8) using UDP. It simply sends message1, message2 separated by white space in a single line. If no message arguments are given, udpclient read file descriptor 0 to send messages. udpclient can also read messages from servers if -r option is provided. udpclient is a generic udp client and can be used with other servers which use datagram sockets. See example below for a generic usage.
-h host
Connect to host host
-p port
Connect to port port
-r responsesize
With this option, udpclient will read responsesize bytes of data
from remote server. The data will be printed on file descriptor 2. You
can use shell redirection to redirect the output to a file.
-t timeout
With this option, udpclient will timeout after timeout seconds
when -r is given. default is 5 seconds
This example uses udpclient to send a packet to greylisting server on localhost, port 1999
printf "I127.0.0.1\0Ftestuser01@example.com\0Ttestuser01@example.com\0Ttestuser02@example.com\0\0" > /tmp/in
udpclient -h 127.0.0.1 -p 1999 2>/tmp/out < /tmp/in
0 if all steps were successful, non-zero otherwise. If any of the steps fail, a diagnostic message is printed.
Manvendra Bhangui