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

  1.  /*
  2.   * refuse() reports a refused connection, and takes the consequences: in
  3.   * case of a datagram-oriented service, the unread datagram is taken from
  4.   * the input queue (or inetd would see the same datagram again and again);
  5.   * the program is terminated.
  6.   * 
  7.   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
  8.   */
  9.  
  10. #ifndef lint
  11. static char sccsid[] = "@(#) refuse.c 1.4 93/09/11 20:45:19";
  12. #endif
  13.  
  14. /* System libraries. */
  15.  
  16. #include <syslog.h>
  17.  
  18. /* Local stuff. */
  19.  
  20. #include "log_tcp.h"
  21.  
  22. /* refuse - refuse request from bad host */
  23.  
  24. void    refuse(client)
  25. struct client_info *client;
  26. {
  27.     syslog(deny_severity, "refused connect from %s", hosts_info(client));
  28.     clean_exit(client);
  29.     /* NOTREACHED */
  30. }
  31.