From c8e5c5f5b42c4db1035d581bfbcd00dfaed18d1a Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Wed, 7 Jul 1999 02:04:27 +0000 Subject: [PATCH] isc_sockaddr_t now has a length --- lib/isc/include/isc/socket.h | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/lib/isc/include/isc/socket.h b/lib/isc/include/isc/socket.h index d854f7c4ab..e4a70f8957 100644 --- a/lib/isc/include/isc/socket.h +++ b/lib/isc/include/isc/socket.h @@ -86,7 +86,6 @@ struct isc_socketevent { unsigned int n; /* bytes read or written */ isc_region_t region; /* the region info */ isc_sockaddr_t address; /* source address */ - unsigned int addrlength; /* length of address */ }; typedef struct isc_socket_newconnev isc_socket_newconnev_t; @@ -95,7 +94,6 @@ struct isc_socket_newconnev { isc_socket_t * newsocket; isc_result_t result; /* OK, EOF, whatever else */ isc_sockaddr_t address; /* source address */ - unsigned int addrlength; /* length of address */ }; typedef struct isc_socket_connev { @@ -273,8 +271,7 @@ isc_socket_detach(isc_socket_t **socketp); */ isc_result_t -isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *addressp, - int length); +isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *addressp); /* * Bind 'socket' to '*addressp'. * @@ -284,8 +281,6 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *addressp, * * 'addressp' points to a valid isc_sockaddr. * - * 'length' is approprate for the isc_sockaddr type. - * * Returns: * * ISC_R_SUCCESS @@ -345,7 +340,7 @@ isc_socket_accept(isc_socket_t *sock, isc_result_t isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addressp, - int length, isc_task_t *task, isc_taskaction_t action, + isc_task_t *task, isc_taskaction_t action, void *arg); /* * Connect 'socket' to peer with address *saddr. When the connection @@ -358,8 +353,6 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addressp, * * 'addressp' points to a valid isc_sockaddr * - * 'length' is approprate for the isc_sockaddr type - * * 'task' is a valid task * * 'action' is a valid action @@ -380,8 +373,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addressp, */ isc_result_t -isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp, - int *lengthp); +isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp); /* * Get the name of the peer connected to 'socket'. * @@ -389,8 +381,6 @@ isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp, * * 'socket' is a valid TCP socket. * - * 'addressp' points to '*lengthp' bytes. - * * Returns: * * ISC_R_SUCCESS @@ -399,8 +389,7 @@ isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp, */ isc_result_t -isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp, - int *lengthp); +isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp); /* * Get the name of 'socket'. * @@ -408,8 +397,6 @@ isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp, * * 'socket' is a valid socket. * - * 'addressp' points to '*lengthp' bytes. - * * Returns: * * ISC_R_SUCCESS @@ -471,7 +458,7 @@ isc_socket_send(isc_socket_t *sock, isc_region_t *region, isc_result_t isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, isc_taskaction_t action, void *arg, - isc_sockaddr_t *address, unsigned int addrlength); + isc_sockaddr_t *address); /* * Send the contents of 'region' to the socket's peer. *