<commit_before>#ifndef __IOC_H__
#define __IOC_H__

#include <bsd/sys/queue.h>

#include <rte_memory.h>

#include <uthash.h>

#include "common.h"
#include "ip_utils.h"
#include "netflow_addr.h"
#include "netflow_format.h"

/* CONSTANTS */

#define SS_IOC_FILE_MAX           8
#define SS_IOC_THREAT_TYPE_SIZE  24
#define SS_IOC_VALUE_SIZE        96
#define SS_IOC_DNS_SIZE          96

enum ss_ioc_type_e {
    SS_IOC_TYPE_EMPTY  = 0,
    SS_IOC_TYPE_IP     = 1,
    SS_IOC_TYPE_DOMAIN = 2,
    SS_IOC_TYPE_URL    = 3,
    SS_IOC_TYPE_EMAIL  = 4,
    SS_IOC_TYPE_MD5    = 5,
    SS_IOC_TYPE_SHA256 = 6,
    SS_IOC_TYPE_MAX,
};

typedef enum ss_ioc_type_e ss_ioc_type_t;

struct ss_ioc_entry_s {
    uint64_t      file_id;
    uint64_t      matches;
    uint64_t      id;
    ss_ioc_type_t type;
    char          threat_type[SS_IOC_THREAT_TYPE_SIZE];
    ip_addr_t     ip;
    char          value[SS_IOC_VALUE_SIZE];
    char          dns[SS_IOC_DNS_SIZE];
    UT_hash_handle hh;
    UT_hash_handle hh_full;
    TAILQ_ENTRY(ss_ioc_entry_s) entry;
} __rte_cache_aligned;

typedef struct ss_ioc_entry_s ss_ioc_entry_t;

TAILQ_HEAD(ss_ioc_list_s, ss_ioc_entry_s);
typedef struct ss_ioc_list_s ss_ioc_list_t;

struct ss_ioc_chain_s {
    ss_ioc_list_t ioc_list;<commit_msg>ioc.h: add some new hash threat_types<commit_after>#ifndef __IOC_H__
#define __IOC_H__

#include <bsd/sys/queue.h>

#include <rte_memory.h>

#include <uthash.h>

#include "common.h"
#include "ip_utils.h"
#include "netflow_addr.h"
#include "netflow_format.h"

/* CONSTANTS */

#define SS_IOC_FILE_MAX           8
#define SS_IOC_THREAT_TYPE_SIZE  24
#define SS_IOC_VALUE_SIZE        96
#define SS_IOC_DNS_SIZE          96

enum ss_ioc_type_e {
    SS_IOC_TYPE_EMPTY  = 0,
    SS_IOC_TYPE_IP     = 1,
    SS_IOC_TYPE_DOMAIN = 2,
    SS_IOC_TYPE_URL    = 3,
    SS_IOC_TYPE_EMAIL  = 4,
    SS_IOC_TYPE_MD5    = 5,
    SS_IOC_TYPE_SHA1   = 6,
    SS_IOC_TYPE_SHA256 = 7,
    SS_IOC_TYPE_MAX,
};

typedef enum ss_ioc_type_e ss_ioc_type_t;

struct ss_ioc_entry_s {
    uint64_t      file_id;
    uint64_t      matches;
    uint64_t      id;
    ss_ioc_type_t type;
    char          threat_type[SS_IOC_THREAT_TYPE_SIZE];
    ip_addr_t     ip;
    char          value[SS_IOC_VALUE_SIZE];
    char          dns[SS_IOC_DNS_SIZE];
    UT_hash_handle hh;
    UT_hash_handle hh_full;
    TAILQ_ENTRY(ss_ioc_entry_s) entry;
} __rte_cache_aligned;

typedef struct ss_ioc_entry_s ss_ioc_entry_t;

TAILQ_HEAD(ss_ioc_list_s, ss_ioc_entry_s);
typedef struct ss_ioc_list_s ss_ioc_list_t;

struct ss_ioc_chain_s {
    ss_ioc_list_t ioc_list;
{'fraction_non_alphanumeric': 0.07264296754250386, 'fraction_numerical': 0.019319938176197836, 'mean_word_length': 3.315, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7072015', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1175, 'n_words': 188}