Last modified: 17 March 2010
Name: h5checker_obj
Signature:
ck_err_t h5checker_obj( char * fname, ck_addr_t obj_addr, ck_errmsg_t *buff )

Purpose:
Validates an object header.

Description:
h5checker_obj validates the object header of the HDF5 file fname at the address obj_addr according to the HDF5 File Format Specification Version 1.1, section IV, “Disk Format Level 2 - Data Objects.”

h5checker_obj first opens the file, then reads and validates the superblock information. The validation of the superblock must succeed before proceeding with validation of the specified object header.

All the header messages embedded in the specified object header are checked. Addresses of the B-tree, object headers, and local heap in some header messages in the specified object header are also followed and validated. The file fname is closed when validation is complete.

When h5checker_obj is called with an undefined obj_addr (=CK_ADDR_UNDEF), the whole file is validated.

When non-compliant errors are found in the object header and buf is non-null, h5checker_obj fills in the following data structure (defined in h5check_public.h) for the errors:

            #define CK_ADDR_UNDEF ((ck_addr_t)(-1))
            #define NSLOTS   32              /* number of error records  */

            typedef struct ck_errmsg_t {
                int          nused;          /* number of error records  */
                                             /*   currently in use       */
                errmsg_t     slot[NSLOTS];   /* array of error records   */
            } ck_errmsg_t;

            typedef struct errmsg_t {
                const char   *desc;          /* error message           */
                ck_addr_t    addr;           /* logical address where   */
                                             /*   error occurs          */
            }errmsg_t;
         

Parameters:
char *fname      IN: Name of the HDF5 file to be validated
ck_addt_t obj_addr   IN: Address of the object header to be validated
ck_errmsg_t *buff   OUT: Buffer in which to return error information if there are errors

Returns:
Returns 0 (zero) if the object header is compliant. Information in buf is undefined, if provided.

Returns a negative value if the object header is not compliant. If buf is non-null, information about the error(s) is filled in.