Loading...
Searching...
No Matches
sdp.h
Go to the documentation of this file.
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SDP_H
#define SDP_H
#ifndef SU_ALLOC_H
#include <sofia-sip/su_alloc.h>
#endif
#ifndef SU_TYPES_H
#include <sofia-sip/su_types.h>
#endif
SOFIA_BEGIN_DECLS
typedef struct sdp_session_s sdp_session_t;
typedef unsigned long sdp_version_t;
typedef struct sdp_origin_s sdp_origin_t;
typedef struct sdp_connection_s sdp_connection_t;
typedef struct sdp_bandwidth_s sdp_bandwidth_t;
typedef struct sdp_time_s sdp_time_t;
typedef struct sdp_repeat_s sdp_repeat_t;
typedef struct sdp_zone_s sdp_zone_t;
typedef struct sdp_key_s sdp_key_t;
typedef struct sdp_attribute_s sdp_attribute_t;
typedef struct sdp_media_s sdp_media_t;
typedef struct sdp_list_s sdp_list_t;
typedef struct sdp_rtpmap_s sdp_rtpmap_t;
typedef char const sdp_text_t;
#define SDP_MIME_TYPE "application/sdp"
enum {
SDP_CURRENT_VERSION = 0
};
struct sdp_session_s
{
int sdp_size;
sdp_session_t *sdp_next;
sdp_version_t sdp_version[1];
sdp_origin_t *sdp_origin;
sdp_text_t *sdp_subject;
sdp_text_t *sdp_information;
sdp_text_t *sdp_uri;
sdp_list_t *sdp_emails;
sdp_list_t *sdp_phones;
sdp_connection_t *sdp_connection;
sdp_bandwidth_t *sdp_bandwidths;
sdp_time_t *sdp_time;
sdp_key_t *sdp_key;
sdp_attribute_t *sdp_attributes;
sdp_text_t *sdp_charset;
sdp_media_t *sdp_media;
};
struct sdp_origin_s
{
int o_size;
sdp_text_t *o_username;
uint64_t o_id;
uint64_t o_version;
sdp_connection_t *o_address;
};
typedef enum
{
sdp_net_x = 0,
sdp_net_in = 1
} sdp_nettype_e;
typedef enum
{
sdp_addr_x = 0,
sdp_addr_ip4 = 1,
sdp_addr_ip6 = 2,
} sdp_addrtype_e;
struct sdp_connection_s
{
int c_size;
sdp_connection_t *c_next;
sdp_nettype_e c_nettype;
sdp_addrtype_e c_addrtype;
sdp_text_t *c_address;
unsigned c_ttl : 8;
unsigned c_mcast : 1;
unsigned : 0;
unsigned c_groups;
};
typedef enum
{
sdp_bw_x,
sdp_bw_ct,
sdp_bw_as,
} sdp_bandwidth_e;
struct sdp_bandwidth_s
{
int b_size;
sdp_bandwidth_t *b_next;
sdp_bandwidth_e b_modifier;
sdp_text_t *b_modifier_name;
unsigned long b_value;
};
struct sdp_time_s
{
int t_size;
sdp_time_t *t_next;
unsigned long t_start;
unsigned long t_stop;
sdp_repeat_t *t_repeat;
sdp_zone_t *t_zone;
};
struct sdp_repeat_s
{
int r_size;
int r_number_of_offsets;
unsigned long r_interval;
unsigned long r_duration;
unsigned long r_offsets[1];
};
struct sdp_zone_s
{
int z_size;
int z_number_of_adjustments;
struct {
unsigned long z_at;
long z_offset;
} z_adjustments[1];
};
typedef enum {
sdp_key_x,
sdp_key_clear,
sdp_key_base64,
sdp_key_uri,
sdp_key_prompt
} sdp_key_method_e;
struct sdp_key_s
{
int k_size;
sdp_key_method_e k_method;
sdp_text_t *k_method_name;
sdp_text_t *k_material;
};
struct sdp_attribute_s {
int a_size;
sdp_attribute_t *a_next;
sdp_text_t *a_name;
sdp_text_t *a_value;
};
typedef enum
{
sdp_media_x = 0,
sdp_media_any,
sdp_media_audio,
sdp_media_video,
sdp_media_application,
sdp_media_data,
sdp_media_control,
sdp_media_message,
sdp_media_image,
sdp_media_red
} sdp_media_e;
typedef enum
{
sdp_proto_x = 0,
sdp_proto_tcp = 6,
sdp_proto_udp = 17,
sdp_proto_rtp = 256,
sdp_proto_srtp = 257,
sdp_proto_udptl = 258,
sdp_proto_tls = 511,
sdp_proto_any = 512
} sdp_proto_e;
typedef enum {
sdp_inactive = 0,
sdp_sendonly = 1,
sdp_recvonly = 2,
sdp_sendrecv = sdp_sendonly | sdp_recvonly
} sdp_mode_t;
struct sdp_media_s
{
int m_size;
sdp_media_t *m_next;
sdp_session_t *m_session;
sdp_media_e m_type;
sdp_text_t *m_type_name;
unsigned long m_port;
unsigned long m_number_of_ports;
sdp_proto_e m_proto;
sdp_text_t *m_proto_name;
sdp_list_t *m_format;
sdp_rtpmap_t *m_rtpmaps;
sdp_text_t *m_information;
sdp_connection_t *m_connections;
sdp_bandwidth_t *m_bandwidths;
sdp_key_t *m_key;
sdp_attribute_t *m_attributes;
void *m_user;
unsigned m_rejected : 1;
/* sdp_mode_t */ unsigned m_mode : 2;
unsigned : 0;
};
struct sdp_list_s
{
int l_size;
sdp_list_t *l_next;
sdp_text_t *l_text;
};
struct sdp_rtpmap_s {
int rm_size;
sdp_rtpmap_t *rm_next;
sdp_text_t *rm_encoding;
unsigned long rm_rate;
sdp_text_t *rm_params;
sdp_text_t *rm_fmtp;
unsigned rm_predef : 1;
unsigned rm_pt : 7;
unsigned rm_any : 1;
unsigned :0;
};
SOFIAPUBVAR sdp_rtpmap_t const * const sdp_rtpmap_well_known[128];
SOFIAPUBFUN sdp_session_t *sdp_session_dup(su_home_t *, sdp_session_t const *);
SOFIAPUBFUN
sdp_origin_t *sdp_origin_dup(su_home_t *, sdp_origin_t const *);
SOFIAPUBFUN
sdp_connection_t *sdp_connection_dup(su_home_t *, sdp_connection_t const *);
SOFIAPUBFUN
sdp_bandwidth_t *sdp_bandwidth_dup(su_home_t *, sdp_bandwidth_t const *);
SOFIAPUBFUN
sdp_time_t *sdp_time_dup(su_home_t *, sdp_time_t const *);
SOFIAPUBFUN
sdp_repeat_t *sdp_repeat_dup(su_home_t *, sdp_repeat_t const *);
SOFIAPUBFUN
sdp_zone_t *sdp_zone_dup(su_home_t *, sdp_zone_t const *);
SOFIAPUBFUN
sdp_key_t *sdp_key_dup(su_home_t *, sdp_key_t const *);
SOFIAPUBFUN
sdp_attribute_t *sdp_attribute_dup(su_home_t *, sdp_attribute_t const *);
SOFIAPUBFUN
sdp_media_t *sdp_media_dup(su_home_t *, sdp_media_t const *,
sdp_session_t *);
SOFIAPUBFUN
sdp_media_t *sdp_media_dup_all(su_home_t *, sdp_media_t const *,
sdp_session_t *);
SOFIAPUBFUN
sdp_list_t *sdp_list_dup(su_home_t *, sdp_list_t const *);
SOFIAPUBFUN
sdp_rtpmap_t *sdp_rtpmap_dup(su_home_t *, sdp_rtpmap_t const *);
SOFIAPUBFUN int sdp_session_cmp(sdp_session_t const *a,
sdp_session_t const *b);
SOFIAPUBFUN int sdp_origin_cmp(sdp_origin_t const *a,
sdp_origin_t const *b);
SOFIAPUBFUN int sdp_connection_cmp(sdp_connection_t const *,
sdp_connection_t const *b);
SOFIAPUBFUN int sdp_bandwidth_cmp(sdp_bandwidth_t const *a,
sdp_bandwidth_t const *b);
SOFIAPUBFUN int sdp_time_cmp(sdp_time_t const *a, sdp_time_t const *b);
/* Compare two repeat (r=) fields */
SOFIAPUBFUN int sdp_repeat_cmp(sdp_repeat_t const *a, sdp_repeat_t const *b);
/* Compare two zone (z=) fields */
SOFIAPUBFUN int sdp_zone_cmp(sdp_zone_t const *a, sdp_zone_t const *b);
SOFIAPUBFUN int sdp_key_cmp(sdp_key_t const *a, sdp_key_t const *b);
SOFIAPUBFUN int sdp_attribute_cmp(sdp_attribute_t const *,
sdp_attribute_t const *);
SOFIAPUBFUN int sdp_media_cmp(sdp_media_t const *, sdp_media_t const *);
SOFIAPUBFUN int sdp_rtpmap_cmp(sdp_rtpmap_t const *a, sdp_rtpmap_t const *b);
SOFIAPUBFUN int sdp_list_cmp(sdp_list_t const *a, sdp_list_t const *b);
SOFIAPUBFUN sdp_connection_t *sdp_media_connections(sdp_media_t const *m);
SOFIAPUBFUN int sdp_media_has_rtp(sdp_media_t const *m);
SOFIAPUBFUN void sdp_media_type(sdp_media_t *m, char const *s);
SOFIAPUBFUN void sdp_media_transport(sdp_media_t *m, char const *s);
SOFIAPUBFUN sdp_attribute_t *sdp_attribute_find(sdp_attribute_t const *a,
char const *name);
SOFIAPUBFUN sdp_attribute_t *sdp_attribute_find2(sdp_attribute_t const *a,
sdp_attribute_t const *a2,
char const *name);
SOFIAPUBFUN sdp_mode_t sdp_attribute_mode(sdp_attribute_t const *a,
sdp_mode_t defmode);
SOFIAPUBFUN sdp_attribute_t *sdp_attribute_by_mode(su_home_t *,
sdp_mode_t mode);
SOFIAPUBFUN
sdp_attribute_t *sdp_attribute_mapped_find(sdp_attribute_t const *a,
char const *name,
int pt, char **return_result);
SOFIAPUBFUN void sdp_attribute_append(sdp_attribute_t **list,
sdp_attribute_t const *a);
SOFIAPUBFUN int sdp_attribute_replace(sdp_attribute_t **list,
sdp_attribute_t *a,
sdp_attribute_t **return_replaced);
SOFIAPUBFUN sdp_attribute_t *sdp_attribute_remove(sdp_attribute_t **list,
char const *name);
/* Return 1 if m= line struct matches with given type and name */
SOFIAPUBFUN unsigned sdp_media_match(sdp_media_t const *m,
sdp_media_e type,
sdp_text_t *type_name,
sdp_proto_e proto,
sdp_text_t *proto_name);
SOFIAPUBFUN unsigned sdp_media_match_with(sdp_media_t const *a,
sdp_media_t const *b);
SOFIAPUBFUN 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);
SOFIAPUBFUN unsigned sdp_media_count_with(sdp_session_t const *sdp,
sdp_media_t const *m0);
SOFIAPUBFUN int sdp_media_uses_rtp(sdp_media_t const *m);
SOFIAPUBFUN int sdp_rtpmap_match(sdp_rtpmap_t const *, sdp_rtpmap_t const *);
SOFIAPUBFUN sdp_rtpmap_t *sdp_rtpmap_find_matching(sdp_rtpmap_t const *list,
sdp_rtpmap_t const *rm);
/* ======================================================================== */
enum sdp_parse_flags_e {
sdp_f_strict = 1,
sdp_f_anynet = 2,
sdp_f_realloc = 4,
sdp_f_all_rtpmaps = 8,
sdp_f_print_prefix = 16,
sdp_f_mode_0000 = 32,
sdp_f_insane = 64,
sdp_f_c_missing = 128,
sdp_f_config = 256,
sdp_f_mode_manual = 512,
sdp_f_mode_always = 1024
};
typedef struct sdp_parser_s sdp_parser_t;
typedef sdp_parser_t *sdp_parser;
SOFIAPUBFUN sdp_parser_t *sdp_parse(su_home_t *,
char const msg[], issize_t msgsize,
int flags);
SOFIAPUBFUN char const *sdp_parsing_error(sdp_parser_t *p);
SOFIAPUBFUN sdp_session_t *sdp_session(sdp_parser_t *p);
SOFIAPUBFUN void sdp_parser_free(sdp_parser_t *p);
SOFIAPUBFUN int sdp_sanity_check(sdp_parser_t *);
SOFIAPUBFUN su_home_t *sdp_parser_home(sdp_parser_t *);
/* ======================================================================== */
typedef struct sdp_printer_s sdp_printer_t;
typedef sdp_printer_t *sdp_printer;
SOFIAPUBFUN sdp_printer_t *sdp_print(su_home_t *, sdp_session_t const *,
char msgbuf[], isize_t maxmsgsize,
int flags);
SOFIAPUBFUN char const *sdp_printing_error(sdp_printer_t *p);
SOFIAPUBFUN char const *sdp_message(sdp_printer_t *p);
SOFIAPUBFUN isize_t sdp_message_size(sdp_printer_t *p);
SOFIAPUBFUN void sdp_printer_free(sdp_printer_t *p);
#define sdp_mapped_attribute_find sdp_attribute_mapped_find
#define sdp_free_parser sdp_parser_free
#define sdp_free_printer sdp_printer_free
SOFIA_END_DECLS
#endif /* SDP_H */
sdp_media_t
struct sdp_media_s sdp_media_t
SDP media "m=" line.
Definition sdp.h:65
sdp_connection_dup
sdp_connection_t * sdp_connection_dup(su_home_t *, sdp_connection_t const *)
Duplicate an SDP connection structure.
Definition sdp.c:210
sdp_rtpmap_find_matching
sdp_rtpmap_t * sdp_rtpmap_find_matching(sdp_rtpmap_t const *list, sdp_rtpmap_t const *rm)
Search for matching rtpmap from list.
Definition sdp.c:1878
sdp_bandwidth_cmp
int sdp_bandwidth_cmp(sdp_bandwidth_t const *a, sdp_bandwidth_t const *b)
Compare two bandwidth (b=) fields.
Definition sdp.c:1260
sdp_attribute_t
struct sdp_attribute_s sdp_attribute_t
SDP attribute "a=" line.
Definition sdp.h:63
sdp_repeat_dup
sdp_repeat_t * sdp_repeat_dup(su_home_t *, sdp_repeat_t const *)
Duplicate an SDP repeat structure.
Definition sdp.c:270
sdp_session_t
struct sdp_session_s sdp_session_t
SDP session description.
Definition sdp.h:45
sdp_attribute_append
void sdp_attribute_append(sdp_attribute_t **list, sdp_attribute_t const *a)
Append a attribute to a list of attributes.
Definition sdp.c:1656
sdp_print
sdp_printer_t * sdp_print(su_home_t *, sdp_session_t const *, char msgbuf[], isize_t maxmsgsize, int flags)
Print a SDP description.
Definition sdp_print.c:129
sdp_sanity_check
int sdp_sanity_check(sdp_parser_t *)
Validates that all mandatory fields exist.
Definition sdp_parse.c:555
sdp_parser_free
void sdp_parser_free(sdp_parser_t *p)
Free an SDP parser.
Definition sdp_parse.c:241
sdp_session_dup
sdp_session_t * sdp_session_dup(su_home_t *, sdp_session_t const *)
Duplicate an SDP session description structure.
Definition sdp.c:997
sdp_time_dup
sdp_time_t * sdp_time_dup(su_home_t *, sdp_time_t const *)
Duplicate an SDP time structure.
Definition sdp.c:250
sdp_key_cmp
int sdp_key_cmp(sdp_key_t const *a, sdp_key_t const *b)
Compare two key (k=) fields.
Definition sdp.c:1354
sdp_printer_free
void sdp_printer_free(sdp_printer_t *p)
Free a SDP printer.
Definition sdp_print.c:233
sdp_printer_t
struct sdp_printer_s sdp_printer_t
SDP printer handle.
Definition sdp.h:547
sdp_list_dup
sdp_list_t * sdp_list_dup(su_home_t *, sdp_list_t const *)
Duplicate a list structure.
Definition sdp.c:350
sdp_parser_t
struct sdp_parser_s sdp_parser_t
SDP parser handle.
Definition sdp.h:530
sdp_session_cmp
int sdp_session_cmp(sdp_session_t const *a, sdp_session_t const *b)
Compare two session descriptions.
Definition sdp.c:1162
sdp_media_has_rtp
int sdp_media_has_rtp(sdp_media_t const *m)
Check if media uses RTP as its transport protocol.
Definition sdp_parse.c:1412
sdp_attribute_dup
sdp_attribute_t * sdp_attribute_dup(su_home_t *, sdp_attribute_t const *)
Duplicate an SDP attribute structure.
Definition sdp.c:330
sdp_mode_t
sdp_mode_t
Session mode.
Definition sdp.h:251
sdp_zone_t
struct sdp_zone_s sdp_zone_t
SDP timezone "z=" line.
Definition sdp.h:59
sdp_rtpmap_cmp
int sdp_rtpmap_cmp(sdp_rtpmap_t const *a, sdp_rtpmap_t const *b)
Compare two rtpmap structures.
Definition sdp.c:1387
sdp_rtpmap_t
struct sdp_rtpmap_s sdp_rtpmap_t
SDP rtpmap attribute.
Definition sdp.h:69
sdp_attribute_remove
sdp_attribute_t * sdp_attribute_remove(sdp_attribute_t **list, char const *name)
Remove a named attribute from a list of attributes.
Definition sdp.c:1713
sdp_message
char const * sdp_message(sdp_printer_t *p)
Get encoded SDP message.
Definition sdp_print.c:201
sdp_rtpmap_match
int sdp_rtpmap_match(sdp_rtpmap_t const *, sdp_rtpmap_t const *)
Check if payload type, rtp rate and parameters match in rtpmaps.
Definition sdp.c:1840
sdp_nettype_e
sdp_nettype_e
Network type.
Definition sdp.h:113
sdp_net_x
@ sdp_net_x
Unknown network type.
Definition sdp.h:114
sdp_net_in
@ sdp_net_in
Internet.
Definition sdp.h:115
sdp_media_connections
sdp_connection_t * sdp_media_connections(sdp_media_t const *m)
Get connections of a media description.
Definition sdp.c:1517
sdp_origin_cmp
int sdp_origin_cmp(sdp_origin_t const *a, sdp_origin_t const *b)
Compare two origin fields.
Definition sdp.c:1218
sdp_media_type
void sdp_media_type(sdp_media_t *m, char const *s)
Set media type.
Definition sdp_parse.c:1359
sdp_attribute_find2
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.
Definition sdp.c:1542
sdp_parser_home
su_home_t * sdp_parser_home(sdp_parser_t *)
Obtain memory home used by parser.
Definition sdp_parse.c:193
sdp_media_count
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.
Definition sdp.c:1799
sdp_origin_dup
sdp_origin_t * sdp_origin_dup(su_home_t *, sdp_origin_t const *)
Duplicate an SDP origin structure.
Definition sdp.c:190
sdp_repeat_t
struct sdp_repeat_s sdp_repeat_t
SDP repeat "r=" line.
Definition sdp.h:57
sdp_attribute_mapped_find
sdp_attribute_t * sdp_attribute_mapped_find(sdp_attribute_t const *a, char const *name, int pt, char **return_result)
Find a mapped attribute.
Definition sdp.c:1618
sdp_text_t
char const sdp_text_t
Message text.
Definition sdp.h:72
sdp_media_dup_all
sdp_media_t * sdp_media_dup_all(su_home_t *, sdp_media_t const *, sdp_session_t *)
Duplicate a list of SDP media description structures.
Definition sdp.c:420
sdp_message_size
isize_t sdp_message_size(sdp_printer_t *p)
Get size of encoded SDP message.
Definition sdp_print.c:218
sdp_time_t
struct sdp_time_s sdp_time_t
SDP time "t=" line.
Definition sdp.h:55
sdp_media_count_with
unsigned sdp_media_count_with(sdp_session_t const *sdp, sdp_media_t const *m0)
Count matching media lines in SDP.
Definition sdp.c:1816
sdp_key_t
struct sdp_key_s sdp_key_t
SDP encryption key "k=" line.
Definition sdp.h:61
sdp_connection_cmp
int sdp_connection_cmp(sdp_connection_t const *, sdp_connection_t const *b)
Compare two connection fields.
Definition sdp.c:1240
sdp_attribute_replace
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.
Definition sdp.c:1676
sdp_repeat_cmp
int sdp_repeat_cmp(sdp_repeat_t const *a, sdp_repeat_t const *b)
Compare two repeat (r=) fields.
Definition sdp.c:1302
sdp_bandwidth_dup
sdp_bandwidth_t * sdp_bandwidth_dup(su_home_t *, sdp_bandwidth_t const *)
Duplicate an SDP bandwidth structure.
Definition sdp.c:230
sdp_zone_dup
sdp_zone_t * sdp_zone_dup(su_home_t *, sdp_zone_t const *)
Duplicate an SDP timezone structure.
Definition sdp.c:290
sdp_attribute_find
sdp_attribute_t * sdp_attribute_find(sdp_attribute_t const *a, char const *name)
Find named attribute from given list.
Definition sdp.c:1531
sdp_list_cmp
int sdp_list_cmp(sdp_list_t const *a, sdp_list_t const *b)
Compare two text lists.
Definition sdp.c:1424
sdp_key_dup
sdp_key_t * sdp_key_dup(su_home_t *, sdp_key_t const *)
Duplicate an SDP key structure.
Definition sdp.c:310
sdp_attribute_by_mode
sdp_attribute_t * sdp_attribute_by_mode(su_home_t *, sdp_mode_t mode)
Get session mode from attribute list.
Definition sdp.c:1578
sdp_bandwidth_t
struct sdp_bandwidth_s sdp_bandwidth_t
SDP bandwidth "b=" line.
Definition sdp.h:53
sdp_list_t
struct sdp_list_s sdp_list_t
SDP list ("e=", "p=" lines).
Definition sdp.h:67
sdp_printing_error
char const * sdp_printing_error(sdp_printer_t *p)
Get encoding error.
Definition sdp_print.c:180
sdp_parse_flags_e
sdp_parse_flags_e
Flags given to sdp_parse()/sdp_print().
Definition sdp.h:504
sdp_f_all_rtpmaps
@ sdp_f_all_rtpmaps
Include well-known rtpmaps in message, too.
Definition sdp.h:512
sdp_f_insane
@ sdp_f_insane
Don't run sanity check.
Definition sdp.h:518
sdp_f_print_prefix
@ sdp_f_print_prefix
Print buffer already contains a valid prefix.
Definition sdp.h:514
sdp_f_realloc
@ sdp_f_realloc
Reallocate message.
Definition sdp.h:510
sdp_f_strict
@ sdp_f_strict
Accept only conforming SDP.
Definition sdp.h:506
sdp_f_c_missing
@ sdp_f_c_missing
Don't require c= for each media line.
Definition sdp.h:520
sdp_f_mode_0000
@ sdp_f_mode_0000
Connection line with INADDR_ANY is considered equal to sendonly.
Definition sdp.h:516
sdp_f_mode_manual
@ sdp_f_mode_manual
Do not generate or parse SDP mode.
Definition sdp.h:524
sdp_f_mode_always
@ sdp_f_mode_always
Always generate media-level mode attributes.
Definition sdp.h:526
sdp_f_config
@ sdp_f_config
Parse SDP config files.
Definition sdp.h:522
sdp_f_anynet
@ sdp_f_anynet
Accept any network type.
Definition sdp.h:508
sdp_media_uses_rtp
int sdp_media_uses_rtp(sdp_media_t const *m)
Return true if media uses RTP.
Definition sdp.c:1830
sdp_zone_cmp
int sdp_zone_cmp(sdp_zone_t const *a, sdp_zone_t const *b)
Compare two zone (z=) fields.
Definition sdp.c:1328
sdp_media_transport
void sdp_media_transport(sdp_media_t *m, char const *s)
Set transport protocol.
Definition sdp_parse.c:1388
sdp_addrtype_e
sdp_addrtype_e
Address type.
Definition sdp.h:120
sdp_addr_ip6
@ sdp_addr_ip6
IPv6 address.
Definition sdp.h:123
sdp_addr_x
@ sdp_addr_x
Unknown address type.
Definition sdp.h:121
sdp_addr_ip4
@ sdp_addr_ip4
IPv4 address.
Definition sdp.h:122
sdp_media_dup
sdp_media_t * sdp_media_dup(su_home_t *, sdp_media_t const *, sdp_session_t *)
Duplicate an SDP media description structure.
Definition sdp.c:392
sdp_rtpmap_dup
sdp_rtpmap_t * sdp_rtpmap_dup(su_home_t *, sdp_rtpmap_t const *)
Duplicate an rtpmap structure.
Definition sdp.c:370
sdp_parsing_error
char const * sdp_parsing_error(sdp_parser_t *p)
Get a parsing error message.
Definition sdp_parse.c:229
sdp_connection_t
struct sdp_connection_s sdp_connection_t
SDP connection "c=" line.
Definition sdp.h:51
sdp_key_method_e
sdp_key_method_e
Mechanism to be used to obtain session key.
Definition sdp.h:195
sdp_key_base64
@ sdp_key_base64
Key is encoded with base64.
Definition sdp.h:198
sdp_key_clear
@ sdp_key_clear
Key is included untransformed.
Definition sdp.h:197
sdp_key_uri
@ sdp_key_uri
URI used to obtain a key.
Definition sdp.h:199
sdp_key_x
@ sdp_key_x
Unknown mechanism.
Definition sdp.h:196
sdp_key_prompt
@ sdp_key_prompt
No key is included, prompt user for key.
Definition sdp.h:200
sdp_bandwidth_e
sdp_bandwidth_e
Bandwdith type.
Definition sdp.h:142
sdp_bw_x
@ sdp_bw_x
Unknown bandwidth type.
Definition sdp.h:143
sdp_bw_ct
@ sdp_bw_ct
Conference total.
Definition sdp.h:144
sdp_bw_as
@ sdp_bw_as
Application-specific.
Definition sdp.h:145
sdp_attribute_mode
sdp_mode_t sdp_attribute_mode(sdp_attribute_t const *a, sdp_mode_t defmode)
Get session mode from attribute list.
Definition sdp.c:1561
sdp_media_cmp
int sdp_media_cmp(sdp_media_t const *, sdp_media_t const *)
Compare two media (m=) descriptions.
Definition sdp.c:1441
sdp_proto_e
sdp_proto_e
Media transport protocol.
Definition sdp.h:239
sdp_proto_srtp
@ sdp_proto_srtp
RTP/SAVP.
Definition sdp.h:244
sdp_proto_udp
@ sdp_proto_udp
Plain UDP.
Definition sdp.h:242
sdp_proto_tls
@ sdp_proto_tls
TLS over TCP.
Definition sdp.h:246
sdp_proto_any
@ sdp_proto_any
Definition sdp.h:247
sdp_proto_udptl
@ sdp_proto_udptl
UDPTL.
Definition sdp.h:245
sdp_proto_tcp
@ sdp_proto_tcp
TCP.
Definition sdp.h:241
sdp_proto_x
@ sdp_proto_x
Unknown transport.
Definition sdp.h:240
sdp_proto_rtp
@ sdp_proto_rtp
RTP/AVP.
Definition sdp.h:243
sdp_parse
sdp_parser_t * sdp_parse(su_home_t *, char const msg[], issize_t msgsize, int flags)
Parse an SDP message.
Definition sdp_parse.c:145
sdp_rtpmap_well_known
sdp_rtpmap_t const *const sdp_rtpmap_well_known[128]
Table of rtpmap structures by payload type numbers.
Definition sdp_parse.c:1458
sdp_version_t
unsigned long sdp_version_t
SDP version "v=" line.
Definition sdp.h:47
sdp_session
sdp_session_t * sdp_session(sdp_parser_t *p)
Retrieve an SDP session structure.
Definition sdp_parse.c:213
sdp_media_e
sdp_media_e
Media type.
Definition sdp.h:223
sdp_media_image
@ sdp_media_image
Image browsing sessions, e.g., JPIP or T.38.
Definition sdp.h:232
sdp_media_audio
@ sdp_media_audio
Audio.
Definition sdp.h:226
sdp_media_any
@ sdp_media_any
Definition sdp.h:225
sdp_media_data
@ sdp_media_data
Bulk data transfer.
Definition sdp.h:229
sdp_media_red
@ sdp_media_red
Redundancy.
Definition sdp.h:234
sdp_media_x
@ sdp_media_x
Unknown media.
Definition sdp.h:224
sdp_media_video
@ sdp_media_video
Video.
Definition sdp.h:227
sdp_media_message
@ sdp_media_message
Messaging sessions.
Definition sdp.h:231
sdp_media_application
@ sdp_media_application
Conferencing.
Definition sdp.h:228
sdp_media_control
@ sdp_media_control
Additional conference control.
Definition sdp.h:230
sdp_attribute_cmp
int sdp_attribute_cmp(sdp_attribute_t const *, sdp_attribute_t const *)
Compare two attribute (a=) fields.
Definition sdp.c:1372
sdp_origin_t
struct sdp_origin_s sdp_origin_t
SDP origin "o=" line.
Definition sdp.h:49
sdp_time_cmp
int sdp_time_cmp(sdp_time_t const *a, sdp_time_t const *b)
Compare two time fields.
Definition sdp.c:1282
sdp_attribute_s
Session or media attribute.
Definition sdp.h:214
sdp_attribute_s::a_value
sdp_text_t * a_value
Attribute value.
Definition sdp.h:218
sdp_attribute_s::a_next
sdp_attribute_t * a_next
Next attribute in list.
Definition sdp.h:216
sdp_attribute_s::a_name
sdp_text_t * a_name
Attribute name.
Definition sdp.h:217
sdp_attribute_s::a_size
int a_size
sizeof sdp_attribute_t
Definition sdp.h:215
sdp_bandwidth_s
Session or media bandwidth.
Definition sdp.h:150
sdp_bandwidth_s::b_value
unsigned long b_value
Bandwidth in kilobits per second.
Definition sdp.h:156
sdp_bandwidth_s::b_next
sdp_bandwidth_t * b_next
Next bw description in list.
Definition sdp.h:152
sdp_bandwidth_s::b_modifier_name
sdp_text_t * b_modifier_name
Modifier if not well-known.
Definition sdp.h:155
sdp_bandwidth_s::b_modifier
sdp_bandwidth_e b_modifier
Meaning of value (total, or per application).
Definition sdp.h:153
sdp_bandwidth_s::b_size
int b_size
Size fo sdp_bandwidth_t.
Definition sdp.h:151
sdp_connection_s
SDP connection - host or group address.
Definition sdp.h:128
sdp_connection_s::c_nettype
sdp_nettype_e c_nettype
Network type.
Definition sdp.h:131
sdp_connection_s::c_next
sdp_connection_t * c_next
Next connection in list.
Definition sdp.h:130
sdp_connection_s::c_mcast
unsigned c_mcast
True if multicast.
Definition sdp.h:135
sdp_connection_s::c_groups
unsigned c_groups
Number of groups (if multiple).
Definition sdp.h:137
sdp_connection_s::c_ttl
unsigned c_ttl
Time to live (scope).
Definition sdp.h:134
sdp_connection_s::c_size
int c_size
Size fo sdp_connection_t.
Definition sdp.h:129
sdp_connection_s::c_addrtype
sdp_addrtype_e c_addrtype
Address type.
Definition sdp.h:132
sdp_connection_s::c_address
sdp_text_t * c_address
Host or group address.
Definition sdp.h:133
sdp_key_s
Session key.
Definition sdp.h:206
sdp_key_s::k_method_name
sdp_text_t * k_method_name
Mechanism if not known.
Definition sdp.h:209
sdp_key_s::k_material
sdp_text_t * k_material
Encryption key.
Definition sdp.h:210
sdp_key_s::k_method
sdp_key_method_e k_method
Mechanism used to obtain key.
Definition sdp.h:208
sdp_key_s::k_size
int k_size
sizeof sdp_key_t
Definition sdp.h:207
sdp_list_s
Text list.
Definition sdp.h:299
sdp_list_s::l_size
int l_size
sizeof sdp_list_t
Definition sdp.h:300
sdp_list_s::l_next
sdp_list_t * l_next
Next text entry in list.
Definition sdp.h:301
sdp_list_s::l_text
sdp_text_t * l_text
Text as C string.
Definition sdp.h:302
sdp_media_s
Media announcement.
Definition sdp.h:269
sdp_media_s::m_size
int m_size
sizeof sdp_media_t
Definition sdp.h:270
sdp_media_s::m_key
sdp_key_t * m_key
Media key.
Definition sdp.h:285
sdp_media_s::m_rejected
unsigned m_rejected
Rejected media.
Definition sdp.h:291
sdp_media_s::m_session
sdp_session_t * m_session
Back-pointer to session level.
Definition sdp.h:272
sdp_media_s::m_mode
unsigned m_mode
Inactive, recvonly, sendonly, sendrecv.
Definition sdp.h:293
sdp_media_s::m_type
sdp_media_e m_type
Media type.
Definition sdp.h:274
sdp_media_s::m_connections
sdp_connection_t * m_connections
List of addresses used.
Definition sdp.h:283
sdp_media_s::m_information
sdp_text_t * m_information
Media information.
Definition sdp.h:282
sdp_media_s::m_type_name
sdp_text_t * m_type_name
Media type name.
Definition sdp.h:275
sdp_media_s::m_rtpmaps
sdp_rtpmap_t * m_rtpmaps
List of RTP maps.
Definition sdp.h:281
sdp_media_s::m_port
unsigned long m_port
Transport port number.
Definition sdp.h:276
sdp_media_s::m_proto_name
sdp_text_t * m_proto_name
Transport protocol name.
Definition sdp.h:279
sdp_media_s::m_attributes
sdp_attribute_t * m_attributes
Media attributes.
Definition sdp.h:286
sdp_media_s::m_proto
sdp_proto_e m_proto
Transport protocol.
Definition sdp.h:278
sdp_media_s::m_next
sdp_media_t * m_next
Next media announcement.
Definition sdp.h:271
sdp_media_s::m_number_of_ports
unsigned long m_number_of_ports
Number of ports (if multiple).
Definition sdp.h:277
sdp_media_s::m_user
void * m_user
User data.
Definition sdp.h:288
sdp_media_s::m_format
sdp_list_t * m_format
List of media formats.
Definition sdp.h:280
sdp_media_s::m_bandwidths
sdp_bandwidth_t * m_bandwidths
Bandwidth specification.
Definition sdp.h:284
sdp_origin_s
Session description identification.
Definition sdp.h:103
sdp_origin_s::o_size
int o_size
sizeof sdp_origin_t
Definition sdp.h:104
sdp_origin_s::o_username
sdp_text_t * o_username
Username of originator.
Definition sdp.h:105
sdp_origin_s::o_id
uint64_t o_id
Session identification.
Definition sdp.h:106
sdp_origin_s::o_version
uint64_t o_version
Version of session description.
Definition sdp.h:107
sdp_origin_s::o_address
sdp_connection_t * o_address
Address of originator.
Definition sdp.h:108
sdp_repeat_s
Description of repetition.
Definition sdp.h:172
sdp_repeat_s::r_duration
unsigned long r_duration
Duration of activation.
Definition sdp.h:178
sdp_repeat_s::r_offsets
unsigned long r_offsets[1]
List of offsets from start-time.
Definition sdp.h:179
sdp_repeat_s::r_size
int r_size
Size of structure including r_offsets[r_number_of_offsets].
Definition sdp.h:173
sdp_repeat_s::r_number_of_offsets
int r_number_of_offsets
Number of offsets in list.
Definition sdp.h:176
sdp_repeat_s::r_interval
unsigned long r_interval
Time between activations.
Definition sdp.h:177
sdp_rtpmap_s
Mapping from RTP payload to codec.
Definition sdp.h:314
sdp_rtpmap_s::rm_params
sdp_text_t * rm_params
Format-specific parameters.
Definition sdp.h:319
sdp_rtpmap_s::rm_fmtp
sdp_text_t * rm_fmtp
Contents of fmtp.
Definition sdp.h:320
sdp_rtpmap_s::rm_any
unsigned rm_any
Wildcard entry.
Definition sdp.h:323
sdp_rtpmap_s::rm_pt
unsigned rm_pt
Payload type.
Definition sdp.h:322
sdp_rtpmap_s::rm_encoding
sdp_text_t * rm_encoding
Codec name.
Definition sdp.h:317
sdp_rtpmap_s::rm_rate
unsigned long rm_rate
Sampling rate.
Definition sdp.h:318
sdp_rtpmap_s::rm_predef
unsigned rm_predef
is this entry well-known?
Definition sdp.h:321
sdp_rtpmap_s::rm_size
int rm_size
sizeof sdp_rtpmap_t
Definition sdp.h:315
sdp_rtpmap_s::rm_next
sdp_rtpmap_t * rm_next
Next RTP map entry.
Definition sdp.h:316
sdp_session_s
Session description.
Definition sdp.h:82
sdp_session_s::sdp_size
int sdp_size
sizeof sdp_session_t
Definition sdp.h:83
sdp_session_s::sdp_subject
sdp_text_t * sdp_subject
Session name.
Definition sdp.h:87
sdp_session_s::sdp_information
sdp_text_t * sdp_information
Session information.
Definition sdp.h:88
sdp_session_s::sdp_attributes
sdp_attribute_t * sdp_attributes
Session attributes.
Definition sdp.h:96
sdp_session_s::sdp_media
sdp_media_t * sdp_media
Media descriptors.
Definition sdp.h:98
sdp_session_s::sdp_emails
sdp_list_t * sdp_emails
E-mail address(s).
Definition sdp.h:90
sdp_session_s::sdp_uri
sdp_text_t * sdp_uri
URi of description.
Definition sdp.h:89
sdp_session_s::sdp_connection
sdp_connection_t * sdp_connection
Group (or member) address.
Definition sdp.h:92
sdp_session_s::sdp_key
sdp_key_t * sdp_key
Session key.
Definition sdp.h:95
sdp_session_s::sdp_charset
sdp_text_t * sdp_charset
SDP charset (default is UTF8).
Definition sdp.h:97
sdp_session_s::sdp_version
sdp_version_t sdp_version[1]
SDP version.
Definition sdp.h:85
sdp_session_s::sdp_next
sdp_session_t * sdp_next
Next description in list.
Definition sdp.h:84
sdp_session_s::sdp_origin
sdp_origin_t * sdp_origin
Owner/creator and session ID.
Definition sdp.h:86
sdp_session_s::sdp_time
sdp_time_t * sdp_time
Session active time.
Definition sdp.h:94
sdp_session_s::sdp_phones
sdp_list_t * sdp_phones
Phone number(s).
Definition sdp.h:91
sdp_session_s::sdp_bandwidths
sdp_bandwidth_t * sdp_bandwidths
Session bandwidth.
Definition sdp.h:93
sdp_time_s
Active time description.
Definition sdp.h:161
sdp_time_s::t_zone
sdp_zone_t * t_zone
Time Zone infromation.
Definition sdp.h:167
sdp_time_s::t_stop
unsigned long t_stop
Stop time (seconds since 1900).
Definition sdp.h:165
sdp_time_s::t_next
sdp_time_t * t_next
Next time description in list.
Definition sdp.h:163
sdp_time_s::t_size
int t_size
sizeof sdp_time_t in bytes
Definition sdp.h:162
sdp_time_s::t_repeat
sdp_repeat_t * t_repeat
Repeat information.
Definition sdp.h:166
sdp_time_s::t_start
unsigned long t_start
Start time (seconds since 1900).
Definition sdp.h:164
sdp_zone_s
Timezone.
Definition sdp.h:184
sdp_zone_s::z_size
int z_size
Size of structure including z_adjustments[z_number_of_adjustments].
Definition sdp.h:186
sdp_zone_s::z_offset
long z_offset
Adjustment offset.
Definition sdp.h:190
sdp_zone_s::z_adjustments
struct sdp_zone_s::@301016204364300373032346265053016031152123145152 z_adjustments[1]
List of timezone adjustments.
sdp_zone_s::z_number_of_adjustments
int z_number_of_adjustments
Number of adjustments in list.
Definition sdp.h:187
sdp_zone_s::z_at
unsigned long z_at
Adjustment time.
Definition sdp.h:189
su_alloc.h
su_home_t
SU_HOME_T su_home_t
SOFIAPUBFUN
#define SOFIAPUBFUN
SOFIAPUBVAR
#define SOFIAPUBVAR
su_types.h
uint64_t
SU_U64_T uint64_t

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.