1 /* 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government have not placed any restriction on its use or reproduction. 13 * 14 * Although all reasonable efforts have been taken to ensure the accuracy 15 * and reliability of the software and data, the NLM and the U.S. 16 * Government do not and cannot warrant the performance or results that 17 * may be obtained by using this software or data. The NLM and the U.S. 18 * Government disclaim all warranties, express or implied, including 19 * warranties of performance, merchantability or fitness for any particular 20 * purpose. 21 * 22 * Please cite the author in any work or product based on this material. 23 * 24 * =========================================================================== 25 * 26 * File Name: ni_types.h 27 * 28 * Author: Beatty, Gish 29 * 30 * Version Creation Date: 1/1/92 31 * 32 * $Revision: 6.8 $ 33 * 34 * File Description: 35 * 36 * 37 * Modifications: 38 * -------------------------------------------------------------------------- 39 * $Log: ni_types.h,v $ 40 * Revision 6.8 2012/02/19 03:45:25 lavr 41 * Cleanup of obsolete features 42 * 43 * Revision 6.7 2004/11/19 14:11:03 lavr 44 * Reinstate OBSOLETED eNII_ constants which still may be in use in some DEAD code in the toolkit 45 * 46 * Revision 6.5 2002/08/08 01:52:28 lavr 47 * Default dispatcher set to SERVICE 48 * 49 * Revision 6.4 2001/02/21 22:09:27 lavr 50 * SERVICE connector included 51 * 52 * Revision 6.3 1998/09/08 17:59:07 vakatov 53 * Added WWW/Firewall network interface 54 * 55 * Revision 6.2 1998/05/05 22:45:39 vakatov 56 * Added "eNII_Debug" network interface 57 * 58 * Revision 6.1 1998/03/30 17:56:06 vakatov 59 * Added ENIInterface enumerator definition and added "interface" field 60 * to the NI_Dispatcher struct 61 * 62 * Revision 5.3 1997/01/28 21:24:33 epstein 63 * move NodePtr definition to ncbimisc.h 64 * 65 * Revision 5.2 1996/06/28 17:14:39 epstein 66 * add job-penalty 67 * 68 * Revision 5.1 1996/06/27 17:18:17 epstein 69 * add load-balancing 70 * 71 * Revision 4.2 1996/04/29 15:29:10 epstein 72 * add disp to NI_HandPtr so that service-handle can encapsulate greater context 73 * 74 * Revision 4.1 1995/11/27 20:59:31 epstein 75 * add client support for direct-connection services 76 * 77 * Revision 1.19 1995/05/24 12:09:04 epstein 78 * add support for tracking of how many times a client IP has used a service within a time interval 79 */ 80 81 #ifndef _NI_TYPES_ 82 #define _NI_TYPES_ 83 84 #include <ncbi.h> 85 #include <asn.h> 86 87 #define NI_Handle MHandle /* for API use */ 88 #define NI_HandPtr MHandPtr /* for API use */ 89 90 91 typedef struct MHandle { 92 CharPtr hostname; /* name of peer machine */ 93 AsnIoPtr raip; /* ASNtool IO read pointer */ 94 AsnIoPtr waip; /* ASNtool IO write pointer */ 95 VoidPtr extra_proc_info; /* extra processing info, used externally */ 96 struct NI_Dispatcher PNTR disp; 97 } MHandle, PNTR MHandPtr; 98 99 100 /* The available connection interfaces 101 */ 102 typedef enum { 103 /* Refer to "s_NII" in "ni_lib_.c" when changing the enumerator ordering 104 * or adding new interfaces */ 105 eNII_Dispatcher = 0, /* old-fashioned NCBI dispatched-based connection | OBSOLETE */ 106 eNII_WWW, /* WWW-based connection | OBSOLETE */ 107 eNII_WWWFirewall, /* eNII_WWW + pass through the NCBI firewall daemon| OBSOLETE */ 108 eNII_WWWDirect, /* WWW-based stateless connection | OBSOLETE */ 109 eNII_Service, /* SERVICE-based connection */ 110 eNII_Debug, /* direct client-server connection */ 111 112 /* FEATURE: add new interfaces *above* this point(i.e. above eNII_Default), 113 * so that eNII_Default be equal to the number of avail. interfaces */ 114 eNII_Default /* let program try environment and config files */ 115 116 /* NII_DEFAULT will be used if user did not explicitly specify the interface 117 * and if application failed to find it in environment and config files */ 118 #define NII_DEFAULT eNII_Service 119 } ENIInterface; 120 121 122 typedef struct NI_Dispatcher { 123 ENIInterface interface; 124 Int2 referenceCount; /* # of services connected via this dispatcher */ 125 CharPtr adminInfo; /* info. regarding administrator */ 126 CharPtr motd; /* message of the day for user */ 127 } NI_Dispatcher, PNTR NI_DispatcherPtr; 128 129 130 #endif 131