1N/A * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. 1N/A * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. 1N/A * HAVE_IPV6 is traditionally configured at tcp_wrappers build time but for 1N/A * Solaris it must always be defined to keep the library interface binary 1N/A/* Structure to describe one communications endpoint. */ 1N/A#
else /* HAVE_IPV6 */ 1N/A#
endif /* HAVE_IPV6 */ 1N/A/* Structure to describe what we know about a service request. */ 1N/A int fd;
/* socket handle */ 1N/A char pid[
10];
/* access via eval_pid(request) */ 1N/A void (*
sink) ();
/* datagram sink function or 0 */ 1N/A void (*
hostname) ();
/* address to printable hostname */ 1N/A void (*
hostaddr) ();
/* address to printable address */ 1N/A/* Common string operations. Less clutter should be more readable. */ 1N/A * Initially, all above strings have the empty value. Information that 1N/A * cannot be determined at runtime is set to "unknown", so that we can 1N/A * distinguish between `unavailable' and `not yet looked up'. A hostname 1N/A * that we do not believe in is set to "paranoid". 1N/A/* Global functions. */ 1N/Aextern void rfc931();
/* client name from RFC 931 daemon */ 1N/Aextern char *
xgets();
/* fgets() on steroids */ 1N/A/* Global variables. */ 1N/A * Routines for controlled initialization and update of request structure 1N/A * attributes. Each attribute has its own key. 1N/A * Routines for delayed evaluation of request attributes. Each attribute 1N/A * type has its own access method. The trivial ones are implemented by 1N/A * macros. The other ones are wrappers around the transport-specific host 1N/A * name, address, and client user lookup methods. The request_info and 1N/A * host_info structures serve as caches for the lookup results. 1N/A/* Socket-specific methods, including DNS hostname lookups. */ 1N/A/* The System V Transport-Level Interface (TLI) interface. */ 1N/Aextern void tli_host();
/* look up endpoint addresses etc. */ 1N/A * Problem reporting interface. Additional file/line context is reported 1N/A * when available. The jump buffer (tcpd_buf) is not declared here, or 1N/Aextern void tcpd_warn(
char *, ...);
/* report problem and proceed */ 1N/Aextern void tcpd_jump(
char *, ...);
/* report problem and jump */ 1N/A * While processing access control rules, error conditions are handled by 1N/A * jumping back into the hosts_access() routine. This is cleaner than 1N/A * checking the return value of each and every silly little function. The 1N/A * (-1) returns are here because zero is already taken by longjmp(). 1N/A * In verification mode an option function should just say what it would do, 1N/A * instead of really doing it. An option function that would not return 1N/A * should clear the dry_run flag to inform the caller of this unusual 1N/A/* Bug workarounds. */