line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::EPP::ResponseCodes; |
2
|
1
|
|
|
1
|
|
6
|
use base qw(Exporter); |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
111
|
|
3
|
1
|
|
|
1
|
|
6
|
use vars qw(@EXPORT); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
59
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Net::EPP::ResponseCodes - a module to export some constants that |
9
|
|
|
|
|
|
|
correspond to EPP response codes |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Net::EPP::ResponseCodes; |
14
|
|
|
|
|
|
|
use Net::EPP::Simple; |
15
|
|
|
|
|
|
|
use strict; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $epp = Net::EPP::Simple->new( |
18
|
|
|
|
|
|
|
host => 'epp.nic.tld', |
19
|
|
|
|
|
|
|
user => 'my-id', |
20
|
|
|
|
|
|
|
pass => 'my-password', |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $result = $epp->domain_transfer_request('example.tld', 'foobar', 1); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
if ($result) { |
26
|
|
|
|
|
|
|
print "Transfer initiated OK\n"; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
} else { |
29
|
|
|
|
|
|
|
if ($Net::EPP::Simple::Code == OBJECT_PENDING_TRANSFER) { |
30
|
|
|
|
|
|
|
print "Error: domain is already pending transfer\n"; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
} elsif ($Net::EPP::Simple::Code == INVALID_AUTH_INFO) { |
33
|
|
|
|
|
|
|
print "Error: invalid authcode provided\n"; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} elsif ($Net::EPP::Simple::Code == OBJECT_DOES_NOT_EXIST) { |
36
|
|
|
|
|
|
|
print "Error: domain not found\n"; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} elsif ($Net::EPP::Simple::Code == STATUS_PROHIBITS_OP) { |
39
|
|
|
|
|
|
|
print "Error: domain cannot be transferred\n"; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
} else { |
42
|
|
|
|
|
|
|
print "Error code $Net::EPP::Simple::Code\n"; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Every response sent to the client by an EPP server contains a CresultE> |
50
|
|
|
|
|
|
|
element that has a C attribute. This is a four-digit |
51
|
|
|
|
|
|
|
numeric code that describes the result of the request. This module exports |
52
|
|
|
|
|
|
|
a set of constants that provide handy mnemonics for each of the defined |
53
|
|
|
|
|
|
|
codes. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 EXPORTS |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
C exports the following constants. The number in |
58
|
|
|
|
|
|
|
brackets is the integer value associated with the constant. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 Successful command completion responses (1nnn) |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=over |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item OK (1000) |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item OK_PENDING (1001) |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item OK_NO_MESSAGES (1300) |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item OK_MESSAGES (1301) |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item OK_BYE (1500) |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=back |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 Command error responses (2nnn) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head3 Protocol Syntax |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=over |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item UNKNOWN_COMMAND (2000) |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item SYNTAX_ERROR (2001) |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item USE_ERROR (2002) |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item MISSING_PARAM (2003) |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item PARAM_RANGE_ERROR (2004) |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item PARAM_SYNTAX_ERROR (2005) |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=back |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head3 Implementation-specific Rules |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=over |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item UNIMPLEMENTED_VERSION (2100) |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item UNIMPLEMENTED_COMMAND (2101) |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item UNIMPLEMENTED_OPTION (2102) |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item UNIMPLEMENTED_EXTENSION (2103) |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item BILLING_FAILURE (2104) |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item NOT_RENEWABLE (2105) |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item NOT_TRANSFERRABLE (2106) |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=back |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head3 Security (22nn) |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=over |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item AUTHENTICATION_ERROR (2200) |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=item AUTHORISATION_ERROR (2201) |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=item AUTHORIZATION_ERROR (2201) |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=item INVALID_AUTH_INFO (2202) |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=back |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head3 Data Management (23nn) |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=over |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item OBJECT_PENDING_TRANSFER (2300) |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=item OBJECT_NOT_PENDING_TRANSFER (2301) |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item OBJECT_EXISTS (2302) |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=item OBJECT_DOES_NOT_EXIST (2303) |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=item STATUS_PROHIBITS_OP (2304) |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=item ASSOC_PROHIBITS_OP (2305) |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item PARAM_POLICY_ERROR (2306) |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=item UNIMPLEMENTED_OBJECT_SERVICE (2307) |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item DATA_MGMT_POLICY_VIOLATION (2308) |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=back |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head3 Server System (24nn) |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=over |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item COMMAND_FAILED (2400) |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=back |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head3 Connection Management (25nn) |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=over |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=item COMMAND_FAILED_BYE (2500) |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=item AUTH_FAILED_BYE (2501) |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=item SESSION_LIMIT_EXCEEDED_BYE (2502) |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=back |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=cut |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
# |
177
|
|
|
|
|
|
|
# Successful command completion responses: |
178
|
|
|
|
|
|
|
# |
179
|
1
|
|
|
1
|
|
7
|
use constant OK => 1000; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
180
|
1
|
|
|
1
|
|
7
|
use constant OK_PENDING => 1001; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
181
|
1
|
|
|
1
|
|
7
|
use constant OK_NO_MESSAGES => 1300; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
182
|
1
|
|
|
1
|
|
6
|
use constant OK_MESSAGES => 1301; |
|
1
|
|
|
|
|
56
|
|
|
1
|
|
|
|
|
53
|
|
183
|
1
|
|
|
1
|
|
6
|
use constant OK_BYE => 1500; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
42
|
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
# |
186
|
|
|
|
|
|
|
# Command error responses: |
187
|
|
|
|
|
|
|
# |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
# Protocol Syntax: |
190
|
1
|
|
|
1
|
|
5
|
use constant UNKNOWN_COMMAND => 2000; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
55
|
|
191
|
1
|
|
|
1
|
|
8
|
use constant SYNTAX_ERROR => 2001; |
|
1
|
|
|
|
|
39
|
|
|
1
|
|
|
|
|
50
|
|
192
|
1
|
|
|
1
|
|
6
|
use constant USE_ERROR => 2002; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
193
|
1
|
|
|
1
|
|
6
|
use constant MISSING_PARAM => 2003; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
194
|
1
|
|
|
1
|
|
6
|
use constant PARAM_RANGE_ERROR => 2004; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
195
|
1
|
|
|
1
|
|
6
|
use constant PARAM_SYNTAX_ERROR => 2005; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
# Implementation-specific Rules: |
198
|
1
|
|
|
1
|
|
6
|
use constant UNIMPLEMENTED_VERSION => 2100; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
199
|
1
|
|
|
1
|
|
11
|
use constant UNIMPLEMENTED_COMMAND => 2101; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
200
|
1
|
|
|
1
|
|
6
|
use constant UNIMPLEMENTED_OPTION => 2102; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
201
|
1
|
|
|
1
|
|
6
|
use constant UNIMPLEMENTED_EXTENSION => 2103; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
202
|
1
|
|
|
1
|
|
5
|
use constant BILLING_FAILURE => 2104; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
62
|
|
203
|
1
|
|
|
1
|
|
21
|
use constant NOT_RENEWABLE => 2105; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
204
|
1
|
|
|
1
|
|
7
|
use constant NOT_TRANSFERRABLE => 2106; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
# Security: |
207
|
1
|
|
|
1
|
|
6
|
use constant AUTHENTICATION_ERROR => 2200; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
208
|
1
|
|
|
1
|
|
6
|
use constant AUTHORISATION_ERROR => 2201; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
73
|
|
209
|
1
|
|
|
1
|
|
7
|
use constant AUTHORIZATION_ERROR => 2201; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
73
|
|
210
|
1
|
|
|
1
|
|
6
|
use constant INVALID_AUTH_INFO => 2202; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
# Data Management: |
213
|
1
|
|
|
1
|
|
6
|
use constant OBJECT_PENDING_TRANSFER => 2300; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
214
|
1
|
|
|
1
|
|
6
|
use constant OBJECT_NOT_PENDING_TRANSFER => 2301; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
215
|
1
|
|
|
1
|
|
5
|
use constant OBJECT_EXISTS => 2302; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
216
|
1
|
|
|
1
|
|
6
|
use constant OBJECT_DOES_NOT_EXIST => 2303; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
41
|
|
217
|
1
|
|
|
1
|
|
6
|
use constant STATUS_PROHIBITS_OP => 2304; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
218
|
1
|
|
|
1
|
|
9
|
use constant ASSOC_PROHIBITS_OP => 2305; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
219
|
1
|
|
|
1
|
|
6
|
use constant PARAM_POLICY_ERROR => 2306; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
220
|
1
|
|
|
1
|
|
5
|
use constant UNIMPLEMENTED_OBJECT_SERVICE => 2307; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
221
|
1
|
|
|
1
|
|
6
|
use constant DATA_MGMT_POLICY_VIOLATION => 2308; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
# Server System: |
224
|
1
|
|
|
1
|
|
6
|
use constant COMMAND_FAILED => 2400; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
# Connection Management: |
227
|
1
|
|
|
1
|
|
8
|
use constant COMMAND_FAILED_BYE => 2500; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
53
|
|
228
|
1
|
|
|
1
|
|
6
|
use constant AUTH_FAILED_BYE => 2501; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
229
|
1
|
|
|
1
|
|
15
|
use constant SESSION_LIMIT_EXCEEDED_BYE => 2502; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
145
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
our @EXPORT; |
232
|
|
|
|
|
|
|
my $package = __PACKAGE__; |
233
|
|
|
|
|
|
|
foreach my $constant (keys(%constant::declared)) { |
234
|
|
|
|
|
|
|
if ($constant =~ /^$package/) { |
235
|
|
|
|
|
|
|
$constant =~ s/^$package\:\://; |
236
|
|
|
|
|
|
|
push(@EXPORT, $constant); |
237
|
|
|
|
|
|
|
} |
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
1; |