home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume23 / log_tcp / part01 / log_tcp.h < prev    next >
C/C++ Source or Header  |  1991-10-19  |  742b  |  28 lines

  1. /* @(#) log_tcp.h 1.1 91/10/02 23:01:55 */
  2.  
  3.  /*
  4.   * Structure filled in by the fromhost() routine. Prerequisites:
  5.   * <sys/types.h> and <sys/param.h>.
  6.   */
  7.  
  8. #ifndef MAXHOSTNAMELEN
  9. #define MAXHOSTNAMELEN    1024
  10. #endif
  11.  
  12. struct from_host {
  13.     int     sock_type;            /* socket type, see below */
  14.     char    source[MAXHOSTNAMELEN + 1];    /* host name or address */
  15. };
  16.  
  17. /* Socket types: 0 means unknown. */
  18.  
  19. #define    FROM_CONNECTED        1    /* connection-oriented */
  20. #define    FROM_UNCONNECTED    2    /* non connection-oriented */
  21.  
  22. /* Global functions. */
  23.  
  24. extern int fromhost();            /* get/validate remote host info */
  25. extern int hosts_access();        /* access control */
  26. extern void refuse();            /* refuse request */
  27. extern void shell_cmd();        /* execute shell command */
  28.