1 /****************************************************************************** 2 * 3 * This module is a confidential and proprietary property of RealTek and 4 * possession or use of this module requires written permission of RealTek. 5 * 6 * Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved. 7 * 8 ******************************************************************************/ 9 10 /* Define to prevent recursive inclusion -------------------------------------*/ 11 #ifndef __NETCONF_H 12 #define __NETCONF_H 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #include "lwip/tcpip.h" 19 /* Includes ------------------------------------------------------------------*/ 20 #include <platform/platform_stdlib.h> 21 #include "platform_opts.h" 22 #include "autoconf.h" 23 24 // macros 25 /* Give default value if not defined */ 26 #ifndef NET_IF_NUM 27 #ifdef CONFIG_CONCURRENT_MODE 28 #define NET_IF_NUM ((CONFIG_ETHERNET) + (CONFIG_WLAN) + 1) 29 #else 30 #define NET_IF_NUM ((CONFIG_ETHERNET) + (CONFIG_WLAN)) 31 #endif // end of CONFIG_CONCURRENT_MODE 32 #endif // end of NET_IF_NUM 33 34 /* Private typedef -----------------------------------------------------------*/ 35 typedef enum 36 { 37 DHCP_START=0, 38 DHCP_WAIT_ADDRESS, 39 DHCP_ADDRESS_ASSIGNED, 40 DHCP_RELEASE_IP, 41 DHCP_STOP, 42 DHCP_TIMEOUT 43 } DHCP_State_TypeDef; 44 45 /* Extern functions ------------------------------------------------------------*/ 46 void wifi_rx_beacon_hdl( char* buf, int buf_len, int flags, void* userdata); 47 48 49 /* Exported types ------------------------------------------------------------*/ 50 /* Exported constants --------------------------------------------------------*/ 51 /* Exported macro ------------------------------------------------------------*/ 52 /* Exported functions ------------------------------------------------------- */ 53 void LwIP_Init(void); 54 uint8_t LwIP_DHCP(uint8_t idx, uint8_t dhcp_state); 55 void LwIP_ReleaseIP(uint8_t idx); 56 unsigned char* LwIP_GetMAC(struct netif *pnetif); 57 unsigned char* LwIP_GetIP(struct netif *pnetif); 58 unsigned char* LwIP_GetGW(struct netif *pnetif); 59 uint8_t* LwIP_GetMASK(struct netif *pnetif); 60 uint8_t* LwIP_GetBC(struct netif *pnetif); 61 #if LWIP_DNS 62 void LwIP_GetDNS(ip_addr_t* dns); 63 void LwIP_SetDNS(ip_addr_t* dns); 64 #endif 65 void LwIP_UseStaticIP(struct netif *pnetif); 66 #if LWIP_AUTOIP 67 void LwIP_AUTOIP(struct netif *pnetif); 68 #endif 69 #if LWIP_IPV6 70 void LwIP_AUTOIP_IPv6(struct netif *pnetif); 71 #endif 72 uint32_t LWIP_Get_Dynamic_Sleep_Interval(); 73 #ifdef __cplusplus 74 } 75 #endif 76 77 #endif /* __NETCONF_H */ 78 79 80 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 81