- Timestamp:
- Dec 28, 2016 3:40:07 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjnath/src/pjnath-test/ice_test.c
r4728 r5513 40 40 WRONG_TURN = 1, 41 41 DEL_ON_ERR = 2, 42 CLIENT_IPV4 = 4, 43 CLIENT_IPV6 = 8 42 44 }; 43 44 45 45 46 /* Test results */ 46 47 struct test_result 47 48 { 49 pj_status_t start_status; /* start ice successful? */ 48 50 pj_status_t init_status; /* init successful? */ 49 51 pj_status_t nego_status; /* negotiation successful? */ … … 102 104 struct sess_param *param; 103 105 104 test_server *server; 106 test_server *server1; /* Test server for IPv4. */ 107 test_server *server2; /* Test server for IPv6. */ 105 108 106 109 pj_thread_t *worker_threads[MAX_THREADS]; … … 122 125 static void destroy_sess(struct test_sess *sess, unsigned wait_msec); 123 126 127 #if USE_IPV6 128 129 static pj_bool_t enable_ipv6_test() 130 { 131 pj_sockaddr addr; 132 pj_bool_t retval = PJ_TRUE; 133 if (pj_gethostip(pj_AF_INET6(), &addr) == PJ_SUCCESS) { 134 const pj_in6_addr *a = &addr.ipv6.sin6_addr; 135 if (a->s6_addr[0] == 0xFE && (a->s6_addr[1] & 0xC0) == 0x80) { 136 retval = PJ_FALSE; 137 PJ_LOG(3,(THIS_FILE, INDENT "Skipping IPv6 test due to link-local " 138 "address")); 139 } 140 } else { 141 retval = PJ_FALSE; 142 PJ_LOG(3,(THIS_FILE, INDENT "Skipping IPv6 test due to fail getting " 143 "IPv6 address")); 144 } 145 return retval; 146 } 147 148 #endif 149 150 static void set_stun_turn_cfg(struct ice_ept *ept, 151 pj_ice_strans_cfg *ice_cfg, 152 char *serverip, 153 pj_bool_t use_ipv6) 154 { 155 if (ept->cfg.enable_stun & YES) { 156 unsigned stun_idx = ice_cfg->stun_tp_cnt++; 157 pj_ice_strans_stun_cfg_default(&ice_cfg->stun_tp[stun_idx]); 158 159 if ((ept->cfg.enable_stun & SRV) == SRV) { 160 ice_cfg->stun_tp[stun_idx].server = pj_str(SRV_DOMAIN); 161 } else { 162 ice_cfg->stun_tp[stun_idx].server = pj_str(serverip); 163 } 164 ice_cfg->stun_tp[stun_idx].port = STUN_SERVER_PORT; 165 166 ice_cfg->stun_tp[stun_idx].af = GET_AF(use_ipv6); 167 } 168 ice_cfg->stun.af = GET_AF(use_ipv6); 169 if (ept->cfg.enable_host == 0) { 170 ice_cfg->stun.max_host_cands = 0; 171 } else { 172 //ice_cfg.stun.no_host_cands = PJ_FALSE; 173 ice_cfg->stun.loop_addr = PJ_TRUE; 174 } 175 176 if (ept->cfg.enable_turn & YES) { 177 unsigned turn_idx = ice_cfg->turn_tp_cnt++; 178 pj_ice_strans_turn_cfg_default(&ice_cfg->turn_tp[turn_idx]); 179 180 if ((ept->cfg.enable_turn & SRV) == SRV) { 181 ice_cfg->turn_tp[turn_idx].server = pj_str(SRV_DOMAIN); 182 } else { 183 ice_cfg->turn_tp[turn_idx].server = pj_str(serverip); 184 } 185 ice_cfg->turn_tp[turn_idx].port = TURN_SERVER_PORT; 186 ice_cfg->turn_tp[turn_idx].conn_type = PJ_TURN_TP_UDP; 187 ice_cfg->turn_tp[turn_idx].auth_cred.type = PJ_STUN_AUTH_CRED_STATIC; 188 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.realm = 189 pj_str(SRV_DOMAIN); 190 if (ept->cfg.client_flag & WRONG_TURN) 191 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.username = 192 pj_str("xxx"); 193 else 194 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.username = 195 pj_str(TURN_USERNAME); 196 197 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.data_type = 198 PJ_STUN_PASSWD_PLAIN; 199 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.data = 200 pj_str(TURN_PASSWD); 201 202 ice_cfg->turn_tp[turn_idx].af = GET_AF(use_ipv6); 203 } 204 } 205 124 206 /* Create ICE stream transport */ 125 207 static int create_ice_strans(struct test_sess *test_sess, 126 struct ice_ept *ept, 208 struct ice_ept *ept, 127 209 pj_ice_strans **p_ice) 128 210 { … … 131 213 pj_ice_strans_cfg ice_cfg; 132 214 pj_sockaddr hostip; 133 char serverip[PJ_INET6_ADDRSTRLEN]; 215 char serveripv4[PJ_INET6_ADDRSTRLEN]; 216 char serveripv6[PJ_INET6_ADDRSTRLEN]; 134 217 pj_status_t status; 218 unsigned flag = (ept->cfg.client_flag)?ept->cfg.client_flag:CLIENT_IPV4; 135 219 136 220 status = pj_gethostip(pj_AF_INET(), &hostip); … … 138 222 return -1030; 139 223 140 pj_sockaddr_print(&hostip, serverip, sizeof(serverip), 0); 224 pj_sockaddr_print(&hostip, serveripv4, sizeof(serveripv4), 0); 225 226 if (flag & CLIENT_IPV6) { 227 status = pj_gethostip(pj_AF_INET6(), &hostip); 228 if (status != PJ_SUCCESS) 229 return -1031; 230 231 pj_sockaddr_print(&hostip, serveripv6, sizeof(serveripv6), 0); 232 } 141 233 142 234 /* Init callback structure */ … … 151 243 ice_cfg.resolver = test_sess->resolver; 152 244 153 if (ept->cfg.enable_stun & YES) { 154 if ((ept->cfg.enable_stun & SRV) == SRV) { 155 ice_cfg.stun.server = pj_str(SRV_DOMAIN); 156 } else { 157 ice_cfg.stun.server = pj_str(serverip); 158 } 159 ice_cfg.stun.port = STUN_SERVER_PORT; 160 } 161 162 if (ept->cfg.enable_host == 0) { 163 ice_cfg.stun.max_host_cands = 0; 164 } else { 165 //ice_cfg.stun.no_host_cands = PJ_FALSE; 166 ice_cfg.stun.loop_addr = PJ_TRUE; 167 } 168 169 170 if (ept->cfg.enable_turn & YES) { 171 if ((ept->cfg.enable_turn & SRV) == SRV) { 172 ice_cfg.turn.server = pj_str(SRV_DOMAIN); 173 } else { 174 ice_cfg.turn.server = pj_str(serverip); 175 } 176 ice_cfg.turn.port = TURN_SERVER_PORT; 177 ice_cfg.turn.conn_type = PJ_TURN_TP_UDP; 178 ice_cfg.turn.auth_cred.type = PJ_STUN_AUTH_CRED_STATIC; 179 ice_cfg.turn.auth_cred.data.static_cred.realm = pj_str(SRV_DOMAIN); 180 if (ept->cfg.client_flag & WRONG_TURN) 181 ice_cfg.turn.auth_cred.data.static_cred.username = pj_str("xxx"); 182 else 183 ice_cfg.turn.auth_cred.data.static_cred.username = pj_str(TURN_USERNAME); 184 ice_cfg.turn.auth_cred.data.static_cred.data_type = PJ_STUN_PASSWD_PLAIN; 185 ice_cfg.turn.auth_cred.data.static_cred.data = pj_str(TURN_PASSWD); 245 if (flag & CLIENT_IPV4) { 246 set_stun_turn_cfg(ept, &ice_cfg, serveripv4, PJ_FALSE); 247 } 248 249 if (flag & CLIENT_IPV6) { 250 set_stun_turn_cfg(ept, &ice_cfg, serveripv6, PJ_TRUE); 186 251 } 187 252 … … 216 281 pj_uint16_t ns_port; 217 282 unsigned flags; 218 pj_status_t status ;283 pj_status_t status = PJ_SUCCESS; 219 284 220 285 /* Create session structure */ … … 233 298 /* Create server */ 234 299 flags = server_flag; 235 status = create_test_server(stun_cfg, flags, SRV_DOMAIN, &sess->server); 300 if (flags & SERVER_IPV4) { 301 status = create_test_server(stun_cfg, (flags & ~SERVER_IPV6), 302 SRV_DOMAIN, &sess->server1); 303 } 304 305 if ((status == PJ_SUCCESS) && (flags & SERVER_IPV6)) { 306 status = create_test_server(stun_cfg, (flags & ~SERVER_IPV4), 307 SRV_DOMAIN, &sess->server2); 308 } 309 236 310 if (status != PJ_SUCCESS) { 237 311 app_perror(INDENT "error: create_test_server()", status); … … 239 313 return -10; 240 314 } 241 sess->server->turn_respond_allocate = 242 sess->server->turn_respond_refresh = PJ_TRUE; 315 if (flags & SERVER_IPV4) { 316 sess->server1->turn_respond_allocate = 317 sess->server1->turn_respond_refresh = PJ_TRUE; 318 } 319 320 if (flags & SERVER_IPV6) { 321 sess->server2->turn_respond_allocate = 322 sess->server2->turn_respond_refresh = PJ_TRUE; 323 } 243 324 244 325 /* Create resolver */ 245 status = pj_dns_resolver_create(mem, NULL, 0, stun_cfg->timer_heap, 246 stun_cfg->ioqueue, &sess->resolver); 247 if (status != PJ_SUCCESS) { 248 app_perror(INDENT "error: pj_dns_resolver_create()", status); 249 destroy_sess(sess, 500); 250 return -20; 251 } 252 253 ns_ip = pj_str("127.0.0.1"); 254 ns_port = (pj_uint16_t)DNS_SERVER_PORT; 255 status = pj_dns_resolver_set_ns(sess->resolver, 1, &ns_ip, &ns_port); 256 if (status != PJ_SUCCESS) { 257 app_perror( INDENT "error: pj_dns_resolver_set_ns()", status); 258 destroy_sess(sess, 500); 259 return -21; 326 if ((sess->callee.cfg.enable_stun & SRV)==SRV || 327 (sess->callee.cfg.enable_turn & SRV)==SRV || 328 (sess->caller.cfg.enable_stun & SRV)==SRV || 329 (sess->caller.cfg.enable_turn & SRV)==SRV) 330 { 331 status = pj_dns_resolver_create(mem, NULL, 0, stun_cfg->timer_heap, 332 stun_cfg->ioqueue, &sess->resolver); 333 if (status != PJ_SUCCESS) { 334 app_perror(INDENT "error: pj_dns_resolver_create()", status); 335 destroy_sess(sess, 500); 336 return -20; 337 } 338 339 ns_ip = (flags & SERVER_IPV6)?pj_str("::1"):pj_str("127.0.0.1"); 340 ns_port = (pj_uint16_t)DNS_SERVER_PORT; 341 status = pj_dns_resolver_set_ns(sess->resolver, 1, &ns_ip, &ns_port); 342 if (status != PJ_SUCCESS) { 343 app_perror(INDENT "error: pj_dns_resolver_set_ns()", status); 344 destroy_sess(sess, 500); 345 return -21; 346 } 260 347 } 261 348 … … 306 393 } 307 394 308 if (sess->server) { 309 destroy_test_server(sess->server); 310 sess->server = NULL; 395 if (sess->server1) { 396 destroy_test_server(sess->server1); 397 sess->server1 = NULL; 398 } 399 400 if (sess->server2) { 401 destroy_test_server(sess->server2); 402 sess->server2 = NULL; 311 403 } 312 404 … … 385 477 status = pj_ice_strans_start_ice(ept->ice, &remote->ufrag, &remote->pass, 386 478 rcand_cnt, rcand); 387 if (status != PJ_SUCCESS) { 479 480 if (status != ept->cfg.expected.start_status) { 388 481 app_perror(INDENT "err: pj_ice_strans_start_ice()", status); 389 482 return status; 390 483 } 391 484 392 return PJ_SUCCESS;485 return status; 393 486 } 394 487 … … 499 592 unsigned i; 500 593 int rc; 501 502 PJ_LOG(3,(THIS_FILE, INDENT "%s", title)); 594 char add_title1[16]; 595 char add_title2[16]; 596 pj_bool_t client_mix_test = ((callee_cfg->client_flag & 597 (CLIENT_IPV4+CLIENT_IPV6)) != 598 (caller_cfg->client_flag & 599 (CLIENT_IPV4+CLIENT_IPV6))); 600 601 sprintf(add_title1, "%s%s%s", (server_flag & SERVER_IPV4)?"IPv4":"", 602 ((server_flag & SERVER_IPV4)&&(server_flag & SERVER_IPV6))?"+":"", 603 (server_flag & SERVER_IPV6)?"IPv6":""); 604 605 sprintf(add_title2, "%s", client_mix_test?"Mix test":""); 606 607 PJ_LOG(3,(THIS_FILE, INDENT "%s (%s) %s", title, add_title1, add_title2)); 503 608 504 609 capture_pjlib_state(stun_cfg, &pjlib_state); 505 610 506 rc = create_sess(stun_cfg, server_flag, caller_cfg, callee_cfg, test_param, &sess); 611 rc = create_sess(stun_cfg, server_flag, caller_cfg, callee_cfg, test_param, 612 &sess); 507 613 if (rc != 0) 508 614 return rc; … … 558 664 rc = start_ice(&sess->callee, &sess->caller); 559 665 if (rc != PJ_SUCCESS) { 560 destroy_sess(sess, 500); 561 return -120; 666 int retval = (rc == sess->callee.cfg.expected.start_status)?0:-120; 667 destroy_sess(sess, 500); 668 return retval; 562 669 } 563 670 /* Wait for callee's answer_delay */ … … 566 673 rc = start_ice(&sess->caller, &sess->callee); 567 674 if (rc != PJ_SUCCESS) { 568 destroy_sess(sess, 500); 569 return -130; 675 int retval = (rc == sess->caller.cfg.expected.start_status)?0:-130; 676 destroy_sess(sess, 500); 677 return retval; 570 678 } 571 679 … … 664 772 } 665 773 774 static void set_client_server_flag(unsigned server_flag, 775 unsigned caller_flag, 776 unsigned callee_flag, 777 unsigned *res_server_flag, 778 unsigned *res_caller_flag, 779 unsigned *res_callee_flag) 780 { 781 enum { 782 RST_CLT_FLAG = CLIENT_IPV4+CLIENT_IPV6, 783 RST_SRV_FLAG = SERVER_IPV4+SERVER_IPV6 784 }; 785 786 *res_server_flag = (*res_server_flag & ~RST_SRV_FLAG) | server_flag; 787 *res_caller_flag = (*res_caller_flag & ~RST_CLT_FLAG) | caller_flag; 788 *res_callee_flag = (*res_callee_flag & ~RST_CLT_FLAG) | callee_flag; 789 } 790 666 791 static int perform_test(const char *title, 667 792 pj_stun_config *stun_cfg, … … 671 796 { 672 797 struct sess_param test_param; 798 int rc; 799 int expected_caller_start_ice = caller_cfg->expected.start_status; 800 int expected_callee_start_ice = callee_cfg->expected.start_status; 801 802 set_client_server_flag(SERVER_IPV4, CLIENT_IPV4, CLIENT_IPV4, 803 &server_flag, &caller_cfg->client_flag, 804 &callee_cfg->client_flag); 805 673 806 674 807 pj_bzero(&test_param, sizeof(test_param)); 675 return perform_test2(title, stun_cfg, server_flag, caller_cfg, 676 callee_cfg, &test_param); 808 809 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 810 callee_cfg, &test_param); 811 812 #if USE_IPV6 813 if (enable_ipv6_test()) { 814 815 /* Test for IPV6. */ 816 if (rc == PJ_SUCCESS) { 817 pj_bzero(&test_param, sizeof(test_param)); 818 set_client_server_flag(SERVER_IPV6, CLIENT_IPV6, CLIENT_IPV6, 819 &server_flag, &caller_cfg->client_flag, 820 &callee_cfg->client_flag); 821 822 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 823 callee_cfg, &test_param); 824 } 825 826 /* Test for IPV4+IPV6. */ 827 if (rc == PJ_SUCCESS) { 828 pj_bzero(&test_param, sizeof(test_param)); 829 set_client_server_flag(SERVER_IPV4+SERVER_IPV6, 830 CLIENT_IPV4+CLIENT_IPV6, 831 CLIENT_IPV4+CLIENT_IPV6, 832 &server_flag, 833 &caller_cfg->client_flag, 834 &callee_cfg->client_flag); 835 836 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 837 callee_cfg, &test_param); 838 } 839 840 /* Test controller(IPV4) vs controlled(IPV6). */ 841 if (rc == PJ_SUCCESS) { 842 pj_bzero(&test_param, sizeof(test_param)); 843 set_client_server_flag(SERVER_IPV4+SERVER_IPV6, 844 CLIENT_IPV4, 845 CLIENT_IPV6, 846 &server_flag, 847 &caller_cfg->client_flag, 848 &callee_cfg->client_flag); 849 caller_cfg->expected.start_status = PJ_ENOTFOUND; 850 callee_cfg->expected.start_status = PJ_ENOTFOUND; 851 852 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 853 callee_cfg, &test_param); 854 } 855 } 856 #endif 857 callee_cfg->expected.start_status = expected_callee_start_ice; 858 caller_cfg->expected.start_status = expected_caller_start_ice; 859 860 return rc; 677 861 } 678 862 … … 696 880 { 697 881 "hosts candidates only", 698 0x FFFF,699 {ROLE1, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},700 {ROLE2, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}882 0x1FFF, 883 {ROLE1, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 884 {ROLE2, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 701 885 }, 702 886 { 703 887 "host and srflxes", 704 0x FFFF,705 {ROLE1, 1, YES, YES, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},706 {ROLE2, 1, YES, YES, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}888 0x1FFF, 889 {ROLE1, 1, YES, YES, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 890 {ROLE2, 1, YES, YES, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 707 891 }, 708 892 { 709 893 "host vs relay", 710 0x FFFF,711 {ROLE1, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},712 {ROLE2, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}894 0x1FFF, 895 {ROLE1, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 896 {ROLE2, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 713 897 }, 714 898 { 715 899 "relay vs host", 716 0x FFFF,717 {ROLE1, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},718 {ROLE2, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}900 0x1FFF, 901 {ROLE1, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 902 {ROLE2, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 719 903 }, 720 904 { 721 905 "relay vs relay", 722 0x FFFF,723 {ROLE1, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},724 {ROLE2, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}906 0x1FFF, 907 {ROLE1, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 908 {ROLE2, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 725 909 }, 726 910 { 727 911 "all candidates", 728 0x FFFF,729 {ROLE1, 1, YES, YES, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},730 {ROLE2, 1, YES, YES, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}912 0x1FFF, 913 {ROLE1, 1, YES, YES, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 914 {ROLE2, 1, YES, YES, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 731 915 }, 732 916 }; … … 746 930 0x0, 747 931 /* Role comp# host? stun? turn? flag? ans_del snd_del des_del */ 748 {ROLE1, 1, YES, NO, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},749 {ROLE2, 1, YES, NO, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}932 {ROLE1, 1, YES, NO, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 933 {ROLE2, 1, YES, NO, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 750 934 }; 751 935 … … 771 955 0xFFFF, 772 956 /* Role comp# host? stun? turn? flag? ans_del snd_del des_del */ 773 {ROLE1, 1, YES, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},774 {ROLE2, 1, YES, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}957 {ROLE1, 1, YES, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 958 {ROLE2, 1, YES, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 775 959 }; 776 960 … … 797 981 0xFFFF, 798 982 /* Role comp# host? stun? turn? flag? ans_del snd_del des_del */ 799 {ROLE1, 1, NO, NO, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }},800 {ROLE2, 1, NO, NO, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS }}983 {ROLE1, 1, NO, NO, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 984 {ROLE2, 1, NO, NO, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 801 985 }; 802 986 … … 823 1007 0x0, 824 1008 /* Role comp# host? stun? turn? flag? ans_del snd_del des_del */ 825 {ROLE1, 2, NO, YES, NO, 0, 0, 0, 0, {PJ NATH_ESTUNTIMEDOUT, -1}},826 {ROLE2, 2, NO, YES, NO, 0, 0, 0, 0, {PJ NATH_ESTUNTIMEDOUT, -1}}1009 {ROLE1, 2, NO, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}}, 1010 {ROLE2, 2, NO, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}} 827 1011 }; 828 1012 … … 849 1033 0xFFFF, 850 1034 /* Role comp# host? stun? turn? flag? ans_del snd_del des_del */ 851 {ROLE1, 2, NO, NO, YES, WRONG_TURN, 0, 0, 0, {PJ_S TATUS_FROM_STUN_CODE(401), -1}},852 {ROLE2, 2, NO, NO, YES, WRONG_TURN, 0, 0, 0, {PJ_S TATUS_FROM_STUN_CODE(401), -1}}1035 {ROLE1, 2, NO, NO, YES, WRONG_TURN, 0, 0, 0, {PJ_SUCCESS, PJ_STATUS_FROM_STUN_CODE(401), -1}}, 1036 {ROLE2, 2, NO, NO, YES, WRONG_TURN, 0, 0, 0, {PJ_SUCCESS, PJ_STATUS_FROM_STUN_CODE(401), -1}} 853 1037 }; 854 1038 … … 876 1060 0xFFFF & (~(CREATE_STUN_SERVER)), 877 1061 /* Role comp# host? stun? turn? flag? ans_del snd_del des_del */ 878 {ROLE1, 1, YES, YES, YES, 0, 0, 0, 0, {PJ NATH_ESTUNTIMEDOUT, -1}},879 {ROLE2, 1, YES, YES, YES, 0, 0, 0, 0, {PJ NATH_ESTUNTIMEDOUT, -1}}1062 {ROLE1, 1, YES, YES, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}}, 1063 {ROLE2, 1, YES, YES, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}} 880 1064 }; 881 1065 … … 970 1154 { 971 1155 "Concurrency test", 972 0x FFFF,1156 0x1FFF, 973 1157 /* Role comp# host? stun? turn? flag? ans_del snd_del des_del */ 974 {ROLE1, 1, YES, YES, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS}},975 {ROLE2, 1, YES, YES, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS}}1158 {ROLE1, 1, YES, YES, YES, CLIENT_IPV4, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 1159 {ROLE2, 1, YES, YES, YES, CLIENT_IPV4, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 976 1160 }; 977 1161 struct sess_param test_param;
Note: See TracChangeset
for help on using the changeset viewer.