Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
0bf7d8d5
Commit
0bf7d8d5
authored
Oct 14, 2016
by
Simon Morlat
Browse files
add new ICE tests
parent
36c73a9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
16 deletions
+65
-16
coreapi/linphonecore.h
coreapi/linphonecore.h
+14
-6
coreapi/misc.c
coreapi/misc.c
+3
-7
mediastreamer2
mediastreamer2
+1
-1
tester/call_single_tester.c
tester/call_single_tester.c
+47
-2
No files found.
coreapi/linphonecore.h
View file @
0bf7d8d5
...
...
@@ -74,28 +74,36 @@ typedef struct _LinphoneCore LinphoneCore;
* Use with #LCSipTransports
* @ingroup initializing
*/
#define LC_SIP_TRANSPORT_RANDOM -1
#define LC_SIP_TRANSPORT_RANDOM (-1)
/**
* Don't create any server socket for this transport, ie don't bind on any port.
* Use with #LCSipTransports
* @ingroup initializing
**/
#define LC_SIP_TRANSPORT_DONTBIND (-2)
/**
* Linphone core SIP transport ports.
* Special values LC_SIP_TRANSPORT_RANDOM, LC_SIP_TRANSPORT_RANDOM, #define LC_SIP_TRANSPORT_DONTBIND can be used.
* Use with #linphone_core_set_sip_transports
* @ingroup initializing
*/
typedef
struct
_LCSipTransports
{
/**
*
udp port to listening on, negative value if not set
*
*/
*
SIP/UDP port.
**/
int
udp_port
;
/**
*
tcp port to listening on, negative value if not se
t
*
SIP/TCP por
t
* */
int
tcp_port
;
/**
*
dtls port to listening on, negative value if not se
t
*
SIP/DTLS por
t
* */
int
dtls_port
;
/**
*
tls port to listening on, negative value if not se
t
*
SIP/TLS por
t
* */
int
tls_port
;
}
LCSipTransports
;
...
...
coreapi/misc.c
View file @
0bf7d8d5
...
...
@@ -1915,13 +1915,9 @@ static void _create_ice_check_lists_and_parse_ice_attributes(LinphoneCall *call,
else
remote_family
=
AF_INET
;
if
(
strchr
(
addr
,
':'
)
!=
NULL
)
family
=
AF_INET6
;
else
family
=
AF_INET
;
if
(
remote_family
==
family
)
{
ice_add_losing_pair
(
cl
,
j
+
1
,
family
,
remote_candidate
->
addr
,
remote_candidate
->
port
,
addr
,
port
);
losing_pairs_added
=
TRUE
;
}
else
{
ms_error
(
"Cannot add ICE losing pair this local and remote candidates having different address families."
);
}
ice_add_losing_pair
(
cl
,
j
+
1
,
remote_family
,
remote_candidate
->
addr
,
remote_candidate
->
port
,
family
,
addr
,
port
);
losing_pairs_added
=
TRUE
;
}
if
(
losing_pairs_added
==
TRUE
)
ice_check_list_check_completed
(
cl
);
}
...
...
mediastreamer2
@
c79c2729
Subproject commit
4a5d8ead921dc66d8d309ea449998f7f6b0e0cbb
Subproject commit
c79c27297585f81a20bad994fc435a14722d43f8
tester/call_single_tester.c
View file @
0bf7d8d5
...
...
@@ -4911,7 +4911,49 @@ static void call_with_ice_in_ipv4_with_v6_enabled(void) {
marie
=
linphone_core_manager_new
(
"marie_v4proxy_rc"
);
pauline
=
linphone_core_manager_new
(
"pauline_v4proxy_rc"
);
_call_with_ice_base
(
pauline
,
marie
,
TRUE
,
TRUE
,
TRUE
,
FALSE
);
_call_with_ice_base
(
marie
,
pauline
,
TRUE
,
TRUE
,
TRUE
,
TRUE
);
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
else
ms_warning
(
"Test skipped, need both ipv6 and v4 available"
);
}
static
void
call_with_ice_ipv4_to_ipv6
(
void
)
{
LinphoneCoreManager
*
marie
;
LinphoneCoreManager
*
pauline
;
if
(
liblinphone_tester_ipv4_available
()
&&
liblinphone_tester_ipv6_available
()){
marie
=
linphone_core_manager_new
(
"marie_v4proxy_rc"
);
pauline
=
linphone_core_manager_new
(
"pauline_tcp_rc"
);
_call_with_ice_base
(
marie
,
pauline
,
TRUE
,
TRUE
,
TRUE
,
TRUE
);
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
else
ms_warning
(
"Test skipped, need both ipv6 and v4 available"
);
}
static
void
call_with_ice_ipv6_to_ipv4
(
void
)
{
LinphoneCoreManager
*
marie
;
LinphoneCoreManager
*
pauline
;
if
(
liblinphone_tester_ipv4_available
()
&&
liblinphone_tester_ipv6_available
()){
marie
=
linphone_core_manager_new
(
"marie_rc"
);
pauline
=
linphone_core_manager_new
(
"pauline_v4proxy_rc"
);
_call_with_ice_base
(
marie
,
pauline
,
TRUE
,
TRUE
,
TRUE
,
TRUE
);
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
else
ms_warning
(
"Test skipped, need both ipv6 and v4 available"
);
}
static
void
call_with_ice_ipv6_to_ipv6
(
void
)
{
LinphoneCoreManager
*
marie
;
LinphoneCoreManager
*
pauline
;
if
(
liblinphone_tester_ipv4_available
()
&&
liblinphone_tester_ipv6_available
()){
marie
=
linphone_core_manager_new
(
"marie_rc"
);
pauline
=
linphone_core_manager_new
(
"pauline_tcp_rc"
);
_call_with_ice_base
(
marie
,
pauline
,
TRUE
,
TRUE
,
TRUE
,
TRUE
);
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
else
ms_warning
(
"Test skipped, need both ipv6 and v4 available"
);
...
...
@@ -4934,7 +4976,10 @@ test_t call_tests[] = {
TEST_NO_TAG
(
"Direct call over IPv6"
,
direct_call_over_ipv6
),
TEST_NO_TAG
(
"Call IPv6 to IPv4 without relay"
,
v6_to_v4_call_without_relay
),
TEST_NO_TAG
(
"IPv6 call over NAT64"
,
v6_call_over_nat_64
),
TEST_NO_TAG
(
"Call with ICE in IPv4 with IPv6 enabled"
,
call_with_ice_in_ipv4_with_v6_enabled
),
TEST_ONE_TAG
(
"Call with ICE in IPv4 with IPv6 enabled"
,
call_with_ice_in_ipv4_with_v6_enabled
,
"ICE"
),
TEST_ONE_TAG
(
"Call with ICE IPv4 to IPv6"
,
call_with_ice_ipv4_to_ipv6
,
"ICE"
),
TEST_ONE_TAG
(
"Call with ICE IPv6 to IPv4"
,
call_with_ice_ipv6_to_ipv4
,
"ICE"
),
TEST_ONE_TAG
(
"Call with ICE IPv6 to IPv6"
,
call_with_ice_ipv6_to_ipv6
,
"ICE"
),
TEST_NO_TAG
(
"Outbound call with multiple proxy possible"
,
call_outbound_with_multiple_proxy
),
TEST_NO_TAG
(
"Audio call recording"
,
audio_call_recording_test
),
#if 0 /* not yet activated because not implemented */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment