hostname_lookup accepts a maximum of two arguments.
If only one argument is supplied and it is not "loop" then the program expects that it is performing a DNS forward lookup. The argument is expected to be a DNS name. The program runs a forward lookup query and returns the IP address to stdout. If an IP address is supplied instead the supplied value is printed to stdout.
If two arguments are supplied then the first argument tells the program whether to perform a forward or a reverse lookup. There are several possible values for the argument, fwd, rev, fwd_wait, rev_wait, or loop.
The second argument is the hostname or the IP address as appropriate.
If an IP address is supplied for the <hostname> argument the value is simply returned without any lookup being performed.
This command may be issued as <arg1> of the command line arguments or may be used in loop mode.
This command may be issued as <arg1> of the command line arguments or may be used in loop mode.
This command may only be issued as <arg1> of the command line arguments. It may not be used in loop mode.
The program exits after issuing the response.
This command may only be issued as <arg1> of the command line arguments. It may not be used in loop mode.
The program exits after issuing the response.
hostname_lookup rev 127.0.0.1