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

typedef struct {
char *v_version; /* v= protocol version */
sdp_owner_t *owner_info; /* o= owner/creator info */
char *s_name; /* s= session name */
char *i_info; /* i= session information */
char *u_uri; /* u= uri */
sdp_email_list_t *email; /* e= email address */
sdp_phone_list_t *phone; /* p= phone number */
sdp_connection_list_t *conn_info; /* c= connection info */
sdp_bandwidth_t *bandw_info; /* b= bandwidth */
sdp_time_list_t *ses_time; /* t= time description */
sdp_adj_time_list_t *adj_time; /* z= time zone info */
sdp_encr_key_t *key; /* k= encryption key */
sdp_attribute_list_t *attributes; /* a= attributes */
sdp_media_list_t *media_des; /* m= media description */
} sdp_t
The sdp_init API allocates memory for the SDP structure and initializes the structure
members. The <sdp.h> file contains the definitions of the following member types:
sdp_owner_t, sdp_email_list_t, sdp_phone_list_t,
sdp_connection_list_t, sdp_bandwidth_t, sdp_time_list_t,
sdp_adj_time_list_t, sdp_encr_key_t, sdp_attribute_list_t, and
sdp_media_list_t.
Return Values
Upon success, sdp_init returns a pointer to an appropriate SDP structure; upon
failure, it returns NULL.
Freeing the Space Allocated for the SDP Structure
The SDP header file, sdp.h, contains the declaration of sdp_freeas follows:
#include <sdp.h>
void sdp_free(sdp_t *sdp)
The sdp_free API deallocates the space pointed to by sdp,which is a pointer to a
block previously allocated by sdp_init. If sdp is a NULL pointer, no action occurs.
The sdp_free API does not return a specific value.
SDP Call Order Sequence
This section outlines the SDP call order sequence.
It includes the following topics:
“Creating an SDP Packet” (page 76)
“Parsing an SDP Packet” (page 78)
Creating an SDP Packet
To create an SDP packet, use the SDP APIs in the following sequence:
76 Using MSP APIs