Changeset 127 for trunk/include
- Timestamp:
- 09/01/08 19:20:50 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/regfi.h
r126 r127 86 86 #define REGFI_VK_MIN_LENGTH 0x14 87 87 #define REGFI_SK_MIN_LENGTH 0x14 88 #define REGFI_ HASH_LIST_MIN_LENGTH0x488 #define REGFI_SUBKEY_LIST_MIN_LEN 0x4 89 89 90 90 /* Constants used for validation */ … … 138 138 139 139 140 /* HashList -- list of key offsets and hashed names for consistency */140 /* Subkey List -- list of key offsets and hashed names for consistency */ 141 141 typedef struct 142 142 { 143 143 uint32 nk_off; 144 144 uint32 hash; 145 } REGF_ HASH_LIST_ELEM;145 } REGF_SUBKEY_LIST_ELEM; 146 146 147 147 … … 150 150 uint32 offset; /* Real offset of this record's cell in the file */ 151 151 uint32 cell_size; /* ((start_offset - end_offset) & 0xfffffff8) */ 152 REGF_HBIN* hbin; /* pointer to HBIN record (in memory) containing 153 * this nk record 154 */ 155 uint32 hbin_off; /* offset from beginning of this hbin block */ 156 REGF_HASH_LIST_ELEM* hashes; 152 uint32 num_keys; 153 REGF_SUBKEY_LIST_ELEM* elements; 157 154 158 155 uint8 magic[REC_HDR_SIZE]; 159 uint16 num_keys; 160 } REGF_HASH_LIST; 156 } REGF_SUBKEY_LIST; 161 157 162 158 … … 219 215 /* link in the other records here */ 220 216 REGF_VK_REC** values; 221 REGF_ HASH_LIST* subkeys;217 REGF_SUBKEY_LIST* subkeys; 222 218 223 219 /* header information */ … … 246 242 /* children */ 247 243 uint32 num_subkeys; 248 uint32 subkeys_off; /* hash records that point to NK records */244 uint32 subkeys_off; /* offset of subkey list that points to NK records */ 249 245 uint32 num_values; 250 246 uint32 values_off; /* value lists which point to VK records */ 251 uint32 sk_off; /* offset to SK record */ 247 uint32 sk_off; /* offset to SK record */ 252 248 } REGF_NK_REC; 253 249 … … 347 343 const REGF_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i); 348 344 const REGF_VK_REC* regfi_iterator_next_value(REGFI_ITERATOR* i); 345 346 347 /********************************************************/ 348 /* Middle-layer structure caching, loading, and linking */ 349 /********************************************************/ 350 REGF_HBIN* regfi_lookup_hbin(REGF_FILE* file, uint32 offset); 351 352 REGF_NK_REC* regfi_load_key(REGF_FILE* file, uint32 offset, bool strict); 353 354 REGF_SUBKEY_LIST* regfi_load_subkeylist(REGF_FILE* file, uint32 offset, 355 uint32 num_keys, uint32 max_size, 356 bool strict); 357 358 REGF_VK_REC** regfi_load_valuelist(REGF_FILE* file, uint32 offset, 359 uint32 num_values, uint32 max_size, 360 bool strict); 361 362 REGF_SUBKEY_LIST* regfi_merge_subkeylists(uint16 num_lists, 363 REGF_SUBKEY_LIST** lists, 364 bool strict); 349 365 350 366 /************************************/ … … 370 386 uint32 max_size, bool strict); 371 387 388 REGF_VK_REC* regfi_parse_vk(REGF_FILE* file, uint32 offset, 389 uint32 max_size, bool strict); 390 391 uint8* regfi_parse_data(REGF_FILE* file, uint32 offset, 392 uint32 length, bool strict); 393 394 REGF_SK_REC* regfi_parse_sk(REGF_FILE* file, uint32 offset, uint32 max_size, bool strict); 395 396 range_list* regfi_parse_unalloc_cells(REGF_FILE* file); 397 398 bool regfi_parse_cell(int fd, uint32 offset, uint8* hdr, uint32 hdr_len, 399 uint32* cell_length, bool* unalloc); 400 401 char* regfi_parse_classname(REGF_FILE* file, uint32 offset, 402 uint16* name_length, bool strict); 403 372 404 373 405 /* Private Functions */ 374 406 REGF_NK_REC* regfi_rootkey(REGF_FILE* file); 375 407 void regfi_key_free(REGF_NK_REC* nk); 408 void regfi_subkeylist_free(REGF_SUBKEY_LIST* list); 376 409 uint32 regfi_read(int fd, uint8* buf, uint32* length); 377 410 378 411 379 380 /****************/381 /* Experimental */382 /****************/383 REGF_NK_REC* regfi_load_key(REGF_FILE* file, uint32 offset, bool strict);384 385 REGF_HASH_LIST* regfi_load_hashlist(REGF_FILE* file, uint32 offset,386 uint32 num_keys, uint32 max_size,387 bool strict);388 389 REGF_VK_REC** regfi_load_valuelist(REGF_FILE* file, uint32 offset,390 uint32 num_values, uint32 max_size,391 bool strict);392 393 REGF_VK_REC* regfi_parse_vk(REGF_FILE* file, uint32 offset,394 uint32 max_size, bool strict);395 396 uint8* regfi_parse_data(REGF_FILE* file, uint32 offset,397 uint32 length, bool strict);398 399 REGF_SK_REC* regfi_parse_sk(REGF_FILE* file, uint32 offset, uint32 max_size, bool strict);400 401 range_list* regfi_parse_unalloc_cells(REGF_FILE* file);402 403 REGF_HBIN* regfi_lookup_hbin(REGF_FILE* file, uint32 offset);404 405 bool regfi_parse_cell(int fd, uint32 offset, uint8* hdr, uint32 hdr_len,406 uint32* cell_length, bool* unalloc);407 408 char* regfi_parse_classname(REGF_FILE* file, uint32 offset,409 uint16* name_length, bool strict);410 411 412 #endif /* _REGFI_H */
Note: See TracChangeset
for help on using the changeset viewer.