mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
isc_sockaddr_t now has a length
This commit is contained in:
parent
4a3b0c4ba8
commit
c8e5c5f5b4
@ -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.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user