16bea8766SBrooks Davis /* $FreeBSD$ */ 26bea8766SBrooks Davis 36bea8766SBrooks Davis /*- 46bea8766SBrooks Davis * Copyright (c) 2012 SRI International 56bea8766SBrooks Davis * Copyright (c) 1995 66bea8766SBrooks Davis * The Regents of the University of California. All rights reserved. 76bea8766SBrooks Davis * 86bea8766SBrooks Davis * Redistribution and use in source and binary forms, with or without 96bea8766SBrooks Davis * modification, are permitted provided that the following conditions 106bea8766SBrooks Davis * are met: 116bea8766SBrooks Davis * 1. Redistributions of source code must retain the above copyright 126bea8766SBrooks Davis * notice, this list of conditions and the following disclaimer. 136bea8766SBrooks Davis * 2. Redistributions in binary form must reproduce the above copyright 146bea8766SBrooks Davis * notice, this list of conditions and the following disclaimer in the 156bea8766SBrooks Davis * documentation and/or other materials provided with the distribution. 166bea8766SBrooks Davis * 3. Neither the name of the University nor the names of its contributors 176bea8766SBrooks Davis * may be used to endorse or promote products derived from this software 186bea8766SBrooks Davis * without specific prior written permission. 196bea8766SBrooks Davis * 206bea8766SBrooks Davis * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 216bea8766SBrooks Davis * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 226bea8766SBrooks Davis * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 236bea8766SBrooks Davis * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 246bea8766SBrooks Davis * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 256bea8766SBrooks Davis * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 266bea8766SBrooks Davis * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 276bea8766SBrooks Davis * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 286bea8766SBrooks Davis * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 296bea8766SBrooks Davis * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 306bea8766SBrooks Davis * SUCH DAMAGE. 316bea8766SBrooks Davis */ 326bea8766SBrooks Davis 33*acf26de3SEnji Cooper #ifndef _LIBNETBSD_UTIL_H_ 34*acf26de3SEnji Cooper #define _LIBNETBSD_UTIL_H_ 356bea8766SBrooks Davis 36*acf26de3SEnji Cooper #include <stdio.h> /* for fparseln(3) */ 376bea8766SBrooks Davis #include <libutil.h> 386bea8766SBrooks Davis 396bea8766SBrooks Davis char *flags_to_string(u_long flags, const char *def); 406bea8766SBrooks Davis int string_to_flags(char **stringp, u_long *setp, u_long *clrp); 416bea8766SBrooks Davis 426bea8766SBrooks Davis #endif /* _UTIL_H_ */ 43