mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Remove Recvfrom wrapper.
This commit is contained in:
parent
c5b818fdce
commit
f7d8aa212f
3 changed files with 6 additions and 14 deletions
|
|
@ -656,8 +656,13 @@ static int ncat_listen_dgram(int proto)
|
|||
* We just peek so we can get the client connection details without
|
||||
* removing anything from the queue. Sigh.
|
||||
*/
|
||||
nbytes = Recvfrom(socket_n, buf, sizeof(buf), MSG_PEEK,
|
||||
nbytes = recvfrom(socket_n, buf, sizeof(buf), MSG_PEEK,
|
||||
&remotess.sockaddr, &sslen);
|
||||
if (nbytes < 0) {
|
||||
loguser("%s.\n", socket_strerror(socket_errno()));
|
||||
close(socket_n);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Check conditions that might cause us to deny the connection. */
|
||||
conn_count = get_conn_count();
|
||||
|
|
|
|||
|
|
@ -166,18 +166,6 @@ ssize_t Read(int fd, void *buf, size_t count)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ssize_t Recvfrom(int s, void *buf, size_t len, int flags,
|
||||
struct sockaddr *from, socklen_t *fromlen)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
ret = recvfrom(s, (char *) buf, len, flags, from, fromlen);
|
||||
if (ret < 0)
|
||||
die("recvfrom");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Setsockopt(int s, int level, int optname, const void *optval,
|
||||
socklen_t optlen)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -135,7 +135,6 @@ int Dup2(int oldfd, int newfd);
|
|||
int Listen(int s, int backlog);
|
||||
int Open(const char *pathname, int flags, mode_t mode);
|
||||
ssize_t Read(int fd, void *buf, size_t count);
|
||||
ssize_t Recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
|
||||
int Setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen);
|
||||
sighandler_t Signal(int signum, sighandler_t handler);
|
||||
int Socket(int domain, int type, int protocol);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue