internal UdpListenerInformation(MIB_UDPROW_OWNER_MODULE entry) { LocalEndPoint = new IPEndPoint(entry.dwLocalAddr, Win32NetworkUtils.ConvertPort(entry.dwLocalPort)); ProcessId = entry.dwOwningPid; CreateTime = entry.liCreateTimestamp.ToDateTime(); OwnerModule = Win32NetworkUtils.GetOwnerModule(Win32NetworkNativeMethods.GetOwnerModuleFromUdpEntry, entry, ProcessId); SpecificPortBind = entry.dwFlags.HasFlagSet(UDPRowFlags.SpecificPortBind); }
internal TcpListenerInformation(MIB_TCPROW_OWNER_MODULE entry) { LocalEndPoint = new IPEndPoint(entry.dwLocalAddr, Win32NetworkUtils.ConvertPort(entry.dwLocalPort)); RemoteEndPoint = new IPEndPoint(entry.dwRemoteAddr, Win32NetworkUtils.ConvertPort(entry.dwRemotePort)); State = (TcpState)entry.dwState; ProcessId = entry.dwOwningPid; CreateTime = entry.liCreateTimestamp.ToDateTime(); OwnerModule = Win32NetworkUtils.GetOwnerModule(Win32NetworkNativeMethods.GetOwnerModuleFromTcpEntry, entry, ProcessId); }