mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 20:00:27 +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);
|
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 LibTCPAccept(PTCP_PCB pcb, struct tcp_pcb *listen_pcb, void *arg);
|
||||||
void LibTCPSetNoDelay(PTCP_PCB pcb, BOOLEAN Set);
|
void LibTCPSetNoDelay(PTCP_PCB pcb, BOOLEAN Set);
|
||||||
|
void LibTCPGetSocketStatus(PTCP_PCB pcb, PULONG State);
|
||||||
|
|
||||||
/* IP functions */
|
/* IP functions */
|
||||||
void LibIPInsertPacket(void *ifarg, const void *const data, const u32_t size);
|
void LibIPInsertPacket(void *ifarg, const void *const data, const u32_t size);
|
||||||
|
|
|
@ -840,3 +840,12 @@ LibTCPSetNoDelay(
|
||||||
else
|
else
|
||||||
pcb->flags &= ~TF_NODELAY;
|
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…
Add table
Add a link
Reference in a new issue