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

Table 2-6 The sdp_get and sdp_add APIs (continued)
DescriptionAPI
Adds time zone adjustment information. The adjtime and
offset arguments point to the adjust time and the offset,
respectively.
sdp_add_tzoneadjust()
Adds encryption key information. The key_method and
key_data arguments point to the encryption method
(mechanism used for obtaining a usable key) and the
encryption key, respectively.
sdp_add_encrkey()
The sdp_get API gets an SDP structure member based on the field_type argument that
it accepts. You can use sdp_get to obtain field information either from the session-level
description or from the media-level description, based on the pointer values passed to
it (sdp and media). If sdp is NULL, the API returns the field information from the
media-level description. Some SDP structure members, such as bandwidth information,
can be part of both session-level and media-level descriptions.
For information on field_type, type man 3 sdp_get at the HP-UX command prompt.
For APIs that return a pointer to the first item of the list of information, you can obtain
the other items by following the link till the end of the list, indicated by a NULL, is
reached. For example, you can retrieve the e-mail addresses in a session description
using sdp_get_email as follows:
sdp_email_list_t *smail;
smail = (sdp_email_list_t *) sdp_get_email(sdp);
while (smail->next != NULL) {
... /* process the email field smail->e_email) */
smail = smail->next;
}
For more information onsdp_get* routines, type man 3 sdp_get_connection at
the HP-UX command prompt.
Return Values
Upon success, sdp_get* routines return a pointer to the particular SDP structure
member requested; otherwise, they return NULL.
Upon success, sdp_add* routines return SDP_SUCCESS, indicating the addition of a
particular SDP structure member. Otherwise, they return one of the following values:
SDP_ENOMEM
Memory allocation failure.
SDP_EPROT
Non-RFC compliant description string encountered.
SDP Library 73