libscf_priv.h (70cbfe41) | libscf_priv.h (dfac3eb2) |
---|---|
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 --- 355 unchanged lines hidden (view full) --- 364 struct scf_match *sp_matches; /* List of matches */ 365 int sp_matchcount; /* # of matches */ 366} scf_pattern_t; 367 368int scf_cmp_pattern(char *, scf_pattern_t *); 369 370int gen_filenms_from_fmri(const char *, const char *, char *, char *); 371 | 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 --- 355 unchanged lines hidden (view full) --- 364 struct scf_match *sp_matches; /* List of matches */ 365 int sp_matchcount; /* # of matches */ 366} scf_pattern_t; 367 368int scf_cmp_pattern(char *, scf_pattern_t *); 369 370int gen_filenms_from_fmri(const char *, const char *, char *, char *); 371 |
372/* 373 * Interfaces for bulk access to SMF-stored configuration. 374 * 375 * Each scf_propvec_t represents a single property to be read (with 376 * scf_read_propvec) or written (with scf_write_propvec). 377 * 378 * The fields of a scf_propvec_t have the following meanings: 379 * 380 * pv_prop - the name of the property 381 * pv_desc - a description string (optional; to be consumed by the caller) 382 * pv_type - the type of the property 383 * pv_ptr - where to store the data read, or a pointer to the data to 384 * be written 385 * pv_aux - additional data influencing the interpretation of pv_ptr 386 * 387 * The meaning of pv_ptr and pv_aux depends on the type of property. For: 388 * 389 * boolean - if pv_aux is 0, pv_ptr is a pointer to a boolean_t 390 * if pv_aux is non-0, pv_ptr is a pointer to a uint64_t, 391 * where pv_aux indicates the bit holding the truth value. 392 * count - pv_ptr is a pointer to a uint64_t; pv_aux is unused 393 * integer - pv_ptr is a pointer to an int64_t; pv_aux is unused 394 * time - pv_ptr is a pointer to an scf_time_t; pv_aux is unused 395 * opaque - pv_ptr is a pointer to an scf_opaque_t; pv_aux is unused 396 * strings - (scf_read_propvec) pv_ptr is a pointer to a char * 397 * (scf_write_propvec) pv_ptr is a pointer to an array of char 398 * (both) pv_aux is unused 399 */ 400typedef struct { 401 int64_t st_sec; 402 int32_t st_nanosec; 403} scf_time_t; 404 405typedef struct { 406 void *so_addr; 407 size_t so_size; 408} scf_opaque_t; 409 410typedef struct { 411 const char *pv_prop; 412 const char *pv_desc; 413 scf_type_t pv_type; 414 void *pv_ptr; 415 uint64_t pv_aux; 416} scf_propvec_t; 417 418void scf_clean_propvec(scf_propvec_t *); 419int scf_read_propvec(const char *, const char *, boolean_t, scf_propvec_t *, 420 scf_propvec_t **); 421int scf_write_propvec(const char *, const char *, scf_propvec_t *, 422 scf_propvec_t **); 423 |
|
372#ifdef __cplusplus 373} 374#endif 375 376#endif /* _LIBSCF_PRIV_H */ | 424#ifdef __cplusplus 425} 426#endif 427 428#endif /* _LIBSCF_PRIV_H */ |