2 mediastreamer2 library - modular sound and video processing and streaming
3 Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org)
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.
24 #include "ortp/stun_udp.h"
25 #include "ortp/stun.h"
26 #include "ortp/ortp.h"
28 /* list of state for STUN connectivity check */
32 #define ICE_IN_PROGRESS 2 /* STUN request was sent */
33 #define ICE_SUCCEEDED 3
34 #define ICE_FAILED 4 /* no answer or unrecoverable failure */
38 /* mandatory attributes: draft 19 */
49 /* optionnal attributes: draft 19 */
50 char extension_attr[512]; /* *(SP extension-att-name SP extension-att-value) */
53 struct CandidatePair {
55 struct SdpCandidate local_candidate;
56 struct SdpCandidate remote_candidate;
57 long long pair_priority;
58 /* additionnal information */
61 int connectivity_check;
62 int retransmission_number;
63 uint64_t retransmission_time;
67 #define MAX_ICE_CANDIDATES 10
70 struct CandidatePair cand_pairs[MAX_ICE_CANDIDATES];
71 int nominated_pair_index;
73 char loc_ice_ufrag[256];
74 char loc_ice_pwd[256];
75 char rem_ice_ufrag[256];
76 char rem_ice_pwd[256];
79 uint64_t tiebreak_value;
81 #define ICE_CL_RUNNING 0
82 #define ICE_CL_COMPLETED 1
83 #define ICE_CL_FAILED 2
88 uint64_t keepalive_time;
91 #define MS_ICE_SET_SESSION MS_FILTER_METHOD(MS_ICE_ID,0,RtpSession*)
92 #define MS_ICE_SET_CANDIDATEPAIRS MS_FILTER_METHOD(MS_ICE_ID,1,struct CandidatePair*)
94 extern MSFilterDesc ms_ice_desc;