xref: /freebsd/usr.sbin/ctladm/ctladm.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1*1de7b4b8SPedro F. Giffuni /*-
2*1de7b4b8SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
3*1de7b4b8SPedro F. Giffuni  *
4130f4520SKenneth D. Merry  * Copyright (c) 1998 Kenneth D. Merry.
5130f4520SKenneth D. Merry  * All rights reserved.
6130f4520SKenneth D. Merry  *
7130f4520SKenneth D. Merry  * Redistribution and use in source and binary forms, with or without
8130f4520SKenneth D. Merry  * modification, are permitted provided that the following conditions
9130f4520SKenneth D. Merry  * are met:
10130f4520SKenneth D. Merry  * 1. Redistributions of source code must retain the above copyright
11130f4520SKenneth D. Merry  *    notice, this list of conditions and the following disclaimer.
12130f4520SKenneth D. Merry  * 2. Redistributions in binary form must reproduce the above copyright
13130f4520SKenneth D. Merry  *    notice, this list of conditions and the following disclaimer in the
14130f4520SKenneth D. Merry  *    documentation and/or other materials provided with the distribution.
15130f4520SKenneth D. Merry  * 3. The name of the author may not be used to endorse or promote products
16130f4520SKenneth D. Merry  *    derived from this software without specific prior written permission.
17130f4520SKenneth D. Merry  *
18130f4520SKenneth D. Merry  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19130f4520SKenneth D. Merry  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20130f4520SKenneth D. Merry  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21130f4520SKenneth D. Merry  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22130f4520SKenneth D. Merry  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23130f4520SKenneth D. Merry  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24130f4520SKenneth D. Merry  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25130f4520SKenneth D. Merry  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26130f4520SKenneth D. Merry  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27130f4520SKenneth D. Merry  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28130f4520SKenneth D. Merry  * SUCH DAMAGE.
29130f4520SKenneth D. Merry  * $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.h#1 $
30130f4520SKenneth D. Merry  */
31130f4520SKenneth D. Merry 
32130f4520SKenneth D. Merry #ifndef _CTLADM_H
33130f4520SKenneth D. Merry #define _CTLADM_H
34130f4520SKenneth D. Merry 
35130f4520SKenneth D. Merry /*
36130f4520SKenneth D. Merry  * get_hook: Structure for evaluating args in a callback.
37130f4520SKenneth D. Merry  */
38130f4520SKenneth D. Merry struct get_hook
39130f4520SKenneth D. Merry {
40130f4520SKenneth D. Merry 	int argc;
41130f4520SKenneth D. Merry 	char **argv;
42130f4520SKenneth D. Merry 	int got;
43130f4520SKenneth D. Merry };
44130f4520SKenneth D. Merry 
45130f4520SKenneth D. Merry char *cget(void *hook, char *name);
46130f4520SKenneth D. Merry int iget(void *hook, char *name);
47130f4520SKenneth D. Merry void arg_put(void *hook, int letter, void *arg, int count, char *name);
48130f4520SKenneth D. Merry void usage(int error);
49130f4520SKenneth D. Merry 
50130f4520SKenneth D. Merry #endif /* _CTLADM_H */
51