1 /* $NetBSD: fixedname.c,v 1.3 2020/05/24 19:46:22 christos Exp $ */ 2 3 /* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * This Source Code Form is subject to the terms of the Mozilla Public 7 * License, v. 2.0. If a copy of the MPL was not distributed with this 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 * 10 * See the COPYRIGHT file distributed with this work for additional 11 * information regarding copyright ownership. 12 */ 13 14 /*! \file */ 15 16 #include <dns/fixedname.h> 17 18 void 19 dns_fixedname_init(dns_fixedname_t *fixed) { 20 dns_name_init(&fixed->name, fixed->offsets); 21 isc_buffer_init(&fixed->buffer, fixed->data, DNS_NAME_MAXWIRE); 22 dns_name_setbuffer(&fixed->name, &fixed->buffer); 23 } 24 25 void 26 dns_fixedname_invalidate(dns_fixedname_t *fixed) { 27 dns_name_invalidate(&fixed->name); 28 } 29 30 dns_name_t * 31 dns_fixedname_name(dns_fixedname_t *fixed) { 32 return (&fixed->name); 33 } 34 35 dns_name_t * 36 dns_fixedname_initname(dns_fixedname_t *fixed) { 37 dns_fixedname_init(fixed); 38 return (dns_fixedname_name(fixed)); 39 } 40