BOOL lookup_attr (const ATTR_TYPES type, const uchar_t * name, const u32 name_len, const IGNORE_CASE_BOOL ic, const VCN lowest_vcn, const u8 * val, const u32 val_len, attr_search_context * ctx);
Find an attribute in an ntfs inode. On first search ctx->ntfs_ino must be the base mft record and ctx must have been obtained from a call to get_attr_search_ctx.
This function transparently handles attribute lists and ctx is used to continue searches where they were left off at.
After finishing with the attribute/mft record you need to call release_attr_search_ctx to cleanup the search context (unmapping any mapped inodes, etc).
Return TRUE if the search was successful and FALSE if not. When TRUE, ctx->attr is the found attribute and it is in mft record ctx->mrec. When FALSE, ctx->attr is the attribute which collates just after the attribute being searched for, i.e. if one wants to add the attribute to the mft record this is the correct place to insert it into.