XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_netif.h
浏览该文件的文档.
1
19#ifndef __XF_NETIF_H__
20#define __XF_NETIF_H__
21
22/* ==================== [Includes] ========================================== */
23
24#include "xf_utils.h"
25#include "xf_netif_types.h"
26
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/* ==================== [Defines] =========================================== */
40
41/* ==================== [Typedefs] ========================================== */
42
43/* ==================== [Global Prototypes] ================================= */
44
59 xf_netif_t netif_hdl, const char *hostname, uint32_t len);
60
72 xf_netif_t netif_hdl, char hostname[], uint32_t len);
73
83
94
105
106/* TODO 配置 DHCP 客户端选项 */
107
117
127
128/* TODO 配置 DHCP 服务端选项 */
129
139
149
161 xf_netif_t netif_hdl,
162 xf_netif_pair_mac_ip_t mac_ip_pair_array[], uint32_t pair_array_size);
163
176
189
190/* ==================== [Macros] ============================================ */
191
192#ifdef __cplusplus
193} /* extern "C" */
194#endif
195
201#endif /* __XF_NETIF_H__ */
void * xf_netif_t
xfusion netif 句柄。
enum _xf_netif_dns_type_t xf_netif_dns_type_t
DNS 服务器类型。
xf_err_t xf_netif_dhcps_stop(xf_netif_t netif_hdl)
设置指定 netif 句柄停止 DHCP 服务端。
xf_err_t xf_netif_set_hostname(xf_netif_t netif_hdl, const char *hostname, uint32_t len)
设置当前 netif 句柄对应的主机名。
xf_err_t xf_netif_dhcps_get_clients_by_mac(xf_netif_t netif_hdl, xf_netif_pair_mac_ip_t mac_ip_pair_array[], uint32_t pair_array_size)
根据 MAC 地址获取对应的 IP(对于 DHCP 服务器)。
xf_err_t xf_netif_get_dns_info(xf_netif_t netif_hdl, xf_netif_dns_type_t type, xf_netif_dns_info_t *dns)
从指定 netif 句柄获取的 DNS 服务端信息。
xf_err_t xf_netif_set_dns_info(xf_netif_t netif_hdl, xf_netif_dns_type_t type, xf_netif_dns_info_t *dns)
设置指定 netif 句柄的 DNS 服务端。
xf_err_t xf_netif_dhcps_start(xf_netif_t netif_hdl)
设置指定 netif 句柄启动 DHCP 服务端。
xf_err_t xf_netif_dhcpc_stop(xf_netif_t netif_hdl)
设置指定 netif 句柄停止 DHCP 客户端。
xf_err_t xf_netif_get_hostname(xf_netif_t netif_hdl, char hostname[], uint32_t len)
获取当前 netif 句柄对应的主机名。
bool xf_netif_is_netif_up(xf_netif_t netif_hdl)
检测当前 netif 句柄对应设备是否上线。
xf_err_t xf_netif_dhcpc_start(xf_netif_t netif_hdl)
设置指定 netif 句柄启动 DHCP 客户端。
xf_err_t xf_netif_set_ip_info(xf_netif_t netif_hdl, const xf_netif_ip_info_t *ip_info)
设置指定 netif 句柄的 IPv4 信息(ip地址、网关、子网掩码)。
xf_err_t xf_netif_get_ip_info(xf_netif_t netif_hdl, xf_netif_ip_info_t *ip_info)
获取指定 netif 句柄的 IPv4 信息(ip地址、网关、子网掩码)。
int32_t xf_err_t
整形错误类型。 错误码具体值见 xf_err_code_t.
Definition xf_err.h:69
DNS 服务器信息。
DHCP 客户端的地址信息(MAC 和 IP 地址对)。