コード例 #1
0
ファイル: PortCache.cpp プロジェクト: YaoXuanZhi/win32-netmon
MIB_UDPROW_OWNER_PID PortCache::GetUdpPortPidEx(int port)
{
	if (_mapUdpPortTableEx.find(port) != _mapUdpPortTableEx.end())
	{
		return _mapUdpPortTableEx[port];
	}
	else {
		// Rebuild Cache
		RebuildUdpTable();

		// Return
		return _mapUdpPortTableEx[port];
	}
}
コード例 #2
0
ファイル: PortCache.cpp プロジェクト: haiiv/permo
int PortCache::GetUdpPortPid(int port)
{
    if( _udpPortTable[port] != 0 )
    {
        return _udpPortTable[port];
    }
    else
    {
        // Rebuild Cache
        RebuildUdpTable();

        // Return
        return _udpPortTable[port];
    }
}