3 Copyright (C) 2010 Simon MORLAT (simon.morlat@free.fr)
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #include "ortp/port.h"
23 #include "ortp/ortp_srtp.h"
25 #include <eXosip2/eXosip.h>
27 #define keywordcmp(key,b) strcmp(key,b)
31 static char *make_relay_session_id(const char *username, const char *relay){
32 /*ideally this should be a hash of the parameters with a random part*/
36 long long int res=((long long int)s1)<<32 | (long long int) s2;
38 b64_encode(src, sizeof(long long int), tmp, sizeof(tmp));
39 return osip_strdup(tmp);
43 static void add_relay_info(sdp_message_t *sdp, int mline, const char *relay, const char *relay_session_id){
45 if (relay) sdp_message_a_attribute_add(sdp, mline,
46 osip_strdup ("relay-addr"),osip_strdup(relay));
47 if (relay_session_id) sdp_message_a_attribute_add(sdp, mline,
48 osip_strdup ("relay-session-id"), osip_strdup(relay_session_id));
53 static char * int_2char(int a){
54 char *p=osip_malloc(16);
55 snprintf(p,16,"%i",a);
59 /* return the value of attr "field" for payload pt at line pos (field=rtpmap,fmtp...)*/
60 static const char *sdp_message_a_attr_value_get_with_pt(sdp_message_t *sdp,int pos,int pt,const char *field)
62 int i,tmppt=0,scanned=0;
64 sdp_attribute_t *attr;
65 for (i=0;(attr=sdp_message_attribute_get(sdp,pos,i))!=NULL;i++){
66 if (keywordcmp(field,attr->a_att_field)==0 && attr->a_att_value!=NULL){
67 int nb = sscanf(attr->a_att_value,"%i %n",&tmppt,&scanned);
68 /* the return value may depend on how %n is interpreted by the libc: see manpage*/
69 if (nb == 1 || nb==2 ){
71 tmp=attr->a_att_value+scanned;
75 }else ms_warning("sdp has a strange a= line (%s) nb=%i",attr->a_att_value,nb);
82 /* return the value of attr "field" */
83 static const char *sdp_message_a_attr_value_get(sdp_message_t *sdp,int pos,const char *field)
86 sdp_attribute_t *attr;
87 for (i=0;(attr=sdp_message_attribute_get(sdp,pos,i))!=NULL;i++){
88 if (keywordcmp(field,attr->a_att_field)==0 && attr->a_att_value!=NULL){
89 return attr->a_att_value;
96 static int _sdp_message_get_a_ptime(sdp_message_t *sdp, int mline){
98 sdp_attribute_t *attr;
99 for (i=0;(attr=sdp_message_attribute_get(sdp,mline,i))!=NULL;i++){
100 if (keywordcmp("ptime",attr->a_att_field)==0){
101 int nb = sscanf(attr->a_att_value,"%i",&ret);
102 /* the return value may depend on how %n is interpreted by the libc: see manpage*/
105 }else ms_warning("sdp has a strange a=ptime line (%s) ",attr->a_att_value);
111 static int _sdp_message_get_mline_dir(sdp_message_t *sdp, int mline){
113 sdp_attribute_t *attr;
114 for (i=0;(attr=sdp_message_attribute_get(sdp,mline,i))!=NULL;i++){
115 if (keywordcmp("sendrecv",attr->a_att_field)==0){
116 return SalStreamSendRecv;
117 }else if (keywordcmp("sendonly",attr->a_att_field)==0){
118 return SalStreamSendOnly;
119 }else if (keywordcmp("recvonly",attr->a_att_field)==0){
120 return SalStreamRecvOnly;
121 }else if (keywordcmp("inactive",attr->a_att_field)==0){
122 return SalStreamInactive;
125 return SalStreamSendRecv;
128 static sdp_message_t *create_generic_sdp(const SalMediaDescription *desc)
130 sdp_message_t *local;
134 const char *rtp_addr = desc->addr;
136 snprintf(sessid,16,"%i",desc->session_id);
137 snprintf(sessver,16,"%i",desc->session_ver);
138 sdp_message_init (&local);
139 if (strchr(desc->addr,':')!=NULL){
142 sdp_message_v_version_set (local, osip_strdup ("0"));
143 sdp_message_o_origin_set (local, osip_strdup (desc->username),
144 osip_strdup (sessid), osip_strdup (sessver),
145 osip_strdup ("IN"), inet6 ? osip_strdup("IP6") : osip_strdup ("IP4"),
146 osip_strdup (desc->addr));
147 sdp_message_s_name_set (local, osip_strdup ("Talk"));
148 /* Do not set the c= line to 0.0.0.0 if there is an ICE session. */
149 if((desc->ice_ufrag[0] != '\0') || !sal_media_description_has_dir (desc,SalStreamSendOnly))
151 sdp_message_c_connection_add (local, -1,
152 osip_strdup ("IN"), inet6 ? osip_strdup ("IP6") : osip_strdup ("IP4"),
153 osip_strdup (rtp_addr), NULL, NULL);
157 sdp_message_c_connection_add (local, -1,
158 osip_strdup ("IN"), inet6 ? osip_strdup ("IP6") : osip_strdup ("IP4"),
159 inet6 ? osip_strdup ("::0") : osip_strdup ("0.0.0.0"), NULL, NULL);
161 sdp_message_t_time_descr_add (local, osip_strdup ("0"), osip_strdup ("0"));
162 if (desc->bandwidth>0) sdp_message_b_bandwidth_add (local, -1, osip_strdup ("AS"),
163 int_2char(desc->bandwidth));
164 if (desc->ice_completed == TRUE) sdp_message_a_attribute_add(local, -1, osip_strdup("nortpproxy"), osip_strdup("yes"));
165 if (desc->ice_pwd[0] != '\0') sdp_message_a_attribute_add(local, -1, osip_strdup("ice-pwd"), osip_strdup(desc->ice_pwd));
166 if (desc->ice_ufrag[0] != '\0') sdp_message_a_attribute_add(local, -1, osip_strdup("ice-ufrag"), osip_strdup(desc->ice_ufrag));
172 static bool_t is_known_rtpmap(const PayloadType *pt){
173 switch(payload_type_get_number(pt)){
183 static void add_payload(sdp_message_t *msg, int line, const PayloadType *pt, bool_t strip_well_known_rtpmaps)
186 sdp_message_m_payload_add (msg,line, int_2char (payload_type_get_number(pt)));
188 if (!strip_well_known_rtpmaps || !is_known_rtpmap(pt)){
190 snprintf (attr,sizeof(attr),"%i %s/%i/%i", payload_type_get_number(pt),
191 pt->mime_type, pt->clock_rate,pt->channels);
193 snprintf (attr,sizeof(attr),"%i %s/%i", payload_type_get_number(pt),
194 pt->mime_type, pt->clock_rate);
195 sdp_message_a_attribute_add (msg, line,
196 osip_strdup ("rtpmap"), osip_strdup(attr));
199 if (pt->recv_fmtp != NULL)
201 snprintf (attr,sizeof(attr),"%i %s", payload_type_get_number(pt),pt->recv_fmtp);
202 sdp_message_a_attribute_add (msg, line, osip_strdup ("fmtp"),
207 static void add_ice_candidates(sdp_message_t *msg, int lineno, const SalStreamDescription *desc)
210 const SalIceCandidate *candidate;
214 for (i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_ICE_CANDIDATES; i++) {
215 candidate = &desc->ice_candidates[i];
216 if ((candidate->addr[0] == '\0') || (candidate->port == 0)) break;
217 nb = snprintf(buffer, sizeof(buffer), "%s %u UDP %u %s %d typ %s",
218 candidate->foundation, candidate->componentID, candidate->priority, candidate->addr, candidate->port, candidate->type);
220 ms_error("Cannot add ICE candidate attribute!");
223 if (candidate->raddr[0] != '\0') {
224 nb = snprintf(buffer + nb, sizeof(buffer) - nb, " raddr %s rport %d", candidate->raddr, candidate->rport);
226 ms_error("Cannot add ICE candidate attribute!");
230 sdp_message_a_attribute_add(msg, lineno, osip_strdup("candidate"), osip_strdup(buffer));
234 static void add_ice_remote_candidates(sdp_message_t *msg, int lineno, const SalStreamDescription *desc)
238 const SalIceRemoteCandidate *candidate;
243 for (i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_ICE_REMOTE_CANDIDATES; i++) {
244 candidate = &desc->ice_remote_candidates[i];
245 if ((candidate->addr[0] != '\0') && (candidate->port != 0)) {
246 offset = snprintf(ptr, buffer + sizeof(buffer) - ptr, "%s%d %s %d", (i > 0) ? " " : "", i + 1, candidate->addr, candidate->port);
248 ms_error("Cannot add ICE remote-candidates attribute!");
254 if (buffer[0] != '\0') sdp_message_a_attribute_add(msg, lineno, osip_strdup("remote-candidates"), osip_strdup(buffer));
257 static void add_line(sdp_message_t *msg, int lineno, const SalStreamDescription *desc){
260 const char *rtp_addr;
261 const char *rtcp_addr;
262 const char *dir="sendrecv";
265 bool_t strip_well_known_rtpmaps;
266 bool_t different_rtp_and_rtcp_addr;
268 switch (desc->type) {
279 rtp_addr=desc->rtp_addr;
280 rtcp_addr=desc->rtcp_addr;
281 rtp_port=desc->rtp_port;
282 rtcp_port=desc->rtcp_port;
284 if (desc->proto == SalProtoRtpSavp) {
287 sdp_message_m_media_add (msg, osip_strdup (mt),
288 int_2char (rtp_port), NULL,
289 osip_strdup ("RTP/SAVP"));
291 /* add crypto lines */
292 for(i=0; i<SAL_CRYPTO_ALGO_MAX; i++) {
294 switch (desc->crypto[i].algo) {
295 case AES_128_SHA1_80:
296 snprintf(buffer, 1024, "%d %s inline:%s",
297 desc->crypto[i].tag, "AES_CM_128_HMAC_SHA1_80", desc->crypto[i].master_key);
298 sdp_message_a_attribute_add(msg, lineno, osip_strdup("crypto"),
299 osip_strdup(buffer));
301 case AES_128_SHA1_32:
302 snprintf(buffer, 1024, "%d %s inline:%s",
303 desc->crypto[i].tag, "AES_CM_128_HMAC_SHA1_32", desc->crypto[i].master_key);
304 sdp_message_a_attribute_add(msg, lineno, osip_strdup("crypto"),
305 osip_strdup(buffer));
307 case AES_128_NO_AUTH:
308 ms_warning("Unsupported crypto suite: AES_128_NO_AUTH");
310 case NO_CIPHER_SHA1_80:
311 ms_warning("Unsupported crypto suite: NO_CIPHER_SHA1_80");
314 i = SAL_CRYPTO_ALGO_MAX;
319 sdp_message_m_media_add (msg, osip_strdup (mt),
320 int_2char (rtp_port), NULL,
321 osip_strdup ("RTP/AVP"));
325 /*only add a c= line within the stream description if address are differents*/
326 if (rtp_addr[0]!='\0' && strcmp(rtp_addr,sdp_message_c_addr_get(msg, -1, 0))!=0){
328 if (strchr(rtp_addr,':')!=NULL){
331 sdp_message_c_connection_add (msg, lineno,
332 osip_strdup ("IN"), inet6 ? osip_strdup ("IP6") : osip_strdup ("IP4"),
333 osip_strdup (rtp_addr), NULL, NULL);
336 if (desc->bandwidth>0) sdp_message_b_bandwidth_add (msg, lineno, osip_strdup ("AS"),
337 int_2char(desc->bandwidth));
338 if (desc->ptime>0) sdp_message_a_attribute_add(msg,lineno,osip_strdup("ptime"),
339 int_2char(desc->ptime));
340 strip_well_known_rtpmaps=ms_list_size(desc->payloads)>5;
342 for(elem=desc->payloads;elem!=NULL;elem=elem->next){
343 add_payload(msg, lineno, (PayloadType*)elem->data,strip_well_known_rtpmaps);
346 /* to comply with SDP we cannot have an empty payload type number list */
347 /* as it happens only when mline is declined with a zero port, it does not matter to put whatever codec*/
348 sdp_message_m_payload_add (msg,lineno, int_2char (0));
351 case SalStreamSendRecv:
355 case SalStreamRecvOnly:
358 case SalStreamSendOnly:
361 case SalStreamInactive:
365 if (dir) sdp_message_a_attribute_add (msg, lineno, osip_strdup (dir),NULL);
367 different_rtp_and_rtcp_addr = (rtcp_addr[0] != '\0') && (strcmp(rtp_addr, rtcp_addr) != 0);
368 if ((rtcp_port != (rtp_port + 1)) || (different_rtp_and_rtcp_addr == TRUE)) {
369 if (different_rtp_and_rtcp_addr == TRUE) {
371 snprintf(buffer, sizeof(buffer), "%u IN IP4 %s", rtcp_port, rtcp_addr);
372 sdp_message_a_attribute_add(msg, lineno, osip_strdup("rtcp"), osip_strdup(buffer));
374 sdp_message_a_attribute_add(msg, lineno, osip_strdup("rtcp"), int_2char(rtcp_port));
378 if (desc->ice_completed == TRUE) {
379 sdp_message_a_attribute_add(msg, lineno, osip_strdup("nortpproxy"), osip_strdup("yes"));
381 if (desc->ice_mismatch == TRUE) {
382 sdp_message_a_attribute_add(msg, lineno, osip_strdup("ice-mismatch"), NULL);
384 if (desc->rtp_port != 0) {
385 if (desc->ice_pwd[0] != '\0') sdp_message_a_attribute_add(msg, lineno, osip_strdup("ice-pwd"), osip_strdup(desc->ice_pwd));
386 if (desc->ice_ufrag[0] != '\0') sdp_message_a_attribute_add(msg, lineno, osip_strdup("ice-ufrag"), osip_strdup(desc->ice_ufrag));
387 add_ice_candidates(msg, lineno, desc);
388 add_ice_remote_candidates(msg, lineno, desc);
394 sdp_message_t *media_description_to_sdp(const SalMediaDescription *desc){
396 sdp_message_t *msg=create_generic_sdp(desc);
397 for(i=0;i<desc->n_total_streams;++i){
398 add_line(msg,i,&desc->streams[i]);
403 static int payload_type_fill_from_rtpmap(PayloadType *pt, const char *rtpmap){
405 PayloadType *refpt=rtp_profile_get_payload(&av_profile,payload_type_get_number(pt));
407 pt->mime_type=ms_strdup(refpt->mime_type);
408 pt->clock_rate=refpt->clock_rate;
410 ms_error("payload number %i has no rtpmap and is unknown in AV Profile, ignored.",
411 payload_type_get_number(pt));
415 char *mime=ms_strdup(rtpmap);
416 char *p=strchr(mime,'/');
425 pt->channels=atoi(chans);
426 }else pt->channels=1;
427 pt->clock_rate=atoi(p);
434 int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc){
436 const char *mtype,*proto,*rtp_port,*rtp_addr,*number;
438 sdp_bandwidth_t *sbw=NULL;
439 sdp_attribute_t *attr;
440 int nb_ice_candidates;
442 /* Get session information. */
443 sess = sdp_message_o_sess_id_get(msg);
444 if (sess) desc->session_id = strtoul(sess, NULL, 10);
445 sess = sdp_message_o_sess_version_get(msg);
446 if (sess) desc->session_ver = strtoul(sess, NULL, 10);
448 rtp_addr=sdp_message_c_addr_get (msg, -1, 0);
450 strncpy(desc->addr,rtp_addr,sizeof(desc->addr));
451 for(j=0;(sbw=sdp_message_bandwidth_get(msg,-1,j))!=NULL;++j){
452 if (strcasecmp(sbw->b_bwtype,"AS")==0) desc->bandwidth=atoi(sbw->b_bandwidth);
455 /* Get ICE remote ufrag and remote pwd, and ice_lite flag */
456 for (i = 0; (i < SAL_MEDIA_DESCRIPTION_MAX_MESSAGE_ATTRIBUTES) && ((attr = sdp_message_attribute_get(msg, -1, i)) != NULL); i++) {
457 if ((keywordcmp("ice-ufrag", attr->a_att_field) == 0) && (attr->a_att_value != NULL)) {
458 strncpy(desc->ice_ufrag, attr->a_att_value, sizeof(desc->ice_ufrag));
459 } else if ((keywordcmp("ice-pwd", attr->a_att_field) == 0) && (attr->a_att_value != NULL)) {
460 strncpy(desc->ice_pwd, attr->a_att_value, sizeof(desc->ice_pwd));
461 } else if (keywordcmp("ice-lite", attr->a_att_field) == 0) {
462 desc->ice_lite = TRUE;
466 desc->n_active_streams = 0;
468 /* for each m= line */
469 for (i=0; !sdp_message_endof_media (msg, i) && i<SAL_MEDIA_DESCRIPTION_MAX_STREAMS; i++)
471 SalStreamDescription *stream=&desc->streams[i];
472 nb_ice_candidates = 0;
474 memset(stream,0,sizeof(*stream));
475 mtype = sdp_message_m_media_get(msg, i);
476 proto = sdp_message_m_proto_get (msg, i);
477 rtp_port = sdp_message_m_port_get(msg, i);
478 stream->proto=SalProtoUnknown;
480 if (strcasecmp(proto,"RTP/AVP")==0)
481 stream->proto=SalProtoRtpAvp;
482 else if (strcasecmp(proto,"RTP/SAVP")==0){
483 stream->proto=SalProtoRtpSavp;
486 rtp_addr = sdp_message_c_addr_get (msg, i, 0);
487 if (rtp_addr != NULL)
488 strncpy(stream->rtp_addr,rtp_addr,sizeof(stream->rtp_addr));
490 stream->rtp_port=atoi(rtp_port);
491 if (stream->rtp_port > 0)
492 desc->n_active_streams++;
494 stream->ptime=_sdp_message_get_a_ptime(msg,i);
495 if (strcasecmp("audio", mtype) == 0){
496 stream->type=SalAudio;
497 }else if (strcasecmp("video", mtype) == 0){
498 stream->type=SalVideo;
500 stream->type=SalOther;
501 strncpy(stream->typeother,mtype,sizeof(stream->typeother)-1);
503 for(j=0;(sbw=sdp_message_bandwidth_get(msg,i,j))!=NULL;++j){
504 if (strcasecmp(sbw->b_bwtype,"AS")==0) stream->bandwidth=atoi(sbw->b_bandwidth);
506 stream->dir=_sdp_message_get_mline_dir(msg,i);
507 /* for each payload type */
508 for (j=0;((number=sdp_message_m_payload_get (msg, i,j)) != NULL); j++){
509 const char *rtpmap,*fmtp;
510 int ptn=atoi(number);
511 PayloadType *pt=payload_type_new();
512 payload_type_set_number(pt,ptn);
513 /* get the rtpmap associated to this codec, if any */
514 rtpmap=sdp_message_a_attr_value_get_with_pt(msg, i,ptn,"rtpmap");
515 if (payload_type_fill_from_rtpmap(pt,rtpmap)==0){
516 /* get the fmtp, if any */
517 fmtp=sdp_message_a_attr_value_get_with_pt(msg, i, ptn,"fmtp");
518 payload_type_set_send_fmtp(pt,fmtp);
519 stream->payloads=ms_list_append(stream->payloads,pt);
520 ms_message("Found payload %s/%i fmtp=%s",pt->mime_type,pt->clock_rate,
521 pt->send_fmtp ? pt->send_fmtp : "");
525 /* Get media specific RTCP attribute */
526 stream->rtcp_port = stream->rtp_port + 1;
527 snprintf(stream->rtcp_addr, sizeof(stream->rtcp_addr), "%s", stream->rtp_addr);
528 for (j = 0; ((attr = sdp_message_attribute_get(msg, i, j)) != NULL); j++) {
529 if ((keywordcmp("rtcp", attr->a_att_field) == 0) && (attr->a_att_value != NULL)) {
531 int nb = sscanf(attr->a_att_value, "%d IN IP4 %s", &stream->rtcp_port, tmp);
533 /* SDP rtcp attribute only contains the port */
534 } else if (nb == 2) {
535 strncpy(stream->rtcp_addr, tmp, sizeof(stream->rtcp_addr));
537 ms_warning("sdp has a strange a= line (%s) nb=%i", attr->a_att_value, nb);
542 /* read crypto lines if any */
543 if (stream->proto == SalProtoRtpSavp) {
544 int k, valid_count = 0;
546 memset(&stream->crypto, 0, sizeof(stream->crypto));
547 for (k=0;valid_count < SAL_CRYPTO_ALGO_MAX && (attr=sdp_message_attribute_get(msg,i,k))!=NULL;k++){
548 char tmp[256], tmp2[256];
549 if (keywordcmp("crypto",attr->a_att_field)==0 && attr->a_att_value!=NULL){
550 int nb = sscanf(attr->a_att_value, "%d %255s inline:%255s",
551 &stream->crypto[valid_count].tag,
554 ms_message("Found valid crypto line (tag:%d algo:'%s' key:'%s'",
555 stream->crypto[valid_count].tag,
559 if (strcmp(tmp, "AES_CM_128_HMAC_SHA1_80") == 0)
560 stream->crypto[valid_count].algo = AES_128_SHA1_80;
561 else if (strcmp(tmp, "AES_CM_128_HMAC_SHA1_32") == 0)
562 stream->crypto[valid_count].algo = AES_128_SHA1_32;
564 ms_warning("Failed to parse crypto-algo: '%s'", tmp);
565 stream->crypto[valid_count].algo = 0;
567 if (stream->crypto[valid_count].algo) {
568 strncpy(stream->crypto[valid_count].master_key, tmp2, 41);
569 stream->crypto[valid_count].master_key[40] = '\0';
570 ms_message("Found valid crypto line (tag:%d algo:'%s' key:'%s'",
571 stream->crypto[valid_count].tag,
573 stream->crypto[valid_count].master_key);
577 ms_warning("sdp has a strange a= line (%s) nb=%i",attr->a_att_value,nb);
581 ms_message("Found: %d valid crypto lines", valid_count);
584 /* Get ICE candidate attributes if any */
585 for (j = 0; (attr = sdp_message_attribute_get(msg, i, j)) != NULL; j++) {
586 if ((keywordcmp("candidate", attr->a_att_field) == 0) && (attr->a_att_value != NULL)) {
587 SalIceCandidate *candidate = &stream->ice_candidates[nb_ice_candidates];
588 int nb = sscanf(attr->a_att_value, "%s %u UDP %u %s %d typ %s raddr %s rport %d",
589 candidate->foundation, &candidate->componentID, &candidate->priority, candidate->addr, &candidate->port,
590 candidate->type, candidate->raddr, &candidate->rport);
591 if ((nb == 6) || (nb == 8)) nb_ice_candidates++;
592 else memset(candidate, 0, sizeof(*candidate));
593 } else if ((keywordcmp("remote-candidates", attr->a_att_field) == 0) && (attr->a_att_value != NULL)) {
594 SalIceRemoteCandidate candidate;
595 unsigned int componentID;
597 char *ptr = attr->a_att_value;
598 while (3 == sscanf(ptr, "%u %s %u%n", &componentID, candidate.addr, &candidate.port, &offset)) {
599 if ((componentID > 0) && (componentID <= SAL_MEDIA_DESCRIPTION_MAX_ICE_REMOTE_CANDIDATES)) {
600 SalIceRemoteCandidate *remote_candidate = &stream->ice_remote_candidates[componentID - 1];
601 strncpy(remote_candidate->addr, candidate.addr, sizeof(remote_candidate->addr));
602 remote_candidate->port = candidate.port;
605 if (ptr[offset] == ' ') ptr += 1;
607 } else if ((keywordcmp("ice-ufrag", attr->a_att_field) == 0) && (attr->a_att_value != NULL)) {
608 strncpy(stream->ice_ufrag, attr->a_att_value, sizeof(stream->ice_ufrag));
609 } else if ((keywordcmp("ice-pwd", attr->a_att_field) == 0) && (attr->a_att_value != NULL)) {
610 strncpy(stream->ice_pwd, attr->a_att_value, sizeof(stream->ice_pwd));
611 } else if (keywordcmp("ice-mismatch", attr->a_att_field) == 0) {
612 stream->ice_mismatch = TRUE;
616 desc->n_total_streams=i;