File modules/wh/wh_queries.c

  $Revision: 1.10 $

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


Global Function WH_connect()

 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 )
Calls: bcopy(), bind(), bzero(), close(), connect(), gethostbyname_r(), socket()
Called by: WH_sock()modules/wh/wh_queries.c

Global Function WH_sock()

 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 )
Calls: SK_putc()modules/sk/sk_socket.c
  WH_connect()modules/wh/wh_queries.c
  __filbuf(), close(), fclose(), fdopen(), fflush(), fprintf()
Called by: run_referral()modules/qi/query_instructions.c