library/src/datastructures/BP-HashTable.cc
// memory compare hash table keyed entry (binary only compare/front part match only).  Returns ERR_SUCCESS if
// the keys match (are matched within their front portions)
memory compare hash table keyed entry (binary only compare/front part match only).  Returns ERR_SUCCESS if
the keys match (are matched within their front portions)
memory compare hash table keyed entry ( binary only compare / front part match only ) . Returns ERR_SUCCESS if the keys match ( are matched within their front portions )
BP_ERROR_T ht_memmatch_key_front_part
(
		P_BP_HASH_TABLE_KEYED_ENTRY entry,
		char  *buff,
		size_t buff_size
)
{
	if(!buff)
		return ERR_FAILURE;
	if(!buff_size)
		return ERR_FAILURE;
	if(!entry->key)
		return ERR_FAILURE;
	if(bpstrlen(entry->key) < buff_size)
		return ERR_FAILURE;
	if(memcmp(entry->key, buff, buff_size) == 0)
		return ERR_SUCCESS;
	return ERR_FAILURE;
}
BP_ERROR_T ht_memmatch_key_front_part ( P_BP_HASH_TABLE_KEYED_ENTRY entry , char * buff , size_t buff_size ) { if ( ! buff ) return ERR_FAILURE ; if ( ! buff_size ) return ERR_FAILURE ; if ( ! entry -> key ) return ERR_FAILURE ; if ( bpstrlen ( entry -> key ) < buff_size ) return ERR_FAILURE ; if ( memcmp ( entry -> key , buff , buff_size ) == 0 ) return ERR_SUCCESS ; return ERR_FAILURE ; }
memory compare hash table keyed entry (binary only compare/front part match only).
memory compare hash table keyed entry ( binary only compare / front part match only ) .
// basic null checks // check that the buffer size is less than the length specified for compare // return true if the buffers match // return indicating failure