37 #ifndef CCXX_RTP_RTCPPKT_H_ 38 #define CCXX_RTP_RTCPPKT_H_ 190 {
return (ntohl(ssrc)); }
216 unsigned char data[1];
252 #if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN 253 unsigned char version:2;
255 unsigned char padding:1;
256 unsigned char block_count:5;
258 unsigned char block_count:5;
260 unsigned char padding:1;
261 unsigned char version:2;
300 {
return ((ntohs(fh.length) + 1) << 2); }
307 {
return (ntohl(info.RR.ssrc)); }
330 enum { defaultPathMTU = 1500 };
348 checkCompoundRTCPHeader(
size_t len);
363 static const uint16 RTCP_VALID_MASK;
364 static const uint16 RTCP_VALID_VALUE;
377 { memcpy(&receiverInfo,&ri,
394 {
return receiverInfo.fractionLost; }
398 {
return ( ((uint32)ntohs(receiverInfo.lostLSW)) +
399 (((uint32)receiverInfo.lostMSB) << 16) ); }
403 {
return ntohl(receiverInfo.highestSeqNum); }
413 {
return ntohl(receiverInfo.jitter); }
422 {
return (uint16)((ntohl(receiverInfo.lsr) & 0xFFFF0000) >> 16); }
431 {
return (uint16)(ntohl(receiverInfo.lsr) & 0xFFFF); }
441 {
return ntohl(receiverInfo.dlsr); }
457 { memcpy(&senderInfo,&si,
474 {
return ntohl(senderInfo.NTPMSW); }
482 {
return ntohl(senderInfo.NTPLSW); }
486 {
return ntohl(senderInfo.RTPTimestamp); }
493 {
return ntohl(senderInfo.packetCount); }
497 {
return ntohl(senderInfo.octetCount); }
528 #endif // ndef CCXX_RTP_RTCPPKT_H_ unsigned char * rtcpRecvBuffer
Definition: rtcppkt.h:355
uint32 getExtendedSeqNum() const
Definition: rtcppkt.h:402
Struct for SR (sender report) RTCP packets.
Definition: rtcppkt.h:163
uint8 length
[optional] length of reason.
Definition: rtcppkt.h:204
RTCPReceiverInfo(void *ri)
Definition: rtcppkt.h:376
uint32 ssrc
ssrc identifier of source.
Definition: rtcppkt.h:240
Struct for the sender info block in a SR (sender report) RTCP packet.
Definition: rtcppkt.h:149
FIRPacket FIR
Definition: rtcppkt.h:322
SDESItem item
SDES item from sender.
Definition: rtcppkt.h:193
Last defined code.
Definition: rtcppkt.h:76
uint32 RTPTimestamp
RTP timestamp.
Definition: rtcppkt.h:153
RTCPSenderInfo(void *si)
Definition: rtcppkt.h:456
uint32 packetCount
cumulative packet counter.
Definition: rtcppkt.h:154
uint16 fsn
First Sequence Number lost.
Definition: rtcppkt.h:241
uint16 getPathMTU()
Definition: rtcppkt.h:95
Struct for the data contained in a receiver info block.
Definition: rtcppkt.h:108
Canonical end-point identifier.
Definition: rtcppkt.h:67
Struct for a receiver info block in a SR (sender report) or an RR (receiver report) RTCP packet...
Definition: rtcppkt.h:125
Comment usually reporting state.
Definition: rtcppkt.h:73
uint8 type
item identifier.
Definition: rtcppkt.h:177
uint32 octetCount
cumulative octet counter.
Definition: rtcppkt.h:155
uint32 jitter
arrival jitter.
Definition: rtcppkt.h:114
uint16 lostLSW
cumulative lost two LSB.
Definition: rtcppkt.h:112
Report block information of SR/RR RTCP reports.
Definition: rtcppkt.h:373
uint8 getFractionLost() const
Get fraction of lost packets, as a number between 0 and 255.
Definition: rtcppkt.h:393
uint32 getCumulativePacketLost() const
Definition: rtcppkt.h:397
BYEPacket BYE
Definition: rtcppkt.h:319
Type
rtp.h cc++/rtp.h
Definition: rtcppkt.h:284
APPlication specific.
Definition: rtcppkt.h:289
Struct for a chunk of items in a SDES RTCP packet.
Definition: rtcppkt.h:187
uint32 ssrc
source identifier.
Definition: rtcppkt.h:139
Phone number of the user.
Definition: rtcppkt.h:70
ReceiverInfo rinfo
info about the source.
Definition: rtcppkt.h:128
uint32 getRTPTimestamp() const
Definition: rtcppkt.h:485
SDESChunk SDES
Definition: rtcppkt.h:318
uint32 ssrc
ssrc identifier of source.
Definition: rtcppkt.h:214
uint32 getSSRC() const
Definition: rtcppkt.h:189
Struct for BYE (leaving session) RTCP packets.
Definition: rtcppkt.h:201
uint32 ssrc
ssrc identifier of source.
Definition: rtcppkt.h:229
Source DEScription.
Definition: rtcppkt.h:287
Fixed RTCP packet header.
Definition: rtcppkt.h:250
Receiver Report.
Definition: rtcppkt.h:286
unsigned char * rtcpSendBuffer
Definition: rtcppkt.h:352
uint8 lostMSB
cumulative lost MSB of 3 octets.
Definition: rtcppkt.h:111
END of SDES item list.
Definition: rtcppkt.h:66
low level structs and RTCP packet parsing and building methods.
Definition: rtcppkt.h:89
uint32 highestSeqNum
highest sequence number.
Definition: rtcppkt.h:113
Sender block information of SR RTCP reports.
Definition: rtcppkt.h:453
Private extension.
Definition: rtcppkt.h:74
~RTCPReceiverInfo()
Definition: rtcppkt.h:385
Struct for Negative ACKnowledgements (NACK) RTCP packet.
Definition: rtcppkt.h:238
uint32 timevalIntervalTo65536(timeval &t)
Convert a time interval, expressed as a timeval, into a 32-bit time interval expressed in units of 1/...
Struct for Full Intra-frame Request (FIR) RTCP packet.
Definition: rtcppkt.h:227
RTCPReceiverInfo(RTCPCompoundHandler::ReceiverInfo &si)
Definition: rtcppkt.h:380
End of participation.
Definition: rtcppkt.h:288
uint32 getLength() const
Get the packet length specified in its header, in octets and in host order.
Definition: rtcppkt.h:299
uint32 getSSRC() const
Get the SSRC identifier specified in the packet header, in host order.
Definition: rtcppkt.h:306
uint16 length
number of 32-bit words in the packet (minus one).
Definition: rtcppkt.h:264
uint32 getPacketCount() const
Get count of sent data packets.
Definition: rtcppkt.h:492
Struct for an item description of a SDES packet.
Definition: rtcppkt.h:175
RTCPSenderInfo(RTCPCompoundHandler::SenderInfo &si)
Definition: rtcppkt.h:460
Struct representing general RTCP packet headers as they are sent through the network.
Definition: rtcppkt.h:277
Personal NAME of the user.
Definition: rtcppkt.h:68
uint16 blp
Bitmask of following Lost Packets.
Definition: rtcppkt.h:242
H323 callable address.
Definition: rtcppkt.h:75
void setPathMTU(uint16 mtu)
Definition: rtcppkt.h:92
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:421
Base elements for RTP stacks: constants, types and global functions.
NACKPacket NACK
Definition: rtcppkt.h:321
Struct for APP (application specific) RTCP packets.
Definition: rtcppkt.h:212
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:430
uint8 type
type of RTCP packet.
Definition: rtcppkt.h:263
RecvReport RR
Definition: rtcppkt.h:317
timeval NTP2Timeval(uint32 msw, uint32 lsw)
Convert a NTP timestamp, expressed as two 32-bit long words, into a timeval value.
uint32 ssrc
source identifier.
Definition: rtcppkt.h:127
uint32 lsr
last sender report timestamp.
Definition: rtcppkt.h:115
uint32 getNTPTimestampFrac() const
Get fractional part of the NTP timestamp of this packet.
Definition: rtcppkt.h:481
uint8 len
item len in octets.
Definition: rtcppkt.h:178
uint32 getNTPTimestampInt() const
Get integer part of the NTP timestamp of this packet.
Definition: rtcppkt.h:473
uint32 getJitter() const
Get the statistical variance of the RTP data packets interarrival time.
Definition: rtcppkt.h:412
uint32 getDelayLastSR() const
Get the delay between the last SR packet received and the transmission of this report.
Definition: rtcppkt.h:440
APPPacket APP
Definition: rtcppkt.h:320
RTCPFixedHeader fh
Fixed RTCP header.
Definition: rtcppkt.h:310
uint32 getOctetCount() const
Definition: rtcppkt.h:496
Application or tool.
Definition: rtcppkt.h:72
~RTCPSenderInfo()
Definition: rtcppkt.h:465
uint8 fractionLost
packet fraction lost.
Definition: rtcppkt.h:110
uint32 NTPMSW
NTP timestamp higher octets.
Definition: rtcppkt.h:151
EMAIL address of the user.
Definition: rtcppkt.h:69
uint32 NTPLSW
NTP timestamp lower octets.
Definition: rtcppkt.h:152
SDESItemType
SDES items that may be carried in a Source DEScription RTCP packet.
Definition: rtcppkt.h:64
uint32 dlsr
delay since last sender report.
Definition: rtcppkt.h:116
SendReport SR
Definition: rtcppkt.h:316
SenderInfo sinfo
actual sender info.
Definition: rtcppkt.h:166
uint32 ssrc
source identifier.
Definition: rtcppkt.h:165
uint32 ssrc
ssrc identifier of source leaving.
Definition: rtcppkt.h:203
Location where the user is.
Definition: rtcppkt.h:71
raw structure of the source and every receiver report in an SR or RR RTCP packet. ...
Definition: rtcppkt.h:137
uint32 ssrc
SSRC identifer from sender.
Definition: rtcppkt.h:192