• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Mar-2025-

figures/H17-Mar-2025-

frameworks/native/H17-Mar-2025-4,6483,790

interfaces/H17-Mar-2025-537365

services/H17-Mar-2025-17,62414,941

test/H17-Mar-2025-10,7128,161

BUILD.gnH A D17-Mar-2025921 2723

LICENSEH A D17-Mar-202511.3 KiB202169

README.en.mdH A D17-Mar-20251.5 KiB2515

README.mdH A D17-Mar-20251.3 KiB2416

bundle.jsonH A D17-Mar-20253.8 KiB119118

dhcp.gniH A D17-Mar-2025873 2421

dhcp_lite.gniH A D17-Mar-2025827 2320

README.en.md

1# communication_dhcp
2
3#### Description
4Dynamic Host Configuration Protocol (DHCP) is a standard protocol defined by RFC 1541 that allows servers to dynamically assign IP addresses and configuration information to clients. The DHCP protocol supports C/S (client/server) structure, which mainly includes two parts:
5
61. DHCP client: it is usually mobile phones, PCs, printers and other terminal devices in the network, using the IP information assigned from the DHCP server, including IP address, default gateway and DNS.
7
82. DHCP server: used to manage all IP network information, and process the client's DHCP request, assigning IP address, subnet mask, default gateway and other content to the accessing client.
9
10#### Software Architecture
11Software architecture description:
12As shown in the figure below, the DhcpService class provides an interface for external management of DHCP module services, including start, stop and result acquisition of DHCP client services. start, stop and management of address pools and lease tables on the DHCP server, etc., which is convenient for calling the interface of DhcpService services in other subsystem business implementations.
13
14![](figures/zh-cn_image_dhcp.png)
15
16#### Instructions
17
181. Call the class DhcpServiceAPI to get the IDhcpService instance;
192. Start DHCP function (Client/Server) through IDhcpService instance;
203. The client registers the callback of the DhcpResultNotify class through GetDhcpResult;
21
22#### Related project
23
24communication_wifi
25

README.md

1# DHCP组件
2
3#### 介绍
4动态主机配置协议 DHCP(Dynamic Host Configuration Protocol,动态主机配置协议) 是 RFC 1541定义的标准协议,该协议允许服务器向客户端动态分配IP地址和配置信息。DHCP协议支持C/S(客户端/服务器)结构,主要分为两部分:
5
61、DHCP客户端:通常为网络中的手机、PC、打印机等终端设备,使用从DHCP服务器分配下来的IP信息,包括IP地址、默认网关及DNS等。
7
82、DHCP服务器:用于管理所有的IP网络信息,并处理客户端的DHCP请求,为接入的客户端分配IP地址、子网掩码、默认网关等内容。
9#### 软件架构
10软件架构说明:
11如下图所示,DhcpService类提供外部管理DHCP模块服务的接口,其中包含了DHCP客户端服务的启动、停止及结果获取,DHCP服务端的启动、停止及地址池和租约表的管理等等,方便其它各子系统业务实现中调用DhcpService业务的接口。
12
13![](figures/zh-cn_image_dhcp.png)
14
15#### 使用说明
16
171. 调用类DhcpServiceApi获取IDhcpService实例;
182. 通过IDhcpService实例启动DHCP功能(Client/Server);
193. Client端通过GetDhcpResult注册DhcpResultNotify类的回调;
204. Server端通过GetDhcpSerProExit获取DHCP Server异常退出的通知。
21
22#### 相关仓
23
24communication_wifi