line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::EPP::ResponseCodes; |
2
|
1
|
|
|
1
|
|
7
|
use base qw(Exporter); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
112
|
|
3
|
1
|
|
|
1
|
|
7
|
use vars qw(@EXPORT); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
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
|
|
|
|
|
|
|
EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 4930) is an |
50
|
|
|
|
|
|
|
application layer client-server protocol for the provisioning and management of |
51
|
|
|
|
|
|
|
objects stored in a shared central repository. Specified in XML, the protocol |
52
|
|
|
|
|
|
|
defines generic object management operations and an extensible framework that |
53
|
|
|
|
|
|
|
maps protocol operations to objects. As of writing, its only well-developed |
54
|
|
|
|
|
|
|
application is the provisioning of Internet domain names, hosts, and related |
55
|
|
|
|
|
|
|
contact details. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Every response sent to the client by an EPP server contains a CresultE> |
58
|
|
|
|
|
|
|
element that has a C attribute. This is a four-digit |
59
|
|
|
|
|
|
|
numeric code that describes the result of the request. This module exports |
60
|
|
|
|
|
|
|
a set of constants that provide handy mnemonics for each of the defined |
61
|
|
|
|
|
|
|
codes. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 EXPORTS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
C exports the following constants. The number in |
66
|
|
|
|
|
|
|
brackets is the integer value associated with the constant. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 Successful command completion responses (1nnn) |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item OK (1000) |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item OK_PENDING (1001) |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item OK_NO_MESSAGES (1300) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item OK_MESSAGES (1301) |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item OK_BYE (1500) |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=back |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 Command error responses (2nnn) |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head3 Protocol Syntax |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=over |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item UNKNOWN_COMMAND (2011) |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item SYNTAX_ERROR (2011) |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item USE_ERROR (2011) |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item MISSING_PARAM (2011) |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item PARAM_RANGE_ERROR (2011) |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item PARAM_SYNTAX_ERROR (2011) |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=back |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head3 Implementation-specific Rules |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=over |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item UNIMPLEMENTED_VERSION (2100) |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item UNIMPLEMENTED_COMMAND (2101) |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item UNIMPLEMENTED_OPTION (2102) |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item UNIMPLEMENTED_EXTENSION (2103) |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item BILLING_FAILURE (2104) |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item NOT_RENEWABLE (2105) |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item NOT_TRANSFERRABLE (2106) |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=back |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head3 Security (22nn) |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=over |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item AUTHENTICATION_ERROR (2200) |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item AUTHORISATION_ERROR (2201) |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item AUTHORIZATION_ERROR (2201) |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item INVALID_AUTH_INFO (2202) |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=back |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head3 Data Management (23nn) |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=over |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=item OBJECT_PENDING_TRANSFER (2300) |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=item OBJECT_NOT_PENDING_TRANSFER (2301) |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item OBJECT_EXISTS (2302) |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=item OBJECT_DOES_NOT_EXIST (2303) |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item STATUS_PROHIBITS_OP (2304) |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=item ASSOC_PROHIBITS_OP (2305) |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=item PARAM_POLICY_ERROR (2306) |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=item UNIMPLEMENTED_OBJECT_SERVICE (2307) |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item DATA_MGMT_POLICY_VIOLATION (2308) |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=back |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head3 Server System (24nn) |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=over |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=item COMMAND_FAILED (2400) |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=back |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head3 Connection Management (25nn) |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=over |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=item COMMAND_FAILED_BYE (2500) |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=item AUTH_FAILED_BYE (2501) |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=item SESSION_LIMIT_EXCEEDED_BYE (2502) |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=back |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
# |
185
|
|
|
|
|
|
|
# Successful command completion responses: |
186
|
|
|
|
|
|
|
# |
187
|
1
|
|
|
1
|
|
6
|
use constant OK => 1000; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
75
|
|
188
|
1
|
|
|
1
|
|
6
|
use constant OK_PENDING => 1001; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
189
|
1
|
|
|
1
|
|
7
|
use constant OK_NO_MESSAGES => 1300; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
190
|
1
|
|
|
1
|
|
6
|
use constant OK_MESSAGES => 1301; |
|
1
|
|
|
|
|
41
|
|
|
1
|
|
|
|
|
51
|
|
191
|
1
|
|
|
1
|
|
6
|
use constant OK_BYE => 1500; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# |
194
|
|
|
|
|
|
|
# Command error responses: |
195
|
|
|
|
|
|
|
# |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
# Protocol Syntax: |
198
|
1
|
|
|
1
|
|
5
|
use constant UNKNOWN_COMMAND => 2011; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
199
|
1
|
|
|
1
|
|
11
|
use constant SYNTAX_ERROR => 2011; |
|
1
|
|
|
|
|
38
|
|
|
1
|
|
|
|
|
53
|
|
200
|
1
|
|
|
1
|
|
6
|
use constant USE_ERROR => 2011; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
201
|
1
|
|
|
1
|
|
6
|
use constant MISSING_PARAM => 2011; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
202
|
1
|
|
|
1
|
|
7
|
use constant PARAM_RANGE_ERROR => 2011; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
75
|
|
203
|
1
|
|
|
1
|
|
7
|
use constant PARAM_SYNTAX_ERROR => 2011; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
62
|
|
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
# Implementation-specific Rules: |
206
|
1
|
|
|
1
|
|
6
|
use constant UNIMPLEMENTED_VERSION => 2100; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
207
|
1
|
|
|
1
|
|
5
|
use constant UNIMPLEMENTED_COMMAND => 2101; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
59
|
|
208
|
1
|
|
|
1
|
|
6
|
use constant UNIMPLEMENTED_OPTION => 2102; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
209
|
1
|
|
|
1
|
|
6
|
use constant UNIMPLEMENTED_EXTENSION => 2103; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
210
|
1
|
|
|
1
|
|
11
|
use constant BILLING_FAILURE => 2104; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
60
|
|
211
|
1
|
|
|
1
|
|
7
|
use constant NOT_RENEWABLE => 2105; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
149
|
|
212
|
1
|
|
|
1
|
|
7
|
use constant NOT_TRANSFERRABLE => 2106; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
# Security: |
215
|
1
|
|
|
1
|
|
6
|
use constant AUTHENTICATION_ERROR => 2200; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
52
|
|
216
|
1
|
|
|
1
|
|
7
|
use constant AUTHORISATION_ERROR => 2201; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
58
|
|
217
|
1
|
|
|
1
|
|
6
|
use constant AUTHORIZATION_ERROR => 2201; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
218
|
1
|
|
|
1
|
|
10
|
use constant INVALID_AUTH_INFO => 2202; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
# Data Management: |
221
|
1
|
|
|
1
|
|
6
|
use constant OBJECT_PENDING_TRANSFER => 2300; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
222
|
1
|
|
|
1
|
|
6
|
use constant OBJECT_NOT_PENDING_TRANSFER => 2301; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
223
|
1
|
|
|
1
|
|
25
|
use constant OBJECT_EXISTS => 2302; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
57
|
|
224
|
1
|
|
|
1
|
|
6
|
use constant OBJECT_DOES_NOT_EXIST => 2303; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
225
|
1
|
|
|
1
|
|
6
|
use constant STATUS_PROHIBITS_OP => 2304; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
226
|
1
|
|
|
1
|
|
6
|
use constant ASSOC_PROHIBITS_OP => 2305; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
55
|
|
227
|
1
|
|
|
1
|
|
6
|
use constant PARAM_POLICY_ERROR => 2306; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
228
|
1
|
|
|
1
|
|
5
|
use constant UNIMPLEMENTED_OBJECT_SERVICE => 2307; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
229
|
1
|
|
|
1
|
|
24
|
use constant DATA_MGMT_POLICY_VIOLATION => 2308; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
56
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
# Server System: |
232
|
1
|
|
|
1
|
|
6
|
use constant COMMAND_FAILED => 2400; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
39
|
|
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
# Connection Management: |
235
|
1
|
|
|
1
|
|
5
|
use constant COMMAND_FAILED_BYE => 2500; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
236
|
1
|
|
|
1
|
|
24
|
use constant AUTH_FAILED_BYE => 2501; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
49
|
|
237
|
1
|
|
|
1
|
|
7
|
use constant SESSION_LIMIT_EXCEEDED_BYE => 2502; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
148
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
our @EXPORT; |
240
|
|
|
|
|
|
|
my $package = __PACKAGE__; |
241
|
|
|
|
|
|
|
foreach my $constant (keys(%constant::declared)) { |
242
|
|
|
|
|
|
|
if ($constant =~ /^$package/) { |
243
|
|
|
|
|
|
|
$constant =~ s/^$package\:\://; |
244
|
|
|
|
|
|
|
push(@EXPORT, $constant); |
245
|
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
} |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
1; |