xref: /illumos-gate/usr/src/cmd/fm/eversholt/common/literals.h (revision 25c6ff4b77fcddf4097ce78a8277275ca603b46c)
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 /*
22602ca9eaScth  * Copyright 2008 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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
477c478bd9Sstevel@tonic-gate extern "C" {
487c478bd9Sstevel@tonic-gate #endif
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate #ifndef	L_DECL
517c478bd9Sstevel@tonic-gate #define	L_DECL(s) extern const char *L_##s
527c478bd9Sstevel@tonic-gate #endif
537c478bd9Sstevel@tonic-gate 
547c478bd9Sstevel@tonic-gate /* reserved words */
557c478bd9Sstevel@tonic-gate L_DECL(asru);
567c478bd9Sstevel@tonic-gate L_DECL(div);
577c478bd9Sstevel@tonic-gate L_DECL(engine);
587c478bd9Sstevel@tonic-gate L_DECL(event);
597c478bd9Sstevel@tonic-gate L_DECL(fru);
607c478bd9Sstevel@tonic-gate L_DECL(if);
617c478bd9Sstevel@tonic-gate L_DECL(mask);
627c478bd9Sstevel@tonic-gate L_DECL(prop);
637c478bd9Sstevel@tonic-gate L_DECL(config);
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate /* event types */
667c478bd9Sstevel@tonic-gate L_DECL(fault);
677c478bd9Sstevel@tonic-gate L_DECL(upset);
687c478bd9Sstevel@tonic-gate L_DECL(defect);
697c478bd9Sstevel@tonic-gate L_DECL(error);
707c478bd9Sstevel@tonic-gate L_DECL(ereport);
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate /* engine types */
737c478bd9Sstevel@tonic-gate L_DECL(serd);
747aec1d6eScindi L_DECL(stat);
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate /* timeval suffixes */
777c478bd9Sstevel@tonic-gate L_DECL(nanosecond);
787c478bd9Sstevel@tonic-gate L_DECL(nanoseconds);
797c478bd9Sstevel@tonic-gate L_DECL(nsec);
807c478bd9Sstevel@tonic-gate L_DECL(nsecs);
817c478bd9Sstevel@tonic-gate L_DECL(ns);
827c478bd9Sstevel@tonic-gate L_DECL(microsecond);
837c478bd9Sstevel@tonic-gate L_DECL(microseconds);
847c478bd9Sstevel@tonic-gate L_DECL(usec);
857c478bd9Sstevel@tonic-gate L_DECL(usecs);
867c478bd9Sstevel@tonic-gate L_DECL(us);
877c478bd9Sstevel@tonic-gate L_DECL(millisecond);
887c478bd9Sstevel@tonic-gate L_DECL(milliseconds);
897c478bd9Sstevel@tonic-gate L_DECL(msec);
907c478bd9Sstevel@tonic-gate L_DECL(msecs);
917c478bd9Sstevel@tonic-gate L_DECL(ms);
927c478bd9Sstevel@tonic-gate L_DECL(second);
937c478bd9Sstevel@tonic-gate L_DECL(seconds);
947c478bd9Sstevel@tonic-gate L_DECL(s);
957c478bd9Sstevel@tonic-gate L_DECL(minute);
967c478bd9Sstevel@tonic-gate L_DECL(minutes);
977c478bd9Sstevel@tonic-gate L_DECL(min);
987c478bd9Sstevel@tonic-gate L_DECL(mins);
997c478bd9Sstevel@tonic-gate L_DECL(m);
1007c478bd9Sstevel@tonic-gate L_DECL(hour);
1017c478bd9Sstevel@tonic-gate L_DECL(hours);
1027c478bd9Sstevel@tonic-gate L_DECL(hr);
1037c478bd9Sstevel@tonic-gate L_DECL(hrs);
1047c478bd9Sstevel@tonic-gate L_DECL(h);
1057c478bd9Sstevel@tonic-gate L_DECL(day);
1067c478bd9Sstevel@tonic-gate L_DECL(days);
1077c478bd9Sstevel@tonic-gate L_DECL(d);
1087c478bd9Sstevel@tonic-gate L_DECL(week);
1097c478bd9Sstevel@tonic-gate L_DECL(weeks);
1107c478bd9Sstevel@tonic-gate L_DECL(wk);
1117c478bd9Sstevel@tonic-gate L_DECL(wks);
1127c478bd9Sstevel@tonic-gate L_DECL(month);
1137c478bd9Sstevel@tonic-gate L_DECL(months);
1147c478bd9Sstevel@tonic-gate L_DECL(year);
1157c478bd9Sstevel@tonic-gate L_DECL(years);
1167c478bd9Sstevel@tonic-gate L_DECL(yr);
1177c478bd9Sstevel@tonic-gate L_DECL(yrs);
1187c478bd9Sstevel@tonic-gate L_DECL(infinity);
1197c478bd9Sstevel@tonic-gate 
1207c478bd9Sstevel@tonic-gate /* property names */
1217c478bd9Sstevel@tonic-gate L_DECL(ASRU);
1227aec1d6eScindi L_DECL(action);
1237c478bd9Sstevel@tonic-gate L_DECL(FITrate);
1247c478bd9Sstevel@tonic-gate L_DECL(FRU);
1257aec1d6eScindi L_DECL(id);
1267aec1d6eScindi L_DECL(message);
127b7d3956bSstephh L_DECL(retire);
128b7d3956bSstephh L_DECL(response);
1297c478bd9Sstevel@tonic-gate L_DECL(FRUID);
1307c478bd9Sstevel@tonic-gate L_DECL(N);
1317c478bd9Sstevel@tonic-gate L_DECL(T);
1327c478bd9Sstevel@tonic-gate L_DECL(count);
1337c478bd9Sstevel@tonic-gate L_DECL(method);
1347c478bd9Sstevel@tonic-gate L_DECL(poller);
1357c478bd9Sstevel@tonic-gate L_DECL(timeout);
1367c478bd9Sstevel@tonic-gate L_DECL(trip);
137602ca9eaScth L_DECL(discard_if_config_unknown);
1387c478bd9Sstevel@tonic-gate 
1397c478bd9Sstevel@tonic-gate /* property values */
1407c478bd9Sstevel@tonic-gate L_DECL(A);
1417c478bd9Sstevel@tonic-gate L_DECL(volatile);
1427c478bd9Sstevel@tonic-gate L_DECL(persistent);
1437c478bd9Sstevel@tonic-gate 
1447c478bd9Sstevel@tonic-gate /* event bubble types */
1457c478bd9Sstevel@tonic-gate L_DECL(from);
1467c478bd9Sstevel@tonic-gate L_DECL(to);
1477c478bd9Sstevel@tonic-gate L_DECL(inhibit);
1487c478bd9Sstevel@tonic-gate 
1497c478bd9Sstevel@tonic-gate /*
1507c478bd9Sstevel@tonic-gate  * internal function names.  note that "fru" and "asru" are also function
1517c478bd9Sstevel@tonic-gate  * names.
1527c478bd9Sstevel@tonic-gate  */
1537c478bd9Sstevel@tonic-gate L_DECL(within);
1547c478bd9Sstevel@tonic-gate L_DECL(call);
1557aec1d6eScindi L_DECL(confcall);
1567c478bd9Sstevel@tonic-gate L_DECL(confprop);
1578a40a695Sgavinm L_DECL(confprop_defined);
1587aec1d6eScindi L_DECL(defined);
1597c478bd9Sstevel@tonic-gate L_DECL(payloadprop);
1607aec1d6eScindi L_DECL(payloadprop_contains);
1617aec1d6eScindi L_DECL(payloadprop_defined);
1627aec1d6eScindi L_DECL(setpayloadprop);
163b7d3956bSstephh L_DECL(setserdsuffix);
164b7d3956bSstephh L_DECL(setserdincrement);
165b7d3956bSstephh L_DECL(setserdn);
166b7d3956bSstephh L_DECL(setserdt);
1677c478bd9Sstevel@tonic-gate L_DECL(envprop);
1687c478bd9Sstevel@tonic-gate L_DECL(is_connected);
1697c478bd9Sstevel@tonic-gate L_DECL(is_under);
1707c478bd9Sstevel@tonic-gate L_DECL(is_on);
1717c478bd9Sstevel@tonic-gate L_DECL(is_present);
172*25c6ff4bSstephh L_DECL(has_fault);
1737c478bd9Sstevel@tonic-gate L_DECL(is_type);
1747aec1d6eScindi L_DECL(count);
1757c478bd9Sstevel@tonic-gate 
1767c478bd9Sstevel@tonic-gate /* our enumerated types (used for debugging) */
1777c478bd9Sstevel@tonic-gate L_DECL(T_NOTHING);
1787c478bd9Sstevel@tonic-gate L_DECL(T_NAME);
1797c478bd9Sstevel@tonic-gate L_DECL(T_GLOBID);
1807c478bd9Sstevel@tonic-gate L_DECL(T_ENAME);
1817c478bd9Sstevel@tonic-gate L_DECL(T_EVENT);
1827c478bd9Sstevel@tonic-gate L_DECL(T_ENGINE);
1837c478bd9Sstevel@tonic-gate L_DECL(T_ASRU);
1847c478bd9Sstevel@tonic-gate L_DECL(T_FRU);
1857c478bd9Sstevel@tonic-gate L_DECL(T_TIMEVAL);
1867c478bd9Sstevel@tonic-gate L_DECL(T_NUM);
1877c478bd9Sstevel@tonic-gate L_DECL(T_QUOTE);
1887c478bd9Sstevel@tonic-gate L_DECL(T_FUNC);
1897c478bd9Sstevel@tonic-gate L_DECL(T_NVPAIR);
1907c478bd9Sstevel@tonic-gate L_DECL(T_ASSIGN);
1917c478bd9Sstevel@tonic-gate L_DECL(T_CONDIF);
1927c478bd9Sstevel@tonic-gate L_DECL(T_CONDELSE);
1937c478bd9Sstevel@tonic-gate L_DECL(T_NOT);
1947c478bd9Sstevel@tonic-gate L_DECL(T_AND);
1957c478bd9Sstevel@tonic-gate L_DECL(T_OR);
1967c478bd9Sstevel@tonic-gate L_DECL(T_EQ);
1977c478bd9Sstevel@tonic-gate L_DECL(T_NE);
1987c478bd9Sstevel@tonic-gate L_DECL(T_SUB);
1997c478bd9Sstevel@tonic-gate L_DECL(T_ADD);
2007c478bd9Sstevel@tonic-gate L_DECL(T_MUL);
2017c478bd9Sstevel@tonic-gate L_DECL(T_DIV);
2027c478bd9Sstevel@tonic-gate L_DECL(T_MOD);
2037c478bd9Sstevel@tonic-gate L_DECL(T_LT);
2047c478bd9Sstevel@tonic-gate L_DECL(T_LE);
2057c478bd9Sstevel@tonic-gate L_DECL(T_GT);
2067c478bd9Sstevel@tonic-gate L_DECL(T_GE);
2077c478bd9Sstevel@tonic-gate L_DECL(T_BITAND);
2087c478bd9Sstevel@tonic-gate L_DECL(T_BITOR);
2097c478bd9Sstevel@tonic-gate L_DECL(T_BITXOR);
2107c478bd9Sstevel@tonic-gate L_DECL(T_BITNOT);
2117c478bd9Sstevel@tonic-gate L_DECL(T_LSHIFT);
2127c478bd9Sstevel@tonic-gate L_DECL(T_RSHIFT);
2137c478bd9Sstevel@tonic-gate L_DECL(T_ARROW);
2147c478bd9Sstevel@tonic-gate L_DECL(T_LIST);
2157c478bd9Sstevel@tonic-gate L_DECL(T_FAULT);
2167c478bd9Sstevel@tonic-gate L_DECL(T_UPSET);
2177c478bd9Sstevel@tonic-gate L_DECL(T_DEFECT);
2187c478bd9Sstevel@tonic-gate L_DECL(T_ERROR);
2197c478bd9Sstevel@tonic-gate L_DECL(T_EREPORT);
2207c478bd9Sstevel@tonic-gate L_DECL(T_SERD);
2217aec1d6eScindi L_DECL(T_STAT);
2227c478bd9Sstevel@tonic-gate L_DECL(T_PROP);
2237c478bd9Sstevel@tonic-gate L_DECL(T_MASK);
2247c478bd9Sstevel@tonic-gate L_DECL(N_UNSPEC);
2257c478bd9Sstevel@tonic-gate L_DECL(N_FAULT);
2267c478bd9Sstevel@tonic-gate L_DECL(N_UPSET);
2277c478bd9Sstevel@tonic-gate L_DECL(N_DEFECT);
2287c478bd9Sstevel@tonic-gate L_DECL(N_ERROR);
2297c478bd9Sstevel@tonic-gate L_DECL(N_EREPORT);
2307c478bd9Sstevel@tonic-gate L_DECL(N_SERD);
2317c478bd9Sstevel@tonic-gate L_DECL(IT_NONE);
2327c478bd9Sstevel@tonic-gate L_DECL(IT_VERTICAL);
2337c478bd9Sstevel@tonic-gate L_DECL(IT_HORIZONTAL);
2347c478bd9Sstevel@tonic-gate L_DECL(IT_ENAME);
2357c478bd9Sstevel@tonic-gate 
2367c478bd9Sstevel@tonic-gate /* misc */
2377c478bd9Sstevel@tonic-gate L_DECL(nofile);
2387c478bd9Sstevel@tonic-gate 
2397c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
2407c478bd9Sstevel@tonic-gate }
2417c478bd9Sstevel@tonic-gate #endif
2427c478bd9Sstevel@tonic-gate 
2437c478bd9Sstevel@tonic-gate #endif	/* _ESC_COMMON_LITERALS_H */
244