summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-09-04 17:42:48 +0300
committerimarom <imarom@cisco.com>2016-09-07 14:02:56 +0300
commit540da82e6df983c36f54b9f48dfa251b348d8e38 (patch)
tree65af3119543151262b75b8145fcd75327a9cfe92 /src/common
parent04eae221e7c0089ae974f86e3f6fe156d4cb56ce (diff)
dual mode - check for ERF only
Diffstat (limited to 'src/common')
-rwxr-xr-xsrc/common/captureFile.h3
-rwxr-xr-xsrc/common/erf.h5
-rwxr-xr-xsrc/common/pcap.h6
3 files changed, 13 insertions, 1 deletions
diff --git a/src/common/captureFile.h b/src/common/captureFile.h
index 32b98272..fefa62bd 100755
--- a/src/common/captureFile.h
+++ b/src/common/captureFile.h
@@ -183,6 +183,9 @@ public:
* open file for reading.
*/
virtual bool Create(char * name, int loops = 0) = 0;
+
+ virtual capture_type_e get_type() = 0;
+
protected:
int m_loops;
uint64_t m_file_size;
diff --git a/src/common/erf.h b/src/common/erf.h
index 299bcdc5..2feb4fd6 100755
--- a/src/common/erf.h
+++ b/src/common/erf.h
@@ -248,6 +248,11 @@ public:
bool Create(char *filename, int loops = 0);
void Delete();
virtual bool ReadPacket(CCapPktRaw * lpPacket);
+
+ virtual capture_type_e get_type() {
+ return ERF;
+ }
+
private:
FILE * m_handle;
};
diff --git a/src/common/pcap.h b/src/common/pcap.h
index fb266e31..01c981d7 100755
--- a/src/common/pcap.h
+++ b/src/common/pcap.h
@@ -79,9 +79,13 @@ public:
* otherwise (reached eof)
*/
virtual bool ReadPacket(CCapPktRaw *lpPacket);
- virtual void Rewind();
+ virtual void Rewind();
+ virtual capture_type_e get_type() {
+ return LIBPCAP;
+ }
+
private:
LibPCapReader(LibPCapReader &);