/[cwmp]/google/trunk/bin/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

Diff of /google/trunk/bin/acs.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

google/bin/acs.pl revision 28 by dpavlin, Mon Jun 18 07:59:20 2007 UTC google/trunk/bin/acs.pl revision 180 by dpavlin, Sun Oct 28 21:36:30 2007 UTC
# Line 6  Line 6 
6    
7  use strict;  use strict;
8    
9  use HTTP::Server::Simple;  use lib './lib';
10    use CWMP::Server;
11    use Getopt::Long;
12    
13  my $port = 3333;  my $port = 3333;
14    my $debug = 0;
15  my $server = CWMP::Server->new( $port );  my $store_path = './';
16  $server->run();  my $store_plugin = 'YAML';
17    my $protocol_dump = 0;
18  package CWMP::Server;  
19    GetOptions(
20  use Data::Dump qw/dump/;          'debug+' => \$debug,
21            'port=i' => \$port,
22  use base qw(HTTP::Server::Simple::CGI);          'store-path=s' => \$store_path,
23            'store-plugin=s' => \$store_plugin,
24  sub handle_request {          'protocol-dump!' => \$protocol_dump,
25          my ($self, $cgi) = @_;  );
26                                                                        
27          #... do something, print output to default  my $queue;
28          # selected filehandle...  
29    if ( $protocol_dump ) {
30          warn $cgi->param('POSTDATA');  
31            warn "generating dump of xml protocol with CPE\n";
32          print "Content-Type: text/xml\r\n\r\n";  
33            $queue = [
34                            'GetRPCMethods',
35                            'GetParameterNames',
36    #                       [ 'GetParameterNames', 'InternetGatewayDevice.DeviceInfo.SerialNumber', 0 ],
37    #                       [ 'GetParameterNames', 'InternetGatewayDevice.DeviceInfo.', 1 ],
38                            [ 'GetParameterValues',
39                                    'InternetGatewayDevice.DeviceInfo.SerialNumber',
40                                    'InternetGatewayDevice.DeviceInfo.VendorConfigFile.',
41                                    'InternetGatewayDevice.DeviceInfo.X_000E50_Country',
42                            ],
43                            [ 'SetParameterValues',
44                                    'InternetGatewayDevice.DeviceInfo.ProvisioningCode' => 'test provision',
45    #                       'InternetGatewayDevice.DeviceInfo.X_000E50_Country' => 1,
46                            ],
47    #                       'Reboot',
48            ];
49  };  };
50    
 1;  
51    
52    my $server = CWMP::Server->new({
53            port => $port,
54            store => {
55                    module => $store_plugin,
56                    path => $store_path,
57                    debug => $debug,
58            },
59            debug => $debug,
60            default_queue => [ $queue ],
61    });
62    $server->run();
63    

Legend:
Removed from v.28  
changed lines
  Added in v.180

  ViewVC Help
Powered by ViewVC 1.1.26