# 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
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)
bool | SetFilters (const DiscoveredRTPInfo &rtp, int dir, const PString &format=PString::Empty())
bool | SetFilters (const DiscoveredRTPMap &rtp, size_t index, const PString &format=PString::Empty())
bool | SetPayloadMap (RTP_DataFrame::PayloadTypes pt, const OpalMediaFormat &format)
OpalMediaFormat | GetMediaFormat (const RTP_DataFrame &rtp) const

## Protected Attributes

FileHeader | m_fileHeader
Frame | m_rawPacket
PIPSocketAddressAndPort | m_filterSrc
PIPSocketAddressAndPort | m_filterDst
PIPSocketAddressAndPort | m_packetSrc
PIPSocketAddressAndPort | m_packetDst
std::map< RTP_DataFrame::PayloadTypes, OpalMediaFormat > | m_payloadType2mediaFormat

## Data Structures

struct | DiscoveredRTPInfo
class | DiscoveredRTPMap
struct | FileHeader
class | Frame
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

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::Restart | ( |  | ) |

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

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

bool OpalPCAPFile::SetFilters | ( | const DiscoveredRTPMap & | rtp,
|  | size_t | index,
|  | const PString & | format = `PString::Empty()` |
| ) |  |  |

bool OpalPCAPFile::SetFilters | ( | const DiscoveredRTPInfo & | rtp,
|  | int | dir,
|  | const PString & | format = `PString::Empty()` |
| ) |  |  |

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]`

PIPSocketAddressAndPort OpalPCAPFile::m_filterDst `[protected]`

PIPSocketAddressAndPort OpalPCAPFile::m_filterSrc `[protected]`

PIPSocketAddressAndPort OpalPCAPFile::m_packetDst `[protected]`

PIPSocketAddressAndPort OpalPCAPFile::m_packetSrc `[protected]`

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

Frame OpalPCAPFile::m_rawPacket `[protected]`

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

- pcapfile.h