1 1.1 christos /* $NetBSD: util.h,v 1.7 2026/01/29 18:36:47 christos Exp $ */ 2 1.1 christos 3 1.1 christos /* 4 1.4 christos * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 1.4 christos * 6 1.4 christos * SPDX-License-Identifier: MPL-2.0 AND ISC 7 1.4 christos * 8 1.4 christos * This Source Code Form is subject to the terms of the Mozilla Public 9 1.4 christos * License, v. 2.0. If a copy of the MPL was not distributed with this 10 1.4 christos * file, you can obtain one at https://mozilla.org/MPL/2.0/. 11 1.4 christos * 12 1.4 christos * See the COPYRIGHT file distributed with this work for additional 13 1.4 christos * information regarding copyright ownership. 14 1.4 christos */ 15 1.4 christos 16 1.4 christos /* 17 1.4 christos * Copyright (C) Red Hat 18 1.4 christos * 19 1.4 christos * Permission to use, copy, modify, and/or distribute this software for any 20 1.4 christos * purpose with or without fee is hereby granted, provided that the above 21 1.4 christos * copyright notice and this permission notice appear in all copies. 22 1.4 christos * 23 1.4 christos * THE SOFTWARE IS PROVIDED "AS IS" AND AUTHORS DISCLAIMS ALL WARRANTIES WITH 24 1.4 christos * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 25 1.4 christos * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 26 1.4 christos * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 27 1.4 christos * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 28 1.4 christos * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 29 1.4 christos * PERFORMANCE OF THIS SOFTWARE. 30 1.4 christos */ 31 1.4 christos 32 1.4 christos /* 33 1.1 christos * Memory allocation and error handling utilities. 34 1.1 christos */ 35 1.1 christos 36 1.5 christos #pragma once 37 1.1 christos 38 1.1 christos #include <isc/mem.h> 39 1.3 christos 40 1.1 christos #include <dns/types.h> 41 1.1 christos 42 1.1 christos #include "log.h" 43