Last change
on this file since 35 was
22,
checked in by rings, 14 years ago
|
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file PCAPLiveCapture.h |
---|
3 | * This header file defines the PCAPLiveCapture class. |
---|
4 | * @author Tomas Urban |
---|
5 | * @version 0.3 |
---|
6 | * @date 22/07/2009 |
---|
7 | */ |
---|
8 | #ifndef PCAP_LIVE_CAPTURE_H |
---|
9 | #define PCAP_LIVE_CAPTURE_H |
---|
10 | |
---|
11 | #include "PCAPCapture.h" |
---|
12 | /** |
---|
13 | * Class used for real-time capture from network adapters using the pcap library. |
---|
14 | */ |
---|
15 | class PCAPLiveCapture : |
---|
16 | public PCAPCapture |
---|
17 | { |
---|
18 | public: |
---|
19 | PCAPLiveCapture(); |
---|
20 | virtual ~PCAPLiveCapture(void); |
---|
21 | /** |
---|
22 | * Initializes capturing object. The parameter contains a semicolon-separated list |
---|
23 | * of adapters in the pcap source syntax (i.e. rpcap:://Device). For more information |
---|
24 | * about the format, please check pcap documentation. |
---|
25 | * @param sParams List of adapters for capturing |
---|
26 | * @return Operation success |
---|
27 | */ |
---|
28 | virtual ECaptureInitResult OpenDevice(const std::string sParams); |
---|
29 | /** |
---|
30 | * Sets the path to a file into which the device should save captured traffic. |
---|
31 | * A successful #OpenDevice() call must precede, otherwise the method returns \c false. |
---|
32 | * If capture is performed on several network adapters, several files will be created |
---|
33 | * with adapter's ordinal number appended to the file name. |
---|
34 | * @param sFile Name of the target file or empty string if the traffic should not |
---|
35 | * be saved. |
---|
36 | * @return Operation success |
---|
37 | */ |
---|
38 | virtual bool SetCaptureFile(const std::string sFile); |
---|
39 | }; |
---|
40 | |
---|
41 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.