17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 58a40a695Sgavinm * Common Development and Distribution License (the "License"). 68a40a695Sgavinm * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*b0daa853SStephen Hanson * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate * 257c478bd9Sstevel@tonic-gate * literals.h -- public definitions for literals in string table 267c478bd9Sstevel@tonic-gate * 277c478bd9Sstevel@tonic-gate * all strings in this program are kept in the string table provided 287c478bd9Sstevel@tonic-gate * by the routines in stable.c. this allows us to see if two strings 297c478bd9Sstevel@tonic-gate * are equal by checking their pointers rather than calling strcmp(). 307c478bd9Sstevel@tonic-gate * when we want to check for a specific string we can either do this: 317c478bd9Sstevel@tonic-gate * if (s == stable("word")) 327c478bd9Sstevel@tonic-gate * or define the literal here in this file and then do this: 337c478bd9Sstevel@tonic-gate * if (s == L_word) 347c478bd9Sstevel@tonic-gate * 357c478bd9Sstevel@tonic-gate * the macro L_DECL() below expands to an extern const char * declaration 367c478bd9Sstevel@tonic-gate * for files that include it. the exception is some cpp statements done by 377c478bd9Sstevel@tonic-gate * literals.c which change L_DECL() to initialize the string by calling 387c478bd9Sstevel@tonic-gate * stable(). 397c478bd9Sstevel@tonic-gate */ 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate #ifndef _ESC_COMMON_LITERALS_H 427c478bd9Sstevel@tonic-gate #define _ESC_COMMON_LITERALS_H 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate #ifdef __cplusplus 457c478bd9Sstevel@tonic-gate extern "C" { 467c478bd9Sstevel@tonic-gate #endif 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate #ifndef L_DECL 497c478bd9Sstevel@tonic-gate #define L_DECL(s) extern const char *L_##s 507c478bd9Sstevel@tonic-gate #endif 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gate /* reserved words */ 537c478bd9Sstevel@tonic-gate L_DECL(asru); 547c478bd9Sstevel@tonic-gate L_DECL(div); 557c478bd9Sstevel@tonic-gate L_DECL(engine); 567c478bd9Sstevel@tonic-gate L_DECL(event); 577c478bd9Sstevel@tonic-gate L_DECL(fru); 587c478bd9Sstevel@tonic-gate L_DECL(if); 597c478bd9Sstevel@tonic-gate L_DECL(mask); 607c478bd9Sstevel@tonic-gate L_DECL(prop); 617c478bd9Sstevel@tonic-gate L_DECL(config); 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate /* event types */ 647c478bd9Sstevel@tonic-gate L_DECL(fault); 657c478bd9Sstevel@tonic-gate L_DECL(upset); 667c478bd9Sstevel@tonic-gate L_DECL(defect); 677c478bd9Sstevel@tonic-gate L_DECL(error); 687c478bd9Sstevel@tonic-gate L_DECL(ereport); 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate /* engine types */ 717c478bd9Sstevel@tonic-gate L_DECL(serd); 727aec1d6eScindi L_DECL(stat); 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate /* timeval suffixes */ 757c478bd9Sstevel@tonic-gate L_DECL(nanosecond); 767c478bd9Sstevel@tonic-gate L_DECL(nanoseconds); 777c478bd9Sstevel@tonic-gate L_DECL(nsec); 787c478bd9Sstevel@tonic-gate L_DECL(nsecs); 797c478bd9Sstevel@tonic-gate L_DECL(ns); 807c478bd9Sstevel@tonic-gate L_DECL(microsecond); 817c478bd9Sstevel@tonic-gate L_DECL(microseconds); 827c478bd9Sstevel@tonic-gate L_DECL(usec); 837c478bd9Sstevel@tonic-gate L_DECL(usecs); 847c478bd9Sstevel@tonic-gate L_DECL(us); 857c478bd9Sstevel@tonic-gate L_DECL(millisecond); 867c478bd9Sstevel@tonic-gate L_DECL(milliseconds); 877c478bd9Sstevel@tonic-gate L_DECL(msec); 887c478bd9Sstevel@tonic-gate L_DECL(msecs); 897c478bd9Sstevel@tonic-gate L_DECL(ms); 907c478bd9Sstevel@tonic-gate L_DECL(second); 917c478bd9Sstevel@tonic-gate L_DECL(seconds); 927c478bd9Sstevel@tonic-gate L_DECL(s); 937c478bd9Sstevel@tonic-gate L_DECL(minute); 947c478bd9Sstevel@tonic-gate L_DECL(minutes); 957c478bd9Sstevel@tonic-gate L_DECL(min); 967c478bd9Sstevel@tonic-gate L_DECL(mins); 977c478bd9Sstevel@tonic-gate L_DECL(m); 987c478bd9Sstevel@tonic-gate L_DECL(hour); 997c478bd9Sstevel@tonic-gate L_DECL(hours); 1007c478bd9Sstevel@tonic-gate L_DECL(hr); 1017c478bd9Sstevel@tonic-gate L_DECL(hrs); 1027c478bd9Sstevel@tonic-gate L_DECL(h); 1037c478bd9Sstevel@tonic-gate L_DECL(day); 1047c478bd9Sstevel@tonic-gate L_DECL(days); 1057c478bd9Sstevel@tonic-gate L_DECL(d); 1067c478bd9Sstevel@tonic-gate L_DECL(week); 1077c478bd9Sstevel@tonic-gate L_DECL(weeks); 1087c478bd9Sstevel@tonic-gate L_DECL(wk); 1097c478bd9Sstevel@tonic-gate L_DECL(wks); 1107c478bd9Sstevel@tonic-gate L_DECL(month); 1117c478bd9Sstevel@tonic-gate L_DECL(months); 1127c478bd9Sstevel@tonic-gate L_DECL(year); 1137c478bd9Sstevel@tonic-gate L_DECL(years); 1147c478bd9Sstevel@tonic-gate L_DECL(yr); 1157c478bd9Sstevel@tonic-gate L_DECL(yrs); 1167c478bd9Sstevel@tonic-gate L_DECL(infinity); 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate /* property names */ 1197c478bd9Sstevel@tonic-gate L_DECL(ASRU); 1207aec1d6eScindi L_DECL(action); 1217c478bd9Sstevel@tonic-gate L_DECL(FITrate); 1227c478bd9Sstevel@tonic-gate L_DECL(FRU); 1237aec1d6eScindi L_DECL(id); 1247aec1d6eScindi L_DECL(message); 125b7d3956bSstephh L_DECL(retire); 126b7d3956bSstephh L_DECL(response); 1277c478bd9Sstevel@tonic-gate L_DECL(FRUID); 1287c478bd9Sstevel@tonic-gate L_DECL(N); 1297c478bd9Sstevel@tonic-gate L_DECL(T); 1307c478bd9Sstevel@tonic-gate L_DECL(count); 1317c478bd9Sstevel@tonic-gate L_DECL(method); 1327c478bd9Sstevel@tonic-gate L_DECL(poller); 1337c478bd9Sstevel@tonic-gate L_DECL(timeout); 1347c478bd9Sstevel@tonic-gate L_DECL(trip); 135602ca9eaScth L_DECL(discard_if_config_unknown); 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate /* property values */ 1387c478bd9Sstevel@tonic-gate L_DECL(A); 1397c478bd9Sstevel@tonic-gate L_DECL(volatile); 1407c478bd9Sstevel@tonic-gate L_DECL(persistent); 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate /* event bubble types */ 1437c478bd9Sstevel@tonic-gate L_DECL(from); 1447c478bd9Sstevel@tonic-gate L_DECL(to); 1457c478bd9Sstevel@tonic-gate L_DECL(inhibit); 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate /* 1487c478bd9Sstevel@tonic-gate * internal function names. note that "fru" and "asru" are also function 1497c478bd9Sstevel@tonic-gate * names. 1507c478bd9Sstevel@tonic-gate */ 1517c478bd9Sstevel@tonic-gate L_DECL(within); 1527c478bd9Sstevel@tonic-gate L_DECL(call); 153*b0daa853SStephen Hanson L_DECL(cat); 1547aec1d6eScindi L_DECL(confcall); 1557c478bd9Sstevel@tonic-gate L_DECL(confprop); 1568a40a695Sgavinm L_DECL(confprop_defined); 1577aec1d6eScindi L_DECL(defined); 1587c478bd9Sstevel@tonic-gate L_DECL(payloadprop); 1597aec1d6eScindi L_DECL(payloadprop_contains); 1607aec1d6eScindi L_DECL(payloadprop_defined); 1617aec1d6eScindi L_DECL(setpayloadprop); 162b7d3956bSstephh L_DECL(setserdsuffix); 163b7d3956bSstephh L_DECL(setserdincrement); 164b7d3956bSstephh L_DECL(setserdn); 165b7d3956bSstephh L_DECL(setserdt); 1667c478bd9Sstevel@tonic-gate L_DECL(envprop); 1677c478bd9Sstevel@tonic-gate L_DECL(is_connected); 1687c478bd9Sstevel@tonic-gate L_DECL(is_under); 1697c478bd9Sstevel@tonic-gate L_DECL(is_on); 1707c478bd9Sstevel@tonic-gate L_DECL(is_present); 17125c6ff4bSstephh L_DECL(has_fault); 1727c478bd9Sstevel@tonic-gate L_DECL(is_type); 1737aec1d6eScindi L_DECL(count); 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate /* our enumerated types (used for debugging) */ 1767c478bd9Sstevel@tonic-gate L_DECL(T_NOTHING); 1777c478bd9Sstevel@tonic-gate L_DECL(T_NAME); 1787c478bd9Sstevel@tonic-gate L_DECL(T_GLOBID); 1797c478bd9Sstevel@tonic-gate L_DECL(T_ENAME); 1807c478bd9Sstevel@tonic-gate L_DECL(T_EVENT); 1817c478bd9Sstevel@tonic-gate L_DECL(T_ENGINE); 1827c478bd9Sstevel@tonic-gate L_DECL(T_ASRU); 1837c478bd9Sstevel@tonic-gate L_DECL(T_FRU); 1847c478bd9Sstevel@tonic-gate L_DECL(T_TIMEVAL); 1857c478bd9Sstevel@tonic-gate L_DECL(T_NUM); 1867c478bd9Sstevel@tonic-gate L_DECL(T_QUOTE); 1877c478bd9Sstevel@tonic-gate L_DECL(T_FUNC); 1887c478bd9Sstevel@tonic-gate L_DECL(T_NVPAIR); 1897c478bd9Sstevel@tonic-gate L_DECL(T_ASSIGN); 1907c478bd9Sstevel@tonic-gate L_DECL(T_CONDIF); 1917c478bd9Sstevel@tonic-gate L_DECL(T_CONDELSE); 1927c478bd9Sstevel@tonic-gate L_DECL(T_NOT); 1937c478bd9Sstevel@tonic-gate L_DECL(T_AND); 1947c478bd9Sstevel@tonic-gate L_DECL(T_OR); 1957c478bd9Sstevel@tonic-gate L_DECL(T_EQ); 1967c478bd9Sstevel@tonic-gate L_DECL(T_NE); 1977c478bd9Sstevel@tonic-gate L_DECL(T_SUB); 1987c478bd9Sstevel@tonic-gate L_DECL(T_ADD); 1997c478bd9Sstevel@tonic-gate L_DECL(T_MUL); 2007c478bd9Sstevel@tonic-gate L_DECL(T_DIV); 2017c478bd9Sstevel@tonic-gate L_DECL(T_MOD); 2027c478bd9Sstevel@tonic-gate L_DECL(T_LT); 2037c478bd9Sstevel@tonic-gate L_DECL(T_LE); 2047c478bd9Sstevel@tonic-gate L_DECL(T_GT); 2057c478bd9Sstevel@tonic-gate L_DECL(T_GE); 2067c478bd9Sstevel@tonic-gate L_DECL(T_BITAND); 2077c478bd9Sstevel@tonic-gate L_DECL(T_BITOR); 2087c478bd9Sstevel@tonic-gate L_DECL(T_BITXOR); 2097c478bd9Sstevel@tonic-gate L_DECL(T_BITNOT); 2107c478bd9Sstevel@tonic-gate L_DECL(T_LSHIFT); 2117c478bd9Sstevel@tonic-gate L_DECL(T_RSHIFT); 2127c478bd9Sstevel@tonic-gate L_DECL(T_ARROW); 2137c478bd9Sstevel@tonic-gate L_DECL(T_LIST); 2147c478bd9Sstevel@tonic-gate L_DECL(T_FAULT); 2157c478bd9Sstevel@tonic-gate L_DECL(T_UPSET); 2167c478bd9Sstevel@tonic-gate L_DECL(T_DEFECT); 2177c478bd9Sstevel@tonic-gate L_DECL(T_ERROR); 2187c478bd9Sstevel@tonic-gate L_DECL(T_EREPORT); 2197c478bd9Sstevel@tonic-gate L_DECL(T_SERD); 2207aec1d6eScindi L_DECL(T_STAT); 2217c478bd9Sstevel@tonic-gate L_DECL(T_PROP); 2227c478bd9Sstevel@tonic-gate L_DECL(T_MASK); 2237c478bd9Sstevel@tonic-gate L_DECL(N_UNSPEC); 2247c478bd9Sstevel@tonic-gate L_DECL(N_FAULT); 2257c478bd9Sstevel@tonic-gate L_DECL(N_UPSET); 2267c478bd9Sstevel@tonic-gate L_DECL(N_DEFECT); 2277c478bd9Sstevel@tonic-gate L_DECL(N_ERROR); 2287c478bd9Sstevel@tonic-gate L_DECL(N_EREPORT); 2297c478bd9Sstevel@tonic-gate L_DECL(N_SERD); 2307c478bd9Sstevel@tonic-gate L_DECL(IT_NONE); 2317c478bd9Sstevel@tonic-gate L_DECL(IT_VERTICAL); 2327c478bd9Sstevel@tonic-gate L_DECL(IT_HORIZONTAL); 2337c478bd9Sstevel@tonic-gate L_DECL(IT_ENAME); 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate /* misc */ 2367c478bd9Sstevel@tonic-gate L_DECL(nofile); 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate #ifdef __cplusplus 2397c478bd9Sstevel@tonic-gate } 2407c478bd9Sstevel@tonic-gate #endif 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gate #endif /* _ESC_COMMON_LITERALS_H */ 243