1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SPE_ATTR_H 28 #define _SPE_ATTR_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 typedef struct attribute_table { 35 char *at_name; 36 int at_len; 37 spe_attributes at_attr; 38 } attribute_table; 39 40 /* 41 * XXX: While these are global, they do not need 42 * to go into server instances. 43 */ 44 attribute_table spe_attribute_table[] = { 45 { "base", 5, SPE_ATTR_BASE }, 46 { "day", 4, SPE_ATTR_DAY }, 47 { "domain", 7, SPE_ATTR_DOMAIN }, 48 { "ext", 4, SPE_ATTR_EXTENSION }, 49 { "file", 5, SPE_ATTR_FILE }, 50 { "fqdn", 5, SPE_ATTR_FQDN }, 51 { "gid", 4, SPE_ATTR_GID }, 52 { "group", 6, SPE_ATTR_GROUP }, 53 { "hour", 5, SPE_ATTR_HOUR }, 54 { "host", 5, SPE_ATTR_HOST }, 55 { "ip", 3, SPE_ATTR_IP }, 56 { "path", 5, SPE_ATTR_PATH }, 57 { "subnet", 7, SPE_ATTR_SUBNET }, 58 { "uid", 4, SPE_ATTR_UID }, 59 { "user", 5, SPE_ATTR_USER }, 60 { "weekday", 8, SPE_ATTR_WEEKDAY }, 61 }; 62 63 int Attribute_count = sizeof (spe_attribute_table) / sizeof (attribute_table); 64 65 char *Spe_ops_list[] = { 66 "&&", 67 "||", 68 "!", 69 "==", 70 "!=", 71 NULL 72 }; 73 74 char *Spe_weekdays[] = { 75 "sun", 76 "mon", 77 "tue", 78 "wed", 79 "thu", 80 "fri", 81 "sat", 82 NULL 83 }; 84 85 #define SPE_WEEKDAY_LEN 3 86 87 #define SPE_HOSTNAME_BUF 256 88 89 #ifdef __cplusplus 90 } 91 #endif 92 93 #endif /* _SPE_ATTR_H */ 94