#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
#include <sofia-sip/su_alloc.h>
#include <sofia-sip/su_types.h>
#include "sofia-sip/sdp.h"
#include <sofia-sip/su_tag_class.h>
Include dependency graph for sdp.c:

Defines | |
| #define | SDP_DUP(type, name) |
| Define a function body duplicating an SDP structure. | |
| #define | SDP_LIST_DUP(type, name) |
| Define a function body duplicating a list of SDP structures. | |
Functions | |
| sdp_origin_t * | sdp_origin_dup (su_home_t *h, sdp_origin_t const *o) |
| Duplicate an SDP origin structure. | |
| sdp_connection_t * | sdp_connection_dup (su_home_t *h, sdp_connection_t const *c) |
| Duplicate an SDP connection structure. | |
| sdp_bandwidth_t * | sdp_bandwidth_dup (su_home_t *h, sdp_bandwidth_t const *b) |
| Duplicate an SDP bandwidth structure. | |
| sdp_time_t * | sdp_time_dup (su_home_t *h, sdp_time_t const *t) |
| Duplicate an SDP time structure. | |
| sdp_repeat_t * | sdp_repeat_dup (su_home_t *h, sdp_repeat_t const *r) |
| Duplicate an SDP repeat structure. | |
| sdp_zone_t * | sdp_zone_dup (su_home_t *h, sdp_zone_t const *z) |
| Duplicate an SDP timezone structure. | |
| sdp_key_t * | sdp_key_dup (su_home_t *h, sdp_key_t const *k) |
| Duplicate an SDP key structure. | |
| sdp_attribute_t * | sdp_attribute_dup (su_home_t *h, sdp_attribute_t const *a) |
| Duplicate an SDP attribute structure. | |
| sdp_list_t * | sdp_list_dup (su_home_t *h, sdp_list_t const *l) |
| Duplicate a list structure. | |
| sdp_rtpmap_t * | sdp_rtpmap_dup (su_home_t *h, sdp_rtpmap_t const *rm) |
| Duplicate an rtpmap structure. | |
| sdp_media_t * | sdp_media_dup (su_home_t *h, sdp_media_t const *m, sdp_session_t *sdp) |
| Duplicate an SDP media description structure. | |
| sdp_media_t * | sdp_media_dup_all (su_home_t *h, sdp_media_t const *m, sdp_session_t *sdp) |
| Duplicate a list of SDP media description structures. | |
| sdp_session_t * | sdp_session_dup (su_home_t *h, sdp_session_t const *sdp) |
| Duplicate an SDP session description structure. | |
| sdp_session_t * | sdp_session_dup_without_media (su_home_t *h, sdp_session_t const *sdp) |
| Duplicate an SDP session description without media descriptions. | |
| int | sdp_session_cmp (sdp_session_t const *a, sdp_session_t const *b) |
| Compare two session descriptions. | |
| int | sdp_origin_cmp (sdp_origin_t const *a, sdp_origin_t const *b) |
| Compare two origin fields. | |
| int | sdp_connection_cmp (sdp_connection_t const *a, sdp_connection_t const *b) |
| Compare two connection fields. | |
| int | sdp_bandwidth_cmp (sdp_bandwidth_t const *a, sdp_bandwidth_t const *b) |
| Compare two bandwidth (b=) fields. | |
| int | sdp_time_cmp (sdp_time_t const *a, sdp_time_t const *b) |
| Compare two time fields. | |
| int | sdp_repeat_cmp (sdp_repeat_t const *a, sdp_repeat_t const *b) |
| Compare two repeat (r=) fields. | |
| int | sdp_zone_cmp (sdp_zone_t const *a, sdp_zone_t const *b) |
| Compare two zone (z=) fields. | |
| int | sdp_key_cmp (sdp_key_t const *a, sdp_key_t const *b) |
| Compare two key (k=) fields. | |
| int | sdp_attribute_cmp (sdp_attribute_t const *a, sdp_attribute_t const *b) |
| Compare two attribute (a=) fields. | |
| int | sdp_rtpmap_cmp (sdp_rtpmap_t const *a, sdp_rtpmap_t const *b) |
| Compare two rtpmap structures. | |
| int | sdp_list_cmp (sdp_list_t const *a, sdp_list_t const *b) |
| Compare two text lists. | |
| int | sdp_media_cmp (sdp_media_t const *a, sdp_media_t const *b) |
| Compare two media (m=) descriptions. | |
| sdp_connection_t * | sdp_media_connections (sdp_media_t const *m) |
| Get connections of a media description. | |
| sdp_attribute_t * | sdp_attribute_find (sdp_attribute_t const *a, char const *name) |
| Find named attribute from given list. | |
| sdp_attribute_t * | sdp_attribute_find2 (sdp_attribute_t const *a, sdp_attribute_t const *a2, char const *name) |
| Find named attribute from given lists. | |
| sdp_mode_t | sdp_attribute_mode (sdp_attribute_t const *a, sdp_mode_t defmode) |
| Get session mode from attribute list. | |
| sdp_attribute_t * | sdp_attribute_by_mode (su_home_t *home, sdp_mode_t mode) |
| Get session mode from attribute list. | |
| sdp_attribute_t * | sdp_attribute_mapped_find (sdp_attribute_t const *a, char const *name, int pt, char **return_result) |
| Find a mapped attribute. | |
| void | sdp_attribute_append (sdp_attribute_t **list, sdp_attribute_t const *a) |
| Append a attribute to a list of attributes. | |
| int | sdp_attribute_replace (sdp_attribute_t **list, sdp_attribute_t *a, sdp_attribute_t **return_replaced) |
| Replace a attribute within a list of attributes. | |
| sdp_attribute_t * | sdp_attribute_remove (sdp_attribute_t **list, char const *name) |
| Remove a named attribute from a list of attributes. | |
| unsigned | sdp_media_count (sdp_session_t const *sdp, sdp_media_e type, sdp_text_t *type_name, sdp_proto_e proto, sdp_text_t *proto_name) |
| Count media lines in SDP. | |
| unsigned | sdp_media_count_with (sdp_session_t const *sdp, sdp_media_t const *m0) |
| Count matching media lines in SDP. | |
| int | sdp_media_uses_rtp (sdp_media_t const *m) |
| Return true if media uses RTP. | |
| int | sdp_rtpmap_match (sdp_rtpmap_t const *a, sdp_rtpmap_t const *b) |
| Check if payload type, rtp rate and parameters match in rtpmaps. | |
| sdp_rtpmap_t * | sdp_rtpmap_find_matching (sdp_rtpmap_t const *list, sdp_rtpmap_t const *rm) |
| Search for matching rtpmap from list. | |
Variables | |
| tag_class_t | sdptag_session_class [1] |
| Tag class for SDP tags. | |
| sdp_attribute_t* sdp_attribute_dup | ( | su_home_t * | h, | |
| sdp_attribute_t const * | a | |||
| ) |
Duplicate an SDP attribute structure.
The function sdp_attribute_dup() duplicates (deeply copies) an SDP attribute list a allocating memory using memory home.
| h | Memory home | |
| a | SDP attribute description to be duplicated |
| sdp_attribute_t* sdp_attribute_mapped_find | ( | sdp_attribute_t const * | a, | |
| char const * | name, | |||
| int | pt, | |||
| char ** | return_result | |||
| ) |
Find a mapped attribute.
A mapped attribute has form 'a=<name>:<pt>
' where pt is a RTP payload type, integer in range 0..127. For example, "a=atmmap" [RFC 3108] is a mapped attribute. Note that common mapped attributes, "a=rtpmap" and "a=fmtp" are already parsed as list of sdp_rtpmap_t in sdp_media_t.
| a | pointer to first attribute in the list | |
| name | name of the attribute | |
| pt | payload type number (must be 0..127) | |
| return_result | return value parameter for mapped attribute value |
| int sdp_attribute_replace | ( | sdp_attribute_t ** | list, | |
| sdp_attribute_t * | a, | |||
| sdp_attribute_t ** | return_replaced | |||
| ) |
Replace a attribute within a list of attributes.
| 1 | if replaced existing attribute | |
| 0 | if attribute was appended | |
| -1 | upon an error |
| sdp_bandwidth_t* sdp_bandwidth_dup | ( | su_home_t * | h, | |
| sdp_bandwidth_t const * | b | |||
| ) |
Duplicate an SDP bandwidth structure.
The function sdp_bandwidth_dup() duplicates (deeply copies) an SDP bandwidth description b allocating memory using memory home.
| h | Memory home | |
| b | SDP bandwidth description to be duplicated |
| sdp_connection_t* sdp_connection_dup | ( | su_home_t * | h, | |
| sdp_connection_t const * | c | |||
| ) |
Duplicate an SDP connection structure.
The function sdp_connection_dup() duplicates (deeply copies) an SDP connection description c allocating memory using memory home.
| h | Memory home | |
| c | SDP connection description to be duplicated |
Duplicate an SDP key structure.
The function sdp_key_dup() duplicates (deeply copies) an SDP key description k allocating memory using memory home.
| h | Memory home | |
| k | SDP key description to be duplicated |
| sdp_list_t* sdp_list_dup | ( | su_home_t * | h, | |
| sdp_list_t const * | l | |||
| ) |
Duplicate a list structure.
The function sdp_list_dup() duplicates (deeply copies) an SDP text list l allocating memory using memory home.
| h | Memory home | |
| l | SDP list description to be duplicated |
| sdp_media_t* sdp_media_dup | ( | su_home_t * | h, | |
| sdp_media_t const * | m, | |||
| sdp_session_t * | sdp | |||
| ) |
Duplicate an SDP media description structure.
The function sdp_media_dup() duplicates (deeply copies) an SDP media description m allocating memory using memory home.
| h | Memory home | |
| m | SDP media description to be duplicated | |
| sdp | SDP session description to which the newly allocated media description is linked |
| sdp_media_t* sdp_media_dup_all | ( | su_home_t * | h, | |
| sdp_media_t const * | m, | |||
| sdp_session_t * | sdp | |||
| ) |
Duplicate a list of SDP media description structures.
The function sdp_media_dup_all() duplicates (deeply copies) a list of SDP media descriptions m allocating memory using memory home.
| h | Memory home | |
| m | list of SDP media descriptions to be duplicated | |
| sdp | SDP session description to which the newly allocated media descriptions are linked |
| sdp_origin_t* sdp_origin_dup | ( | su_home_t * | h, | |
| sdp_origin_t const * | o | |||
| ) |
Duplicate an SDP origin structure.
The function sdp_origin_dup() duplicates (deeply copies) an SDP origin description o allocating memory using memory home.
| h | Memory home | |
| o | SDP origin description to be duplicated |
| sdp_repeat_t* sdp_repeat_dup | ( | su_home_t * | h, | |
| sdp_repeat_t const * | r | |||
| ) |
Duplicate an SDP repeat structure.
The function sdp_repeat_dup() duplicates (deeply copies) an SDP repeat description r allocating memory using memory home.
| h | Memory home | |
| r | SDP repeat description to be duplicated |
| sdp_rtpmap_t* sdp_rtpmap_dup | ( | su_home_t * | h, | |
| sdp_rtpmap_t const * | rm | |||
| ) |
Duplicate an rtpmap structure.
The function sdp_rtpmap_dup() duplicates (deeply copies) an SDP rtpmap list rm allocating memory using memory home.
| h | Memory home | |
| rm | SDP rtpmap description to be duplicated |
| sdp_rtpmap_t* sdp_rtpmap_find_matching | ( | sdp_rtpmap_t const * | list, | |
| sdp_rtpmap_t const * | rm | |||
| ) |
Search for matching rtpmap from list.
| sdp_session_t* sdp_session_dup | ( | su_home_t * | h, | |
| sdp_session_t const * | sdp | |||
| ) |
Duplicate an SDP session description structure.
The function sdp_session_dup() duplicates (deeply copies) an SDP session description sdp allocating memory using memory home.
| h | Memory home | |
| sdp | SDP session description to be duplicated |
| sdp_session_t* sdp_session_dup_without_media | ( | su_home_t * | h, | |
| sdp_session_t const * | sdp | |||
| ) |
Duplicate an SDP session description without media descriptions.
The function sdp_session_dup() duplicates (deeply copies) an SDP session description sdp allocating memory using memory home. It does not copy the media descriptions, however.
| h | memory h | |
| sdp | SDP session description to be duplicated |
| sdp_time_t* sdp_time_dup | ( | su_home_t * | h, | |
| sdp_time_t const * | t | |||
| ) |
Duplicate an SDP time structure.
The function sdp_time_dup() duplicates (deeply copies) an SDP time description t allocating memory using memory home.
| h | Memory home | |
| t | SDP time description to be duplicated |
| sdp_zone_t* sdp_zone_dup | ( | su_home_t * | h, | |
| sdp_zone_t const * | z | |||
| ) |
Duplicate an SDP timezone structure.
The function sdp_zone_dup() duplicates (deeply copies) an SDP zone description z allocating memory using memory home.
| h | Memory home | |
| z | SDP zone description to be duplicated |