yaidsthread

Logo
YAIDS

Functions

yaidsthread.c File Reference

#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#include <malloc.h>
#include <yaids.h>
#include <yaidstypes.h>
#include <yaidsconf.h>
#include <yaidsio.h>
#include <yaidspcap.h>
#include <yaidsyara.h>
#include <yaidsthread.h>
#include <pthread.h>
#include <pcap.h>
#include <signal.h>
#include <sys/prctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

Include dependency graph for yaidsthread.c:

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)

 

void * 

yaidsthread_pcap_thread (void *args)

 

void * 

yaidsthread_yara_thread (void *args)

 

void * 

yaidsthread_output_thread (void *args)

 

void * 

yaidsthread_timelimit_thread (void *args)

 

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)

 

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 )

Source Code Documentation Generated By doxygen