Skip to content

udpclient.1

Manvendra Bhangui edited this page Dec 13, 2024 · 5 revisions

NAME

udpclient - log messages via UDP

SYNOPSIS

udpclient -h host -p port -r responsesize -t timeout [message1] [message2] [...]

DESCRIPTION

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.

OPTIONS

-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

Example

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

RETURN VALUE

0 if all steps were successful, non-zero otherwise. If any of the steps fail, a diagnostic message is printed.

HISTORY

Manvendra Bhangui

SEE ALSO

udplogger(8), multilog(8),

Clone this wiki locally