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:
@@ -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.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user