10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 52869Sgavinm * Common Development and Distribution License (the "License"). 62869Sgavinm * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*11202SStephen.Hanson@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate * 250Sstevel@tonic-gate * literals.h -- public definitions for literals in string table 260Sstevel@tonic-gate * 270Sstevel@tonic-gate * all strings in this program are kept in the string table provided 280Sstevel@tonic-gate * by the routines in stable.c. this allows us to see if two strings 290Sstevel@tonic-gate * are equal by checking their pointers rather than calling strcmp(). 300Sstevel@tonic-gate * when we want to check for a specific string we can either do this: 310Sstevel@tonic-gate * if (s == stable("word")) 320Sstevel@tonic-gate * or define the literal here in this file and then do this: 330Sstevel@tonic-gate * if (s == L_word) 340Sstevel@tonic-gate * 350Sstevel@tonic-gate * the macro L_DECL() below expands to an extern const char * declaration 360Sstevel@tonic-gate * for files that include it. the exception is some cpp statements done by 370Sstevel@tonic-gate * literals.c which change L_DECL() to initialize the string by calling 380Sstevel@tonic-gate * stable(). 390Sstevel@tonic-gate */ 400Sstevel@tonic-gate 410Sstevel@tonic-gate #ifndef _ESC_COMMON_LITERALS_H 420Sstevel@tonic-gate #define _ESC_COMMON_LITERALS_H 430Sstevel@tonic-gate 440Sstevel@tonic-gate #ifdef __cplusplus 450Sstevel@tonic-gate extern "C" { 460Sstevel@tonic-gate #endif 470Sstevel@tonic-gate 480Sstevel@tonic-gate #ifndef L_DECL 490Sstevel@tonic-gate #define L_DECL(s) extern const char *L_##s 500Sstevel@tonic-gate #endif 510Sstevel@tonic-gate 520Sstevel@tonic-gate /* reserved words */ 530Sstevel@tonic-gate L_DECL(asru); 540Sstevel@tonic-gate L_DECL(div); 550Sstevel@tonic-gate L_DECL(engine); 560Sstevel@tonic-gate L_DECL(event); 570Sstevel@tonic-gate L_DECL(fru); 580Sstevel@tonic-gate L_DECL(if); 590Sstevel@tonic-gate L_DECL(mask); 600Sstevel@tonic-gate L_DECL(prop); 610Sstevel@tonic-gate L_DECL(config); 620Sstevel@tonic-gate 630Sstevel@tonic-gate /* event types */ 640Sstevel@tonic-gate L_DECL(fault); 650Sstevel@tonic-gate L_DECL(upset); 660Sstevel@tonic-gate L_DECL(defect); 670Sstevel@tonic-gate L_DECL(error); 680Sstevel@tonic-gate L_DECL(ereport); 690Sstevel@tonic-gate 700Sstevel@tonic-gate /* engine types */ 710Sstevel@tonic-gate L_DECL(serd); 721414Scindi L_DECL(stat); 730Sstevel@tonic-gate 740Sstevel@tonic-gate /* timeval suffixes */ 750Sstevel@tonic-gate L_DECL(nanosecond); 760Sstevel@tonic-gate L_DECL(nanoseconds); 770Sstevel@tonic-gate L_DECL(nsec); 780Sstevel@tonic-gate L_DECL(nsecs); 790Sstevel@tonic-gate L_DECL(ns); 800Sstevel@tonic-gate L_DECL(microsecond); 810Sstevel@tonic-gate L_DECL(microseconds); 820Sstevel@tonic-gate L_DECL(usec); 830Sstevel@tonic-gate L_DECL(usecs); 840Sstevel@tonic-gate L_DECL(us); 850Sstevel@tonic-gate L_DECL(millisecond); 860Sstevel@tonic-gate L_DECL(milliseconds); 870Sstevel@tonic-gate L_DECL(msec); 880Sstevel@tonic-gate L_DECL(msecs); 890Sstevel@tonic-gate L_DECL(ms); 900Sstevel@tonic-gate L_DECL(second); 910Sstevel@tonic-gate L_DECL(seconds); 920Sstevel@tonic-gate L_DECL(s); 930Sstevel@tonic-gate L_DECL(minute); 940Sstevel@tonic-gate L_DECL(minutes); 950Sstevel@tonic-gate L_DECL(min); 960Sstevel@tonic-gate L_DECL(mins); 970Sstevel@tonic-gate L_DECL(m); 980Sstevel@tonic-gate L_DECL(hour); 990Sstevel@tonic-gate L_DECL(hours); 1000Sstevel@tonic-gate L_DECL(hr); 1010Sstevel@tonic-gate L_DECL(hrs); 1020Sstevel@tonic-gate L_DECL(h); 1030Sstevel@tonic-gate L_DECL(day); 1040Sstevel@tonic-gate L_DECL(days); 1050Sstevel@tonic-gate L_DECL(d); 1060Sstevel@tonic-gate L_DECL(week); 1070Sstevel@tonic-gate L_DECL(weeks); 1080Sstevel@tonic-gate L_DECL(wk); 1090Sstevel@tonic-gate L_DECL(wks); 1100Sstevel@tonic-gate L_DECL(month); 1110Sstevel@tonic-gate L_DECL(months); 1120Sstevel@tonic-gate L_DECL(year); 1130Sstevel@tonic-gate L_DECL(years); 1140Sstevel@tonic-gate L_DECL(yr); 1150Sstevel@tonic-gate L_DECL(yrs); 1160Sstevel@tonic-gate L_DECL(infinity); 1170Sstevel@tonic-gate 1180Sstevel@tonic-gate /* property names */ 1190Sstevel@tonic-gate L_DECL(ASRU); 1201414Scindi L_DECL(action); 1210Sstevel@tonic-gate L_DECL(FITrate); 1220Sstevel@tonic-gate L_DECL(FRU); 1231414Scindi L_DECL(id); 1241414Scindi L_DECL(message); 1257197Sstephh L_DECL(retire); 1267197Sstephh L_DECL(response); 1270Sstevel@tonic-gate L_DECL(FRUID); 1280Sstevel@tonic-gate L_DECL(N); 1290Sstevel@tonic-gate L_DECL(T); 1300Sstevel@tonic-gate L_DECL(count); 1310Sstevel@tonic-gate L_DECL(method); 1320Sstevel@tonic-gate L_DECL(poller); 1330Sstevel@tonic-gate L_DECL(timeout); 1340Sstevel@tonic-gate L_DECL(trip); 1356640Scth L_DECL(discard_if_config_unknown); 1360Sstevel@tonic-gate 1370Sstevel@tonic-gate /* property values */ 1380Sstevel@tonic-gate L_DECL(A); 1390Sstevel@tonic-gate L_DECL(volatile); 1400Sstevel@tonic-gate L_DECL(persistent); 1410Sstevel@tonic-gate 1420Sstevel@tonic-gate /* event bubble types */ 1430Sstevel@tonic-gate L_DECL(from); 1440Sstevel@tonic-gate L_DECL(to); 1450Sstevel@tonic-gate L_DECL(inhibit); 1460Sstevel@tonic-gate 1470Sstevel@tonic-gate /* 1480Sstevel@tonic-gate * internal function names. note that "fru" and "asru" are also function 1490Sstevel@tonic-gate * names. 1500Sstevel@tonic-gate */ 1510Sstevel@tonic-gate L_DECL(within); 1520Sstevel@tonic-gate L_DECL(call); 153*11202SStephen.Hanson@Sun.COM L_DECL(cat); 1541414Scindi L_DECL(confcall); 1550Sstevel@tonic-gate L_DECL(confprop); 1562869Sgavinm L_DECL(confprop_defined); 1571414Scindi L_DECL(defined); 1580Sstevel@tonic-gate L_DECL(payloadprop); 1591414Scindi L_DECL(payloadprop_contains); 1601414Scindi L_DECL(payloadprop_defined); 1611414Scindi L_DECL(setpayloadprop); 1627197Sstephh L_DECL(setserdsuffix); 1637197Sstephh L_DECL(setserdincrement); 1647197Sstephh L_DECL(setserdn); 1657197Sstephh L_DECL(setserdt); 1660Sstevel@tonic-gate L_DECL(envprop); 1670Sstevel@tonic-gate L_DECL(is_connected); 1680Sstevel@tonic-gate L_DECL(is_under); 1690Sstevel@tonic-gate L_DECL(is_on); 1700Sstevel@tonic-gate L_DECL(is_present); 1717275Sstephh L_DECL(has_fault); 1720Sstevel@tonic-gate L_DECL(is_type); 1731414Scindi L_DECL(count); 1740Sstevel@tonic-gate 1750Sstevel@tonic-gate /* our enumerated types (used for debugging) */ 1760Sstevel@tonic-gate L_DECL(T_NOTHING); 1770Sstevel@tonic-gate L_DECL(T_NAME); 1780Sstevel@tonic-gate L_DECL(T_GLOBID); 1790Sstevel@tonic-gate L_DECL(T_ENAME); 1800Sstevel@tonic-gate L_DECL(T_EVENT); 1810Sstevel@tonic-gate L_DECL(T_ENGINE); 1820Sstevel@tonic-gate L_DECL(T_ASRU); 1830Sstevel@tonic-gate L_DECL(T_FRU); 1840Sstevel@tonic-gate L_DECL(T_TIMEVAL); 1850Sstevel@tonic-gate L_DECL(T_NUM); 1860Sstevel@tonic-gate L_DECL(T_QUOTE); 1870Sstevel@tonic-gate L_DECL(T_FUNC); 1880Sstevel@tonic-gate L_DECL(T_NVPAIR); 1890Sstevel@tonic-gate L_DECL(T_ASSIGN); 1900Sstevel@tonic-gate L_DECL(T_CONDIF); 1910Sstevel@tonic-gate L_DECL(T_CONDELSE); 1920Sstevel@tonic-gate L_DECL(T_NOT); 1930Sstevel@tonic-gate L_DECL(T_AND); 1940Sstevel@tonic-gate L_DECL(T_OR); 1950Sstevel@tonic-gate L_DECL(T_EQ); 1960Sstevel@tonic-gate L_DECL(T_NE); 1970Sstevel@tonic-gate L_DECL(T_SUB); 1980Sstevel@tonic-gate L_DECL(T_ADD); 1990Sstevel@tonic-gate L_DECL(T_MUL); 2000Sstevel@tonic-gate L_DECL(T_DIV); 2010Sstevel@tonic-gate L_DECL(T_MOD); 2020Sstevel@tonic-gate L_DECL(T_LT); 2030Sstevel@tonic-gate L_DECL(T_LE); 2040Sstevel@tonic-gate L_DECL(T_GT); 2050Sstevel@tonic-gate L_DECL(T_GE); 2060Sstevel@tonic-gate L_DECL(T_BITAND); 2070Sstevel@tonic-gate L_DECL(T_BITOR); 2080Sstevel@tonic-gate L_DECL(T_BITXOR); 2090Sstevel@tonic-gate L_DECL(T_BITNOT); 2100Sstevel@tonic-gate L_DECL(T_LSHIFT); 2110Sstevel@tonic-gate L_DECL(T_RSHIFT); 2120Sstevel@tonic-gate L_DECL(T_ARROW); 2130Sstevel@tonic-gate L_DECL(T_LIST); 2140Sstevel@tonic-gate L_DECL(T_FAULT); 2150Sstevel@tonic-gate L_DECL(T_UPSET); 2160Sstevel@tonic-gate L_DECL(T_DEFECT); 2170Sstevel@tonic-gate L_DECL(T_ERROR); 2180Sstevel@tonic-gate L_DECL(T_EREPORT); 2190Sstevel@tonic-gate L_DECL(T_SERD); 2201414Scindi L_DECL(T_STAT); 2210Sstevel@tonic-gate L_DECL(T_PROP); 2220Sstevel@tonic-gate L_DECL(T_MASK); 2230Sstevel@tonic-gate L_DECL(N_UNSPEC); 2240Sstevel@tonic-gate L_DECL(N_FAULT); 2250Sstevel@tonic-gate L_DECL(N_UPSET); 2260Sstevel@tonic-gate L_DECL(N_DEFECT); 2270Sstevel@tonic-gate L_DECL(N_ERROR); 2280Sstevel@tonic-gate L_DECL(N_EREPORT); 2290Sstevel@tonic-gate L_DECL(N_SERD); 2300Sstevel@tonic-gate L_DECL(IT_NONE); 2310Sstevel@tonic-gate L_DECL(IT_VERTICAL); 2320Sstevel@tonic-gate L_DECL(IT_HORIZONTAL); 2330Sstevel@tonic-gate L_DECL(IT_ENAME); 2340Sstevel@tonic-gate 2350Sstevel@tonic-gate /* misc */ 2360Sstevel@tonic-gate L_DECL(nofile); 2370Sstevel@tonic-gate 2380Sstevel@tonic-gate #ifdef __cplusplus 2390Sstevel@tonic-gate } 2400Sstevel@tonic-gate #endif 2410Sstevel@tonic-gate 2420Sstevel@tonic-gate #endif /* _ESC_COMMON_LITERALS_H */ 243