mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[LWIP] Implement a LibTCPGetSocketStatus() function in our LwIP glue
It is used to query a socket state (established, closed, and so on).
This commit is contained in:
parent
a2819679ec
commit
29c1510423
2 changed files with 10 additions and 0 deletions
|
@ -110,6 +110,7 @@ err_t LibTCPGetPeerName(PTCP_PCB pcb, struct ip_addr *const ipaddr, u16_t
|
|||
err_t LibTCPGetHostName(PTCP_PCB pcb, struct ip_addr *const ipaddr, u16_t *const port);
|
||||
void LibTCPAccept(PTCP_PCB pcb, struct tcp_pcb *listen_pcb, void *arg);
|
||||
void LibTCPSetNoDelay(PTCP_PCB pcb, BOOLEAN Set);
|
||||
void LibTCPGetSocketStatus(PTCP_PCB pcb, PULONG State);
|
||||
|
||||
/* IP functions */
|
||||
void LibIPInsertPacket(void *ifarg, const void *const data, const u32_t size);
|
||||
|
|
|
@ -840,3 +840,12 @@ LibTCPSetNoDelay(
|
|||
else
|
||||
pcb->flags &= ~TF_NODELAY;
|
||||
}
|
||||
|
||||
void
|
||||
LibTCPGetSocketStatus(
|
||||
PTCP_PCB pcb,
|
||||
PULONG State)
|
||||
{
|
||||
/* Translate state from enum tcp_state -> MIB_TCP_STATE */
|
||||
*State = pcb->state + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue