home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume39 / tcp_wrappers / part03 / init_client.c next >
Encoding:
C/C++ Source or Header  |  1993-09-29  |  796 b   |  33 lines

  1.  /*
  2.   * init_client(struct client_info *) initializes its client argument to
  3.   * suitable default values. All members are initialized to zeros, except
  4.   * for: hostname and address (which become "unknown"), and the remote
  5.   * username (which becomes a zero-length string).
  6.   * 
  7.   * Diagnostics are reported through syslog(3).
  8.   * 
  9.   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
  10.   */
  11.  
  12. #ifndef lint
  13. static char sccsid[] = "@(#) init_client.c 1.1 93/09/24 19:49:01";
  14. #endif
  15.  
  16. /* Local stuff. */
  17.  
  18. #include "log_tcp.h"
  19.  
  20. /* init_client - initialize client info to suitable default values */
  21.  
  22. void    init_client(client)
  23. struct client_info *client;
  24. {
  25.     static struct client_info default_info = {
  26.     FROM_UNKNOWN,
  27.     FROM_UNKNOWN,
  28.     "",
  29.     };
  30.  
  31.     *client = default_info;
  32. }
  33.