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