xref: /freebsd/lib/libnetbsd/util.h (revision 6bea8766443cc86412928fa25a6e6a4b70a0a3b0)
1*6bea8766SBrooks Davis /*	$FreeBSD$	*/
2*6bea8766SBrooks Davis 
3*6bea8766SBrooks Davis /*-
4*6bea8766SBrooks Davis  * Copyright (c) 2012 SRI International
5*6bea8766SBrooks Davis  * Copyright (c) 1995
6*6bea8766SBrooks Davis  *	The Regents of the University of California.  All rights reserved.
7*6bea8766SBrooks Davis  *
8*6bea8766SBrooks Davis  * Redistribution and use in source and binary forms, with or without
9*6bea8766SBrooks Davis  * modification, are permitted provided that the following conditions
10*6bea8766SBrooks Davis  * are met:
11*6bea8766SBrooks Davis  * 1. Redistributions of source code must retain the above copyright
12*6bea8766SBrooks Davis  *    notice, this list of conditions and the following disclaimer.
13*6bea8766SBrooks Davis  * 2. Redistributions in binary form must reproduce the above copyright
14*6bea8766SBrooks Davis  *    notice, this list of conditions and the following disclaimer in the
15*6bea8766SBrooks Davis  *    documentation and/or other materials provided with the distribution.
16*6bea8766SBrooks Davis  * 3. Neither the name of the University nor the names of its contributors
17*6bea8766SBrooks Davis  *    may be used to endorse or promote products derived from this software
18*6bea8766SBrooks Davis  *    without specific prior written permission.
19*6bea8766SBrooks Davis  *
20*6bea8766SBrooks Davis  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21*6bea8766SBrooks Davis  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22*6bea8766SBrooks Davis  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23*6bea8766SBrooks Davis  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24*6bea8766SBrooks Davis  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25*6bea8766SBrooks Davis  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26*6bea8766SBrooks Davis  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27*6bea8766SBrooks Davis  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28*6bea8766SBrooks Davis  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29*6bea8766SBrooks Davis  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30*6bea8766SBrooks Davis  * SUCH DAMAGE.
31*6bea8766SBrooks Davis  */
32*6bea8766SBrooks Davis 
33*6bea8766SBrooks Davis #ifndef _UTIL_H_
34*6bea8766SBrooks Davis #define _UTIL_H_
35*6bea8766SBrooks Davis 
36*6bea8766SBrooks Davis #include <libutil.h>
37*6bea8766SBrooks Davis 
38*6bea8766SBrooks Davis char	*flags_to_string(u_long flags, const char *def);
39*6bea8766SBrooks Davis int	 string_to_flags(char **stringp, u_long *setp, u_long *clrp);
40*6bea8766SBrooks Davis 
41*6bea8766SBrooks Davis #endif	/* _UTIL_H_ */
42