HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide

where buf is the size of the buffer. The return value of rtp_free_buf is not
predictable if buf is not valid or not allocated by rtp_recv.
RTCP Control Packet APIs
This section describes the RTCP control packet APIs that the RTP module includes.
The following lists the RTCP control packet APIs:
rtcp_recv
You can use rtcp_recv to receive RTCP packets.
The declaration of rtcp_recv is as follows:
# include <rtp.h>
int rtcp_recv(int rd, char **buf, int *buflen);
where rd is an integer value, buf is the size of the buffer, and buflen is the length
of the buffer.
The buf buffer obtains memory, upon request. To trigger memory allocation, you
must send a valid pointer that points to NULL; that is, *buf should be NULL for
enabling memory allocation, but itself is not NULL. You must call
rtcp_parse_pkt separately for parsing the RTCP packet.
rtcp_free_buf
You can use rtcp_free_buf to free the memory allocated by rtcp_recv.
The declaration of rtcp_free_buf is as follows:
# include <rtp.h>
int rtcp_free_buf(char *buf);
The return value of rtcp_free_buf is not predictable if buf is not valid or not
allocated by rtcp_recv.
RTP I/O Control Option APIs
To set or retrieve I/O control options for a particular RTP session, use rtp_ioctl.
The declaration of rtp_ioctl is as follows:
# include <rtp.h>
int rtp_ioctl(int rd, int option,...);
You must pass the following arguments to rtp_ioctl:
rd
The rd argument is an RTP session descriptor that specifies the session for which
the option needs to be obtained or modified. You must obtain rd by calling
rtp_open.
RTP Library 23