Go to the documentation of this file.
38 #ifndef CCXX_RTP_RTCPPKT_H_
39 #define CCXX_RTP_RTCPPKT_H_
191 {
return (ntohl(ssrc)); }
217 unsigned char data[1];
253 #if __BYTE_ORDER == __BIG_ENDIAN
254 unsigned char version:2;
259 unsigned char block_count:5;
261 unsigned char padding:1;
262 unsigned char version:2;
301 {
return ((ntohs(fh.length) + 1) << 2); }
308 {
return (ntohl(info.RR.ssrc)); }
331 enum { defaultPathMTU = 1500 };
349 checkCompoundRTCPHeader(
size_t len);
364 static const uint16 RTCP_VALID_MASK;
365 static const uint16 RTCP_VALID_VALUE;
378 { memcpy(&receiverInfo,&ri,
395 {
return receiverInfo.fractionLost; }
399 {
return ( ((uint32)ntohs(receiverInfo.lostLSW)) +
400 (((uint32)receiverInfo.lostMSB) << 16) ); }
404 {
return ntohl(receiverInfo.highestSeqNum); }
414 {
return ntohl(receiverInfo.jitter); }
423 {
return (uint16)((ntohl(receiverInfo.lsr) & 0xFFFF0000) >> 16); }
432 {
return (uint16)(ntohl(receiverInfo.lsr) & 0xFFFF); }
442 {
return ntohl(receiverInfo.dlsr); }
458 { memcpy(&senderInfo,&si,
475 {
return ntohl(senderInfo.NTPMSW); }
483 {
return ntohl(senderInfo.NTPLSW); }
487 {
return ntohl(senderInfo.RTPTimestamp); }
494 {
return ntohl(senderInfo.packetCount); }
498 {
return ntohl(senderInfo.octetCount); }
529 #endif // ndef CCXX_RTP_RTCPPKT_H_
Definition: rtcppkt.h:176
uint8 fractionLost
packet fraction lost.
Definition: rtcppkt.h:111
uint32 ssrc
ssrc identifier of source.
Definition: rtcppkt.h:241
timeval NTP2Timeval(uint32 msw, uint32 lsw)
Convert a NTP timestamp, expressed as two 32-bit long words, into a timeval value.
ReceiverInfo rinfo
info about the source.
Definition: rtcppkt.h:129
Definition: rtcppkt.h:150
uint32 octetCount
cumulative octet counter.
Definition: rtcppkt.h:156
@ SDESItemTypeLOC
Location where the user is.
Definition: rtcppkt.h:72
NACKPacket NACK
Definition: rtcppkt.h:322
@ SDESItemTypeLast
Last defined code.
Definition: rtcppkt.h:77
~RTCPReceiverInfo()
Definition: rtcppkt.h:386
uint8 type
type of RTCP packet.
Definition: rtcppkt.h:264
uint16 getLastSRNTPTimestampFrac() const
Get the fractional part of the NTP timestamp of the last SR RTCP packet received from the source this...
Definition: rtcppkt.h:431
uint16 getLastSRNTPTimestampInt() const
Get the integer part of the NTP timestamp of the last SR RTCP packet received from the source this re...
Definition: rtcppkt.h:422
uint32 jitter
arrival jitter.
Definition: rtcppkt.h:115
Definition: rtcppkt.h:126
SDESChunk SDES
Definition: rtcppkt.h:319
Sender block information of SR RTCP reports.
Definition: rtcppkt.h:454
raw structure of the source and every receiver report in an SR or RR RTCP packet.
Definition: rtcppkt.h:138
uint8 len
item len in octets.
Definition: rtcppkt.h:179
Struct for Full Intra-frame Request (FIR) RTCP packet. Specific for H.261 sessions (see RFC 2032).
Definition: rtcppkt.h:228
Definition: rtcppkt.h:164
uint32 getSSRC() const
Get the SSRC identifier specified in the packet header, in host order.
Definition: rtcppkt.h:307
RTCPSenderInfo(void *si)
Definition: rtcppkt.h:457
uint8 type
item identifier.
Definition: rtcppkt.h:178
@ SDESItemTypeCNAME
Canonical end-point identifier.
Definition: rtcppkt.h:68
@ SDESItemTypeNOTE
Comment usually reporting state.
Definition: rtcppkt.h:74
@ tSDES
Source DEScription.
Definition: rtcppkt.h:288
unsigned char * rtcpRecvBuffer
Definition: rtcppkt.h:356
unsigned char * rtcpSendBuffer
Definition: rtcppkt.h:353
uint32 timevalIntervalTo65536(timeval &t)
Convert a time interval, expressed as a timeval, into a 32-bit time interval expressed in units of 1/...
Base elements for RTP stacks: constants, types and global functions.
unsigned char padding
Padding bit.
Definition: rtcppkt.h:256
uint32 packetCount
cumulative packet counter.
Definition: rtcppkt.h:155
uint32 getPacketCount() const
Get count of sent data packets.
Definition: rtcppkt.h:493
Report block information of SR/RR RTCP reports.
Definition: rtcppkt.h:374
uint32 ssrc
source identifier.
Definition: rtcppkt.h:128
@ tRR
Receiver Report.
Definition: rtcppkt.h:287
uint32 NTPLSW
NTP timestamp lower octets.
Definition: rtcppkt.h:153
RTCPReceiverInfo(void *ri)
Definition: rtcppkt.h:377
uint32 getExtendedSeqNum() const
Definition: rtcppkt.h:403
@ SDESItemTypePHONE
Phone number of the user.
Definition: rtcppkt.h:71
uint32 ssrc
ssrc identifier of source leaving.
Definition: rtcppkt.h:204
Struct for BYE (leaving session) RTCP packets.
Definition: rtcppkt.h:202
@ tAPP
APPlication specific.
Definition: rtcppkt.h:290
RTCPSenderInfo(RTCPCompoundHandler::SenderInfo &si)
Definition: rtcppkt.h:461
uint32 ssrc
SSRC identifer from sender.
Definition: rtcppkt.h:193
low level structs and RTCP packet parsing and building methods.
Definition: rtcppkt.h:90
void setPathMTU(uint16 mtu)
Definition: rtcppkt.h:93
uint32 getOctetCount() const
Definition: rtcppkt.h:497
uint32 getJitter() const
Get the statistical variance of the RTP data packets interarrival time.
Definition: rtcppkt.h:413
uint32 getDelayLastSR() const
Get the delay between the last SR packet received and the transmission of this report.
Definition: rtcppkt.h:441
uint32 getRTPTimestamp() const
Definition: rtcppkt.h:486
Struct for APP (application specific) RTCP packets.
Definition: rtcppkt.h:213
SDESItem item
SDES item from sender.
Definition: rtcppkt.h:194
Definition: rtcppkt.h:109
SenderInfo sinfo
actual sender info.
Definition: rtcppkt.h:167
uint16 length
number of 32-bit words in the packet (minus one).
Definition: rtcppkt.h:265
@ SDESItemTypeEND
END of SDES item list.
Definition: rtcppkt.h:67
uint32 getSSRC() const
Definition: rtcppkt.h:190
uint32 ssrc
ssrc identifier of source.
Definition: rtcppkt.h:215
uint32 getNTPTimestampFrac() const
Get fractional part of the NTP timestamp of this packet.
Definition: rtcppkt.h:482
uint32 getCumulativePacketLost() const
Definition: rtcppkt.h:398
uint16 lostLSW
cumulative lost two LSB.
Definition: rtcppkt.h:113
@ SDESItemTypePRIV
Private extension.
Definition: rtcppkt.h:75
uint32 highestSeqNum
highest sequence number.
Definition: rtcppkt.h:114
uint32 RTPTimestamp
RTP timestamp.
Definition: rtcppkt.h:154
@ SDESItemTypeH323CADDR
H323 callable address.
Definition: rtcppkt.h:76
unsigned char block_count
Number of RR, SR, or SDES chunks.
Definition: rtcppkt.h:257
uint32 dlsr
delay since last sender report.
Definition: rtcppkt.h:117
uint32 lsr
last sender report timestamp.
Definition: rtcppkt.h:116
Definition: rtcppkt.h:251
RecvReport RR
Definition: rtcppkt.h:318
@ SDESItemTypeNAME
Personal NAME of the user.
Definition: rtcppkt.h:69
uint8 getFractionLost() const
Get fraction of lost packets, as a number between 0 and 255.
Definition: rtcppkt.h:394
uint32 ssrc
source identifier.
Definition: rtcppkt.h:166
uint32 ssrc
ssrc identifier of source.
Definition: rtcppkt.h:230
uint32 getLength() const
Get the packet length specified in its header, in octets and in host order.
Definition: rtcppkt.h:300
Struct for Negative ACKnowledgements (NACK) RTCP packet. Specific for H.261 sessions (see RFC 2032).
Definition: rtcppkt.h:239
uint8 length
[optional] length of reason.
Definition: rtcppkt.h:205
APPPacket APP
Definition: rtcppkt.h:321
uint16 fsn
First Sequence Number lost.
Definition: rtcppkt.h:242
uint32 getNTPTimestampInt() const
Get integer part of the NTP timestamp of this packet.
Definition: rtcppkt.h:474
uint8 lostMSB
cumulative lost MSB of 3 octets.
Definition: rtcppkt.h:112
Struct representing general RTCP packet headers as they are sent through the network.
Definition: rtcppkt.h:278
BYEPacket BYE
Definition: rtcppkt.h:320
@ SDESItemTypeTOOL
Application or tool.
Definition: rtcppkt.h:73
FIRPacket FIR
Definition: rtcppkt.h:323
uint32 ssrc
source identifier.
Definition: rtcppkt.h:140
Definition: rtcppkt.h:188
@ tBYE
End of participation.
Definition: rtcppkt.h:289
@ SDESItemTypeEMAIL
EMAIL address of the user.
Definition: rtcppkt.h:70
uint32 NTPMSW
NTP timestamp higher octets.
Definition: rtcppkt.h:152
uint16 getPathMTU()
Definition: rtcppkt.h:96
SendReport SR
Definition: rtcppkt.h:317
RTCPFixedHeader fh
Fixed RTCP header.
Definition: rtcppkt.h:311
~RTCPSenderInfo()
Definition: rtcppkt.h:466
uint16 blp
Bitmask of following Lost Packets.
Definition: rtcppkt.h:243
RTCPReceiverInfo(RTCPCompoundHandler::ReceiverInfo &si)
Definition: rtcppkt.h:381
SDESItemType
SDES items that may be carried in a Source DEScription RTCP packet.
Definition: rtcppkt.h:65