当前位置:网站首页>EasyCwmp源码分析
EasyCwmp源码分析
2022-06-11 18:00:00 【陈小帅hh】
一、源码架构组成

EasyCwmp设计包括两个部分:
①EasyCwmp Core:它包括TR069 CWMP引擎,并负责与ACS服务器的通信。使用C语言开发。
②EasyCwmp DataModel:它包含TR-06的DATAModel,并且符合某些DataModel标准,例如TR-098,TR-181,TR-104等。使用shell开发,只支持部分协议模型,在开发和维护过程效率比较低。
二、EasyCwmp源码组成

三、EasyCwmp文件依赖
四、EasyCwmp执行流程

详细代码参考easycwmp.c中的main函数。
①获取输入参数
②建立互斥文件锁,设置互斥文件属性,确认为root登录。
③内存分配,链表初始化,uloop_init,xml备份初始化。
④创建子进程、两个pipe管道复制父子进程进行通信,子进程交给/usr/sbin/easycwmp脚本程序接管,准备处理JSON格式参数。
⑤加载easycwpm配置文件,通过配置文件初始化设备信息(设备类型、设备厂商、设备编号、厂商唯一编号),初始化心跳timer。
⑥测试通过管道发送命令/usr/sbin/easycwmp 脚本程序并使其退出。
⑦根据输入参数添加EVENT_BOOT或EVENT_PERIODIC事件到evens列表,设定timer回调处理事件(启动连接事件)。
⑧netlink_init,http_server_init 本地服务初始化。
⑨进入uloop_run主循环,处理事件消息。
五、RPC方法
这里主要介绍的是 CPE 设备端的 RPC 远程调用方法,ACS 服务端所具有的 RPC 方法需要查看对应服务器端的配置。
在 EasyCwmp 源码中已经实现了 TR069 协议中常用 RPC 方法,源码定义的 RPC 方法在 xml.c 文件中。
边栏推荐
- ctf入门
- SISO Decoder for a General (n, N - 1) SPC Code (Supplementary section 3)
- SQL报错注入1
- Database lock and transaction isolation level
- Hwang
- Common shortcut keys for Hello go (x) and GoLand
- [Golang]力扣Leetcode - 349. 两个数组的交集(哈希表)
- Expérience initiale du moteur de segmentation de l'araignée mariadb
- jsfinder,wafw00f安装,nmap配置(缺少msvcr120.dll文件)
- [FAQs for novices on the road] about project management
猜你喜欢
![Winter vacation daily question (improvement group) [end of week 4]](/img/67/89b5164712d8c4eb319b9266dd4b91.jpg)
Winter vacation daily question (improvement group) [end of week 4]

Initial egg framework

mariadb spider分片引擎初體驗

zabbix怎样自定义mysql监控项并触发告警

密码学概述

网络和并发编程常见面试题

Getting started with Wireshark

安装mariadb 10.5.7(tar包安装)

SISO decoder for a general (n,n-1) SPC code(补充章节3)
![Spring 2021 daily question [week7 not finished]](/img/93/582608e18bf6d78c552fa9478cdd77.jpg)
Spring 2021 daily question [week7 not finished]
随机推荐
Sqli labs customs clearance hey hey~
了解一下random库·1
SQL error injection 1
Spring 2021 daily question [week5 not finished]
【先收藏,早晚用得到】49个Flink高频面试题系列(一)
Winter vacation daily question 2022 [week1 not finished]
Seeing the sudden death of a 28 year old employee, I was silent
[practical Script] obtain the line number of a file, and then delete the file content.
SISO decoder for a general (n,n-1) SPC code(補充章節3)
Getting started with CTF
Experiment 2: write a program and verify that the linear table sequence represents all operations
zabbix怎样自定义mysql监控项并触发告警
社会工程学实战入门
Some thoughts on how to do a good job of operation and maintenance management
ISCSI详解(四)——ISCSI服务端配置实战
[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (I)
谈谈远程工作 | 社区征文
密评-----
mysql8安装,navicat安装,sqli-labs搭建
Learning about canvas API