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 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _IPQOS_CONF_H 28*7c478bd9Sstevel@tonic-gate #define _IPQOS_CONF_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #include <sys/stat.h> 31*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 32*7c478bd9Sstevel@tonic-gate #include <sys/nvpair.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 /* debug level bits */ 39*7c478bd9Sstevel@tonic-gate #define L0 0x01 40*7c478bd9Sstevel@tonic-gate #define L1 0x02 41*7c478bd9Sstevel@tonic-gate #define L2 0x04 42*7c478bd9Sstevel@tonic-gate #define DIFF 0x08 43*7c478bd9Sstevel@tonic-gate #define KRET 0x10 44*7c478bd9Sstevel@tonic-gate #define APPLY 0x20 45*7c478bd9Sstevel@tonic-gate #define MHME 0x40 46*7c478bd9Sstevel@tonic-gate #define RBK 0x80 47*7c478bd9Sstevel@tonic-gate 48*7c478bd9Sstevel@tonic-gate /* directory for types files */ 49*7c478bd9Sstevel@tonic-gate #define TYPES_FILE_DIR "/usr/lib/ipqosconf/" 50*7c478bd9Sstevel@tonic-gate 51*7c478bd9Sstevel@tonic-gate /* location of lock file */ 52*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_LOCK_FILE "/var/run/ipqosconf.lock" 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate /* location of startup config file */ 55*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_INIT_PATH "/etc/inet/ipqosinit.conf" 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate /* ipqosconf commands */ 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_APPLY 1 60*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_VIEW 2 61*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_COMMIT 3 62*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_FLUSH 4 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate /* print ntabs to stream fp */ 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate #define PRINT_TABS(fp, ntabs)\ 67*7c478bd9Sstevel@tonic-gate {\ 68*7c478bd9Sstevel@tonic-gate int x;\ 69*7c478bd9Sstevel@tonic-gate for (x = 0; x < ntabs; x++)\ 70*7c478bd9Sstevel@tonic-gate (void) fprintf(fp, "\t");\ 71*7c478bd9Sstevel@tonic-gate } 72*7c478bd9Sstevel@tonic-gate 73*7c478bd9Sstevel@tonic-gate /* having to define this as ip6.h version in _KERNEL guard */ 74*7c478bd9Sstevel@tonic-gate #ifndef V4_PART_OF_V6 75*7c478bd9Sstevel@tonic-gate #define V4_PART_OF_V6(v6) v6._S6_un._S6_u32[3] 76*7c478bd9Sstevel@tonic-gate #endif 77*7c478bd9Sstevel@tonic-gate 78*7c478bd9Sstevel@tonic-gate /* 79*7c478bd9Sstevel@tonic-gate * given pointer cp advance it to the first non-space character. 80*7c478bd9Sstevel@tonic-gate */ 81*7c478bd9Sstevel@tonic-gate #define SKIPWS(cp) while (isspace(*cp) && (*cp != '\0')) cp++ 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate /* extract the v4 and v6 bits of the ip_version enumeration from the filter */ 84*7c478bd9Sstevel@tonic-gate #define VERSION_IS_V4(flt) ((flt)->ip_versions & 0x01) 85*7c478bd9Sstevel@tonic-gate #define VERSION_IS_V6(flt) ((flt)->ip_versions & 0x02) 86*7c478bd9Sstevel@tonic-gate 87*7c478bd9Sstevel@tonic-gate /* retrieve short name from a module.name nvpair name */ 88*7c478bd9Sstevel@tonic-gate #define SHORT_NAME(longnme) (strchr(longnme, '.') + 1) 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gate /* latest version of cfg file supported (1.0) */ 91*7c478bd9Sstevel@tonic-gate #define IPQOS_CUR_FMT_MAJOR_VER 1 92*7c478bd9Sstevel@tonic-gate #define IPQOS_CUR_FMT_MINOR_VER 0 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate /* length of string buffer used for storing an integer as a string */ 95*7c478bd9Sstevel@tonic-gate #define IPQOS_INT_STR_LEN 15 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gate /* length of line buffer used to read types file */ 98*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_TYPE_LINE_LEN 1024 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gate /* length of buffer used to store name of type when reading types file */ 101*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_TYPE_LEN 24 102*7c478bd9Sstevel@tonic-gate 103*7c478bd9Sstevel@tonic-gate /* max length of value string in types file */ 104*7c478bd9Sstevel@tonic-gate #define IPQOS_VALST_MAXLEN 100 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate /* initial size of line buffer used by readtoken */ 107*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_LINEBUF_SZ 150 108*7c478bd9Sstevel@tonic-gate 109*7c478bd9Sstevel@tonic-gate /* length of class/filter/action names */ 110*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_NAME_LEN 24 111*7c478bd9Sstevel@tonic-gate 112*7c478bd9Sstevel@tonic-gate /* length of module names */ 113*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_MOD_NAME_LEN 10 114*7c478bd9Sstevel@tonic-gate 115*7c478bd9Sstevel@tonic-gate /* IPQOS_CONF_NAME_LEN + IPQOS_CONF_MOD_NAME_LEN */ 116*7c478bd9Sstevel@tonic-gate /* must be a numeric literal for use in scanf() format string */ 117*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_PNAME_LEN 34 118*7c478bd9Sstevel@tonic-gate 119*7c478bd9Sstevel@tonic-gate /* length of buffer used to construct msgs for printing */ 120*7c478bd9Sstevel@tonic-gate #define IPQOS_MSG_BUF_SZ 200 121*7c478bd9Sstevel@tonic-gate /* 122*7c478bd9Sstevel@tonic-gate * Define CURL here so that while you are reading 123*7c478bd9Sstevel@tonic-gate * the code, it does not affect "vi" in pattern 124*7c478bd9Sstevel@tonic-gate * matching. 125*7c478bd9Sstevel@tonic-gate */ 126*7c478bd9Sstevel@tonic-gate #define CURL_BEGIN '{' 127*7c478bd9Sstevel@tonic-gate #define CURL_END '}' 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gate /* internal return codes */ 130*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_SUCCESS 0 131*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_ERR 1 132*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_RECOVER_ERR 2 133*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_CURL_END 3 134*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_CURL_BEGIN 4 135*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_EOF 5 136*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_NO_VER_STR 6 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate /* special tokens in config file */ 139*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_IP_VERSION_STR "ip_version" 140*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_NEXT_ACTION_STR "next_action" 141*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_NAME_STR "name" 142*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_MODULE_STR "module" 143*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_FILTER_STR "filter" 144*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_ACTION_STR "action" 145*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_CLASS_STR "class" 146*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_PARAMS_STR "params" 147*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_NEXT_STR "next" 148*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_STATS_ENABLE_STR "enable_stats" 149*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_GLOBAL_STATS_STR "global_stats" 150*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_DROP_STR "drop" 151*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_CONT_STR "continue" 152*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_DEFER_STR "defer" 153*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_TRUE_STR "true" 154*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_FALSE_STR "false" 155*7c478bd9Sstevel@tonic-gate #define IPQOS_FMT_VERSION_STR "fmt_version" 156*7c478bd9Sstevel@tonic-gate #define IPQOS_IFNAME_STR "if_name" 157*7c478bd9Sstevel@tonic-gate #define IPQOS_PLACE_PRM_STR IPQOS_CONF_PARAMS_STR 158*7c478bd9Sstevel@tonic-gate #define IPQOS_PLACE_FILTER_STR IPQOS_CONF_FILTER_STR 159*7c478bd9Sstevel@tonic-gate #define IPQOS_PLACE_MAP_STR "map" 160*7c478bd9Sstevel@tonic-gate 161*7c478bd9Sstevel@tonic-gate /* special tokens in types file */ 162*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_PERM_FILTER_MK "#PERM_FILTER" 163*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_PERM_CLASS_MK "#PERM_CLASS" 164*7c478bd9Sstevel@tonic-gate #define IPQOS_FMT_STR "fmt_version" 165*7c478bd9Sstevel@tonic-gate #define IPQOS_MOD_STR "mod_version" 166*7c478bd9Sstevel@tonic-gate 167*7c478bd9Sstevel@tonic-gate 168*7c478bd9Sstevel@tonic-gate /* nvlist parameters */ 169*7c478bd9Sstevel@tonic-gate #define IPQOS_CONF_IP_VERSION "ipgpc.ip_version" 170*7c478bd9Sstevel@tonic-gate 171*7c478bd9Sstevel@tonic-gate /* name lookup errors returned from domultihome() */ 172*7c478bd9Sstevel@tonic-gate #define IPQOS_LOOKUP_RETRY 1 173*7c478bd9Sstevel@tonic-gate #define IPQOS_LOOKUP_FAIL 2 174*7c478bd9Sstevel@tonic-gate 175*7c478bd9Sstevel@tonic-gate /* 176*7c478bd9Sstevel@tonic-gate * used in calls to ipp_action_info() to encapuslate both an action and 177*7c478bd9Sstevel@tonic-gate * an ipqosconf internal return code. 178*7c478bd9Sstevel@tonic-gate */ 179*7c478bd9Sstevel@tonic-gate typedef struct ipqos_actinfo_prm_s { 180*7c478bd9Sstevel@tonic-gate struct ipqos_conf_action_s *action; 181*7c478bd9Sstevel@tonic-gate int intl_ret; 182*7c478bd9Sstevel@tonic-gate } ipqos_actinfo_prm_t; 183*7c478bd9Sstevel@tonic-gate 184*7c478bd9Sstevel@tonic-gate /* 185*7c478bd9Sstevel@tonic-gate * skeletal list element struct used in manipulating lists of more complex 186*7c478bd9Sstevel@tonic-gate * structures. 187*7c478bd9Sstevel@tonic-gate */ 188*7c478bd9Sstevel@tonic-gate typedef struct ipqos_list_el_s { 189*7c478bd9Sstevel@tonic-gate struct ipqos_list_el_s *next; 190*7c478bd9Sstevel@tonic-gate } ipqos_list_el_t; 191*7c478bd9Sstevel@tonic-gate 192*7c478bd9Sstevel@tonic-gate typedef struct str_str { 193*7c478bd9Sstevel@tonic-gate char *s1; 194*7c478bd9Sstevel@tonic-gate char *s2; 195*7c478bd9Sstevel@tonic-gate } str_str_t; 196*7c478bd9Sstevel@tonic-gate 197*7c478bd9Sstevel@tonic-gate typedef struct str_val { 198*7c478bd9Sstevel@tonic-gate char *string; 199*7c478bd9Sstevel@tonic-gate int value; 200*7c478bd9Sstevel@tonic-gate } str_val_t; 201*7c478bd9Sstevel@tonic-gate 202*7c478bd9Sstevel@tonic-gate typedef struct str_val_nd { 203*7c478bd9Sstevel@tonic-gate struct str_val sv; 204*7c478bd9Sstevel@tonic-gate struct str_val_nd *next; 205*7c478bd9Sstevel@tonic-gate } str_val_nd_t; 206*7c478bd9Sstevel@tonic-gate 207*7c478bd9Sstevel@tonic-gate /* type of msg to be printed by ipqos_msg */ 208*7c478bd9Sstevel@tonic-gate enum msg_type { MT_ERROR, MT_WARNING, MT_LOG, MT_ENOSTR }; 209*7c478bd9Sstevel@tonic-gate 210*7c478bd9Sstevel@tonic-gate /* enum for allowable parameter types */ 211*7c478bd9Sstevel@tonic-gate 212*7c478bd9Sstevel@tonic-gate typedef enum ipqos_nvtype_e { 213*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_UINT8, 214*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_INT16, 215*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_UINT16, 216*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_INT32, 217*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_UINT32, 218*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_BOOLEAN, 219*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_STRING, 220*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_ACTION, 221*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_ADDRESS, 222*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_PORT, 223*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_PROTO, 224*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_ENUM, 225*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_IFNAME, 226*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_M_INDEX, 227*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_INT_ARRAY, 228*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_USER, 229*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_ADDRESS_MASK, 230*7c478bd9Sstevel@tonic-gate IPQOS_DATA_TYPE_IFINDEX 231*7c478bd9Sstevel@tonic-gate } ipqos_nvtype_t; 232*7c478bd9Sstevel@tonic-gate 233*7c478bd9Sstevel@tonic-gate /* 234*7c478bd9Sstevel@tonic-gate * passed to readnvpair to indicate which special meanings for nv names 235*7c478bd9Sstevel@tonic-gate * to use. 236*7c478bd9Sstevel@tonic-gate */ 237*7c478bd9Sstevel@tonic-gate typedef enum place_e { 238*7c478bd9Sstevel@tonic-gate PL_ACTION, PL_FILTER, PL_CLASS, PL_PARAMS, PL_MAP, PL_ANY} place_t; 239*7c478bd9Sstevel@tonic-gate 240*7c478bd9Sstevel@tonic-gate 241*7c478bd9Sstevel@tonic-gate /* classifier filter representation */ 242*7c478bd9Sstevel@tonic-gate 243*7c478bd9Sstevel@tonic-gate typedef struct ipqos_conf_filter_s { 244*7c478bd9Sstevel@tonic-gate struct ipqos_conf_filter_s *next; 245*7c478bd9Sstevel@tonic-gate char name[IPQOS_CONF_NAME_LEN]; 246*7c478bd9Sstevel@tonic-gate char class_name[IPQOS_CONF_NAME_LEN]; 247*7c478bd9Sstevel@tonic-gate nvlist_t *nvlist; 248*7c478bd9Sstevel@tonic-gate boolean_t new; 249*7c478bd9Sstevel@tonic-gate boolean_t modified; 250*7c478bd9Sstevel@tonic-gate boolean_t cr_mod; 251*7c478bd9Sstevel@tonic-gate boolean_t todel; 252*7c478bd9Sstevel@tonic-gate boolean_t deleted; 253*7c478bd9Sstevel@tonic-gate uint32_t originator; 254*7c478bd9Sstevel@tonic-gate char *src_nd_name; 255*7c478bd9Sstevel@tonic-gate char *dst_nd_name; 256*7c478bd9Sstevel@tonic-gate int instance; 257*7c478bd9Sstevel@tonic-gate uint32_t lineno; 258*7c478bd9Sstevel@tonic-gate uint32_t ip_versions; 259*7c478bd9Sstevel@tonic-gate int nlerr; 260*7c478bd9Sstevel@tonic-gate } ipqos_conf_filter_t; 261*7c478bd9Sstevel@tonic-gate 262*7c478bd9Sstevel@tonic-gate 263*7c478bd9Sstevel@tonic-gate /* 264*7c478bd9Sstevel@tonic-gate * action reference - used to store information and reference an action struct. 265*7c478bd9Sstevel@tonic-gate */ 266*7c478bd9Sstevel@tonic-gate 267*7c478bd9Sstevel@tonic-gate typedef struct ipqos_conf_act_ref_s { 268*7c478bd9Sstevel@tonic-gate struct ipqos_conf_act_ref_s *next; 269*7c478bd9Sstevel@tonic-gate struct ipqos_conf_act_ref_s *prev; 270*7c478bd9Sstevel@tonic-gate char name[IPQOS_CONF_NAME_LEN]; 271*7c478bd9Sstevel@tonic-gate char field[IPQOS_CONF_PNAME_LEN]; 272*7c478bd9Sstevel@tonic-gate struct ipqos_conf_action_s *action; 273*7c478bd9Sstevel@tonic-gate nvlist_t *nvlist; 274*7c478bd9Sstevel@tonic-gate } ipqos_conf_act_ref_t; 275*7c478bd9Sstevel@tonic-gate 276*7c478bd9Sstevel@tonic-gate 277*7c478bd9Sstevel@tonic-gate /* classifier class representation */ 278*7c478bd9Sstevel@tonic-gate 279*7c478bd9Sstevel@tonic-gate typedef struct ipqos_conf_class_s { 280*7c478bd9Sstevel@tonic-gate struct ipqos_conf_class_s *next; 281*7c478bd9Sstevel@tonic-gate char name[IPQOS_CONF_NAME_LEN]; 282*7c478bd9Sstevel@tonic-gate nvlist_t *nvlist; 283*7c478bd9Sstevel@tonic-gate ipqos_conf_act_ref_t *alist; 284*7c478bd9Sstevel@tonic-gate boolean_t modified; 285*7c478bd9Sstevel@tonic-gate boolean_t new; 286*7c478bd9Sstevel@tonic-gate boolean_t cr_mod; 287*7c478bd9Sstevel@tonic-gate boolean_t todel; 288*7c478bd9Sstevel@tonic-gate boolean_t deleted; 289*7c478bd9Sstevel@tonic-gate boolean_t stats_enable; 290*7c478bd9Sstevel@tonic-gate uint32_t originator; 291*7c478bd9Sstevel@tonic-gate uint32_t lineno; 292*7c478bd9Sstevel@tonic-gate } ipqos_conf_class_t; 293*7c478bd9Sstevel@tonic-gate 294*7c478bd9Sstevel@tonic-gate /* action parameters representation */ 295*7c478bd9Sstevel@tonic-gate 296*7c478bd9Sstevel@tonic-gate typedef struct ipqos_conf_params_s { 297*7c478bd9Sstevel@tonic-gate struct ipqos_conf_params_s *next; 298*7c478bd9Sstevel@tonic-gate ipqos_conf_act_ref_t *actions; 299*7c478bd9Sstevel@tonic-gate nvlist_t *nvlist; 300*7c478bd9Sstevel@tonic-gate boolean_t modified; 301*7c478bd9Sstevel@tonic-gate boolean_t stats_enable; 302*7c478bd9Sstevel@tonic-gate uint32_t originator; 303*7c478bd9Sstevel@tonic-gate uint32_t lineno; 304*7c478bd9Sstevel@tonic-gate boolean_t cr_mod; 305*7c478bd9Sstevel@tonic-gate } ipqos_conf_params_t; 306*7c478bd9Sstevel@tonic-gate 307*7c478bd9Sstevel@tonic-gate 308*7c478bd9Sstevel@tonic-gate /* signifys which stage of configuration application has just past */ 309*7c478bd9Sstevel@tonic-gate enum visit {ADD_VISITED = 1, MOD_VISITED, REM_VISITED, INCYCLE_VISITED}; 310*7c478bd9Sstevel@tonic-gate 311*7c478bd9Sstevel@tonic-gate /* 312*7c478bd9Sstevel@tonic-gate * action representation, with parameters, and lists of filters and classes 313*7c478bd9Sstevel@tonic-gate * if classifier action. 314*7c478bd9Sstevel@tonic-gate */ 315*7c478bd9Sstevel@tonic-gate typedef struct ipqos_conf_action_s { 316*7c478bd9Sstevel@tonic-gate struct ipqos_conf_action_s *next; 317*7c478bd9Sstevel@tonic-gate char name[IPQOS_CONF_NAME_LEN]; 318*7c478bd9Sstevel@tonic-gate char module[IPQOS_CONF_NAME_LEN]; 319*7c478bd9Sstevel@tonic-gate ipqos_conf_filter_t *filters; 320*7c478bd9Sstevel@tonic-gate ipqos_conf_class_t *classes; 321*7c478bd9Sstevel@tonic-gate ipqos_conf_params_t *params; 322*7c478bd9Sstevel@tonic-gate nvlist_t *nvlist; 323*7c478bd9Sstevel@tonic-gate boolean_t todel; 324*7c478bd9Sstevel@tonic-gate boolean_t deleted; 325*7c478bd9Sstevel@tonic-gate boolean_t new; 326*7c478bd9Sstevel@tonic-gate boolean_t modified; 327*7c478bd9Sstevel@tonic-gate boolean_t cr_mod; 328*7c478bd9Sstevel@tonic-gate ipqos_conf_act_ref_t *dependencies; 329*7c478bd9Sstevel@tonic-gate enum visit visited; 330*7c478bd9Sstevel@tonic-gate uint32_t lineno; 331*7c478bd9Sstevel@tonic-gate ipqos_conf_filter_t *retry_filters; 332*7c478bd9Sstevel@tonic-gate char **perm_classes; 333*7c478bd9Sstevel@tonic-gate int num_perm_classes; 334*7c478bd9Sstevel@tonic-gate int module_version; 335*7c478bd9Sstevel@tonic-gate } ipqos_conf_action_t; 336*7c478bd9Sstevel@tonic-gate 337*7c478bd9Sstevel@tonic-gate 338*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 339*7c478bd9Sstevel@tonic-gate } 340*7c478bd9Sstevel@tonic-gate #endif 341*7c478bd9Sstevel@tonic-gate 342*7c478bd9Sstevel@tonic-gate #endif /* _IPQOS_CONF_H */ 343