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

rtp_addr
This is a pointer to an IPv4 or IPv6 socket address structure.
rtcp_addr
This is a pointer to an IPv4 or IPv6 socket address structure.
These arguments point to a structure that specifies the address and port on which
RTP and RTCP packets are received.
rtp_close
You can use rtp_close to terminate an RTP session, represented by rd, that is
obtained by calling rtp_open. This API closes the RTP session and frees all the
memory associated with the session and internal structures that map to lower level
protocols.
The declaration of rtp_close is as follows:
# include <rtp.h>
int rtp_close(int rd);
Return Values
Unless explicitly stated, the RTP APIs return zero or a positive integer upon success;
upon failure, they return a specific error number, which is a negative value.
RTP Data Packet APIs
An RTP data packet consists of a fixed RTP header of length 12 octets, followed by the
optional Contributing Source (CSRC) list and extension headers. The length of the
header helps in assessing the end of the data block.
RTP data packet APIs use rtp_pkt_t, a data structure, as follows:
typedef struct {
unsigned short v:2; /* packet type */
unsigned short p:1; /* padding flag */
unsigned short x:1; /* header extension flag */
unsigned short cc:4; /* CSRC count */
unsigned short m:1; /* marker bit */
unsigned short pt:7; /* payload type */
uint16_t seq; /* sequence number */
uint32_t ts; /* timestamp */
uint32_t ssrc; /* synchronization source */
uint32_t *csrcp;
rtp_xtn_hdr_t *xtnhdrp;
char *datap;
int datalen;}rtp_pkt_t;
The RTP packet data structures contain all the optional fields of an RTP packet, such
as the CSRC list and the extension headers, as pointers. If these pointers are NULL,
APIs, for example rtp_send, treat them as non-existent.
RTP Library 21