summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
738f327)
This fixes netstat not having any state when enumerating connections.
Basically, now, our netstat produces stuff like:
https://twitter.com/HeisSpiter/status/
1065871999266955264
void
LibTCPDumpPcb(PVOID SocketContext);
void
LibTCPDumpPcb(PVOID SocketContext);
+
+NTSTATUS TCPGetSocketStatus(PCONNECTION_ENDPOINT Connection, PULONG State);
TI_DbgPrint(DEBUG_INFO, ("Called.\n"));
TI_DbgPrint(DEBUG_INFO, ("Called.\n"));
- TcpRow.State = 0; /* FIXME */
TcpRow.dwLocalAddr = AddrFile->Address.Address.IPv4Address;
TcpRow.dwLocalPort = AddrFile->Port;
TcpRow.dwLocalAddr = AddrFile->Address.Address.IPv4Address;
TcpRow.dwLocalPort = AddrFile->Port;
TcpRow.dwRemoteAddr = EndPoint.Address[0].Address[0].in_addr;
TcpRow.dwRemotePort = ntohs(EndPoint.Address[0].Address[0].sin_port);
}
TcpRow.dwRemoteAddr = EndPoint.Address[0].Address[0].in_addr;
TcpRow.dwRemotePort = ntohs(EndPoint.Address[0].Address[0].sin_port);
}
+
+ Status = TCPGetSocketStatus(AddrFile->Connection, (PULONG)&TcpRow.State);
+ ASSERT(NT_SUCCESS(Status));
TcpRow.dwRemoteAddr = 0;
TcpRow.dwRemotePort = 0;
}
TcpRow.dwRemoteAddr = 0;
TcpRow.dwRemotePort = 0;
}