https://git.reactos.org/?p=reactos.git;a=commitdiff;h=738f3276683a782eb74ca…
commit 738f3276683a782eb74cabc0bac0f63dfc410613
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Nov 23 22:48:34 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Nov 23 22:51:35 2018 +0100
[IP] Add a TCPGetSocketStatus() wrapper around LibTCPGetSocketStatus()
---
sdk/lib/drivers/ip/transport/tcp/tcp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sdk/lib/drivers/ip/transport/tcp/tcp.c
b/sdk/lib/drivers/ip/transport/tcp/tcp.c
index 69a2f42366..675971bb2a 100644
--- a/sdk/lib/drivers/ip/transport/tcp/tcp.c
+++ b/sdk/lib/drivers/ip/transport/tcp/tcp.c
@@ -691,5 +691,19 @@ TCPSetNoDelay(
return STATUS_SUCCESS;
}
+NTSTATUS
+TCPGetSocketStatus(
+ PCONNECTION_ENDPOINT Connection,
+ PULONG State)
+{
+ if (!Connection)
+ return STATUS_UNSUCCESSFUL;
+
+ if (Connection->SocketContext == NULL)
+ return STATUS_UNSUCCESSFUL;
+
+ LibTCPGetSocketStatus(Connection->SocketContext, State);
+ return STATUS_SUCCESS;
+}
/* EOF */