2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

add cfg_obj_assockaddr

This commit is contained in:
Brian Wellington
2001-02-22 23:59:28 +00:00
parent dc9870de55
commit fba7c63ea4
2 changed files with 21 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.18 2001/02/22 20:41:41 gson Exp $ */
/* $Id: parser.c,v 1.19 2001/02/22 23:59:27 bwelling Exp $ */
#include <config.h>
@@ -1604,6 +1604,12 @@ cfg_obj_asboolean(cfg_obj_t *obj) {
return (obj->value.boolean);
}
isc_sockaddr_t *
cfg_obj_assockaddr(cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_sockaddr);
return (&obj->value.sockaddr);
}
/* Quoted string only */
static cfg_type_t cfg_type_qstring = {
"qstring", parse_qstring, print_qstring, &cfg_rep_string, NULL };