8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / tnf / prex / cmd.h
blob8e67544b9367f0f7d713ba07f58bb89321fae6c1
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1994, by Sun Microsytems, Inc.
26 #ifndef _CMD_H
27 #define _CMD_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 * Includes
35 #include <sys/types.h>
36 #include "queue.h"
37 #include "expr.h"
38 #include "set.h"
39 #include "fcn.h"
41 #include <tnf/tnfctl.h>
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
48 * Typedefs
51 typedef enum cmd_kind {
52 CMD_ENABLE,
53 CMD_DISABLE,
54 CMD_CONNECT,
55 CMD_CLEAR,
56 CMD_TRACE,
57 CMD_UNTRACE
58 } cmd_kind_t;
60 typedef struct cmd {
61 queue_node_t qn;
62 boolean_t isnamed;
63 boolean_t isnew;
64 union {
65 #ifdef LATEBINDSETS
66 char *setname_p;
67 #endif
68 expr_t *expr_p;
69 } expr;
70 char *fcnname_p;
71 cmd_kind_t kind;
72 } cmd_t;
74 typedef
75 tnfctl_errcode_t (*cmd_traverse_func_t) (
76 expr_t * expr_p,
77 cmd_kind_t kind,
78 fcn_t * fcn_p,
79 boolean_t isnew,
80 void *calldata_p);
84 * Declarations
87 cmd_t *cmd_set(char *setname_p, cmd_kind_t kind, char *fcnname_p);
88 cmd_t *cmd_expr(expr_t * expr_p, cmd_kind_t kind, char *fcnname_p);
89 void cmd_list(void);
90 #if 0
91 void cmd_mark(void);
92 void cmd_delete(int cmdnum);
93 #endif
94 tnfctl_errcode_t cmd_traverse(cmd_traverse_func_t percmdfunc, void *calldata_p);
95 tnfctl_errcode_t cmd_callback(cmd_t *cmd, cmd_traverse_func_t percmdfunc,
96 void *calldata_p);
98 #ifdef __cplusplus
100 #endif
102 #endif /* _CMD_H */