mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Move isc_socket_getsockname() calls into dispatch
We now use dns_dispentry_getlocaladdress(). (this API is likely to be cleaned up further later.)
This commit is contained in:
@@ -2678,6 +2678,23 @@ dns_dispatch_getlocaladdress(dns_dispatch_t *disp, isc_sockaddr_t *addrp) {
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_dispentry_getlocaladdress(dns_dispentry_t *resp, isc_sockaddr_t *addrp) {
|
||||
REQUIRE(VALID_RESPONSE(resp));
|
||||
REQUIRE(addrp != NULL);
|
||||
|
||||
if (resp->disp->socktype == isc_sockettype_tcp) {
|
||||
return (isc_socket_getsockname(resp->disp->socket, addrp));
|
||||
}
|
||||
|
||||
if (resp->dispsocket != NULL) {
|
||||
return (isc_socket_getsockname(resp->dispsocket->socket,
|
||||
addrp));
|
||||
}
|
||||
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
dns_dispatch_getattributes(dns_dispatch_t *disp) {
|
||||
REQUIRE(VALID_DISPATCH(disp));
|
||||
|
Reference in New Issue
Block a user