fred-mod-whoisd
/builddir/build/BUILD/fred-mod-whoisd-3.12.2/whois-client.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2006-2018 CZ.NIC, z. s. p. o.
3 *
4 * This file is part of FRED.
5 *
6 * FRED 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
9 * (at your option) any later version.
10 *
11 * FRED is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with FRED. If not, see <https://www.gnu.org/licenses/>.
18 */
27#ifndef WHOIS_CLIENT_H
28#define WHOIS_CLIENT_H
29
30#include "Logger.h"
31
40#define CORBA_OK 0
42#define CORBA_OK_LIMIT 1
43#define CORBA_SERVICE_FAILED 2
44#define CORBA_INTERNAL_ERROR 3
45#define CORBA_UNKNOWN_ERROR 4
54#define TIME_BUFFER_LENGTH 60
56#define MAX_ERROR_MSG_LEN 100
61#define MAX_OBJECT_COUNT 100
62
65typedef void *service_Whois;
68typedef void *service_Logger;
69
70#define T_NONE 0 /* Nothing. */
71#define T_DOMAIN 1 /* Object type domain. */
72#define T_NSSET 2 /* Object type nsset. */
73#define T_CONTACT 4 /* Object type contact. */
74#define T_REGISTRAR 8 /* Object type registrar. */
75#define T_KEYSET 16 /* Object type keyset. */
76
80typedef enum {
81 SA_NONE = 0,
82 SA_REGISTRANT,
83 SA_ADMIN_C,
84 SA_TEMP_C,
85 SA_NSSET,
86 SA_KEYSET,
87 SA_NSERVER,
88 SA_TECH_C
90
94/*
95 * This enum reflects database table request_type
96 */
97typedef enum {
98 Info = 1105,
100
104typedef struct {
107 int type;
108 const char *value;
110
112typedef struct {
113 char *domain;
115 char **admin_c;
116 char **temp_c;
117 char *nsset;
118 char *keyset;
119 char *registrar;
120 char **status;
122 char *changed;
123 char *expire;
127
129typedef struct {
130 char *nsset;
131 char **nserver;
133 char **tech_c;
134 char *registrar;
135 char *created;
136 char *changed;
137}obj_nsset;
138
140typedef struct {
142 int alg;
144 char *digest;
147
149typedef struct {
150 int flags;
152 int alg;
155
157typedef struct {
158 char *keyset;
160 char **tech_c;
165 char *registrar;
166 char *created;
167 char *changed;
168} obj_keyset;
169
171typedef struct {
172 char *contact;
173 char *org;
174 char *name;
175 char **address;
176 char *phone;
177 char *fax_no;
178 char *e_mail;
179 char *registrar;
180 char *created;
181 char *changed;
186
188typedef struct {
189 char *registrar;
190 char *org;
191 char *url;
192 char *phone;
193 char **address;
195
197typedef struct {
198 int type;
199 union {
200 obj_domain d;
201 obj_nsset n;
202 obj_keyset k;
203 obj_contact c;
205 }obj;
207
219int
221 const whois_request *wr,
222 general_object *objects,
223 char *timebuf,
224 char *errmsg);
225
235void whois_release_data(general_object *object_list);
236
237int check_duplicates(int type, char *handle, general_object *objects, int index_free);
238
249int
251 const char *sourceIP,
252 const char *content,
253 ccReg_RequestProperties *properties,
254 ccReg_TID *log_entry_id,
255 char *errmsg);
256
267int
269 const char *content,
270 ccReg_RequestProperties *properties,
271 ccReg_TID log_entry_id,
272 CORBA_long result_code,
273 char *errmsg);
274
275#endif /* WHOIS_CLIENT_H */
Definition: whois-client.h:197
int type
Definition: whois-client.h:198
Definition: whois-client.h:149
int flags
Definition: whois-client.h:150
int protocol
Definition: whois-client.h:151
int alg
Definition: whois-client.h:152
char * public_key
Definition: whois-client.h:153
Definition: whois-client.h:140
int alg
Definition: whois-client.h:142
char * digest
Definition: whois-client.h:144
int key_tag
Definition: whois-client.h:141
int max_sig_life
Definition: whois-client.h:145
int digest_type
Definition: whois-client.h:143
Definition: whois-client.h:171
char * name
Definition: whois-client.h:174
char * changed
Definition: whois-client.h:181
char * registrar
Definition: whois-client.h:179
int disclose
Definition: whois-client.h:182
char * created
Definition: whois-client.h:180
char ** address
Definition: whois-client.h:175
char * fax_no
Definition: whois-client.h:177
char * phone
Definition: whois-client.h:176
char * org
Definition: whois-client.h:173
char * e_mail
Definition: whois-client.h:178
char * contact
Definition: whois-client.h:172
Definition: whois-client.h:112
char * registrant
Definition: whois-client.h:114
char * validated_to
Definition: whois-client.h:124
char ** temp_c
Definition: whois-client.h:116
int * status_ids
Definition: whois-client.h:125
char * changed
Definition: whois-client.h:122
char * domain
Definition: whois-client.h:113
char ** admin_c
Definition: whois-client.h:115
char * keyset
Definition: whois-client.h:118
char * expire
Definition: whois-client.h:123
char * nsset
Definition: whois-client.h:117
char * registrar
Definition: whois-client.h:119
char ** status
Definition: whois-client.h:120
char * registered
Definition: whois-client.h:121
Definition: whois-client.h:157
keyset_dsrecord * ds
Definition: whois-client.h:162
char ** tech_c
Definition: whois-client.h:160
char * created
Definition: whois-client.h:166
char * changed
Definition: whois-client.h:167
keyset_dnskey * keys
Definition: whois-client.h:163
char * keyset
Definition: whois-client.h:158
char * registrar
Definition: whois-client.h:165
Definition: whois-client.h:129
char ** tech_c
Definition: whois-client.h:133
char ** nserver_addrs
Definition: whois-client.h:132
char * nsset
Definition: whois-client.h:130
char * changed
Definition: whois-client.h:136
char * registrar
Definition: whois-client.h:134
char ** nserver
Definition: whois-client.h:131
char * created
Definition: whois-client.h:135
Definition: whois-client.h:188
char ** address
Definition: whois-client.h:193
char * url
Definition: whois-client.h:191
char * phone
Definition: whois-client.h:192
char * registrar
Definition: whois-client.h:189
char * org
Definition: whois-client.h:190
Definition: whois-client.h:104
search_axis axe
Definition: whois-client.h:105
int norecursion
Definition: whois-client.h:106
const char * value
Definition: whois-client.h:108
int type
Definition: whois-client.h:107
int whois_close_log_message(service_Logger service, const char *content, ccReg_RequestProperties *properties, ccReg_TID log_entry_id, CORBA_long result_code, char *errmsg)
Definition: whois-client.c:1262
whois_action_type
Definition: whois-client.h:97
int check_duplicates(int type, char *handle, general_object *objects, int index_free)
Definition: whois-client.c:182
void * service_Logger
Definition: whois-client.h:68
void whois_release_data(general_object *object_list)
Definition: whois-client.c:1434
search_axis
Definition: whois-client.h:80
int whois_corba_call(service_Whois service, const whois_request *wr, general_object *objects, char *timebuf, char *errmsg)
Definition: whois-client.c:1333
int whois_log_new_message(service_Logger service, const char *sourceIP, const char *content, ccReg_RequestProperties *properties, ccReg_TID *log_entry_id, char *errmsg)
Definition: whois-client.c:1190
void * service_Whois
Definition: whois-client.h:65