line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## Domain Registry Interface, EPP DNS-LU Poll extensions |
2
|
|
|
|
|
|
|
## |
3
|
|
|
|
|
|
|
## Copyright (c) 2007,2008,2013 Patrick Mevzek . All rights reserved. |
4
|
|
|
|
|
|
|
## |
5
|
|
|
|
|
|
|
## This file is part of Net::DRI |
6
|
|
|
|
|
|
|
## |
7
|
|
|
|
|
|
|
## Net::DRI is free software; you can redistribute it and/or modify |
8
|
|
|
|
|
|
|
## it under the terms of the GNU General Public License as published by |
9
|
|
|
|
|
|
|
## the Free Software Foundation; either version 2 of the License, or |
10
|
|
|
|
|
|
|
## (at your option) any later version. |
11
|
|
|
|
|
|
|
## |
12
|
|
|
|
|
|
|
## See the LICENSE file that comes with this distribution for more details. |
13
|
|
|
|
|
|
|
#################################################################################################### |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package Net::DRI::Protocol::EPP::Extensions::LU::Poll; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
662
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
18
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
4
|
use Net::DRI::Util; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
3
|
use DateTime::Format::ISO8601; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
292
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=pod |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Net::DRI::Protocol::EPP::Extensions::LU::Poll - EPP DNS-LU Poll extensions (DocRegistrar-2.0.6.pdf pages 35-37) for Net::DRI |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DESCRIPTION |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Please see the README file for details. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SUPPORT |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
For now, support questions should be sent to: |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Enetdri@dotandco.comE |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Please also see the SUPPORT file in the distribution. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SEE ALSO |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Ehttp://www.dotandco.com/services/software/Net-DRI/E |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 AUTHOR |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Patrick Mevzek, Enetdri@dotandco.comE |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 COPYRIGHT |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Copyright (c) 2007,2008,2013 Patrick Mevzek . |
53
|
|
|
|
|
|
|
All rights reserved. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
56
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
57
|
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or |
58
|
|
|
|
|
|
|
(at your option) any later version. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
See the LICENSE file that comes with this distribution for more details. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
#################################################################################################### |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub register_commands |
67
|
|
|
|
|
|
|
{ |
68
|
0
|
|
|
0
|
0
|
|
my ($class,$version)=@_; |
69
|
0
|
|
|
|
|
|
my %tmp=( |
70
|
|
|
|
|
|
|
dnslu => [ undef, \&parse ], |
71
|
|
|
|
|
|
|
); |
72
|
0
|
|
|
|
|
|
return { 'message' => \%tmp }; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#################################################################################################### |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub parse |
78
|
|
|
|
|
|
|
{ |
79
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
80
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
81
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
my $infdata=$mes->node_msg(); |
84
|
0
|
0
|
|
|
|
|
return unless $infdata; |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
|
my $pollmsg=$infdata->getFirstChild(); |
87
|
0
|
|
|
|
|
|
my %w=(action => 'dnslu_notification', type => $infdata->getAttribute('type')); ## list of types p.36 |
88
|
0
|
0
|
0
|
|
|
|
$w{type}=$pollmsg->getAttribute('type') if (!defined($w{type}) && $pollmsg->localname() eq 'pollmsg'); |
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
my (%ns,%e); |
91
|
0
|
|
|
|
|
|
my $c=$pollmsg->getFirstChild(); |
92
|
0
|
|
|
|
|
|
while ($c) |
93
|
|
|
|
|
|
|
{ |
94
|
0
|
0
|
|
|
|
|
next unless ($c->nodeType() == 1); ## only for element nodes |
95
|
0
|
|
0
|
|
|
|
my $name=$c->localname() || $c->nodeName(); |
96
|
0
|
0
|
|
|
|
|
next unless $name; |
97
|
|
|
|
|
|
|
|
98
|
0
|
0
|
|
|
|
|
if ($name=~m/^(roid|object|clTRID|svTRID|reason)$/) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
99
|
|
|
|
|
|
|
{ |
100
|
0
|
|
|
|
|
|
$w{$name}=$c->getFirstChild()->getData(); |
101
|
|
|
|
|
|
|
} elsif ($name eq 'exDate') |
102
|
|
|
|
|
|
|
{ |
103
|
0
|
|
|
|
|
|
$w{$name}=DateTime::Format::ISO8601->new()->parse_datetime($c->getFirstChild()->getData()); |
104
|
|
|
|
|
|
|
} elsif ($name eq 'ns') |
105
|
|
|
|
|
|
|
{ |
106
|
0
|
|
|
|
|
|
$ns{$c->getAttribute('name')}=$c->getFirstChild()->getData(); |
107
|
|
|
|
|
|
|
} elsif ($name eq 'extra') |
108
|
|
|
|
|
|
|
{ |
109
|
0
|
|
|
|
|
|
$e{$c->getAttribute('name')}=$c->getFirstChild()->getData(); |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
0
|
|
|
|
|
|
} continue { $c=$c->getNextSibling(); } |
113
|
0
|
0
|
|
|
|
|
$w{ns}=\%ns if %ns; |
114
|
0
|
0
|
|
|
|
|
$w{extra}=\%e if %e; |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
$rinfo->{session}->{notification}=\%w; |
117
|
0
|
|
|
|
|
|
return; |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
#################################################################################################### |
121
|
|
|
|
|
|
|
1; |