The IInetLogInformation::GetPortNumber method retrieves the number of the port the client is connected to.
virtual DWORD STDMETHODCALLTYPE GetPortNumber( VOID);
Logging modules should query for this method if a server instance has set the LogExtFileServerPort flag of the LogExtFileFlags metabase identifier.
LogExtFileServerPort, LogExtFileFlags