summaryrefslogtreecommitdiffstats
path: root/mDNSResponder/mDNSMacOSX/BonjourTop/source/CaptureFile.h
blob: ea625bac544296ca00a708961f544bc244c08177 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
//  CaptureFile.h
//  TestTB
//
//  Created by Terrin Eager on 9/14/12.
//
//

#ifndef __TestTB__CaptureFile__
#define __TestTB__CaptureFile__

#include <iostream>
#include "bjtypes.h"
#include "bjsocket.h"
#include "Frame.h"

class CCaptureFile
{
public:
    CCaptureFile();
    virtual ~CCaptureFile();
    bool Open(const char* pFileName);
    bool NextFrame();
    bool Close();

    Frame m_CurrentFrame;



    __uint32_t GetDeltaTime();

    __uint32_t GetBufferLen(BJ_UINT8* pStart);

    __uint32_t GetWiredLength(){ return m_nWireLen;};


private:
    bool Init();
    bool Clear();

    FILE* m_hFile;
    BJ_UINT8* m_pFrameHeader;
    BJ_UINT8* m_pFrameData;
    BJ_UINT8* m_pFileHeader;
    __uint32_t  m_nCaptureLen;
    __uint32_t  m_nWireLen;
    __uint32_t  m_TimeSec;

    __uint32_t m_nFirstFrameTime;

    Frame::BJ_DATALINKTYPE m_datalinkType;

};

#endif /* defined(__TestTB__CaptureFile__) */