suricata
source-pcap-file-directory-helper.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2010 Open Information Security Foundation
2 *
3 * You can copy, redistribute or modify this Program under the terms of
4 * the GNU General Public License version 2 as published by the Free
5 * Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * version 2 along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18/**
19 * \file
20 *
21 * \author Danny Browning <danny.browning@protectwise.com>
22 */
23
24#include "suricata-common.h"
26#include "queue.h"
27
28#ifndef SURICATA_SOURCE_PCAP_FILE_DIRECTORY_HELPER_H
29#define SURICATA_SOURCE_PCAP_FILE_DIRECTORY_HELPER_H
30
37/**
38 * Data specific to a directory of pcap files
39 */
54
55/**
56 * Cleanup resources associated with a PendingFile object
57 * @param pending Object to be cleaned up
58 */
59void CleanupPendingFile(PendingFile *pending);
60
61/**
62 * Cleanup resources associated with a PcapFileDirectoryVars object
63 * @param ptv Object to be cleaned up
64 */
66
67/**
68 * Determine if a given string represents a file or directory. If a directory,
69 * populate the directory object.
70 * @param filename String to check
71 * @param directory Directory point to populate if directory
72 * @return TM_ECODE_OK if string or directory
73 */
74TmEcode PcapDetermineDirectoryOrFile(char *filename, DIR **directory);
75
76/**
77 * Dispatch a directory for processing, where information for processing the
78 * directory is contained in a PcapFileDirectoryVars object
79 * @param ptv PcapFileDirectoryVars object containing information for processing
80 * the directory
81 * @return
82 */
84
85#endif /* SURICATA_SOURCE_PCAP_FILE_DIRECTORY_HELPER_H */
struct HtpBodyChunk_ * next
struct PcapFileDirectoryVars_ PcapFileDirectoryVars
TmEcode PcapDetermineDirectoryOrFile(char *filename, DIR **directory)
void CleanupPendingFile(PendingFile *pending)
struct PendingFile_ PendingFile
void CleanupPcapFileDirectoryVars(PcapFileDirectoryVars *ptv)
TmEcode PcapDirectoryDispatch(PcapFileDirectoryVars *ptv)
TAILQ_HEAD(PendingFiles, PendingFile_) directory_content
TAILQ_ENTRY(PendingFile_) next