$Revision: 1.7 $
Whois query (wh) - connects to a whois server and returns result
Status: NOT REVIEWED, TESTED
Design and implementation by: Marek Bukowy
Note: still not final. Probably SK calls should be moved to the
calling routine
Included Files
- #include <include/erroutines.h>
- #include "include/socket.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <stdlib.h>
- #include <errno.h>
- #include <netdb.h>
- #include <signal.h>
- #include <stdio.h>
- #include <include/iproutines.h>
opens a connection to hostname and queries it,
sets sock to the socket number it got for this connection.
All reading and possibly other queries must be performed by
the caller.
er_ret_t WH_connect ( int* sock, char* hostname, int port )
opens a whois connection to hostname, queries it and
prints result on sock
er_ret_t WH_sock ( int sock, char* hostname, int port, char* query, int maxlines, int timeout )