1 /* $NetBSD: netmgr_p.h,v 1.1 2024/02/18 20:57:49 christos Exp $ */ 2 3 /* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * SPDX-License-Identifier: MPL-2.0 7 * 8 * This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 11 * 12 * See the COPYRIGHT file distributed with this work for additional 13 * information regarding copyright ownership. 14 */ 15 16 #pragma once 17 18 #include <isc/mem.h> 19 #include <isc/result.h> 20 21 void 22 isc__netmgr_create(isc_mem_t *mctx, uint32_t workers, isc_nm_t **netgmrp); 23 /*%< 24 * Creates a new network manager with 'workers' worker threads, 25 * and starts it running. 26 */ 27 28 void 29 isc__netmgr_destroy(isc_nm_t **netmgrp); 30 /*%< 31 * Similar to isc_nm_detach(), but actively waits for all other references 32 * to be gone before returning. 33 */ 34 35 void 36 isc__netmgr_shutdown(isc_nm_t *mgr); 37 /*%< 38 * Shut down all active connections, freeing associated resources; 39 * prevent new connections from being established. 40 */ 41