netcwmp-master代码优化和编译 - 京月飞鸿

时间:2024-01-31 14:41:49

 

原创作品,转载请注明出处,严禁非法转载。如有错误,请留言!

 

email:40879506@qq.com

 

淘宝店:https://shop484606081.taobao.com

 

一. 下载和编译

1.git代码下载路径

https://github.com/netcwmp/netcwmp.git

2. 编译与安装

参考代码的帮助文档,如下编译步骤

1. autoreconf -i(如果出现libtool错误,可尝试)
2. mkdir tmp tmp/etc
3. ./configure  --prefix=$PWD/tmp
4. make
5. make install

将程序和配置拷贝到需要的位置

二. 优化  

在玩netcwmp发现,log实在不舒服,遇到错误也不知道哪行代码,什么函数出错,于是乎重写了log模块,还有主函数, 增加了log的配置选项。

优化版代码下载路径:http://download.csdn.net/detail/eryunyong/9760980

. 交叉编译和安装

以我们项目中用到的开发板为例:

 

1 1. autoreconf -i(如果出现libtool错误,可尝试)
2 2. mkdir tmp tmp/etc
3 3. ./configure --target=arm-mv5sft-linux --host=arm-mv5sft-linux CC=arm-mv5sft-linux-gnueabi-gcc  --prefix=$PWD/tmp
4 4. make
5 5. make install

 拷贝/tmp目录下的bin目录下的cwmpd程序到开发板中,运行即可。

配置文件内容修改如下:

 1 root@andy:/home/andy/vm_share/netcwmp# cat conf/cwmp.conf 
 2 [cwmp]
 3 enable=1;
 4 soap_env=SOAP-ENV
 5 soap_enc=SOAP-ENC
 6 acs_auth=0
 7 cpe_auth=0
 8 event_filename=/etc/cwmpevent.bin
 9 
10 
11 acs_url=http://192.168.4.11:9090/ACS-server/ACS
12 #acs_url=http://192.168.28.246:9999/
13 ca_file=/etc/ssl/private/ca.pem
14 ca_password=123456
15 
16 
17 cpe_manufacture=ChinaNMS
18 cpe_oui=A00001
19 cpe_sn=30000000000000000
20 cpe_name=000000
21 cpe_pc=OT2800
22 cpe_specver=V1.0
23 cpe_hwver=V1.0
24 cpe_version=V1.2.7.29
25 cpe_username=cwmp
26 cpe_password=cwmp
27 acs_username=cwmp
28 acs_password=cwmp
29 
30 
31 
32 [cwmpd]
33 httpd_port=5400
34 http_timeout=-1
35 
36 [log]
37 path=/var/log/cwmpd.log
38 enable=1
39 level=7
40 size=500000
41 syslog=0

. 运行

1.运行cwmpd主进程,等待大约30s后,主进程退出,交由子进程运行!

 

30s后

2.log信息如下:

是不是比原来好看多了啊。

 

  1 2017-02-22 17:15:52.383 [DBUG] [conf.c:cwmp_conf_init()] [0035] TRACE:
  2 2017-02-22 17:15:52.384 [DBUG] [cfg.c:cwmp_conf_get_int()] [0114] TRACE:
  3 2017-02-22 17:15:52.384 [DBUG] [cfg.c:cwmp_conf_get_int()] [0114] TRACE:
  4 2017-02-22 17:15:52.384 [DBUG] [cfg.c:cwmp_conf_get_int()] [0114] TRACE:
  5 2017-02-22 17:15:52.385 [DBUG] [conf.c:cwmp_conf_init()] [0069] url:http://192.168.4.11:9090/ACS-server/ACS
  6 mf:ChinaNMS
  7 oui:A00001
  8 sn:30000000000000000
  9 name:000000
 10 pc:OT2800
 11 httpd port:5400
 12 2017-02-22 17:15:52.559 [DBUG] [model.c:cwmp_model_load_parameter()] [0376] TRACE:
 13 2017-02-22 17:15:52.559 [DBUG] [model.c:cwmp_model_load_parameter()] [0384] model load: xml node name is cwmp
 14 2017-02-22 17:15:52.559 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name (null): (nil),(nil)
 15 2017-02-22 17:15:52.560 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name InternetGatewayDevice: (nil),(nil)
 16 2017-02-22 17:15:52.560 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DeviceSummary: (nil),(nil)
 17 2017-02-22 17:15:52.560 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name LANDeviceNumberOfEntries: (nil),(nil)
 18 2017-02-22 17:15:52.560 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANDeviceNumberOfEntries: (nil),(nil)
 19 2017-02-22 17:15:52.560 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DeviceInfo: (nil),(nil)
 20 2017-02-22 17:15:52.560 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name SpecVersion: 0xc5f4,(nil)
 21 2017-02-22 17:15:52.561 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name HardwareVersion: 0xc65c,(nil)
 22 2017-02-22 17:15:52.561 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name SoftwareVersion: 0xc6c4,(nil)
 23 2017-02-22 17:15:52.561 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ProvisioningCode: 0xc72c,(nil)
 24 2017-02-22 17:15:52.561 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Manufacturer: 0xc430,(nil)
 25 2017-02-22 17:15:52.561 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ManufacturerOUI: 0xc4bc,(nil)
 26 2017-02-22 17:15:52.562 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ProductClass: 0xc524,(nil)
 27 2017-02-22 17:15:52.562 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name SerialNumber: 0xc58c,(nil)
 28 2017-02-22 17:15:52.573 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ManagementServer: (nil),(nil)
 29 2017-02-22 17:15:52.573 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ConnectionRequestURL: 0xcc88,(nil)
 30 2017-02-22 17:15:52.573 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ConnectionRequestUsername: 0xcdf8,0xce40
 31 2017-02-22 17:15:52.574 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ConnectionRequestPassword: 0xce70,0xceb8
 32 2017-02-22 17:15:52.574 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Username: 0xcb20,(nil)
 33 2017-02-22 17:15:52.574 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Password: 0xcb98,(nil)
 34 2017-02-22 17:15:52.574 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name URL: (nil),(nil)
 35 2017-02-22 17:15:52.574 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name PeriodicInformEnable: (nil),(nil)
 36 2017-02-22 17:15:52.574 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name PeriodicInformInterval: (nil),(nil)
 37 2017-02-22 17:15:52.575 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name PeriodicInformTime: (nil),(nil)
 38 2017-02-22 17:15:52.575 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ParameterKey: (nil),(nil)
 39 2017-02-22 17:15:52.575 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name UDPConnectionRequestAddress: (nil),(nil)
 40 2017-02-22 17:15:52.575 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name UDPConnectionRequestAddressNotificationLimit: (nil),(nil)
 41 2017-02-22 17:15:52.575 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name STUNEnable: (nil),(nil)
 42 2017-02-22 17:15:52.576 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name STUNServerAddress: (nil),(nil)
 43 2017-02-22 17:15:52.576 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name STUNServerPort: (nil),(nil)
 44 2017-02-22 17:15:52.576 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name STUNUsername: (nil),(nil)
 45 2017-02-22 17:15:52.576 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name STUNPassword: (nil),(nil)
 46 2017-02-22 17:15:52.576 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name STUNMaximumKeepAlivePeriod: (nil),(nil)
 47 2017-02-22 17:15:52.576 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name STUNMinimumKeepAlivePeriod: (nil),(nil)
 48 2017-02-22 17:15:52.577 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name NATDetected: (nil),(nil)
 49 2017-02-22 17:15:52.577 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANDevice: (nil),(nil)
 50 2017-02-22 17:15:52.577 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name {i}: (nil),(nil)
 51 2017-02-22 17:15:52.577 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANConnectionNumberOfEntries: (nil),(nil)
 52 2017-02-22 17:15:52.577 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANConnectionDevice: (nil),(nil)
 53 2017-02-22 17:15:52.578 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name {i}: (nil),(nil)
 54 2017-02-22 17:15:52.578 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANIPConnectionNumberOfEntries: (nil),(nil)
 55 2017-02-22 17:15:52.578 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANPPPConnectionNumberOfEntries: (nil),(nil)
 56 2017-02-22 17:15:52.578 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANIPConnection: (nil),(nil)
 57 2017-02-22 17:15:52.578 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name {i}: (nil),(nil)
 58 2017-02-22 17:15:52.578 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Enable: (nil),(nil)
 59 2017-02-22 17:15:52.579 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name AddressingType: (nil),(nil)
 60 2017-02-22 17:15:52.579 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ExternalIPAddress: (nil),(nil)
 61 2017-02-22 17:15:52.579 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name SubnetMask: (nil),(nil)
 62 2017-02-22 17:15:52.579 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DefaultGateway: (nil),(nil)
 63 2017-02-22 17:15:52.579 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DNSServers: (nil),(nil)
 64 2017-02-22 17:15:52.580 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name MACAddress: (nil),(nil)
 65 2017-02-22 17:15:52.580 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Stats: (nil),(nil)
 66 2017-02-22 17:15:52.580 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetBytesSent: (nil),(nil)
 67 2017-02-22 17:15:52.580 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetBytesReceived: (nil),(nil)
 68 2017-02-22 17:15:52.580 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetPacketsSent: (nil),(nil)
 69 2017-02-22 17:15:52.580 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetPacketsReceived: (nil),(nil)
 70 2017-02-22 17:15:52.581 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name WANPPPConnection: (nil),(nil)
 71 2017-02-22 17:15:52.581 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name {i}: (nil),(nil)
 72 2017-02-22 17:15:52.581 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Enable: (nil),(nil)
 73 2017-02-22 17:15:52.581 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DefaultGateway: (nil),(nil)
 74 2017-02-22 17:15:52.581 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Username: (nil),(nil)
 75 2017-02-22 17:15:52.581 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Password: (nil),(nil)
 76 2017-02-22 17:15:52.582 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ExternalIPAddress: (nil),(nil)
 77 2017-02-22 17:15:52.582 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DNSServers: (nil),(nil)
 78 2017-02-22 17:15:52.592 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name MACAddress: (nil),(nil)
 79 2017-02-22 17:15:52.592 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ConnectionTrigger: (nil),(nil)
 80 2017-02-22 17:15:52.593 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Stats: (nil),(nil)
 81 2017-02-22 17:15:52.593 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetBytesSent: (nil),(nil)
 82 2017-02-22 17:15:52.593 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetBytesReceived: (nil),(nil)
 83 2017-02-22 17:15:52.593 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetPacketsSent: (nil),(nil)
 84 2017-02-22 17:15:52.593 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name EthernetPacketsReceived: (nil),(nil)
 85 2017-02-22 17:15:52.593 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name IPPingDiagnostics: (nil),(nil)
 86 2017-02-22 17:15:52.594 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DiagnosticsState: (nil),(nil)
 87 2017-02-22 17:15:52.594 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Interface: (nil),(nil)
 88 2017-02-22 17:15:52.594 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Host: (nil),(nil)
 89 2017-02-22 17:15:52.594 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name NumberOfRepetitions: (nil),(nil)
 90 2017-02-22 17:15:52.594 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Timeout: (nil),(nil)
 91 2017-02-22 17:15:52.594 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DataBlockSize: (nil),(nil)
 92 2017-02-22 17:15:52.595 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DSCP: (nil),(nil)
 93 2017-02-22 17:15:52.595 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name SuccessCount: (nil),(nil)
 94 2017-02-22 17:15:52.595 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name FailureCount: (nil),(nil)
 95 2017-02-22 17:15:52.595 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name AverageResponseTime: (nil),(nil)
 96 2017-02-22 17:15:52.595 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name MinimumResponseTime: (nil),(nil)
 97 2017-02-22 17:15:52.595 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name MaximumResponseTime: (nil),(nil)
 98 2017-02-22 17:15:52.596 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name TraceRouteDiagnostics: (nil),(nil)
 99 2017-02-22 17:15:52.596 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DiagnosticsState: (nil),(nil)
100 2017-02-22 17:15:52.596 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Interface: (nil),(nil)
101 2017-02-22 17:15:52.596 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Host: (nil),(nil)
102 2017-02-22 17:15:52.596 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name NumberOfTries: (nil),(nil)
103 2017-02-22 17:15:52.597 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name Timeout: (nil),(nil)
104 2017-02-22 17:15:52.597 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DataBlockSize: (nil),(nil)
105 2017-02-22 17:15:52.597 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name DSCP: (nil),(nil)
106 2017-02-22 17:15:52.597 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name MaxHopCount: (nil),(nil)
107 2017-02-22 17:15:52.597 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name ResponseTime: (nil),(nil)
108 2017-02-22 17:15:52.597 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name RouteHopsNumberOfEntries: (nil),(nil)
109 2017-02-22 17:15:52.598 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name RouteHops: (nil),(nil)
110 2017-02-22 17:15:52.598 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name {i}: (nil),(nil)
111 2017-02-22 17:15:52.598 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name HopHost: (nil),(nil)
112 2017-02-22 17:15:52.598 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name HopHostAddress: (nil),(nil)
113 2017-02-22 17:15:52.598 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name HopErrorCode: (nil),(nil)
114 2017-02-22 17:15:52.598 [DBUG] [model.c:cwmp_model_create_parameter()] [0292] name HopRTTimes: (nil),(nil)
115 2017-02-22 17:15:52.599 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANDevice.c:cpe_refresh_igd_wandevice()] [0004] TRACE:
116 2017-02-22 17:15:52.599 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0005] TRACE:
117 2017-02-22 17:15:52.599 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
118 2017-02-22 17:15:52.599 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
119 2017-02-22 17:15:52.600 [INFO] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0019] refresh WANConnectionDevice node, delete param 1
120 2017-02-22 17:15:52.600 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0005] TRACE:
121 2017-02-22 17:15:52.600 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
122 2017-02-22 17:15:52.600 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
123 2017-02-22 17:15:52.601 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
124 2017-02-22 17:15:52.601 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
125 2017-02-22 17:15:52.601 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0005] TRACE:
126 2017-02-22 17:15:52.601 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
127 2017-02-22 17:15:52.601 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
128 2017-02-22 17:15:52.601 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
129 2017-02-22 17:15:52.602 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0005] TRACE:
130 2017-02-22 17:15:52.602 [INFO] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0017] refresh WANConnectionDevice node, delete param 1
131 2017-02-22 17:15:52.604 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
132 2017-02-22 17:15:52.604 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
133 2017-02-22 17:15:52.604 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
134 2017-02-22 17:15:52.604 [INFO] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0019] refresh WANConnectionDevice node, delete param 1
135 2017-02-22 17:15:52.605 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0005] TRACE:
136 2017-02-22 17:15:52.605 [INFO] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0017] refresh WANConnectionDevice node, delete param 1
137 2017-02-22 17:15:52.605 [INFO] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANConnectionDevice.c:cpe_refresh_igd_wanconnectiondevice()] [0017] refresh WANConnectionDevice node, delete param 2
138 2017-02-22 17:15:52.605 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
139 2017-02-22 17:15:52.605 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
140 2017-02-22 17:15:52.606 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
141 2017-02-22 17:15:52.606 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
142 2017-02-22 17:15:52.606 [DBUG] [modules/InternetGatewayDevice/WANDevice/WANConnectionDevice/WANIPConnection.c:cpe_refresh_igd_wanipconnection()] [0007] TRACE:
143 2017-02-22 17:15:52.607 [DBUG] [cwmp.c:cwmp_set_envelope_ns()] [0658] ENV: SOAP-ENV, ENC: SOAP-ENC
144 2017-02-22 17:15:52.607 [DBUG] [cwmp.c:cwmp_set_envelope_ns()] [0678] SOAP-ENV:Header
145 SOAP-ENV:Body
146 SOAP-ENV:Envelope
147 SOAP-ENC:arrayType
148 2017-02-22 17:15:52.607 [DBUG] [agent.c:cwmp_agent_start_session()] [0192] TRACE:
149 2017-02-22 17:15:52.608 [DBUG] [agent.c:cwmp_agent_start_session()] [0204] New request from ACS
150 2017-02-22 17:15:52.608 [DBUG] [cfg.c:cwmp_conf_get_int()] [0114] TRACE:
151 2017-02-22 17:15:52.608 [DBUG] [agent.c:cwmp_agent_start_session()] [0210] session timeout is -1
152 2017-02-22 17:15:52.608 [DBUG] [agent.c:cwmp_agent_start_session()] [0222] session stutus: New START
153 2017-02-22 17:15:52.608 [DBUG] [http.c:http_parse_url()] [0491] TRACE:
154 2017-02-22 17:15:52.609 [DBUG] [http.c:http_parse_url()] [0621] scheme:   [http]
155 user:     []
156 password: []
157 host:     [192.168.4.11]
158 port:     [9090]
159 uri: [/ACS-server/ACS]
160 2017-02-22 17:15:52.609 [DBUG] [http.c:http_dest_create()] [0089] dest create url is http://192.168.4.11:9090/ACS-server/ACS
161 2017-02-22 17:15:52.609 [DBUG] [session.c:cwmp_session_connect()] [0450] session connect: dest url is http://192.168.4.11:9090/ACS-server/ACS, acs url is http://192.168.4.11:9090/ACS-server/ACS
162 2017-02-22 17:15:52.609 [INFO] [session.c:cwmp_session_create_connection()] [0497] session connect using ssl?(no)
163 2017-02-22 17:15:52.609 [DBUG] [session.c:cwmp_session_create_connection()] [0510] dest host: 192.168.4.11, dest port: 9090
164 2017-02-22 17:15:52.613 [DBUG] [agent.c:cwmp_agent_start_session()] [0236] session stutus: INFORM
165 2017-02-22 17:15:52.613 [DBUG] [agent.c:cwmp_agent_get_active_event()] [0131] TRACE:
166 2017-02-22 17:15:52.613 [DBUG] [event.c:cwmp_event_file_save()] [0127] TRACE:
167 2017-02-22 17:15:52.616 [DBUG] [agent.c:cwmp_agent_start_session()] [0242] session stutus: INFORM2
168 2017-02-22 17:15:52.616 [DBUG] [agent.c:cwmp_agent_start_session()] [0248] session stutus: INFORM3
169 2017-02-22 17:15:52.616 [DBUG] [session.c:cwmp_session_create_inform_message()] [0801] TRACE:
170 2017-02-22 17:15:52.616 [DBUG] [session.c:cwmp_session_create_header()] [0553] TRACE:
171 2017-02-22 17:15:52.617 [DBUG] [session.c:cwmp_session_create_inform_device()] [0569] TRACE:
172 2017-02-22 17:15:52.617 [DBUG] [session.c:cwmp_session_create_inform_parameters()] [0594] TRACE:
173 2017-02-22 17:15:52.617 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_manufacturer()] [0005] TRACE:
174 2017-02-22 17:15:52.617 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_manufacturer()] [0007] cpe_get_igd_di_manufacturer: value is ChinaNMS
175 2017-02-22 17:15:52.617 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_manufactureroui()] [0014] TRACE:
176 2017-02-22 17:15:52.618 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_productclass()] [0022] TRACE:
177 2017-02-22 17:15:52.618 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_serialnumber()] [0030] TRACE:
178 2017-02-22 17:15:52.618 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_specversion()] [0038] TRACE:
179 2017-02-22 17:15:52.619 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_hardwareversion()] [0046] TRACE:
180 2017-02-22 17:15:52.619 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_softwareversion()] [0054] TRACE:
181 2017-02-22 17:15:52.619 [DBUG] [modules/InternetGatewayDevice/DeviceInfo/DeviceInfo.c:cpe_get_igd_di_provisioningcode()] [0062] TRACE:
182 2017-02-22 17:15:52.619 [DBUG] [cfg.c:cwmp_conf_get_int()] [0114] TRACE:
183 2017-02-22 17:15:52.620 [DBUG] [session.c:cwmp_session_create_inform_parameters()] [0695] cwmp:wan_interface name is: []
184 2017-02-22 17:15:52.621 [DBUG] [session.c:cwmp_session_create_inform_parameters()] [0698] cwmp:wan_interface new name is: [InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress]
185 2017-02-22 17:15:52.621 [DBUG] [cwmp.c:cwmp_create_inform_message()] [1991] TRACE:
186 2017-02-22 17:15:52.621 [DBUG] [cwmp.c:cwmp_create_envelope_node()] [1843] TRACE:
187 2017-02-22 17:15:52.621 [DBUG] [cwmp.c:cwmp_create_envelope_node()] [1844] ENV: SOAP-ENV, ENC: SOAP-ENC
188 2017-02-22 17:15:52.621 [DBUG] [cwmp.c:cwmp_create_header_node()] [1820] TRACE:
189 2017-02-22 17:15:52.622 [DBUG] [cwmp.c:cwmp_create_body_node()] [1834] TRACE:
190 2017-02-22 17:15:52.622 [DBUG] [cwmp.c:cwmp_create_device_id_node()] [1864] TRACE:
191 2017-02-22 17:15:52.625 [DBUG] [cwmp.c:cwmp_create_event_node()] [1785] TRACE:
192 2017-02-22 17:15:52.625 [DBUG] [cwmp.c:cwmp_create_max_envelope_node()] [1891] TRACE:
193 2017-02-22 17:15:52.625 [DBUG] [cwmp.c:cwmp_create_current_time_node()] [1760] TRACE:
194 2017-02-22 17:15:52.626 [DBUG] [cwmp.c:cwmp_create_retry_count_node()] [1904] TRACE:
195 2017-02-22 17:15:52.626 [DBUG] [cwmp.c:cwmp_create_parameter_list_node()] [1944] TRACE:
196 2017-02-22 17:15:52.627 [DBUG] [cwmp.c:cwmp_create_parameter_list_node()] [1966] created parameter list: [17]
197 2017-02-22 17:15:52.628 [DBUG] [agent.c:cwmp_agent_start_session()] [0260] session stutus: SEND
198 2017-02-22 17:15:52.628 [DBUG] [agent.c:cwmp_agent_start_session()] [0261] session data request length: 4232
199 2017-02-22 17:15:52.628 [DBUG] [agent.c:cwmp_agent_send_request()] [0177] TRACE:
200 2017-02-22 17:15:52.628 [DBUG] [session.c:cwmp_session_send_request()] [1124] TRACE:
201 2017-02-22 17:15:52.628 [DBUG] [session.c:cwmp_session_send_request()] [1126] session dest url: http://192.168.4.11:9090/ACS-server/ACS
202 2017-02-22 17:15:52.629 [DBUG] [http.c:http_socket_write()] [0362] http socket write buffer fd:4, length:4395,  [
203 POST /ACS-server/ACS HTTP/1.1
204 Host: 192.168.4.11:9090
205 User-Agent: CPE Netcwmp Agent
206 Accept: */*
207 Content-Type: text/xml; charset=utf-8
208 Content-Length: 4232
209 
210 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
211 <SOAP-ENV:Header>
212 <cwmp:ID SOAP-ENV:mustUnderstand="1">1</cwmp:ID>
213 </SOAP-ENV:Header>
214 <SOAP-ENV:Body>
215 <cwmp:Inform>
216 <DeviceId xsi:type="cwmp:DeviceIdStruct">
217 <Manufacturer xsi:type="xsd:string">ChinaNMS</Manufacturer>
218 <OUI xsi:type="xsd:string">A00001</OUI>
219 <ProductClass xsi:type="xsd:string">OT2800</ProductClass>
220 <SerialNumber xsi:type="xsd:string">30000000000000000</SerialNumber>
221 </DeviceId>
222 <Event SOAP-ENC:arrayType="cwmp:EventStruct[1]">
223 <EventStruct>
224 <EventCode xsi:type="xsd:string">0 BOOTSTRAP</EventCode>
225 <CommandKey></CommandKey>
226 </EventStruct>
227 </Event>
228 <MaxEnvelopes xsi:type="xsd:unsignedInt">1</MaxEnvelopes>
229 <CurrentTime xsi:type="xsd:dateTime">2017-02-22T17:15:52</CurrentTime>
230 <RetryCount xsi:type="xsd:unsignedInt">0</RetryCount>
231 <ParameterList SOAP-ENC:arrayType="cwmp:ParameterValueStruct[17]">
232 <ParameterValueStruct>
233 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceSummary</Name>
234 <Value xsi:type="xsd:string"></Value>
235 </ParameterValueStruct>
236 <ParameterValueStruct>
237 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.Manufacturer</Name>
238 <Value xsi:type="xsd:string">ChinaNMS</Value>
239 </ParameterValueStruct>
240 <ParameterValueStruct>
241 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.ManufacturerOUI</Name>
242 <Value xsi:type="xsd:string">A00001</Value>
243 </ParameterValueStruct>
244 <ParameterValueStruct>
245 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.ProductClass</Name>
246 <Value xsi:type="xsd:string">OT2800</Value>
247 </ParameterValueStruct>
248 <ParameterValueStruct>
249 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.SerialNumber</Name>
250 <Value xsi:type="xsd:string">30000000000000000</Value>
251 </ParameterValueStruct>
252 <ParameterValueStruct>
253 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.SpecVersion</Name>
254 <Value xsi:type="xsd:string">V1.0</Value>
255 </ParameterValueStruct>
256 <ParameterValueStruct>
257 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>
258 <Value xsi:type="xsd:string">V1.0</Value>
259 </ParameterValueStruct>
260 <ParameterValueStruct>
261 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>
262 <Value xsi:type="xsd:string">V1.2.7.29</Value>
263 </ParameterValueStruct>
264 <ParameterValueStruct>
265 <Name xsi:type="xsd:string">InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>
266 <Value xsi:type="xsd:string">OT2800</Value>
267 </ParameterValueStruct>
268 <ParameterValueStruct>
269 <Name xsi:type="xsd:string">InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>
270 <Value xsi:type="xsd:string">http://192.168.4.200:5400</Value>
271 </ParameterValueStruct>
272 <ParameterValueStruct>
273 <Name xsi:type="xsd:string">InternetGatewayDevice.ManagementServer.ParameterKey</Name>
274 <Value xsi:type="xsd:string"></Value>
275 </ParameterValueStruct>
276 <ParameterValueStruct>
277 <Name xsi:type="xsd:string">InternetGatewayDevice.ManagementServer.Username</Name>
278 <Value xsi:type="xsd:string">cwmp</Value>
279 </ParameterValueStruct>
280 <ParameterValueStruct>
281 <Name xsi:type="xsd:string">InternetGatewayDevice.ManagementServer.Password</Name>
282 <Value xsi:type="xsd:string">cwmp</Value>
283 </ParameterValueStruct>
284 <ParameterValueStruct>
285 <Name xsi:type="xsd:string">InternetGatewayDevice.ManagementServer.ConnectionRequestUsername</Name>
286 <Value xsi:type="xsd:string">cwmp</Value>
287 </ParameterValueStruct>
288 <ParameterValueStruct>
289 <Name xsi:type="xsd:string">InternetGatewayDevice.ManagementServer.ConnectionRequestPassword</Name>
290 <Value xsi:type="xsd:string">cwmp</Value>
291 </ParameterValueStruct>
292 <ParameterValueStruct>
293 <Name xsi:type="xsd:string">InternetGatewayDevice.ManagementServer.URL</Name>
294 <Value xsi:type="xsd:string">http://192.168.4.11:9090/ACS-server/ACS</Value>
295 </ParameterValueStruct>
296 <ParameterValueStruct>
297 <Name xsi:type="xsd:string">InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress</Name>
298 <Value xsi:type="xsd:string"></Value>
299 </ParameterValueStruct>
300 </ParameterList>
301 </cwmp:Inform>
302 </SOAP-ENV:Body>
303 </SOAP-ENV:Envelope>
304 
305 ]
306 2017-02-22 17:15:52.629 [DBUG] [agent.c:cwmp_agent_start_session()] [0269] session data sended OK, rv=0
307 2017-02-22 17:15:52.629 [DBUG] [agent.c:cwmp_agent_start_session()] [0291] session stutus: RECV
308 2017-02-22 17:15:52.629 [DBUG] [http.c:http_read_header()] [0758] TRACE:
309 2017-02-22 17:15:52.712 [DBUG] [http.c:http_read_response()] [1177] http read header length: 81, [
310 HTTP/1.1 200 OK
311 Content-Type: text/xml; charset="utf-8"
312 Content-Length: 387
313 
314 
315 ]
316 2017-02-22 17:15:52.713 [DBUG] [agent.c:cwmp_agent_start_session()] [0307] session stutus: ANSLYSE
317 2017-02-22 17:15:52.713 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0414] agent analyse xml: 
318 <cwmp><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:InformResponse><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
319 
320 </cwmp>
321 2017-02-22 17:15:52.715 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0426] analyse method is: cwmp:InformResponse
322 2017-02-22 17:15:52.715 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0495] agent analyse newdoc is null. 
323 2017-02-22 17:15:52.715 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0500] agent analyse begin check global event, 3
324 2017-02-22 17:15:52.716 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0526] newdoc (nil), msglength: 387
325 2017-02-22 17:15:52.716 [DBUG] [agent.c:cwmp_agent_start_session()] [0260] session stutus: SEND
326 2017-02-22 17:15:52.716 [DBUG] [agent.c:cwmp_agent_start_session()] [0261] session data request length: 0
327 2017-02-22 17:15:52.716 [DBUG] [agent.c:cwmp_agent_send_request()] [0177] TRACE:
328 2017-02-22 17:15:52.716 [DBUG] [session.c:cwmp_session_send_request()] [1124] TRACE:
329 2017-02-22 17:15:52.717 [DBUG] [session.c:cwmp_session_send_request()] [1126] session dest url: http://192.168.4.11:9090/ACS-server/ACS
330 2017-02-22 17:15:52.717 [DBUG] [http.c:http_socket_write()] [0362] http socket write buffer fd:4, length:160,  [
331 POST /ACS-server/ACS HTTP/1.1
332 Host: 192.168.4.11:9090
333 User-Agent: CPE Netcwmp Agent
334 Accept: */*
335 Content-Type: text/xml; charset=utf-8
336 Content-Length: 0
337 
338 
339 ]
340 2017-02-22 17:15:52.717 [DBUG] [agent.c:cwmp_agent_start_session()] [0269] session data sended OK, rv=0
341 2017-02-22 17:15:52.717 [DBUG] [agent.c:cwmp_agent_start_session()] [0291] session stutus: RECV
342 2017-02-22 17:15:52.717 [DBUG] [http.c:http_read_header()] [0758] TRACE:
343 2017-02-22 17:16:02.730 [DBUG] [http.c:http_read_response()] [1177] http read header length: 79, [
344 HTTP/1.1 200 OK
345 Content-Type: text/xml; charset="utf-8"
346 Content-Length: 0
347 
348 
349 ]
350 2017-02-22 17:16:02.730 [DBUG] [agent.c:cwmp_agent_start_session()] [0307] session stutus: ANSLYSE
351 2017-02-22 17:16:02.730 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0401] analyse receive length is 0
352 2017-02-22 17:16:02.731 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0500] agent analyse begin check global event, 3
353 2017-02-22 17:16:02.731 [DBUG] [agent.c:cwmp_agent_analyse_session()] [0526] newdoc (nil), msglength: 0
354 2017-02-22 17:16:02.731 [DBUG] [agent.c:cwmp_agent_start_session()] [0332] session stutus: END
355 2017-02-22 17:16:02.731 [DBUG] [agent.c:cwmp_agent_start_session()] [0346] session stutus: EXIT
356 2017-02-22 17:16:02.731 [DBUG] [http.c:http_socket_close()] [0269] TRACE:
357 2017-02-22 17:16:02.731 [DBUG] [agent.c:cwmp_agent_start_session()] [0367] session stutus: EXIT
358 2017-02-22 17:16:02.732 [DBUG] [agent.c:cwmp_agent_run_tasks()] [0875] TRACE:
359 2017-02-22 17:16:02.732 [DBUG] [queue.c:queue_pop()] [0105] queue is empty.
360 2017-02-22 17:16:02.732 [DBUG] [agent.c:cwmp_agent_run_tasks()] [0882] no more task to run
361 2017-02-22 17:16:02.732 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
362 2017-02-22 17:16:03.652 [INFO] [httpd.c:httpd_build_server()] [0166] select new connection timeout. no new request.
363 2017-02-22 17:16:04.742 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
364 2017-02-22 17:16:06.752 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
365 2017-02-22 17:16:08.762 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
366 2017-02-22 17:16:10.772 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
367 2017-02-22 17:16:12.782 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
368 2017-02-22 17:16:14.682 [INFO] [httpd.c:httpd_build_server()] [0166] select new connection timeout. no new request.
369 2017-02-22 17:16:14.792 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
370 2017-02-22 17:16:16.802 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
371 2017-02-22 17:16:18.812 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
372 2017-02-22 17:16:20.822 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
373 2017-02-22 17:16:22.832 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
374 2017-02-22 17:16:24.842 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
375 2017-02-22 17:16:25.712 [INFO] [httpd.c:httpd_build_server()] [0166] select new connection timeout. no new request.
376 2017-02-22 17:16:26.852 [DBUG] [agent.c:cwmp_agent_start_session()] [0198] No new request from ACS
377 ^C
378 root@EBANG:~# 
View Code

 

欢迎大家和我交流。