4 * Author: Mark R. Prior
5 * Communications and Systems Branch
6 * Information Technology Division
7 * The University of Adelaide
8 * E-mail: mrp@itd.adelaide.edu.au
10 * Copyright: (C) 1992, The University of Adelaide
13 * This is an experimental implementation of the proposed IETF
14 * WNILS WG update to the whois/nicname protocol (whois++).
16 * Redistribution and use in source and binary forms are permitted
17 * provided that the above copyright notice and this paragraph are
18 * duplicated in all such forms and that any documentation,
19 * advertising materials, and other materials related to such
20 * distribution and use acknowledge that the software was developed
21 * by the University of Adelaide. The name of the University may not
22 * be used to endorse or promote products derived from this software
23 * without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
25 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
26 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
34 #if defined(INTERNATIONAL)
39 #include <sys/types.h>
40 #include <sys/param.h>
42 #include <netinet/in.h>
47 #define EQ(x,y) (strcasecmp(x,y) == 0)
51 extern char *sys_errlist[];
52 #define strerror(_e) ( ( ( (_e) >= 0 ) && ( (_e) < sys_nerr ) ) ? \
53 sys_errlist[(_e)] : "Undocumented error code" )
67 #if !defined(ABRIDGED_LIMIT)
68 #define ABRIDGED_LIMIT 10
70 #if !defined(DEFAULT_LDAPHOST)
71 #define DEFAULT_LDAPHOST "localhost"
73 #if !defined(DEFAULT_SIZELIMIT)
74 #define DEFAULT_SIZELIMIT 50
76 #if !defined(DEFAULT_TIMELIMIT)
77 #define DEFAULT_TIMELIMIT 60
79 #if !defined(HELP_DIRECTORY)
80 #define HELP_DIRECTORY "/usr/local/isode/help/whois++"
82 #if !defined(CONFIG_DIRECTORY)
83 #define CONFIG_DIRECTORY "/usr/local/isode/etc/whois++"
85 #if !defined(DEFAULT_LANGUAGE)
86 #define DEFAULT_LANGUAGE "english"
89 #define ATTRIBUTE_INCREMENT 10
90 #define TABLE_INCREMENT 10
91 #define DEFAULT_LINE_LENGTH 80
92 #define MIN_LINE_LENGTH 40
93 #define MAX_LINE_LENGTH 200
103 #define CONSTRAINTS 6
109 #define SEARCH_ALL 12
124 #define LINE_LENGTH 27
133 EXTERN int debug, outputFormat, lineLength, holdConnection, log;
134 EXTERN int maxHits, numberOfTemplates, tableSize, maximumSize;
135 EXTERN char *program, *ldaphost, *language, *locale, *base;
136 EXTERN char *contact, *hostname, *user, *password, *helpDir;
137 EXTERN char *configDir, *organisation, *defaultLanguage;
139 EXTERN char **category;
140 EXTERN table *templateTranslationTable;
142 extern int displayDescribe(), parseCommand();
143 extern void needHelp();
144 extern void showTemplate(), listTemplates();
145 extern char **specifyAttributes();
146 extern char *lowerCase(), *version(), *attributeLabel();
147 extern char *rfc931_name();