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>
46 #define EQ(x,y) (strcasecmp(x,y) == 0)
50 extern char *sys_errlist[];
51 #define strerror(_e) ( ( ( (_e) >= 0 ) && ( (_e) < sys_nerr ) ) ? \
52 sys_errlist[(_e)] : "Undocumented error code" )
66 #if !defined(ABRIDGED_LIMIT)
67 #define ABRIDGED_LIMIT 10
69 #if !defined(DEFAULT_LDAPHOST)
70 #define DEFAULT_LDAPHOST "localhost"
72 #if !defined(DEFAULT_SIZELIMIT)
73 #define DEFAULT_SIZELIMIT 50
75 #if !defined(DEFAULT_TIMELIMIT)
76 #define DEFAULT_TIMELIMIT 60
78 #if !defined(HELP_DIRECTORY)
79 #define HELP_DIRECTORY "/usr/local/isode/help/whois++"
81 #if !defined(CONFIG_DIRECTORY)
82 #define CONFIG_DIRECTORY "/usr/local/isode/etc/whois++"
84 #if !defined(DEFAULT_LANGUAGE)
85 #define DEFAULT_LANGUAGE "english"
88 #define ATTRIBUTE_INCREMENT 10
89 #define TABLE_INCREMENT 10
90 #define DEFAULT_LINE_LENGTH 80
91 #define MIN_LINE_LENGTH 40
92 #define MAX_LINE_LENGTH 200
102 #define CONSTRAINTS 6
108 #define SEARCH_ALL 12
123 #define LINE_LENGTH 27
132 EXTERN int debug, outputFormat, lineLength, holdConnection, log;
133 EXTERN int maxHits, numberOfTemplates, tableSize, maximumSize;
134 EXTERN char *program, *ldaphost, *language, *locale, *base;
135 EXTERN char *contact, *hostname, *user, *password, *helpDir;
136 EXTERN char *configDir, *organisation, *defaultLanguage;
138 EXTERN char **category;
139 EXTERN table *templateTranslationTable;
141 extern int displayDescribe(), parseCommand(char *query);
142 extern void needHelp(char *reason);
143 extern void showTemplate(char *template), listTemplates(char *query);
144 extern char **specifyAttributes(char *objectClass);
145 extern char *lowerCase(char *string), *version(void), *attributeLabel();
146 extern char *rfc931_name();
147 extern char *templateToObjectClass(char *template);