/src/bind9/lib/dns/fixedname.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (C) Internet Systems Consortium, Inc. ("ISC") |
3 | | * |
4 | | * SPDX-License-Identifier: MPL-2.0 |
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 https://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 | 7.03M | dns_fixedname_init(dns_fixedname_t *fixed) { |
20 | 7.03M | dns_name_init(&fixed->name); |
21 | 7.03M | isc_buffer_init(&fixed->buffer, fixed->data, DNS_NAME_MAXWIRE); |
22 | 7.03M | dns_name_setbuffer(&fixed->name, &fixed->buffer); |
23 | 7.03M | } |
24 | | |
25 | | void |
26 | 0 | dns_fixedname_invalidate(dns_fixedname_t *fixed) { |
27 | 0 | dns_name_invalidate(&fixed->name); |
28 | 0 | } |
29 | | |
30 | | dns_name_t * |
31 | 6.73M | dns_fixedname_name(dns_fixedname_t *fixed) { |
32 | 6.73M | return &fixed->name; |
33 | 6.73M | } |
34 | | |
35 | | dns_name_t * |
36 | 6.71M | dns_fixedname_initname(dns_fixedname_t *fixed) { |
37 | 6.71M | dns_fixedname_init(fixed); |
38 | 6.71M | return dns_fixedname_name(fixed); |
39 | 6.71M | } |