source-pcap-file-directory-helper.h File Reference
#include "suricata-common.h"
#include "source-pcap-file-helper.h"
#include "queue.h"
Include dependency graph for source-pcap-file-directory-helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PendingFile_
struct  PcapFileDirectoryVars_


typedef struct PendingFile_ PendingFile
typedef struct PcapFileDirectoryVars_ PcapFileDirectoryVars


void CleanupPendingFile (PendingFile *pending)
void CleanupPcapFileDirectoryVars (PcapFileDirectoryVars *ptv)
TmEcode PcapDetermineDirectoryOrFile (char *filename, DIR **directory)
TmEcode PcapDirectoryDispatch (PcapFileDirectoryVars *ptv)

Detailed Description

Typedef Documentation

◆ PcapFileDirectoryVars

Data specific to a directory of pcap files

◆ PendingFile

typedef struct PendingFile_ PendingFile

Function Documentation

◆ CleanupPcapFileDirectoryVars()

void CleanupPcapFileDirectoryVars ( PcapFileDirectoryVars ptv)

Cleanup resources associated with a PcapFileDirectoryVars object

ptvObject to be cleaned up

Definition at line 107 of file source-pcap-file-directory-helper.c.

References CleanupPcapFileFileVars(), CleanupPendingFile(), PcapFileDirectoryVars_::current_file, PcapFileDirectoryVars_::directory, PcapFileDirectoryVars_::filename, next, SCFree, PcapFileDirectoryVars_::shared, TAILQ_EMPTY, TAILQ_FIRST, and TAILQ_REMOVE.

Here is the call graph for this function:

◆ CleanupPendingFile()

void CleanupPendingFile ( PendingFile pending)

Cleanup resources associated with a PendingFile object

pendingObject to be cleaned up

Definition at line 98 of file source-pcap-file-directory-helper.c.

References PendingFile_::filename, and SCFree.

Referenced by CleanupPcapFileDirectoryVars().

Here is the caller graph for this function:

◆ PcapDetermineDirectoryOrFile()

TmEcode PcapDetermineDirectoryOrFile ( char *  filename,
DIR **  directory 

Determine if a given string represents a file or directory. If a directory, populate the directory object.

filenameString to check
directoryDirectory point to populate if directory
TM_ECODE_OK if string or directory

Definition at line 172 of file source-pcap-file-directory-helper.c.

References SCLogDebug, SCLogError, TM_ECODE_FAILED, and TM_ECODE_OK.

◆ PcapDirectoryDispatch()

TmEcode PcapDirectoryDispatch ( PcapFileDirectoryVars ptv)

Dispatch a directory for processing, where information for processing the directory is contained in a PcapFileDirectoryVars object

ptvPcapFileDirectoryVars object containing information for processing the directory

Definition at line 477 of file source-pcap-file-directory-helper.c.

References PcapFileDirectoryVars_::poll_interval, SCEnter, and PcapFileDirectoryVars_::should_loop.