一个被调试程序通过API函数WSARecvFrom接收UDP数据包,现在希望WSARecvFrom函数只在接收到指定源IP地址(lpFrom)和指定大小的已接收字节数(lpNumberOfBytesRecvd)时再中断,因为WSARecvFrom函数在这个程序中,即使很短时间内也会有大量调用,如果一一排查太费时间。
请问应该如何下这个条件中断? -----------------------------------------------------------
函数WSARecvFrom的原型( http://msdn.microsoft.com/en-us/library/ms741686%28VS.85%29.aspx): int WSARecvFrom( __in SOCKET s, __inout LPWSABUF lpBuffers, __in DWORD dwBufferCount, __out LPDWORD lpNumberOfBytesRecvd, __inout LPDWORD lpFlags, __out struct sockaddr *lpFrom, __inout LPINT lpFromlen, __in LPWSAOVERLAPPED lpOverlapped, __in LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine ); ----------------------------------------------------------- 谢谢!
|