yaidsthread

Logo
YAIDS

Macros | Functions | Variables

yaidsthread.h File Reference

Macros

#define 

YAIDS_THREAD_INPUT_PCAP   1

 

#define 

YAIDS_THREAD_OUTPUT   2

 

#define 

YAIDS_THREAD_YARA   3

 

#define 

YAIDS_THREAD_TIMELIMIT   4

 

#define 

MAX_OUTPUT_ELEMENT_SIZE   60

 

#define 

MAX_OUTPUT_SINGLE_SIZE   20

 

Functions

yaidsPacketCounts_ptr 

yaidsthread_new_packet_counts (void)

 

yaidsThreadStatuses_ptr 

yaidsthread_new_thread_statuses (void)

 

yaidsInputDataQueue_ptr 

yaidsthread_new_input_queue (void)

 

yaidsInputDataNode_ptr 

yaidsthread_new_input_data (yaidsPcapPacket_ptr packet)

 

yaidsInputThreadArgs_ptr 

yaidsthread_new_input_thread_args (yaidsInputDataQueue_ptr dataQueue, yaidsPcapHandle_ptr pcapHandle, yaidsConfig_ptr config, yaidsPacketCounts_ptr packetCounts, yaidsThreadStatuses_ptr threadStatuses)

 

yaidsTimelimitThreadArgs_ptr 

yaidsthread_new_timelimit_thread_args (bool *yaidsRunning, yaidsConfig_ptr config)

 

yaidsOutputDataQueue_ptr 

yaidsthread_new_output_queue (void)

 

yaidsOutputDataNode_ptr 

yaidsthread_new_output_data (yaidsPcapPacket_ptr packet, char *alert)

 

yaidsOutputThreadArgs_ptr 

yaidsthread_new_output_thread_args (yaidsOutputDataQueue_ptr dataQueue, yaidsPcapHandle_ptr pcapHandle, yaidsConfig_ptr config, yaidsPacketCounts_ptr packetCounts, yaidsThreadStatuses_ptr threadStatuses)

 

yaidsYaraThreadArgs_ptr 

yaidsthread_new_yara_thread_args (yaidsInputDataQueue_ptr inputDataQueue, yaidsOutputDataQueue_ptr outputDataQueue, yaidsYaraScanner_ptr yaraScanner, yaidsConfig_ptr config, yaidsPacketCounts_ptr packetCounts, yaidsThreadStatuses_ptr threadStatuses)

 

void 

yaidsthread_update_pcap_packet_count (yaidsPacketCounts_ptr packetCounts)

 

void 

yaidsthread_update_yara_packet_count (yaidsPacketCounts_ptr packetCounts)

 

void 

yaidsthread_update_alert_packet_count (yaidsPacketCounts_ptr packetCounts)

 

void 

yaidsthread_update_output_packet_count (yaidsPacketCounts_ptr packetCounts)

 

void 

yaidsthread_set_pcap_finished (yaidsThreadStatuses_ptr threadStatuses, yaidsConfig_ptr config)

 

void 

yaidsthread_set_yara_finished (yaidsThreadStatuses_ptr threadStatuses, yaidsConfig_ptr config)

 

void 

yaidsthread_set_output_finished (yaidsThreadStatuses_ptr threadStatuses, yaidsConfig_ptr config)

 

void 

yaidsthread_add_input_data (yaidsInputDataQueue_ptr dataQueue, yaidsPcapPacket_ptr packet)

 

yaidsInputDataNode 

yaidsthread_get_input_data (yaidsInputDataQueue_ptr dataQueue)

 

void 

yaidsthread_add_output_data (yaidsOutputDataQueue_ptr dataQueue, yaidsPcapPacket_ptr packet, char *alert)

 

yaidsOutputDataNode 

yaidsthread_get_output_data (yaidsOutputDataQueue_ptr dataQueue)

 

yaidsThreadReturn 

yaidsthread_create_pcap_thread (yaidsInputThreadArgs_ptr threadArgs)

 

yaidsThreadReturn 

yaidsthread_create_yara_thread (yaidsYaraThreadArgs_ptr threadArgs)

 

yaidsThreadReturn 

yaidsthread_create_output_thread (yaidsOutputThreadArgs_ptr threadArgs)

 

yaidsThreadReturn 

yaidsthread_create_timelimit_thread (yaidsTimelimitThreadArgs_ptr threadArgs)

 

yaidsThreadList_ptr 

yaidsthread_new_threadlist (yaidsConfig_ptr config)

 

yaidsThreadInfo_ptr 

yaidsthread_new_threadinfo (void)

 

int 

yaidsthread_start_input_threads (yaidsConfig_ptr config, yaidsThreadList_ptr threadList, yaidsThreadStatuses_ptr threadStatuses, yaidsPcapHandle_ptr pcapHandle, yaidsInputDataQueue_ptr yaidsInputQueue, yaidsPacketCounts_ptr packetCounts)

 

int 

yaidsthread_start_yara_threads (yaidsConfig_ptr config, yaidsThreadList_ptr threadList, yaidsThreadStatuses_ptr threadStatuses, yaidsInputDataQueue_ptr yaidsInputQueue, yaidsOutputDataQueue_ptr yaidsOutputQueue, yaidsYaraScanner_ptr yaraScanners, yaidsPacketCounts_ptr packetCounts)

 

int 

yaidsthread_start_output_threads (yaidsConfig_ptr config, yaidsThreadList_ptr threadList, yaidsThreadStatuses_ptr threadStatuses, yaidsPcapHandle_ptr pcapHandle, yaidsOutputDataQueue_ptr yaidsOutputQueue, yaidsPacketCounts_ptr packetCounts, int scannerThreadCount)

 

int 

yaidsthread_start_timelimit_threads (yaidsConfig_ptr config, yaidsThreadList_ptr threadList, bool *yaidsRunning, int scannerThreadCount)

 

int 

yaidsthread_run_threads (bool *yaidsRunning, yaidsConfig config, yaidsThreadList_ptr threadList, yaidsInputDataQueue_ptr yaidsInputQueue, yaidsOutputDataQueue_ptr yaidsOutputQueue, yaidsPcapHandle_ptr pcapHandle, yaidsYaraScanner_ptr yaraScanners)

 

void * 

yaidsthread_pcap_thread (void *args)

 

void * 

yaidsthread_yara_thread (void *args)

 

void * 

yaidsthread_output_thread (void *args)

 

void * 

yaidsthread_timelimit_thread (void *args)

 

Variables

static pthread_mutex_t 

dataInputQueueMutex = PTHREAD_MUTEX_INITIALIZER

 

static pthread_mutex_t 

dataInputQueueNextMutex = PTHREAD_MUTEX_INITIALIZER

 

static pthread_mutex_t 

dataInputQueueReadMutex = PTHREAD_MUTEX_INITIALIZER

 

static pthread_mutex_t 

dataOutputQueueMutex = PTHREAD_MUTEX_INITIALIZER

 

static pthread_mutex_t 

dataOutputQueueNextMutex

 

static pthread_mutex_t 

dataOutputQueueReadMutex

 

static pthread_mutex_t 

packetCountsandThreadStatusesMutex = PTHREAD_MUTEX_INITIALIZER

 

static pthread_mutex_t 

packetCountsandThreadStatusesNextMutex

 

static pthread_mutex_t 

packetCountsandThreadStatusesLowMutex

 

Macro Definition Documentation

◆ MAX_OUTPUT_ELEMENT_SIZE

#define MAX_OUTPUT_ELEMENT_SIZE   60

◆ MAX_OUTPUT_SINGLE_SIZE

#define MAX_OUTPUT_SINGLE_SIZE   20

◆ YAIDS_THREAD_INPUT_PCAP

#define YAIDS_THREAD_INPUT_PCAP   1

◆ YAIDS_THREAD_OUTPUT

#define YAIDS_THREAD_OUTPUT   2

◆ YAIDS_THREAD_TIMELIMIT

#define YAIDS_THREAD_TIMELIMIT   4

◆ YAIDS_THREAD_YARA

#define YAIDS_THREAD_YARA   3

Function Documentation

◆ yaidsthread_add_input_data()

void yaidsthread_add_input_data ( yaidsInputDataQueue_ptr  dataQueue,
yaidsPcapPacket_ptr  packet 
)

◆ yaidsthread_add_output_data()

void yaidsthread_add_output_data ( yaidsOutputDataQueue_ptr  dataQueue,
yaidsPcapPacket_ptr  packet,
char *  alert 
)

◆ yaidsthread_create_output_thread()

yaidsThreadReturn yaidsthread_create_output_thread ( yaidsOutputThreadArgs_ptr  threadArgs )

◆ yaidsthread_create_pcap_thread()

yaidsThreadReturn yaidsthread_create_pcap_thread ( yaidsInputThreadArgs_ptr  threadArgs )

◆ yaidsthread_create_timelimit_thread()

yaidsThreadReturn yaidsthread_create_timelimit_thread ( yaidsTimelimitThreadArgs_ptr  threadArgs )

◆ yaidsthread_create_yara_thread()

yaidsThreadReturn yaidsthread_create_yara_thread ( yaidsYaraThreadArgs_ptr  threadArgs )

◆ yaidsthread_get_input_data()

yaidsInputDataNode yaidsthread_get_input_data ( yaidsInputDataQueue_ptr  dataQueue )

◆ yaidsthread_get_output_data()

yaidsOutputDataNode yaidsthread_get_output_data ( yaidsOutputDataQueue_ptr  dataQueue )

◆ yaidsthread_new_input_data()

yaidsInputDataNode_ptr yaidsthread_new_input_data ( yaidsPcapPacket_ptr  packet )

◆ yaidsthread_new_input_queue()

yaidsInputDataQueue_ptr yaidsthread_new_input_queue ( void  )

◆ yaidsthread_new_input_thread_args()

yaidsInputThreadArgs_ptr yaidsthread_new_input_thread_args ( yaidsInputDataQueue_ptr  dataQueue,
yaidsPcapHandle_ptr  pcapHandle,
yaidsConfig_ptr  config,
yaidsPacketCounts_ptr  packetCounts,
yaidsThreadStatuses_ptr  threadStatuses 
)

◆ yaidsthread_new_output_data()

yaidsOutputDataNode_ptr yaidsthread_new_output_data ( yaidsPcapPacket_ptr  packet,
char *  alert 
)

◆ yaidsthread_new_output_queue()

yaidsOutputDataQueue_ptr yaidsthread_new_output_queue ( void  )

◆ yaidsthread_new_output_thread_args()

yaidsOutputThreadArgs_ptr yaidsthread_new_output_thread_args ( yaidsOutputDataQueue_ptr  dataQueue,
yaidsPcapHandle_ptr  pcapHandle,
yaidsConfig_ptr  config,
yaidsPacketCounts_ptr  packetCounts,
yaidsThreadStatuses_ptr  threadStatuses 
)

◆ yaidsthread_new_packet_counts()

yaidsPacketCounts_ptr yaidsthread_new_packet_counts ( void  )

◆ yaidsthread_new_thread_statuses()

yaidsThreadStatuses_ptr yaidsthread_new_thread_statuses ( void  )

◆ yaidsthread_new_threadinfo()

yaidsThreadInfo_ptr yaidsthread_new_threadinfo ( void  )

◆ yaidsthread_new_threadlist()

yaidsThreadList_ptr yaidsthread_new_threadlist ( yaidsConfig_ptr  config )

◆ yaidsthread_new_timelimit_thread_args()

yaidsTimelimitThreadArgs_ptr yaidsthread_new_timelimit_thread_args ( bool *  yaidsRunning,
yaidsConfig_ptr  config 
)

◆ yaidsthread_new_yara_thread_args()

yaidsYaraThreadArgs_ptr yaidsthread_new_yara_thread_args ( yaidsInputDataQueue_ptr  inputDataQueue,
yaidsOutputDataQueue_ptr  outputDataQueue,
yaidsYaraScanner_ptr  yaraScanner,
yaidsConfig_ptr  config,
yaidsPacketCounts_ptr  packetCounts,
yaidsThreadStatuses_ptr  threadStatuses 
)

◆ yaidsthread_output_thread()

void* yaidsthread_output_thread ( void *  args )

◆ yaidsthread_pcap_thread()

void* yaidsthread_pcap_thread ( void *  args )

◆ yaidsthread_run_threads()

int yaidsthread_run_threads ( bool *  yaidsRunning,
yaidsConfig  config,
yaidsThreadList_ptr  threadList,
yaidsInputDataQueue_ptr  yaidsInputQueue,
yaidsOutputDataQueue_ptr  yaidsOutputQueue,
yaidsPcapHandle_ptr  pcapHandle,
yaidsYaraScanner_ptr  yaraScanners 
)

◆ yaidsthread_set_output_finished()

void yaidsthread_set_output_finished ( yaidsThreadStatuses_ptr  threadStatuses,
yaidsConfig_ptr  config 
)

◆ yaidsthread_set_pcap_finished()

void yaidsthread_set_pcap_finished ( yaidsThreadStatuses_ptr  threadStatuses,
yaidsConfig_ptr  config 
)

◆ yaidsthread_set_yara_finished()

void yaidsthread_set_yara_finished ( yaidsThreadStatuses_ptr  threadStatuses,
yaidsConfig_ptr  config 
)

◆ yaidsthread_start_input_threads()

int yaidsthread_start_input_threads ( yaidsConfig_ptr  config,
yaidsThreadList_ptr  threadList,
yaidsThreadStatuses_ptr  threadStatuses,
yaidsPcapHandle_ptr  pcapHandle,
yaidsInputDataQueue_ptr  yaidsInputQueue,
yaidsPacketCounts_ptr  packetCounts 
)

◆ yaidsthread_start_output_threads()

int yaidsthread_start_output_threads ( yaidsConfig_ptr  config,
yaidsThreadList_ptr  threadList,
yaidsThreadStatuses_ptr  threadStatuses,
yaidsPcapHandle_ptr  pcapHandle,
yaidsOutputDataQueue_ptr  yaidsOutputQueue,
yaidsPacketCounts_ptr  packetCounts,
int  scannerThreadCount 
)

◆ yaidsthread_start_timelimit_threads()

int yaidsthread_start_timelimit_threads ( yaidsConfig_ptr  config,
yaidsThreadList_ptr  threadList,
bool *  yaidsRunning,
int  scannerThreadCount 
)

◆ yaidsthread_start_yara_threads()

int yaidsthread_start_yara_threads ( yaidsConfig_ptr  config,
yaidsThreadList_ptr  threadList,
yaidsThreadStatuses_ptr  threadStatuses,
yaidsInputDataQueue_ptr  yaidsInputQueue,
yaidsOutputDataQueue_ptr  yaidsOutputQueue,
yaidsYaraScanner_ptr  yaraScanners,
yaidsPacketCounts_ptr  packetCounts 
)

◆ yaidsthread_timelimit_thread()

void* yaidsthread_timelimit_thread ( void *  args )

◆ yaidsthread_update_alert_packet_count()

void yaidsthread_update_alert_packet_count ( yaidsPacketCounts_ptr  packetCounts )

◆ yaidsthread_update_output_packet_count()

void yaidsthread_update_output_packet_count ( yaidsPacketCounts_ptr  packetCounts )

◆ yaidsthread_update_pcap_packet_count()

void yaidsthread_update_pcap_packet_count ( yaidsPacketCounts_ptr  packetCounts )

◆ yaidsthread_update_yara_packet_count()

void yaidsthread_update_yara_packet_count ( yaidsPacketCounts_ptr  packetCounts )

◆ yaidsthread_yara_thread()

void* yaidsthread_yara_thread ( void *  args )

Variable Documentation

◆ dataInputQueueMutex

pthread_mutex_t dataInputQueueMutex = PTHREAD_MUTEX_INITIALIZER
static

◆ dataInputQueueNextMutex

pthread_mutex_t dataInputQueueNextMutex = PTHREAD_MUTEX_INITIALIZER
static

◆ dataInputQueueReadMutex

pthread_mutex_t dataInputQueueReadMutex = PTHREAD_MUTEX_INITIALIZER
static

◆ dataOutputQueueMutex

pthread_mutex_t dataOutputQueueMutex = PTHREAD_MUTEX_INITIALIZER
static

◆ dataOutputQueueNextMutex

pthread_mutex_t dataOutputQueueNextMutex
static

Initial value:

=

PTHREAD_MUTEX_INITIALIZER

◆ dataOutputQueueReadMutex

pthread_mutex_t dataOutputQueueReadMutex
static

Initial value:

=

PTHREAD_MUTEX_INITIALIZER

◆ packetCountsandThreadStatusesLowMutex

pthread_mutex_t packetCountsandThreadStatusesLowMutex
static

Initial value:

=

PTHREAD_MUTEX_INITIALIZER

◆ packetCountsandThreadStatusesMutex

pthread_mutex_t packetCountsandThreadStatusesMutex = PTHREAD_MUTEX_INITIALIZER
static

◆ packetCountsandThreadStatusesNextMutex

pthread_mutex_t packetCountsandThreadStatusesNextMutex
static

Initial value:

=

PTHREAD_MUTEX_INITIALIZER


Source Code Documentation Generated By doxygen