Searched defs:tnf (Results 1 - 14 of 14) sorted by relevance

/illumos-gate/usr/src/lib/libtnf/
H A Drecord.c51 TNF *tnf; local
56 tnf = DATUM_TNF(datum);
60 arg = _tnf_get_tag_arg(tnf, DATUM_RECORD(datum));
65 return (RECORD_DATUM(tnf, arg));
H A Derror.c59 _tnf_error(TNF *tnf, tnf_errcode_t err) argument
61 (*_err_handler)(_err_arg, tnf, err);
109 tnf_default_error_handler(void *arg, TNF *tnf, tnf_errcode_t err) argument
H A Dreader.c39 TNF *tnf; local
61 if ((tnf = (TNF*)calloc(1, sizeof (*tnf))) == (TNF*)NULL)
64 tnf->file_magic = magic;
65 tnf->file_native = native;
66 tnf->file_start = base;
67 tnf->file_size = size;
68 tnf->file_end = base + size;
76 tnf->file_header = fhdr;
79 p = _tnf_get_slot_named(tnf, fhd
179 tnf_reader_end(TNF *tnf) argument
[all...]
H A Dutil.c72 _tnf_get_props(TNF *tnf, tnf_ref32_t *tag) argument
82 if (HAS_PROPERTY(tnf, tag, p->name))
95 _tnf_get_kind(TNF *tnf, tnf_ref32_t *tag) argument
100 base_tag = _tnf_get_base_tag(tnf, tag);
101 base_name = _tnf_get_name(tnf, base_tag);
103 if (HAS_PROPERTY(tnf, base_tag, TNF_N_SCALAR)) {
114 } else if (HAS_PROPERTY(tnf, base_tag, TNF_N_ARRAY)) {
120 } else if (HAS_PROPERTY(tnf, base_tag, TNF_N_TYPE)) {
123 } else if (HAS_PROPERTY(tnf, base_tag, TNF_N_STRUCT)) {
H A Daccess.c35 tnf_get_file_header(TNF *tnf) argument
37 return (DATUM(tnf->file_header_info, (caddr_t)tnf->file_header));
45 tnf_get_block_count(TNF *tnf) argument
47 return (tnf->block_count);
51 tnf_get_block_absolute(TNF *tnf, unsigned index) argument
53 if (index >= tnf->block_count)
64 return (DATUM(tnf->block_header_info,
65 (caddr_t)_GET_INDEX_BLOCK(tnf, index)));
71 TNF *tnf; local
104 TNF *tnf; local
124 TNF *tnf; local
[all...]
H A Darray.c142 TNF *tnf; local
145 tnf = DATUM_TNF(datum);
147 rec = _GET_REF32(tnf, (tnf_ref32_t *)
151 RECORD_DATUM(tnf, rec));
H A Ddatum.c76 TNF *tnf; local
82 tnf = DATUM_TNF(datum);
84 if ((val <= tnf->file_start) || (val >= tnf->file_end))
85 _tnf_error(tnf, TNF_ERR_BADDATUM);
200 return (_tnf_get_self_size(info->tnf, DATUM_RECORD(datum)));
H A Dref.c51 vaddr_to_phys(TNF *tnf, tnf_ref32_t *src_cell, tnf_ref32_t src_val) argument
60 base = tnf->file_start;
61 shft = tnf->generation_shift;
62 mask = tnf->address_mask;
66 src_gen = _GET_BLOCK_GENERATION(tnf, _GET_BLOCK(tnf, src_cell));
87 dst_blk = _GET_BLOCK(tnf, dst_cell);
90 dst_gen = _GET_BLOCK_GENERATION(tnf, dst_blk);
93 bytes_valid = _GET_BLOCK_BYTES_VALID(tnf, dst_blk);
110 _tnf_get_ref32(TNF *tnf, tnf_ref32_ argument
190 _tnf_get_ref16(TNF *tnf, tnf_ref32_t *cell) argument
[all...]
H A Dscalar.c44 static tnf_uint64_t get_uint64(TNF *tnf, caddr_t val);
103 get_uint64(TNF *tnf, caddr_t val) argument
115 if (tnf->file_native)
124 if (tnf->file_native)
H A Dstruct.c110 TNF *tnf; local
113 tnf = DATUM_TNF(datum);
115 rec = _GET_REF32(tnf, (tnf_ref32_t *)
119 RECORD_DATUM(tnf, rec));
H A Dinfo.c60 _tnf_init_tags(TNF *tnf) argument
62 if ((tnf->tag_table = calloc(TAGTABCNT, sizeof (struct taginfo *)))
65 if ((tnf->tag_directory = calloc(TAGDIRCNT(tnf->directory_size),
77 _tnf_fini_tags(TNF *tnf) argument
86 info = tnf->tag_table[i];
102 free(tnf->tag_table);
103 tnf->tag_table = NULL;
104 free(tnf->tag_directory);
105 tnf
115 _tnf_get_info(TNF *tnf, tnf_ref32_t *tag) argument
134 _tnf_record_info(TNF *tnf, tnf_ref32_t *record) argument
169 add_info(TNF *tnf, tnf_ref32_t *tag) argument
220 init_abstract_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info) argument
235 init_derived_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info) argument
255 init_scalar_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info) argument
273 init_struct_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info) argument
292 init_array_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info) argument
334 init_slots(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info) argument
[all...]
H A Dabi.c34 #define _GET_TAG(tnf, p) \
35 _GET_REF32(tnf, p)
37 #define _GET_TAG_ARG(tnf, p) \
38 _GET_REF16(tnf, p)
40 #define _GET_SELF_SIZE(tnf, p) \
41 _GET_UINT32(tnf, &((struct tnf_array_hdr *)(p))->self_size)
43 #define _GET_NAME(tnf, p) \
44 _GET_REF32(tnf, &((struct tnf_type_hdr *)(p))->name)
46 #define _GET_PROPERTIES(tnf, p) \
47 _GET_REF32(tnf,
72 _tnf_get_tag(TNF *tnf, tnf_ref32_t *record) argument
82 _tnf_get_tag_arg(TNF *tnf, tnf_ref32_t *record) argument
92 _tnf_get_self_size(TNF *tnf, tnf_ref32_t *array) argument
102 _tnf_get_element_count(TNF *tnf, tnf_ref32_t *array, unsigned eltsize) argument
125 _tnf_get_elements(TNF *tnf, tnf_ref32_t *array) argument
144 _tnf_get_chars(TNF *tnf, tnf_ref32_t *string) argument
154 _tnf_get_name(TNF *tnf, tnf_ref32_t *tag) argument
164 _tnf_get_properties(TNF *tnf, tnf_ref32_t *tag) argument
174 _tnf_get_slot_types(TNF *tnf, tnf_ref32_t *tag) argument
184 _tnf_get_header_size(TNF *tnf, tnf_ref32_t *tag) argument
194 _tnf_get_derived_base(TNF *tnf, tnf_ref32_t *tag) argument
205 _tnf_get_root_tag(TNF *tnf, tnf_ref32_t *record) argument
224 _tnf_get_element_named(TNF *tnf, tnf_ref32_t *array, char *name) argument
255 _tnf_get_property(TNF *tnf, tnf_ref32_t *tag, char *name) argument
294 _tnf_get_base_tag(TNF *tnf, tnf_ref32_t *tag) argument
318 _tnf_get_ref_size(TNF *tnf, tnf_ref32_t *tag) argument
338 _tnf_get_storage_size(TNF *tnf, tnf_ref32_t *tag) argument
407 _tnf_get_align(TNF *tnf, tnf_ref32_t *tag) argument
430 _tnf_get_slot_typed(TNF *tnf, tnf_ref32_t *record, char *name) argument
495 _tnf_get_slot_named(TNF *tnf, tnf_ref32_t *record, char *name) argument
571 fetch_slot(TNF *tnf, caddr_t p, tnf_ref32_t *tag) argument
[all...]
H A Dlibtnf.h39 #include "tnf/tnf.h"
68 TNF *tnf; /* TNF handle */ member in struct:taginfo
124 #define TAGOFF(tnf, p) ((unsigned)((caddr_t)(p) - (tnf)->data_start))
125 #define TAGHASH(tnf, p) ((TAGOFF(tnf, p) >> TAGTABSHIFT) & TAGTABMASK)
179 #define _GET_UINT32(tnf, ptr) \
180 ((tnf)->file_native ? \
184 #define _GET_INT32(tnf, pt
[all...]
/illumos-gate/usr/src/cmd/tnf/tnfdump/
H A Dmain.c36 #include <tnf/tnf.h>
132 TNF *tnf; local
188 if ((err = tnf_reader_begin(p, st.st_size, &tnf)) != TNF_ERR_NONE) {
198 record = tnf_get_file_header(tnf);

Completed in 59 milliseconds