Bayonne2 / Common C++ 2 Framework
|
#include <ZrtpQueue.h>
Public Member Functions | |
OutgoingZRTPPkt (const unsigned char *const hdrext, uint32 hdrextlen) | |
Construct a new ZRTP packet to be sent. More... | |
~OutgoingZRTPPkt () | |
void | setPayloadType (PayloadType pt) |
void | setSeqNum (uint16 seq) |
Sets the sequence number in the header. More... | |
void | setTimestamp (uint32 pts) |
void | setSSRC (uint32 ssrc) const |
Set synchronization source numeric identifier. More... | |
void | setSSRCNetwork (uint32 ssrc) const |
Set synchronization source numeric identifier. More... | |
void | setMarker (bool mark) |
Specify the value of the marker bit. More... | |
void | protect (uint32 ssrc, CryptoContext *pcc) |
Called packet is setup. More... | |
bool | operator== (const OutgoingRTPPkt &p) const |
Outgoing packets are equal if their sequence numbers match. More... | |
bool | operator!= (const OutgoingRTPPkt &p) const |
Outgoing packets are not equal if their sequence numbers differ. More... | |
uint32 | getHeaderSize () const |
Get the length of the header, including contributing sources identifiers and header extension, if present. More... | |
const uint8 *const | getPayload () const |
uint32 | getPayloadSize () const |
PayloadType | getPayloadType () const |
uint16 | getSeqNum () const |
uint32 | getTimestamp () const |
uint8 | getProtocolVersion () const |
bool | isPadded () const |
Ask whether the packet contains padding bytes at the end. More... | |
uint8 | getPaddingSize () const |
Get the number of octets padding the end of the payload section. More... | |
bool | isMarked () const |
Ask whether the packet is marked (for isntance, is a new talk spurt in some audio profiles). More... | |
bool | isExtended () const |
Ask whether the packet contains header extensions. More... | |
uint16 | getCSRCsCount () const |
Get the number of contributing sources specified in the packet header. More... | |
const uint32 * | getCSRCs () const |
Get the 32-bit identifiers of the contributing sources for the packet as an array, of length getCSRCsCount(). More... | |
uint16 | getHdrExtUndefined () const |
Get the first 16 bits (in network order) of the header of the RTP header extension. More... | |
uint32 | getHdrExtSize () const |
Get the length (in octets) of the data contained in the header extension. More... | |
const unsigned char * | getHdrExtContent () const |
Get the content of the header extension. More... | |
const unsigned char *const | getRawPacket () const |
Get the raw packet as it will be sent through the network. More... | |
uint32 | getRawPacketSize () const |
Get the raw packet length, including header, extension, payload and padding. More... | |
uint32 | getRawPacketSizeSrtp () const |
size_t | getSizeOfFixedHeader () const |
void | reComputePayLength (bool padding) |
Re-compute payload length. More... | |
struct RFC2833Payload * | getRaw2833Payload (void) |
Fetch a raw 2833 packet. More... | |
uint16 | get2833Duration (void) |
Fetch 2833 duration field. More... | |
void | set2833Duration (uint16 timestamp) |
Set 2833 duration field. More... | |
Protected Member Functions | |
void | endPacket () |
Free memory allocated for the packet. More... | |
RTPFixedHeader * | getHeader () const |
Return low level structure for the header of the packet. More... | |
void | setExtension (bool e) |
const RTPHeaderExt * | getHeaderExt () const |
Get a pointer to RTPHeaderExt pointing after the RTP header (fixed part plus contributing sources). More... | |
uint32 | getRawTimestamp () const |
Obtain the absolute timestamp carried in the packet header. More... | |
void | setbuffer (const void *src, size_t len, size_t pos) |
Protected Attributes | |
uint16 | cachedSeqNum |
Packet sequence number in host order. More... | |
uint32 | cachedTimestamp |
Packet timestamp in host order (includes initial shift). More... | |
uint32 | srtpDataOffset |
Offset into packet memory pointing to area for SRTP data. More... | |
int32 | srtpLength |
Lebgth of additional SRTP data. More... | |
uint32 | total |
total length, including header, payload and padding More... | |
uint32 | payloadSize |
note: payload (not full packet) size. More... | |
Definition at line 889 of file ZrtpQueue.h.
OutgoingZRTPPkt::OutgoingZRTPPkt | ( | const unsigned char *const | hdrext, |
uint32 | hdrextlen | ||
) |
Construct a new ZRTP packet to be sent.
A new copy in memory (holding all this components along with the fixed header) is created.
hdrext | whole header extension. |
hdrextlen | size of whole header extension, in octets. |
|
inline |
Definition at line 902 of file ZrtpQueue.h.
|
protectedinherited |
Free memory allocated for the packet.
|
inlineinherited |
|
inlineinherited |
Get the 32-bit identifiers of the contributing sources for the packet as an array, of length getCSRCsCount().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get the length (in octets) of the data contained in the header extension.
Note that this length does not include the four octets at the beginning of the header extension.
|
inlineinherited |
Get the first 16 bits (in network order) of the header of the RTP header extension.
Its meaning is undefined at this level.
|
inlineprotectedinherited |
Return low level structure for the header of the packet.
|
inlineprotectedinherited |
Get a pointer to RTPHeaderExt pointing after the RTP header (fixed part plus contributing sources).
No check for for the X bit is done.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Called packet is setup.
This private method computes the SRTP data and stores it in the packet. Then encrypt the payload data (ex padding).
|
inherited |
Re-compute payload length.
This recomputation may be necessary in case of SRTP. We need to decrypt the packet before we can handle padding. See takeInDataPacket
in incqueue.cpp
padding | If true then set padding flag in RTP header and re-compute payloadSize. |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |