# OpalPCAPFile Class Reference

`#include <pcapfile.h>`

Collaboration diagram for OpalPCAPFile:

[legend]

## Public Member Functions

| OpalPCAPFile ()
bool | Open (const PFilePath &filename)
bool | Restart ()
void | PrintOn (ostream &strm) const
bool | ReadRawPacket (PBYTEArray &payload)
int | GetDataLink (PBYTEArray &payload)
int | GetIP (PBYTEArray &payload)
int | GetUDP (PBYTEArray &payload)
int | GetRTP (RTP_DataFrame &rtp)
const PTime & | GetPacketTime () const
const PIPSocket::Address & | GetSrcIP () const
const PIPSocket::Address & | GetDstIP () const
unsigned | IsFragmentated () const
WORD | GetSrcPort () const
WORD | GetDstPort () const
void | SetFilterSrcIP (const PIPSocket::Address &ip)
const PIPSocket::Address & | GetFilterSrcIP () const
void | SetFilterDstIP (const PIPSocket::Address &ip)
const PIPSocket::Address & | GetFilterDstIP () const
void | SetFilterSrcPort (WORD port)
WORD | GetFilterSrcPort () const
void | SetFilterDstPort (WORD port)
WORD | GetFilterDstPort () const
bool | DiscoverRTP (DiscoveredRTPMap &discoveredRTPMap)
void | SetFilters (const DiscoveredRTPInfo &rtp, int dir)
bool | SetFilters (const DiscoveredRTPMap &rtp, size_t index)
bool | SetPayloadMap (RTP_DataFrame::PayloadTypes pt, const OpalMediaFormat &format)
OpalMediaFormat | GetMediaFormat (const RTP_DataFrame &rtp) const

## Protected Member Functions

PINDEX | GetNetworkLayerHeaderSize ()

## Protected Attributes

FileHeader | m_fileHeader
bool | m_otherEndian
PBYTEArray | m_rawPacket
PTime | m_packetTime
PIPSocket::Address | m_filterSrcIP
PIPSocket::Address | m_filterDstIP
PIPSocket::Address | m_packetSrcIP
PIPSocket::Address | m_packetDstIP
PBYTEArray | m_fragments
bool | m_fragmentated
unsigned | m_fragmentProto
WORD | m_filterSrcPort
WORD | m_filterDstPort
WORD | m_packetSrcPort
WORD | m_packetDstPort
std::map< RTP_DataFrame::PayloadTypes, OpalMediaFormat > | m_payloadType2mediaFormat

## Data Structures

struct | DiscoveredRTPInfo
class | DiscoveredRTPMap
struct | FileHeader
struct | RecordHeader

## Detailed Description

Class for a reading RTP from an Ethernet Capture (PCAP) file.

## Constructor & Destructor Documentation

OpalPCAPFile::OpalPCAPFile | ( |  | ) |

## Member Function Documentation

bool OpalPCAPFile::DiscoverRTP | ( | DiscoveredRTPMap & | discoveredRTPMap | ) |

int OpalPCAPFile::GetDataLink | ( | PBYTEArray & | payload | ) |

const PIPSocket::Address& OpalPCAPFile::GetDstIP | ( |  | ) | const`[inline]`

WORD OpalPCAPFile::GetDstPort | ( |  | ) | const`[inline]`

const PIPSocket::Address& OpalPCAPFile::GetFilterDstIP | ( |  | ) | const`[inline]`

WORD OpalPCAPFile::GetFilterDstPort | ( |  | ) | const`[inline]`

const PIPSocket::Address& OpalPCAPFile::GetFilterSrcIP | ( |  | ) | const`[inline]`

WORD OpalPCAPFile::GetFilterSrcPort | ( |  | ) | const`[inline]`

int OpalPCAPFile::GetIP | ( | PBYTEArray & | payload | ) |

OpalMediaFormat OpalPCAPFile::GetMediaFormat | ( | const RTP_DataFrame & | rtp | ) | const

PINDEX OpalPCAPFile::GetNetworkLayerHeaderSize | ( |  | ) | `[protected]`

const PTime& OpalPCAPFile::GetPacketTime | ( |  | ) | const`[inline]`

int OpalPCAPFile::GetRTP | ( | RTP_DataFrame & | rtp | ) |

const PIPSocket::Address& OpalPCAPFile::GetSrcIP | ( |  | ) | const`[inline]`

WORD OpalPCAPFile::GetSrcPort | ( |  | ) | const`[inline]`

int OpalPCAPFile::GetUDP | ( | PBYTEArray & | payload | ) |

unsigned OpalPCAPFile::IsFragmentated | ( |  | ) | const`[inline]`

bool OpalPCAPFile::Open | ( | const PFilePath & | filename | ) |

void OpalPCAPFile::PrintOn | ( | ostream & | strm | ) | const

bool OpalPCAPFile::ReadRawPacket | ( | PBYTEArray & | payload | ) |

bool OpalPCAPFile::Restart | ( |  | ) |

void OpalPCAPFile::SetFilterDstIP | ( | const PIPSocket::Address & | ip | ) | `[inline]`

void OpalPCAPFile::SetFilterDstPort | ( | WORD | port | ) | `[inline]`

bool OpalPCAPFile::SetFilters | ( | const DiscoveredRTPMap & | rtp,
|  | size_t | index |
| ) |  |  |

void OpalPCAPFile::SetFilters | ( | const DiscoveredRTPInfo & | rtp,
|  | int | dir |
| ) |  |  |

void OpalPCAPFile::SetFilterSrcIP | ( | const PIPSocket::Address & | ip | ) | `[inline]`

void OpalPCAPFile::SetFilterSrcPort | ( | WORD | port | ) | `[inline]`

bool OpalPCAPFile::SetPayloadMap | ( | RTP_DataFrame::PayloadTypes | pt,
|  | const OpalMediaFormat & | format |
| ) |  |  |

## Field Documentation

FileHeader OpalPCAPFile::m_fileHeader `[protected]`

PIPSocket::Address OpalPCAPFile::m_filterDstIP `[protected]`

WORD OpalPCAPFile::m_filterDstPort `[protected]`

PIPSocket::Address OpalPCAPFile::m_filterSrcIP `[protected]`

WORD OpalPCAPFile::m_filterSrcPort `[protected]`

bool OpalPCAPFile::m_fragmentated `[protected]`

unsigned OpalPCAPFile::m_fragmentProto `[protected]`

PBYTEArray OpalPCAPFile::m_fragments `[protected]`

bool OpalPCAPFile::m_otherEndian `[protected]`

PIPSocket::Address OpalPCAPFile::m_packetDstIP `[protected]`

WORD OpalPCAPFile::m_packetDstPort `[protected]`

PIPSocket::Address OpalPCAPFile::m_packetSrcIP `[protected]`

WORD OpalPCAPFile::m_packetSrcPort `[protected]`

PTime OpalPCAPFile::m_packetTime `[protected]`

std::map<RTP_DataFrame::PayloadTypes, OpalMediaFormat> OpalPCAPFile::m_payloadType2mediaFormat `[protected]`

PBYTEArray OpalPCAPFile::m_rawPacket `[protected]`

The documentation for this class was generated from the following file:

- pcapfile.h