/[cwmp]/google/acs.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /google/acs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Sat May 19 15:15:14 2007 UTC (16 years, 11 months ago) by dpavlin
File MIME type: text/plain
File size: 1238 byte(s)
initial import of cruft around TR-069

1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use SOAP::Transport::HTTP +trace => 'debug';
7
8 # Eh...
9 $SOAP::Constants::DO_NOT_CHECK_MUSTUNDERSTAND = 1;
10
11 $SIG{PIPE} = $SIG{INT} = 'IGNORE'; # don't want to die on 'Broken pipe' or Ctrl-C
12
13 # change LocalPort to 81 if you want to test it with soapmark.pl
14
15 my $daemon = SOAP::Transport::HTTP::Daemon->new(
16 #LocalAddr => 'localhost',
17 LocalPort => 3333,
18 Reuse => 1,
19 #'Listen' => 128,
20 )
21 ->dispatch_with({ 'urn:dslforum-org:cwmp-1-0' => 'CWMP'})
22 ;
23
24
25 print "Contact to ACS server at ", $daemon->url, "\n";
26 $daemon->handle;
27
28 package CWMP;
29 use strict;
30
31 use Data::Dump qw/dump/;
32
33 sub new {
34 bless {}, shift;
35 }
36
37 # Server methods Calling Responding
38 # GetRPCMethods Optional Required
39 # Inform Required Required
40 # TransferComplete Required Required
41 # RequestDownload Optional Optional
42 # Kicked Optional Optional
43
44 sub Inform {
45 my ($self, $DeviceId, $Event, $MaxEnvelopes, $CurrentTime, $RetryCount, $ParameterList) = @_;
46
47 my $p;
48
49 foreach ( @$ParameterList ) {
50 $p->{ $_->{Name} } = $_->{Value};
51 }
52
53 warn "request from ", dump( $DeviceId ), " with events ",dump( $Event ), "maxEnvelopes: $MaxEnvelopes on $CurrentTime retry $RetryCount params ", dump( $p );
54
55 }

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26