Changeset 203 for trunk/include
- Timestamp:
- 08/21/10 12:53:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/regfi.h
r202 r203 553 553 */ 554 554 bool data_in_offset; 555 } REGFI_VK _REC;555 } REGFI_VK; 556 556 557 557 … … 593 593 /** The magic number for this record (should be "sk") */ 594 594 uint8_t magic[REGFI_CELL_MAGIC_SIZE]; 595 } REGFI_SK _REC;595 } REGFI_SK; 596 596 597 597 … … 599 599 * @ingroup regfiBase 600 600 */ 601 typedef struct 601 typedef struct _regfi_nk_rec 602 602 { 603 603 /** Real offset of this record's cell in the file */ … … 688 688 /** Virtual offset of SK record */ 689 689 uint32_t sk_off; 690 } REGFI_NK _REC;690 } REGFI_NK; 691 691 692 692 … … 719 719 typedef struct _regfi_file 720 720 { 721 /* Run-time information */722 /************************/723 /* Functions for accessing the file */724 REGFI_RAW_FILE* cb;725 726 /* Mutex for all cb access. This is done to prevent one thread from moving727 * the file offset while another thread is in the middle of a multi-read728 * parsing transaction */729 pthread_mutex_t cb_lock;730 731 /* For sanity checking (not part of the registry header) */732 uint32_t file_length;733 734 /* Metadata about hbins */735 range_list* hbins;736 737 /* Multiple read access allowed, write access is exclusive */738 pthread_rwlock_t hbins_lock;739 740 /* SK record cached since they're repeatedly reused */741 lru_cache* sk_cache;742 743 /* Need exclusive access for LRUs, since lookups make changes */744 pthread_mutex_t sk_lock;745 746 721 /* Data parsed from file header */ 747 722 /********************************/ … … 794 769 uint8_t reserved2[REGFI_REGF_RESERVED2_SIZE]; 795 770 771 772 /* Run-time information */ 773 /************************/ 774 /* Functions for accessing the file */ 775 REGFI_RAW_FILE* cb; 776 777 /* Mutex for all cb access. This is done to prevent one thread from moving 778 * the file offset while another thread is in the middle of a multi-read 779 * parsing transaction */ 780 pthread_mutex_t cb_lock; 781 782 /* For sanity checking (not part of the registry header) */ 783 uint32_t file_length; 784 785 /* Metadata about hbins */ 786 range_list* hbins; 787 788 /* Multiple read access allowed, write access is exclusive */ 789 pthread_rwlock_t hbins_lock; 790 791 /* SK record cached since they're repeatedly reused */ 792 lru_cache* sk_cache; 793 794 /* Need exclusive access for LRUs, since lookups make changes */ 795 pthread_mutex_t sk_lock; 796 796 797 } REGFI_FILE; 797 798 … … 809 810 810 811 /** The current key */ 811 REGFI_NK _REC* cur_key;812 REGFI_NK* cur_key; 812 813 813 814 /** The encoding that all strings are converted to as set during iterator … … 826 827 typedef struct _regfi_iter_position 827 828 { 828 REGFI_NK _REC* nk;829 REGFI_NK* nk; 829 830 uint32_t cur_subkey; 830 831 /* We could store a cur_value here as well, but didn't see … … 939 940 /** Frees a record previously returned by one of the API functions. 940 941 * 941 * Can be used to free REGFI_NK _REC, REGFI_VK_REC, REGFI_SK_REC, REGFI_DATA, and942 * Can be used to free REGFI_NK, REGFI_VK, REGFI_SK, REGFI_DATA, and 942 943 * REGFI_CLASSNAME records. 943 944 * … … 1070 1071 */ 1071 1072 _EXPORT 1072 const REGFI_NK _REC* regfi_iterator_cur_key(REGFI_ITERATOR* i);1073 const REGFI_NK* regfi_iterator_cur_key(REGFI_ITERATOR* i); 1073 1074 1074 1075 … … 1082 1083 */ 1083 1084 _EXPORT 1084 const REGFI_SK _REC* regfi_iterator_cur_sk(REGFI_ITERATOR* i);1085 const REGFI_SK* regfi_iterator_cur_sk(REGFI_ITERATOR* i); 1085 1086 1086 1087 … … 1109 1110 */ 1110 1111 _EXPORT 1111 const REGFI_NK _REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i);1112 const REGFI_NK* regfi_iterator_cur_subkey(REGFI_ITERATOR* i); 1112 1113 1113 1114 … … 1163 1164 */ 1164 1165 _EXPORT 1165 const REGFI_VK _REC* regfi_iterator_cur_value(REGFI_ITERATOR* i);1166 const REGFI_VK* regfi_iterator_cur_value(REGFI_ITERATOR* i); 1166 1167 1167 1168 … … 1205 1206 _EXPORT 1206 1207 const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i, 1207 const REGFI_NK _REC* key);1208 const REGFI_NK* key); 1208 1209 1209 1210 … … 1220 1221 _EXPORT 1221 1222 const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i, 1222 const REGFI_VK _REC* value);1223 const REGFI_VK* value); 1223 1224 1224 1225 … … 1237 1238 */ 1238 1239 _EXPORT 1239 REGFI_NK _REC* regfi_load_key(REGFI_FILE* file, uint32_t offset,1240 REGFI_NK* regfi_load_key(REGFI_FILE* file, uint32_t offset, 1240 1241 REGFI_ENCODING output_encoding, 1241 1242 bool strict); … … 1249 1250 */ 1250 1251 _EXPORT 1251 REGFI_VK _REC* regfi_load_value(REGFI_FILE* file, uint32_t offset,1252 REGFI_VK* regfi_load_value(REGFI_FILE* file, uint32_t offset, 1252 1253 REGFI_ENCODING output_encoding, 1253 1254 bool strict); … … 1327 1328 */ 1328 1329 _EXPORT 1329 const REGFI_SK _REC* regfi_load_sk(REGFI_FILE* file, uint32_t offset,1330 const REGFI_SK* regfi_load_sk(REGFI_FILE* file, uint32_t offset, 1330 1331 bool strict); 1331 1332 … … 1369 1370 */ 1370 1371 _EXPORT 1371 REGFI_NK _REC* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,1372 REGFI_NK* regfi_parse_nk(REGFI_FILE* file, uint32_t offset, 1372 1373 uint32_t max_size, bool strict); 1373 1374 … … 1391 1392 */ 1392 1393 _EXPORT 1393 REGFI_VK _REC* regfi_parse_vk(REGFI_FILE* file, uint32_t offset,1394 REGFI_VK* regfi_parse_vk(REGFI_FILE* file, uint32_t offset, 1394 1395 uint32_t max_size, bool strict); 1395 1396 … … 1402 1403 */ 1403 1404 _EXPORT 1404 REGFI_SK _REC* regfi_parse_sk(REGFI_FILE* file, uint32_t offset,1405 REGFI_SK* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, 1405 1406 uint32_t max_size, bool strict); 1406 1407 … … 1469 1470 /* Private Functions */ 1470 1471 /******************************************************************************/ 1471 REGFI_NK _REC* regfi_rootkey(REGFI_FILE* file,1472 REGFI_NK* regfi_rootkey(REGFI_FILE* file, 1472 1473 REGFI_ENCODING output_encoding); 1473 1474 … … 1505 1506 void regfi_add_message(REGFI_FILE* file, uint16_t msg_type, 1506 1507 const char* fmt, ...); 1507 REGFI_NK _REC* regfi_copy_nk(const REGFI_NK_REC* nk);1508 REGFI_VK _REC* regfi_copy_vk(const REGFI_VK_REC* vk);1508 REGFI_NK* regfi_copy_nk(const REGFI_NK* nk); 1509 REGFI_VK* regfi_copy_vk(const REGFI_VK* vk); 1509 1510 _EXPORT 1510 1511 int32_t regfi_calc_maxsize(REGFI_FILE* file, uint32_t offset); … … 1524 1525 1525 1526 _EXPORT 1526 void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK _REC* nk,1527 void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK* nk, 1527 1528 REGFI_ENCODING output_encoding, bool strict); 1528 1529 _EXPORT 1529 void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK _REC* vk,1530 void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK* vk, 1530 1531 REGFI_ENCODING output_encoding, bool strict); 1531 1532
Note: See TracChangeset
for help on using the changeset viewer.