change type of rule_id, object_id, item_id from (long long) to (uuid_t)

just compile libmaatframe.so, without modifing about test case
This commit is contained in:
root
2024-09-20 11:20:21 +00:00
parent 20de47c873
commit fc99675b40
40 changed files with 972 additions and 934 deletions

View File

@@ -84,7 +84,7 @@ static void aligned_free(void * aligned_ptr)
/*************************************************************************************/
struct domain_impl_t
{
unsigned int id;
uuid_t uuid;
int suf_match;
unsigned int len;
unsigned long long hash; /*<2A><>64λ<34><CEBB>ϣֵΨһ<CEA8><D2BB>ʾһ<CABE><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
@@ -170,7 +170,7 @@ int CHashTrieFQDN::initialize(const struct FQDN_rule * rules, size_t n_rule)
FOR(k, m_num)
{
m_domains[k].id =rules[k].id;
uuid_copy(m_domains[k].uuid, rules[k].uuid);
m_domains[k].suf_match=rules[k].is_suffix_match;
m_domains[k].len=rules[k].len;
m_domains[k].next=NULL;
@@ -307,7 +307,7 @@ int CHashTrieFQDN::search(const char * FQDN, size_t FQDN_len, struct FQDN_match
if(pt->len+P[t]==FQDN_len && pt->hash==HASH[t])
{
//if(match_num>0 && P[t]!=results[match_num-1].offset) return match_num;
results[match_num].id=pt->id;
uuid_copy(results[match_num].uuid, pt->uuid);
results[match_num].offset=P[t];
results[match_num].user_tag=pt->utag;
++match_num;

View File

@@ -23,10 +23,11 @@ extern "C" {
#endif
#include <stddef.h>
#include <uuid/uuid.h>
struct FQDN_rule
{
unsigned int id;
uuid_t uuid;
int is_suffix_match; /* is_suffix_match==0: exact match; is_suffix_match==1: longest suffix matching. */
size_t len;
char * FQDN; /* Non-ASCII character is allowed. */
@@ -39,7 +40,7 @@ extern "C" {
struct FQDN_match
{
unsigned int id;
uuid_t uuid;
unsigned int offset; /* offset==0 for exact matching; offset>0 for longest suffix matching. */
void * user_tag;
};