1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright (c) 1993 by Sun Microsystems, Inc. 24*7c478bd9Sstevel@tonic-gate */ 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate #ifndef _FW_H 27*7c478bd9Sstevel@tonic-gate #define _FW_H 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #include <rpc/rpc.h> 32*7c478bd9Sstevel@tonic-gate #include "fakewin.h" 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 35*7c478bd9Sstevel@tonic-gate extern "C" { 36*7c478bd9Sstevel@tonic-gate #endif 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate /* 39*7c478bd9Sstevel@tonic-gate * Header file for the framework. 40*7c478bd9Sstevel@tonic-gate */ 41*7c478bd9Sstevel@tonic-gate #define CTXTLEN 1024 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate struct Op_arg_item { 44*7c478bd9Sstevel@tonic-gate char _TKFAR *name; 45*7c478bd9Sstevel@tonic-gate char _TKFAR *value; 46*7c478bd9Sstevel@tonic-gate struct Op_arg_item _TKFAR *next; 47*7c478bd9Sstevel@tonic-gate }; 48*7c478bd9Sstevel@tonic-gate typedef struct Op_arg_item Op_arg_item; 49*7c478bd9Sstevel@tonic-gate 50*7c478bd9Sstevel@tonic-gate struct Op_row_link { 51*7c478bd9Sstevel@tonic-gate Op_arg_item _TKFAR *first; 52*7c478bd9Sstevel@tonic-gate Op_arg_item _TKFAR *last; 53*7c478bd9Sstevel@tonic-gate struct Op_row_link _TKFAR *next; 54*7c478bd9Sstevel@tonic-gate }; 55*7c478bd9Sstevel@tonic-gate typedef struct Op_row_link Op_row_link; 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate struct Op_arg { 58*7c478bd9Sstevel@tonic-gate Op_row_link _TKFAR *first; 59*7c478bd9Sstevel@tonic-gate Op_row_link _TKFAR *last; 60*7c478bd9Sstevel@tonic-gate Op_row_link _TKFAR *curr; 61*7c478bd9Sstevel@tonic-gate Op_arg_item _TKFAR *cura; 62*7c478bd9Sstevel@tonic-gate u_long rows; 63*7c478bd9Sstevel@tonic-gate bool_t xdr_flag; 64*7c478bd9Sstevel@tonic-gate }; 65*7c478bd9Sstevel@tonic-gate typedef struct Op_arg Op_arg; 66*7c478bd9Sstevel@tonic-gate 67*7c478bd9Sstevel@tonic-gate enum Fw_err { 68*7c478bd9Sstevel@tonic-gate FW_ERR_NONE = 0, 69*7c478bd9Sstevel@tonic-gate FW_ERR_FW = 1, 70*7c478bd9Sstevel@tonic-gate FW_ERR_OP = 2 71*7c478bd9Sstevel@tonic-gate }; 72*7c478bd9Sstevel@tonic-gate typedef enum Fw_err Fw_err; 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gate struct Op_err { 75*7c478bd9Sstevel@tonic-gate Fw_err type; 76*7c478bd9Sstevel@tonic-gate u_long code; 77*7c478bd9Sstevel@tonic-gate bool_t xdr_flag; 78*7c478bd9Sstevel@tonic-gate char _TKFAR *message; 79*7c478bd9Sstevel@tonic-gate }; 80*7c478bd9Sstevel@tonic-gate typedef struct Op_err Op_err; 81*7c478bd9Sstevel@tonic-gate 82*7c478bd9Sstevel@tonic-gate typedef char invk_context[CTXTLEN]; 83*7c478bd9Sstevel@tonic-gate 84*7c478bd9Sstevel@tonic-gate struct invk_result { 85*7c478bd9Sstevel@tonic-gate Op_err _TKFAR *err; 86*7c478bd9Sstevel@tonic-gate Op_arg _TKFAR *arg; 87*7c478bd9Sstevel@tonic-gate bool_t eof; 88*7c478bd9Sstevel@tonic-gate }; 89*7c478bd9Sstevel@tonic-gate typedef struct invk_result invk_result; 90*7c478bd9Sstevel@tonic-gate 91*7c478bd9Sstevel@tonic-gate struct invk_request { 92*7c478bd9Sstevel@tonic-gate char _TKFAR *category; 93*7c478bd9Sstevel@tonic-gate char _TKFAR *op; 94*7c478bd9Sstevel@tonic-gate char _TKFAR *vers; 95*7c478bd9Sstevel@tonic-gate char _TKFAR *locale; 96*7c478bd9Sstevel@tonic-gate u_long threshold; 97*7c478bd9Sstevel@tonic-gate invk_context context; 98*7c478bd9Sstevel@tonic-gate Op_arg _TKFAR *arg; 99*7c478bd9Sstevel@tonic-gate }; 100*7c478bd9Sstevel@tonic-gate typedef struct invk_request invk_request; 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gate struct more_request { 103*7c478bd9Sstevel@tonic-gate invk_context context; 104*7c478bd9Sstevel@tonic-gate u_long threshold; 105*7c478bd9Sstevel@tonic-gate }; 106*7c478bd9Sstevel@tonic-gate typedef struct more_request more_request; 107*7c478bd9Sstevel@tonic-gate 108*7c478bd9Sstevel@tonic-gate struct kill_request { 109*7c478bd9Sstevel@tonic-gate invk_context context; 110*7c478bd9Sstevel@tonic-gate }; 111*7c478bd9Sstevel@tonic-gate typedef struct kill_request kill_request; 112*7c478bd9Sstevel@tonic-gate 113*7c478bd9Sstevel@tonic-gate #define FW_KV_DELIM "=" 114*7c478bd9Sstevel@tonic-gate #define FW_KV_DELIM_CH '=' 115*7c478bd9Sstevel@tonic-gate #define FW_VK_DELIM "\n" 116*7c478bd9Sstevel@tonic-gate #define FW_VK_DELIM_CH '\n'; 117*7c478bd9Sstevel@tonic-gate #define FW_INPUT_VERS_VAL 1 118*7c478bd9Sstevel@tonic-gate #define FW_INPUT_VERS_STR "1" 119*7c478bd9Sstevel@tonic-gate #define FW_OUTPUT_VERS_VAL 1 120*7c478bd9Sstevel@tonic-gate #define FW_OUTPUT_VERS_STR "1" 121*7c478bd9Sstevel@tonic-gate #define FW_INPUT_VERS_KEY "_SUNW_AO_INPUT_VERS" 122*7c478bd9Sstevel@tonic-gate #define FW_OUTPUT_VERS_KEY "_SUNW_AO_OUTPUT_VERS" 123*7c478bd9Sstevel@tonic-gate #define FW_ROW_MARKER_KEY "_SUNW_AO_BEGIN_ROW" 124*7c478bd9Sstevel@tonic-gate #define FW_ROW_MARKER FW_ROW_MARKER_KEY FW_KV_DELIM FW_OUTPUT_VERS_STR \ 125*7c478bd9Sstevel@tonic-gate FW_VK_DELIM 126*7c478bd9Sstevel@tonic-gate #define FW_INPUT_VERS FW_INPUT_VERS_KEY FW_KV_DELIM FW_INPUT_VERS_STR \ 127*7c478bd9Sstevel@tonic-gate FW_VK_DELIM 128*7c478bd9Sstevel@tonic-gate #define FW_OUTPUT_VERS FW_OUTPUT_VERS_KEY FW_KV_DELIM FW_OUTPUT_VERS_STR \ 129*7c478bd9Sstevel@tonic-gate FW_VK_DELIM 130*7c478bd9Sstevel@tonic-gate #define FW_ERR_MSG_MAX 2047 131*7c478bd9Sstevel@tonic-gate #define FW_UNIX_USER "UU" 132*7c478bd9Sstevel@tonic-gate 133*7c478bd9Sstevel@tonic-gate #define FW_SUCCESS 0 134*7c478bd9Sstevel@tonic-gate #define FW_ERROR -1 135*7c478bd9Sstevel@tonic-gate #define FW_TIMEOUT -2 136*7c478bd9Sstevel@tonic-gate 137*7c478bd9Sstevel@tonic-gate #define SN_LOCALE_PATH_VAR "_SN_LOCALE_PATH" 138*7c478bd9Sstevel@tonic-gate #define SN_UNAME_VAR "_SN_UNAME" 139*7c478bd9Sstevel@tonic-gate #define SN_UID_VAR "_SN_UID" 140*7c478bd9Sstevel@tonic-gate 141*7c478bd9Sstevel@tonic-gate #include "fw_lib.h" 142*7c478bd9Sstevel@tonic-gate 143*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 144*7c478bd9Sstevel@tonic-gate } 145*7c478bd9Sstevel@tonic-gate #endif 146*7c478bd9Sstevel@tonic-gate 147*7c478bd9Sstevel@tonic-gate #endif /* !_FW_H */ 148