• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Winner Microelectronics Co., Ltd. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef WM_DHCP_SERVER_H
17 #define WM_DHCP_SERVER_H
18 
19 /**
20  * @defgroup APP_APIs APP APIs
21  * @brief APP APIs
22  */
23 
24 /**
25  * @addtogroup APP_APIs
26  * @{
27  */
28 
29 /**
30  * @defgroup DHCPS_APIs DHCPS APIs
31  * @brief DHCP server APIs
32  */
33 
34 /**
35  * @addtogroup DHCPS_APIs
36  * @{
37  */
38 
39 /**
40  * @brief          This function is used to start DHCP Server for a network
41                    interface
42  *
43  * @param          None
44  *
45  * @retval         WM_SUCCESS     success
46  * @retval         WM_FAILED	  failed
47  *
48  * @note           None
49  */
50 s8 tls_dhcps_start(void);
51 
52 /**
53  * @brief          This function is used to stop DHCP server
54  *
55  * @param[in]      None
56  *
57  * @return         None
58  *
59  * @note           None
60  */
61 void tls_dhcps_stop(void);
62 
63 /**
64  * @brief          This function is used to get station's IP address by
65                    MAC address
66  *
67  * @param[in]      *mac  STA's MAC address
68  *
69  * @retval         ip_addr     STA's IP address
70  * @retval         NULL		   Not found match IP with MAC address
71  *
72  * @note           None
73  */
74 ip_addr_t *tls_dhcps_getip(const u8 *mac);
75 
76 /**
77  * @brief          This function is used to set DHCP server's DNS address
78  *
79  * @param[in]      numdns    the index of the DNS server to set must be 0 or 1
80  *
81  * @return         None
82  *
83  * @note           None
84  */
85 void tls_dhcps_setdns(u8 numdns);
86 
87 /**
88  * @}
89  */
90 
91 /**
92  * @}
93  */
94 
95 #endif /* WM_DHCP_SERVER_H */
96 
97