blob: 241c718ba68256b70065c4f1fbfae8458c081def [file] [log] [blame]
b.liu68a94c92025-05-24 12:53:41 +08001/**
2 * @file ql_network.h
3 * @brief Quectel Openlinux network public function declarations.
4 *
5 * @note
6 *
7 * @copyright Copyright (c) 2009-2017 @ Quectel Wireless Solutions Co., Ltd.
8 */
9
10#ifndef __QL_NETWORK_H__
11#define __QL_NETWORK_H__
12#include "mbtk_type.h"
13#include "mbtk_info_api.h"
14
15
16 typedef struct {
17 char gw_ip[20]; /* Gateway Address*/
18 char netmask[20]; /* netmask */
19 unsigned char enable_dhcp; /* Whether to enable DHCP; boolean value. */
20 char dhcp_start_ip[20]; /*DHCP start IP address.*/
21 char dhcp_end_ip[20]; /*DHCP end IP address. */
22 unsigned int lease_time; /*DHCP lease time, in seconds.*/
23 }ql_lan_dhcp_config_s;
24
25
26
27/**
28* Set the network configuration: dhcp configuration.
29*s
30* @param [in] lan_dhcp_config
31*
32* @return
33* On success, 0 is returned. On error, -1 is returned.
34*
35*/
36extern int QL_LAN_DHCP_Config_Set(ql_lan_dhcp_config_s lan_dhcp_config);
37
38/**
39* Get the network configuration: dhcp configuration.
40*
41* @param [out] lan_dhcp_config
42*
43* @return
44* On success, 0 is returned. On error, -1 is returned.
45*
46*/
47extern int QL_LAN_DHCP_Config_Get(ql_lan_dhcp_config_s *lan_dhcp_config);
48
49#endif
50
51