remove ISC_NET_RECVOVERFLOW, as it appears to be unused
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ISC_NET_H
|
||||
#define ISC_NET_H 1
|
||||
|
||||
@@ -263,15 +262,6 @@ extern const struct in6_addr isc_net_in6addrloop;
|
||||
typedef isc_uint16_t in_port_t;
|
||||
#endif
|
||||
|
||||
#ifndef MSG_TRUNC
|
||||
/*%
|
||||
* If this system does not have MSG_TRUNC (as returned from recvmsg())
|
||||
* ISC_PLATFORM_RECVOVERFLOW will be defined. This will enable the MSG_TRUNC
|
||||
* faking code in socket.c.
|
||||
*/
|
||||
#define ISC_PLATFORM_RECVOVERFLOW
|
||||
#endif
|
||||
|
||||
/*% IP address. */
|
||||
#define ISC__IPADDR(x) ((isc_uint32_t)htonl((isc_uint32_t)(x)))
|
||||
|
||||
|
||||
@@ -371,10 +371,6 @@ struct isc__socket {
|
||||
active : 1, /* currently active */
|
||||
pktdscp : 1; /* per packet dscp */
|
||||
|
||||
#ifdef ISC_NET_RECVOVERFLOW
|
||||
unsigned char overflow; /* used for MSG_TRUNC fake */
|
||||
#endif
|
||||
|
||||
char *recvcmsgbuf;
|
||||
ISC_SOCKADDR_LEN_T recvcmsgbuflen;
|
||||
char *sendcmsgbuf;
|
||||
@@ -463,11 +459,7 @@ static isc__socketmgr_t *socketmgr = NULL;
|
||||
* send() and recv() iovec counts
|
||||
*/
|
||||
#define MAXSCATTERGATHER_SEND (ISC_SOCKET_MAXSCATTERGATHER)
|
||||
#ifdef ISC_NET_RECVOVERFLOW
|
||||
# define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER + 1)
|
||||
#else
|
||||
# define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER)
|
||||
#endif
|
||||
#define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER)
|
||||
|
||||
static isc_result_t socket_create(isc_socketmgr_t *manager0, int pf,
|
||||
isc_sockettype_t type,
|
||||
@@ -1706,10 +1698,6 @@ build_msghdr_recv(isc__socket_t *sock, isc_socketevent_t *dev,
|
||||
#else
|
||||
msg->msg_name = (void *)&dev->address.type.sa;
|
||||
msg->msg_namelen = sizeof(dev->address.type);
|
||||
#endif
|
||||
#ifdef ISC_NET_RECVOVERFLOW
|
||||
/* If needed, steal one iovec for overflow detection. */
|
||||
maxiov--;
|
||||
#endif
|
||||
} else { /* TCP */
|
||||
msg->msg_name = NULL;
|
||||
@@ -1760,19 +1748,6 @@ build_msghdr_recv(isc__socket_t *sock, isc_socketevent_t *dev,
|
||||
|
||||
config:
|
||||
|
||||
/*
|
||||
* If needed, set up to receive that one extra byte. Note that
|
||||
* we know there is at least one iov left, since we stole it
|
||||
* at the top of this function.
|
||||
*/
|
||||
#ifdef ISC_NET_RECVOVERFLOW
|
||||
if (sock->type == isc_sockettype_udp) {
|
||||
iov[iovcount].iov_base = (void *)(&sock->overflow);
|
||||
iov[iovcount].iov_len = 1;
|
||||
iovcount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
msg->msg_iov = iov;
|
||||
msg->msg_iovlen = iovcount;
|
||||
|
||||
@@ -1998,18 +1973,6 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
|
||||
isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PKTRECV,
|
||||
"packet received correctly");
|
||||
|
||||
/*
|
||||
* Overflow bit detection. If we received MORE bytes than we should,
|
||||
* this indicates an overflow situation. Set the flag in the
|
||||
* dev entry and adjust how much we read by one.
|
||||
*/
|
||||
#ifdef ISC_NET_RECVOVERFLOW
|
||||
if ((sock->type == isc_sockettype_udp) && ((size_t)cc > read_count)) {
|
||||
dev->attributes |= ISC_SOCKEVENTATTR_TRUNC;
|
||||
cc--;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there are control messages attached, run through them and pull
|
||||
* out the interesting bits.
|
||||
|
||||
@@ -117,15 +117,6 @@ struct in6_pktinfo {
|
||||
typedef isc_uint16_t in_port_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If this system does not have MSG_TRUNC (as returned from recvmsg())
|
||||
* ISC_PLATFORM_RECVOVERFLOW will be defined. This will enable the MSG_TRUNC
|
||||
* faking code in socket.c.
|
||||
*/
|
||||
#ifndef MSG_TRUNC
|
||||
#define ISC_PLATFORM_RECVOVERFLOW
|
||||
#endif
|
||||
|
||||
#define ISC__IPADDR(x) ((isc_uint32_t)htonl((isc_uint32_t)(x)))
|
||||
|
||||
#define ISC_IPADDR_ISMULTICAST(i) \
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#endif
|
||||
#define ISC_PLATFORM_HAVESCOPEID
|
||||
#define ISC_PLATFORM_NEEDPORTT
|
||||
#undef MSG_TRUNC
|
||||
#define ISC_PLATFORM_NEEDNTOP
|
||||
#define ISC_PLATFORM_NEEDPTON
|
||||
#define ISC_PLATFORM_HAVESOCKADDRSTORAGE
|
||||
|
||||
Reference in New Issue
Block a user