Debian Codegraph @

whois/whois.h

raw
1 /*
2 Copyright (C) 1998-2026 Free Software Foundation, Inc.
3
4 This file is part of GNU Inetutils.
5
6 GNU Inetutils is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or (at
9 your option) any later version.
10
11 GNU Inetutils is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see `http://www.gnu.org/licenses/'. */
18
19 #ifndef _WHOIS_H
20 # define _WHOIS_H
21
22 /* 6bone referto: extension */
23 # define REFERTO_FORMAT "%% referto: whois -h %255s -p %15s %1021[^\n\r]"
24
25 /* String sent to RIPE servers - ONLY FIVE CHARACTERS! */
26 /* Do *NOT* change it if you don't know what you are doing! */
27 # define IDSTRING "Md4.5"
28
29 /* system features */
30 # ifdef ENABLE_NLS
31 # ifndef NLS_CAT_NAME
32 # define NLS_CAT_NAME "whois"
33 # endif
34 # ifndef LOCALEDIR
35 # define LOCALEDIR "/usr/share/locale"
36 # endif
37 # endif
38
39 /* NLS stuff */
40 # ifdef ENABLE_NLS
41 # include <libintl.h>
42 # include <locale.h>
43 # define _(a) (gettext (a))
44 # ifdef gettext_noop
45 # define N_(a) gettext_noop (a)
46 # else
47 # define N_(a) (a)
48 # endif
49 # else
50 # define _(a) (a)
51 # define N_(a) a
52 # endif
53
54
55 /* prototypes */
56 const char *whichwhois (const char *);
57 const char *whereas (int, struct as_del[]);
58 char *queryformat (const char *, const char *, const char *);
59 void do_query (const int, const char *);
60 const char *query_crsnic (const int, const char *);
61 int openconn (const char *, const char *);
62 void closeconn (const int);
63 void sighandler (int);
64 unsigned long myinet_aton (const char *);
65 int domcmp (const char *, const char *);
66 int domfind (const char *, const char *[]);
67
68 void err_quit (const char *, ...);
69 void err_sys (const char *, ...);
70
71
72 /* flags for RIPE-like servers */
73 const char *ripeflags = "acFlLmMrRSx";
74 const char *ripeflagsp = "gisTtvq";
75
76 /* Configurable features */
77
78 /* 6bone referto: support */
79 # define EXT_6BONE
80
81 /* Always hide legal disclaimers */
82 # undef ALWAYS_HIDE_DISCL
83
84 /* Default server */
85 # define DEFAULTSERVER "whois.internic.net"
86
87 #endif /* _WHOIS_H */