"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "nsock/src/engine_iocp.c" between
nmap-7.90.tgz and nmap-7.91.tgz

About: Nmap ("Network Mapper") is a utility for network exploration or security auditing (port scanner).

engine_iocp.c  (nmap-7.90.tgz):engine_iocp.c  (nmap-7.91.tgz)
skipping to change at line 615 skipping to change at line 615
struct extended_overlapped *eov = new_eov(nse->iod->nsp, nse); struct extended_overlapped *eov = new_eov(nse->iod->nsp, nse);
eov->wsabuf.buf = eov->readbuf; eov->wsabuf.buf = eov->readbuf;
eov->wsabuf.len = READ_BUFFER_SZ; eov->wsabuf.len = READ_BUFFER_SZ;
err = WSARecvFrom(nse->iod->sd, &eov->wsabuf, 1, NULL, &flags, err = WSARecvFrom(nse->iod->sd, &eov->wsabuf, 1, NULL, &flags,
(struct sockaddr *)&nse->iod->peer, (LPINT)&nse->iod->peerlen, (LPOVERLAPPED )eov, NULL); (struct sockaddr *)&nse->iod->peer, (LPINT)&nse->iod->peerlen, (LPOVERLAPPED )eov, NULL);
if (err) { if (err) {
err = socket_errno(); err = socket_errno();
if (errcode_is_failure(err)) { if (errcode_is_failure(err)) {
eov->err = err; // WSARecvFrom with overlapped I/O may generate ERROR_PORT_UNREACHABLE on
ICMP error.
// We'll translate that so Nsock-using software doesn't have to know about
it.
eov->err = (err == ERROR_PORT_UNREACHABLE ? ECONNREFUSED : err);
/* Send the error to the main loop to be picked up by the appropriate hand ler */ /* Send the error to the main loop to be picked up by the appropriate hand ler */
BOOL bRet = PostQueuedCompletionStatus(iinfo->iocp, -1, (ULONG_PTR)nse->io d, (LPOVERLAPPED)eov); BOOL bRet = PostQueuedCompletionStatus(iinfo->iocp, -1, (ULONG_PTR)nse->io d, (LPOVERLAPPED)eov);
if (!bRet) if (!bRet)
fatal("Error initiating event type(%d)", nse->type); fatal("Error initiating event type(%d)", nse->type);
} }
} }
} }
static void call_write_overlapped(struct nevent *nse) { static void call_write_overlapped(struct nevent *nse) {
int err; int err;
 End of changes. 1 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)