77
78 SCF_TYPE_BOOLEAN,
79 SCF_TYPE_COUNT,
80 SCF_TYPE_INTEGER,
81 SCF_TYPE_TIME,
82 SCF_TYPE_ASTRING,
83 SCF_TYPE_OPAQUE,
84
85 SCF_TYPE_USTRING = 100,
86
87 SCF_TYPE_URI = 200,
88 SCF_TYPE_FMRI,
89
90 SCF_TYPE_HOST = 300,
91 SCF_TYPE_HOSTNAME,
92 SCF_TYPE_NET_ADDR_V4,
93 SCF_TYPE_NET_ADDR_V6,
94 SCF_TYPE_NET_ADDR
95 } scf_type_t;
96
97 typedef struct scf_time {
98 int64_t t_seconds;
99 int32_t t_ns;
100 } scf_time_t;
101
102 /*
103 * There is no explicit initializer for this structure. Functions
104 * which set or populate this structure assume that it is either
105 * uninitialized or destroyed.
106 */
107 typedef struct scf_values {
108 scf_type_t value_type;
109 void *reserved; /* reserved for future use */
110 int value_count;
111 char **values_as_strings;
112 union {
113 uint64_t *v_count;
114 uint8_t *v_boolean;
115 int64_t *v_integer;
116 char **v_astring;
|
77
78 SCF_TYPE_BOOLEAN,
79 SCF_TYPE_COUNT,
80 SCF_TYPE_INTEGER,
81 SCF_TYPE_TIME,
82 SCF_TYPE_ASTRING,
83 SCF_TYPE_OPAQUE,
84
85 SCF_TYPE_USTRING = 100,
86
87 SCF_TYPE_URI = 200,
88 SCF_TYPE_FMRI,
89
90 SCF_TYPE_HOST = 300,
91 SCF_TYPE_HOSTNAME,
92 SCF_TYPE_NET_ADDR_V4,
93 SCF_TYPE_NET_ADDR_V6,
94 SCF_TYPE_NET_ADDR
95 } scf_type_t;
96
97 /*
98 * Values returned by scf_type_to_string
99 */
100 #define SCF_TYPE_STRING_BOOLEAN "boolean"
101 #define SCF_TYPE_STRING_COUNT "count"
102 #define SCF_TYPE_STRING_INTEGER "integer"
103 #define SCF_TYPE_STRING_TIME "time"
104 #define SCF_TYPE_STRING_ASTRING "astring"
105 #define SCF_TYPE_STRING_OPAQUE "opaque"
106 #define SCF_TYPE_STRING_USTRING "ustring"
107 #define SCF_TYPE_STRING_URI "uri"
108 #define SCF_TYPE_STRING_FMRI "fmri"
109 #define SCF_TYPE_STRING_HOST "host"
110 #define SCF_TYPE_STRING_HOSTNAME "hostname"
111 #define SCF_TYPE_STRING_NET_ADDR "net_address"
112 #define SCF_TYPE_STRING_NET_ADDR_V4 "net_address_v4"
113 #define SCF_TYPE_STRING_NET_ADDR_V6 "net_address_v6"
114
115 typedef struct scf_time {
116 int64_t t_seconds;
117 int32_t t_ns;
118 } scf_time_t;
119
120 /*
121 * There is no explicit initializer for this structure. Functions
122 * which set or populate this structure assume that it is either
123 * uninitialized or destroyed.
124 */
125 typedef struct scf_values {
126 scf_type_t value_type;
127 void *reserved; /* reserved for future use */
128 int value_count;
129 char **values_as_strings;
130 union {
131 uint64_t *v_count;
132 uint8_t *v_boolean;
133 int64_t *v_integer;
134 char **v_astring;
|