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:
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)
void yaidsthread_add_input_data | ( | yaidsInputDataQueue_ptr | dataQueue, |
yaidsPcapPacket_ptr | packet | ||
) |
void yaidsthread_add_output_data | ( | yaidsOutputDataQueue_ptr | dataQueue, |
yaidsPcapPacket_ptr | packet, | ||
char * | alert | ||
) |
yaidsThreadReturn yaidsthread_create_output_thread | ( | yaidsOutputThreadArgs_ptr | threadArgs | ) |
yaidsThreadReturn yaidsthread_create_pcap_thread | ( | yaidsInputThreadArgs_ptr | threadArgs | ) |
yaidsThreadReturn yaidsthread_create_timelimit_thread | ( | yaidsTimelimitThreadArgs_ptr | threadArgs | ) |
yaidsThreadReturn yaidsthread_create_yara_thread | ( | yaidsYaraThreadArgs_ptr | threadArgs | ) |
yaidsInputDataNode yaidsthread_get_input_data | ( | yaidsInputDataQueue_ptr | dataQueue | ) |
yaidsOutputDataNode yaidsthread_get_output_data | ( | yaidsOutputDataQueue_ptr | dataQueue | ) |
yaidsInputDataNode_ptr yaidsthread_new_input_data | ( | yaidsPcapPacket_ptr | packet | ) |
yaidsInputDataQueue_ptr yaidsthread_new_input_queue | ( | void | ) |
yaidsInputThreadArgs_ptr yaidsthread_new_input_thread_args | ( | yaidsInputDataQueue_ptr | dataQueue, |
yaidsPcapHandle_ptr | pcapHandle, | ||
yaidsConfig_ptr | config, | ||
yaidsPacketCounts_ptr | packetCounts, | ||
yaidsThreadStatuses_ptr | threadStatuses | ||
) |
yaidsOutputDataNode_ptr yaidsthread_new_output_data | ( | yaidsPcapPacket_ptr | packet, |
char * | alert | ||
) |
yaidsOutputDataQueue_ptr yaidsthread_new_output_queue | ( | void | ) |
yaidsOutputThreadArgs_ptr yaidsthread_new_output_thread_args | ( | yaidsOutputDataQueue_ptr | dataQueue, |
yaidsPcapHandle_ptr | pcapHandle, | ||
yaidsConfig_ptr | config, | ||
yaidsPacketCounts_ptr | packetCounts, | ||
yaidsThreadStatuses_ptr | threadStatuses | ||
) |
yaidsPacketCounts_ptr yaidsthread_new_packet_counts | ( | void | ) |
yaidsThreadStatuses_ptr yaidsthread_new_thread_statuses | ( | void | ) |
yaidsThreadInfo_ptr yaidsthread_new_threadinfo | ( | void | ) |
yaidsThreadList_ptr yaidsthread_new_threadlist | ( | yaidsConfig_ptr | config | ) |
yaidsTimelimitThreadArgs_ptr yaidsthread_new_timelimit_thread_args | ( | bool * | yaidsRunning, |
yaidsConfig_ptr | config | ||
) |
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_output_thread | ( | void * | args | ) |
void* yaidsthread_pcap_thread | ( | void * | args | ) |
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_set_output_finished | ( | yaidsThreadStatuses_ptr | threadStatuses, |
yaidsConfig_ptr | config | ||
) |
void yaidsthread_set_pcap_finished | ( | yaidsThreadStatuses_ptr | threadStatuses, |
yaidsConfig_ptr | config | ||
) |
void yaidsthread_set_yara_finished | ( | yaidsThreadStatuses_ptr | threadStatuses, |
yaidsConfig_ptr | config | ||
) |
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_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_start_yara_threads | ( | yaidsConfig_ptr | config, |
yaidsThreadList_ptr | threadList, | ||
yaidsThreadStatuses_ptr | threadStatuses, | ||
yaidsInputDataQueue_ptr | yaidsInputQueue, | ||
yaidsOutputDataQueue_ptr | yaidsOutputQueue, | ||
yaidsYaraScanner_ptr | yaraScanners, | ||
yaidsPacketCounts_ptr | packetCounts | ||
) |
void* yaidsthread_timelimit_thread | ( | void * | args | ) |
void yaidsthread_update_alert_packet_count | ( | yaidsPacketCounts_ptr | packetCounts | ) |
void yaidsthread_update_output_packet_count | ( | yaidsPacketCounts_ptr | packetCounts | ) |
void yaidsthread_update_pcap_packet_count | ( | yaidsPacketCounts_ptr | packetCounts | ) |
void yaidsthread_update_yara_packet_count | ( | yaidsPacketCounts_ptr | packetCounts | ) |
void* yaidsthread_yara_thread | ( | void * | args | ) |
Source Code Documentation Generated By doxygen