aboutsummaryrefslogtreecommitdiffstats
path: root/cfile.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-05-08 22:59:19 -0400
committerMichael Mann <mmann78@netscape.net>2014-05-09 03:04:39 +0000
commit1abeb277f5e6bd27fbaebfecc8184e37ba9d008a (patch)
tree8cc6eaa5a6982454a00adc600fa4aab02bec3d73 /cfile.h
parentaa3a968eb6e85c47014a4cec4a2b955357b0e77f (diff)
Refactor Wiretap
Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality. The "architectural" changes can be found in cfile.h, wtap.h, wtap-int.h and (new file) wftap-int.h. Most of the other (painstaking) changes were really just the result of compiling those new architecture changes. bug:9607 Change-Id: Ife858a61760d7a8a03be073546c0e7e582cab2ae Reviewed-on: https://code.wireshark.org/review/1485 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'cfile.h')
-rw-r--r--cfile.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/cfile.h b/cfile.h
index 40ae6057f0..0310d59f6b 100644
--- a/cfile.h
+++ b/cfile.h
@@ -63,6 +63,11 @@ typedef struct {
} modified_frame_data;
#endif
+typedef union _phdr_t {
+ struct wtap_pkthdr wtap_hdr;
+ /*** Placeholder for ftap_pkthdr */
+} phdr_t;
+
typedef struct _capture_file {
epan_t *epan;
file_state state; /* Current state of capture file */
@@ -87,7 +92,7 @@ typedef struct _capture_file {
nstime_t elapsed_time; /* Elapsed time */
gboolean has_snap; /* TRUE if maximum capture packet length is known */
int snap; /* Maximum captured packet length */
- wtap *wth; /* Wiretap session */
+ wftap *wfth; /* Tap session */
dfilter_t *rfcode; /* Compiled read filter program */
dfilter_t *dfcode; /* Compiled display filter program */
gchar *dfilter; /* Display filter string */
@@ -104,8 +109,7 @@ typedef struct _capture_file {
search_charset_t scs_type; /* Character set for text search */
search_direction dir; /* Direction in which to do searches */
gboolean search_in_progress; /* TRUE if user just clicked OK in the Find dialog or hit <control>N/B */
- /* packet data */
- struct wtap_pkthdr phdr; /* Packet header */
+ phdr_t hdr; /* Packet/File header */
Buffer buf; /* Packet data */
/* frames */
frame_data_sequence *frames; /* Sequence of frames, if we're keeping that information */