1313#endif
1414
1515typedef struct tcp_pcb * PTCP_PCB ;
16+ typedef struct ip_addr ip4_addr_t ;
1617
1718typedef struct _QUEUE_ENTRY
1819{
@@ -36,7 +37,7 @@ struct lwip_callback_msg
3637 } FreeSocket ;
3738 struct {
3839 PCONNECTION_ENDPOINT Connection ;
39- struct ip_addr * IpAddress ;
40+ ip_addr_t * IpAddress ;
4041 u16_t Port ;
4142 } Bind ;
4243 struct {
@@ -50,7 +51,7 @@ struct lwip_callback_msg
5051 } Send ;
5152 struct {
5253 PCONNECTION_ENDPOINT Connection ;
53- struct ip_addr * IpAddress ;
54+ ip_addr_t * IpAddress ;
5455 u16_t Port ;
5556 } Connect ;
5657 struct {
@@ -103,15 +104,15 @@ extern void TCPRecvEventHandler(void *arg);
103104/* TCP functions */
104105PTCP_PCB LibTCPSocket (void * arg );
105106VOID LibTCPFreeSocket (PTCP_PCB pcb );
106- err_t LibTCPBind (PCONNECTION_ENDPOINT Connection , struct ip_addr * const ipaddr , const u16_t port );
107+ err_t LibTCPBind (PCONNECTION_ENDPOINT Connection , ip4_addr_t * const ipaddr , const u16_t port );
107108PTCP_PCB LibTCPListen (PCONNECTION_ENDPOINT Connection , const u8_t backlog );
108- err_t LibTCPSend (PCONNECTION_ENDPOINT Connection , void * const dataptr , const u16_t len , u32_t * sent , const int safe );
109- err_t LibTCPConnect (PCONNECTION_ENDPOINT Connection , struct ip_addr * const ipaddr , const u16_t port );
109+ err_t LibTCPSend (PCONNECTION_ENDPOINT Connection , void * const dataptr , const u16_t len , ULONG * sent , const int safe );
110+ err_t LibTCPConnect (PCONNECTION_ENDPOINT Connection , ip4_addr_t * const ipaddr , const u16_t port );
110111err_t LibTCPShutdown (PCONNECTION_ENDPOINT Connection , const int shut_rx , const int shut_tx );
111112err_t LibTCPClose (PCONNECTION_ENDPOINT Connection , const int safe , const int callback );
112113
113- err_t LibTCPGetPeerName (PTCP_PCB pcb , struct ip_addr * const ipaddr , u16_t * const port );
114- err_t LibTCPGetHostName (PTCP_PCB pcb , struct ip_addr * const ipaddr , u16_t * const port );
114+ err_t LibTCPGetPeerName (PTCP_PCB pcb , ip4_addr_t * const ipaddr , u16_t * const port );
115+ err_t LibTCPGetHostName (PTCP_PCB pcb , ip4_addr_t * const ipaddr , u16_t * const port );
115116void LibTCPAccept (PTCP_PCB pcb , struct tcp_pcb * listen_pcb , void * arg );
116117void LibTCPSetNoDelay (PTCP_PCB pcb , BOOLEAN Set );
117118void LibTCPGetSocketStatus (PTCP_PCB pcb , PULONG State );
0 commit comments