Remove Recvfrom wrapper.

This commit is contained in:
david 2012-06-19 02:53:01 +00:00
parent c5b818fdce
commit f7d8aa212f
3 changed files with 6 additions and 14 deletions

View file

@ -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();

View file

@ -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)
{

View file

@ -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);