Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
/builds/wireshark/wireshark/fileset.h
Go to the documentation of this file.
1
12#ifndef __FILESET_H__
13#define __FILESET_H__
14
15#include <inttypes.h>
16#include <time.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
25typedef struct _fileset_entry {
26 char *fullname;
27 char *name;
28 time_t ctime;
29 time_t mtime;
30 int64_t size;
31 bool current;
33
42
43/* helper: is this a probable file of a file set (does the naming pattern match)?
44 * Possible naming patterns are prefix_NNNNN_YYYYMMDDHHMMSS.ext[.gz] and
45 * prefix_YYYYMMDDHHMMSS_NNNNN.ext[.gz], where any compression suffix
46 * supported by libwiretap is allowed. The validation is minimal; e.g., the
47 * time is only checked to see if all 14 characters are digits.
48 *
49 * @param[in] fname The filename to check for a naming pattern.
50 * @param[out] prefix If not NULL and the filename matches, the prefix
51 * @param[out] suffix If not NULL and the filename matches, the suffix
52 * (file extension) not including the compression suffix
53 * @param[out] time If not NULL and the filename matches, the time component
54 * @return The type of pattern match, or FILESET_NO_MATCH.
55 * */
56
69extern fileset_match_t fileset_filename_match_pattern(const char *fname, char **prefix, char **suffix, char **time);
70
77extern void fileset_add_dir(const char *fname, void *window);
78
84extern void fileset_delete(void);
85
91extern const char *fileset_get_dirname(void);
92
99
106
115extern void fileset_dlg_add_file(fileset_entry *entry, void *window);
116
123extern void fileset_dlg_begin_add_file(void *window);
124
132extern void fileset_dlg_end_add_file(void *window);
133
139extern void fileset_update_dlg(void *window);
140
150extern void fileset_update_file(const char *path);
151
152#ifdef __cplusplus
153}
154#endif /* __cplusplus */
155
156#endif /* __FILESET_H__ */
157
158/*
159 * Editor modelines - https://www.wireshark.org/tools/modelines.html
160 *
161 * Local variables:
162 * c-basic-offset: 4
163 * tab-width: 8
164 * indent-tabs-mode: nil
165 * End:
166 *
167 * vi: set shiftwidth=4 tabstop=8 expandtab:
168 * :indentSize=4:tabSize=8:noTabs=true:
169 */
void fileset_delete(void)
Deletes the fileset and frees all associated resources.
Definition fileset.c:480
fileset_match_t
Describes the naming pattern detected in a capture file set's filenames.
Definition fileset.h:37
@ FILESET_NO_MATCH
Definition fileset.h:38
@ FILESET_NUM_TIME
Definition fileset.h:40
@ FILESET_TIME_NUM
Definition fileset.h:39
void fileset_dlg_add_file(fileset_entry *entry, void *window)
Add an entry to our dialog / window.
Definition file_set_dialog.cpp:43
fileset_entry * fileset_get_next(void)
Get the next fileset entry.
Definition fileset.c:426
fileset_match_t fileset_filename_match_pattern(const char *fname, char **prefix, char **suffix, char **time)
Determines if a filename matches a specific pattern and extracts relevant parts.
Definition fileset.c:64
void fileset_update_dlg(void *window)
Updates the file dialog with the current file entries.
Definition fileset.c:331
void fileset_add_dir(const char *fname, void *window)
Adds a directory to the fileset.
Definition fileset.c:348
void fileset_dlg_end_add_file(void *window)
Notify our dialog / window that we're done adding files.
Definition file_set_dialog.cpp:50
fileset_entry * fileset_get_previous(void)
Get the previous fileset entry.
Definition fileset.c:447
struct _fileset_entry fileset_entry
Describes a single file belonging to a capture file set.
void fileset_dlg_begin_add_file(void *window)
Definition file_set_dialog.cpp:35
const char * fileset_get_dirname(void)
Get the current directory name.
Definition fileset.c:396
void fileset_update_file(const char *path)
Updates the file entry with the given path.
Definition fileset.c:248
Describes a single file belonging to a capture file set.
Definition fileset.h:25
bool current
Definition fileset.h:31
int64_t size
Definition fileset.h:30
char * fullname
Definition fileset.h:26
time_t mtime
Definition fileset.h:29
time_t ctime
Definition fileset.h:28
char * name
Definition fileset.h:27