2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

isc_sockaddr_t now has a length

This commit is contained in:
Bob Halley
1999-07-07 02:04:27 +00:00
parent 4a3b0c4ba8
commit c8e5c5f5b4

View File

@@ -86,7 +86,6 @@ struct isc_socketevent {
unsigned int n; /* bytes read or written */ unsigned int n; /* bytes read or written */
isc_region_t region; /* the region info */ isc_region_t region; /* the region info */
isc_sockaddr_t address; /* source address */ isc_sockaddr_t address; /* source address */
unsigned int addrlength; /* length of address */
}; };
typedef struct isc_socket_newconnev isc_socket_newconnev_t; typedef struct isc_socket_newconnev isc_socket_newconnev_t;
@@ -95,7 +94,6 @@ struct isc_socket_newconnev {
isc_socket_t * newsocket; isc_socket_t * newsocket;
isc_result_t result; /* OK, EOF, whatever else */ isc_result_t result; /* OK, EOF, whatever else */
isc_sockaddr_t address; /* source address */ isc_sockaddr_t address; /* source address */
unsigned int addrlength; /* length of address */
}; };
typedef struct isc_socket_connev { typedef struct isc_socket_connev {
@@ -273,8 +271,7 @@ isc_socket_detach(isc_socket_t **socketp);
*/ */
isc_result_t isc_result_t
isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *addressp, isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *addressp);
int length);
/* /*
* Bind 'socket' to '*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. * 'addressp' points to a valid isc_sockaddr.
* *
* 'length' is approprate for the isc_sockaddr type.
*
* Returns: * Returns:
* *
* ISC_R_SUCCESS * ISC_R_SUCCESS
@@ -345,7 +340,7 @@ isc_socket_accept(isc_socket_t *sock,
isc_result_t isc_result_t
isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addressp, 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); void *arg);
/* /*
* Connect 'socket' to peer with address *saddr. When the connection * 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 * 'addressp' points to a valid isc_sockaddr
* *
* 'length' is approprate for the isc_sockaddr type
*
* 'task' is a valid task * 'task' is a valid task
* *
* 'action' is a valid action * 'action' is a valid action
@@ -380,8 +373,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addressp,
*/ */
isc_result_t isc_result_t
isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp, isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp);
int *lengthp);
/* /*
* Get the name of the peer connected to 'socket'. * 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. * 'socket' is a valid TCP socket.
* *
* 'addressp' points to '*lengthp' bytes.
*
* Returns: * Returns:
* *
* ISC_R_SUCCESS * ISC_R_SUCCESS
@@ -399,8 +389,7 @@ isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp,
*/ */
isc_result_t isc_result_t
isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp, isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp);
int *lengthp);
/* /*
* Get the name of 'socket'. * 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. * 'socket' is a valid socket.
* *
* 'addressp' points to '*lengthp' bytes.
*
* Returns: * Returns:
* *
* ISC_R_SUCCESS * ISC_R_SUCCESS
@@ -471,7 +458,7 @@ isc_socket_send(isc_socket_t *sock, isc_region_t *region,
isc_result_t isc_result_t
isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_socket_sendto(isc_socket_t *sock, isc_region_t *region,
isc_task_t *task, isc_taskaction_t action, void *arg, 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. * Send the contents of 'region' to the socket's peer.
* *