2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

add dns_dispatch_getlocaladdress().

This commit is contained in:
Mark Andrews
2001-03-13 05:48:41 +00:00
parent 79bc63f006
commit a674e7ecec
2 changed files with 29 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dispatch.c,v 1.96 2001/02/17 00:23:49 gson Exp $ */
/* $Id: dispatch.c,v 1.97 2001/03/13 05:48:40 marka Exp $ */
#include <config.h>
@@ -2010,6 +2010,19 @@ dns_dispatch_getsocket(dns_dispatch_t *disp) {
return (disp->socket);
}
isc_result_t
dns_dispatch_getlocaladdress(dns_dispatch_t *disp, isc_sockaddr_t *addrp) {
REQUIRE(VALID_DISPATCH(disp));
REQUIRE(addrp != NULL);
if (disp->socktype == isc_sockettype_udp) {
*addrp = disp->local;
return (ISC_R_SUCCESS);
}
return (ISC_R_NOTIMPLEMENTED);
}
void
dns_dispatch_cancel(dns_dispatch_t *disp) {
REQUIRE(VALID_DISPATCH(disp));