Changeset 5350 for pjproject/trunk/pjnath/src/pjnath-test/ice_test.c
- Timestamp:
- Jun 21, 2016 6:55:10 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath-test/ice_test.c
r4728 r5350 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 static void set_stun_turn_cfg(struct ice_ept *ept, 128 pj_ice_strans_cfg *ice_cfg, 129 char *serverip, 130 pj_bool_t use_ipv6) 131 { 132 if (ept->cfg.enable_stun & YES) { 133 unsigned stun_idx = ice_cfg->stun_tp_cnt++; 134 pj_ice_strans_stun_cfg_default(&ice_cfg->stun_tp[stun_idx]); 135 136 if ((ept->cfg.enable_stun & SRV) == SRV) { 137 ice_cfg->stun_tp[stun_idx].server = pj_str(SRV_DOMAIN); 138 } else { 139 ice_cfg->stun_tp[stun_idx].server = pj_str(serverip); 140 } 141 ice_cfg->stun_tp[stun_idx].port = STUN_SERVER_PORT; 142 143 ice_cfg->stun_tp[stun_idx].af = GET_AF(use_ipv6); 144 } 145 ice_cfg->stun.af = GET_AF(use_ipv6); 146 if (ept->cfg.enable_host == 0) { 147 ice_cfg->stun.max_host_cands = 0; 148 } else { 149 //ice_cfg.stun.no_host_cands = PJ_FALSE; 150 ice_cfg->stun.loop_addr = PJ_TRUE; 151 } 152 153 if (ept->cfg.enable_turn & YES) { 154 unsigned turn_idx = ice_cfg->turn_tp_cnt++; 155 pj_ice_strans_turn_cfg_default(&ice_cfg->turn_tp[turn_idx]); 156 157 if ((ept->cfg.enable_turn & SRV) == SRV) { 158 ice_cfg->turn_tp[turn_idx].server = pj_str(SRV_DOMAIN); 159 } else { 160 ice_cfg->turn_tp[turn_idx].server = pj_str(serverip); 161 } 162 ice_cfg->turn_tp[turn_idx].port = TURN_SERVER_PORT; 163 ice_cfg->turn_tp[turn_idx].conn_type = PJ_TURN_TP_UDP; 164 ice_cfg->turn_tp[turn_idx].auth_cred.type = PJ_STUN_AUTH_CRED_STATIC; 165 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.realm = 166 pj_str(SRV_DOMAIN); 167 if (ept->cfg.client_flag & WRONG_TURN) 168 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.username = 169 pj_str("xxx"); 170 else 171 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.username = 172 pj_str(TURN_USERNAME); 173 174 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.data_type = 175 PJ_STUN_PASSWD_PLAIN; 176 ice_cfg->turn_tp[turn_idx].auth_cred.data.static_cred.data = 177 pj_str(TURN_PASSWD); 178 179 ice_cfg->turn_tp[turn_idx].af = GET_AF(use_ipv6); 180 } 181 } 182 124 183 /* Create ICE stream transport */ 125 184 static int create_ice_strans(struct test_sess *test_sess, 126 struct ice_ept *ept, 185 struct ice_ept *ept, 127 186 pj_ice_strans **p_ice) 128 187 { … … 131 190 pj_ice_strans_cfg ice_cfg; 132 191 pj_sockaddr hostip; 133 char serverip[PJ_INET6_ADDRSTRLEN]; 192 char serveripv4[PJ_INET6_ADDRSTRLEN]; 193 char serveripv6[PJ_INET6_ADDRSTRLEN]; 134 194 pj_status_t status; 195 unsigned flag = (ept->cfg.client_flag)?ept->cfg.client_flag:CLIENT_IPV4; 135 196 136 197 status = pj_gethostip(pj_AF_INET(), &hostip); … … 138 199 return -1030; 139 200 140 pj_sockaddr_print(&hostip, serverip, sizeof(serverip), 0); 201 pj_sockaddr_print(&hostip, serveripv4, sizeof(serveripv4), 0); 202 203 if (flag & CLIENT_IPV6) { 204 status = pj_gethostip(pj_AF_INET6(), &hostip); 205 if (status != PJ_SUCCESS) 206 return -1031; 207 208 pj_sockaddr_print(&hostip, serveripv6, sizeof(serveripv6), 0); 209 } 141 210 142 211 /* Init callback structure */ … … 151 220 ice_cfg.resolver = test_sess->resolver; 152 221 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); 222 if (flag & CLIENT_IPV4) { 223 set_stun_turn_cfg(ept, &ice_cfg, serveripv4, PJ_FALSE); 224 } 225 226 if (flag & CLIENT_IPV6) { 227 set_stun_turn_cfg(ept, &ice_cfg, serveripv6, PJ_TRUE); 186 228 } 187 229 … … 216 258 pj_uint16_t ns_port; 217 259 unsigned flags; 218 pj_status_t status ;260 pj_status_t status = PJ_SUCCESS; 219 261 220 262 /* Create session structure */ … … 233 275 /* Create server */ 234 276 flags = server_flag; 235 status = create_test_server(stun_cfg, flags, SRV_DOMAIN, &sess->server); 277 if (flags & SERVER_IPV4) { 278 status = create_test_server(stun_cfg, (flags & ~SERVER_IPV6), 279 SRV_DOMAIN, &sess->server1); 280 } 281 282 if ((status == PJ_SUCCESS) && (flags & SERVER_IPV6)) { 283 status = create_test_server(stun_cfg, (flags & ~SERVER_IPV4), 284 SRV_DOMAIN, &sess->server2); 285 } 286 236 287 if (status != PJ_SUCCESS) { 237 288 app_perror(INDENT "error: create_test_server()", status); … … 239 290 return -10; 240 291 } 241 sess->server->turn_respond_allocate = 242 sess->server->turn_respond_refresh = PJ_TRUE; 292 if (flags & SERVER_IPV4) { 293 sess->server1->turn_respond_allocate = 294 sess->server1->turn_respond_refresh = PJ_TRUE; 295 } 296 297 if (flags & SERVER_IPV6) { 298 sess->server2->turn_respond_allocate = 299 sess->server2->turn_respond_refresh = PJ_TRUE; 300 } 243 301 244 302 /* 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; 303 if ((sess->callee.cfg.enable_stun & SRV)==SRV || 304 (sess->callee.cfg.enable_turn & SRV)==SRV || 305 (sess->caller.cfg.enable_stun & SRV)==SRV || 306 (sess->caller.cfg.enable_turn & SRV)==SRV) 307 { 308 status = pj_dns_resolver_create(mem, NULL, 0, stun_cfg->timer_heap, 309 stun_cfg->ioqueue, &sess->resolver); 310 if (status != PJ_SUCCESS) { 311 app_perror(INDENT "error: pj_dns_resolver_create()", status); 312 destroy_sess(sess, 500); 313 return -20; 314 } 315 316 ns_ip = (flags & SERVER_IPV6)?pj_str("::1"):pj_str("127.0.0.1"); 317 ns_port = (pj_uint16_t)DNS_SERVER_PORT; 318 status = pj_dns_resolver_set_ns(sess->resolver, 1, &ns_ip, &ns_port); 319 if (status != PJ_SUCCESS) { 320 app_perror(INDENT "error: pj_dns_resolver_set_ns()", status); 321 destroy_sess(sess, 500); 322 return -21; 323 } 260 324 } 261 325 … … 306 370 } 307 371 308 if (sess->server) { 309 destroy_test_server(sess->server); 310 sess->server = NULL; 372 if (sess->server1) { 373 destroy_test_server(sess->server1); 374 sess->server1 = NULL; 375 } 376 377 if (sess->server2) { 378 destroy_test_server(sess->server2); 379 sess->server2 = NULL; 311 380 } 312 381 … … 385 454 status = pj_ice_strans_start_ice(ept->ice, &remote->ufrag, &remote->pass, 386 455 rcand_cnt, rcand); 387 if (status != PJ_SUCCESS) { 456 457 if (status != ept->cfg.expected.start_status) { 388 458 app_perror(INDENT "err: pj_ice_strans_start_ice()", status); 389 459 return status; 390 460 } 391 461 392 return PJ_SUCCESS;462 return status; 393 463 } 394 464 … … 499 569 unsigned i; 500 570 int rc; 501 502 PJ_LOG(3,(THIS_FILE, INDENT "%s", title)); 571 char add_title1[16]; 572 char add_title2[16]; 573 pj_bool_t client_mix_test = ((callee_cfg->client_flag & 574 (CLIENT_IPV4+CLIENT_IPV6)) != 575 (caller_cfg->client_flag & 576 (CLIENT_IPV4+CLIENT_IPV6))); 577 578 sprintf(add_title1, "%s%s%s", (server_flag & SERVER_IPV4)?"IPv4":"", 579 ((server_flag & SERVER_IPV4)&&(server_flag & SERVER_IPV6))?"+":"", 580 (server_flag & SERVER_IPV6)?"IPv6":""); 581 582 sprintf(add_title2, "%s", client_mix_test?"Mix test":""); 583 584 PJ_LOG(3,(THIS_FILE, INDENT "%s (%s) %s", title, add_title1, add_title2)); 503 585 504 586 capture_pjlib_state(stun_cfg, &pjlib_state); 505 587 506 rc = create_sess(stun_cfg, server_flag, caller_cfg, callee_cfg, test_param, &sess); 588 rc = create_sess(stun_cfg, server_flag, caller_cfg, callee_cfg, test_param, 589 &sess); 507 590 if (rc != 0) 508 591 return rc; … … 558 641 rc = start_ice(&sess->callee, &sess->caller); 559 642 if (rc != PJ_SUCCESS) { 560 destroy_sess(sess, 500); 561 return -120; 643 int retval = (rc == sess->callee.cfg.expected.start_status)?0:-120; 644 destroy_sess(sess, 500); 645 return retval; 562 646 } 563 647 /* Wait for callee's answer_delay */ … … 566 650 rc = start_ice(&sess->caller, &sess->callee); 567 651 if (rc != PJ_SUCCESS) { 568 destroy_sess(sess, 500); 569 return -130; 652 int retval = (rc == sess->caller.cfg.expected.start_status)?0:-130; 653 destroy_sess(sess, 500); 654 return retval; 570 655 } 571 656 … … 664 749 } 665 750 751 static void set_client_server_flag(unsigned server_flag, 752 unsigned caller_flag, 753 unsigned callee_flag, 754 unsigned *res_server_flag, 755 unsigned *res_caller_flag, 756 unsigned *res_callee_flag) 757 { 758 enum { 759 RST_CLT_FLAG = CLIENT_IPV4+CLIENT_IPV6, 760 RST_SRV_FLAG = SERVER_IPV4+SERVER_IPV6 761 }; 762 763 *res_server_flag = (*res_server_flag & ~RST_SRV_FLAG) | server_flag; 764 *res_caller_flag = (*res_caller_flag & ~RST_CLT_FLAG) | caller_flag; 765 *res_callee_flag = (*res_callee_flag & ~RST_CLT_FLAG) | callee_flag; 766 } 767 666 768 static int perform_test(const char *title, 667 769 pj_stun_config *stun_cfg, … … 671 773 { 672 774 struct sess_param test_param; 775 int rc; 776 int expected_caller_start_ice = caller_cfg->expected.start_status; 777 int expected_callee_start_ice = callee_cfg->expected.start_status; 778 779 set_client_server_flag(SERVER_IPV4, CLIENT_IPV4, CLIENT_IPV4, 780 &server_flag, &caller_cfg->client_flag, 781 &callee_cfg->client_flag); 782 673 783 674 784 pj_bzero(&test_param, sizeof(test_param)); 675 return perform_test2(title, stun_cfg, server_flag, caller_cfg, 676 callee_cfg, &test_param); 785 786 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 787 callee_cfg, &test_param); 788 789 #if USE_IPV6 790 /* Test for IPV6. */ 791 if (rc == PJ_SUCCESS) { 792 pj_bzero(&test_param, sizeof(test_param)); 793 set_client_server_flag(SERVER_IPV6, CLIENT_IPV6, CLIENT_IPV6, 794 &server_flag, &caller_cfg->client_flag, 795 &callee_cfg->client_flag); 796 797 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 798 callee_cfg, &test_param); 799 } 800 801 /* Test for IPV4+IPV6. */ 802 if (rc == PJ_SUCCESS) { 803 pj_bzero(&test_param, sizeof(test_param)); 804 set_client_server_flag(SERVER_IPV4+SERVER_IPV6, 805 CLIENT_IPV4+CLIENT_IPV6, 806 CLIENT_IPV4+CLIENT_IPV6, 807 &server_flag, 808 &caller_cfg->client_flag, 809 &callee_cfg->client_flag); 810 811 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 812 callee_cfg, &test_param); 813 } 814 815 /* Test controller(IPV4) vs controlled(IPV6). */ 816 if (rc == PJ_SUCCESS) { 817 pj_bzero(&test_param, sizeof(test_param)); 818 set_client_server_flag(SERVER_IPV4+SERVER_IPV6, 819 CLIENT_IPV4, 820 CLIENT_IPV6, 821 &server_flag, 822 &caller_cfg->client_flag, 823 &callee_cfg->client_flag); 824 caller_cfg->expected.start_status = PJ_ENOTFOUND; 825 callee_cfg->expected.start_status = PJ_ENOTFOUND; 826 827 rc = perform_test2(title, stun_cfg, server_flag, caller_cfg, 828 callee_cfg, &test_param); 829 } 830 831 #endif 832 callee_cfg->expected.start_status = expected_callee_start_ice; 833 caller_cfg->expected.start_status = expected_caller_start_ice; 834 835 return rc; 677 836 } 678 837 … … 696 855 { 697 856 "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 }}857 0x1FFF, 858 {ROLE1, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 859 {ROLE2, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 701 860 }, 702 861 { 703 862 "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 }}863 0x1FFF, 864 {ROLE1, 1, YES, YES, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 865 {ROLE2, 1, YES, YES, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 707 866 }, 708 867 { 709 868 "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 }}869 0x1FFF, 870 {ROLE1, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 871 {ROLE2, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 713 872 }, 714 873 { 715 874 "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 }}875 0x1FFF, 876 {ROLE1, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 877 {ROLE2, 1, YES, NO, NO, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 719 878 }, 720 879 { 721 880 "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 }}881 0x1FFF, 882 {ROLE1, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 883 {ROLE2, 1, NO, NO, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 725 884 }, 726 885 { 727 886 "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 }}887 0x1FFF, 888 {ROLE1, 1, YES, YES, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 889 {ROLE2, 1, YES, YES, YES, NO, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 731 890 }, 732 891 }; … … 746 905 0x0, 747 906 /* 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 }}907 {ROLE1, 1, YES, NO, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 908 {ROLE2, 1, YES, NO, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 750 909 }; 751 910 … … 771 930 0xFFFF, 772 931 /* 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 }}932 {ROLE1, 1, YES, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 933 {ROLE2, 1, YES, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 775 934 }; 776 935 … … 797 956 0xFFFF, 798 957 /* 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 }}958 {ROLE1, 1, NO, NO, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 959 {ROLE2, 1, NO, NO, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 801 960 }; 802 961 … … 823 982 0x0, 824 983 /* 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}}984 {ROLE1, 2, NO, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}}, 985 {ROLE2, 2, NO, YES, NO, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}} 827 986 }; 828 987 … … 849 1008 0xFFFF, 850 1009 /* 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}}1010 {ROLE1, 2, NO, NO, YES, WRONG_TURN, 0, 0, 0, {PJ_SUCCESS, PJ_STATUS_FROM_STUN_CODE(401), -1}}, 1011 {ROLE2, 2, NO, NO, YES, WRONG_TURN, 0, 0, 0, {PJ_SUCCESS, PJ_STATUS_FROM_STUN_CODE(401), -1}} 853 1012 }; 854 1013 … … 876 1035 0xFFFF & (~(CREATE_STUN_SERVER)), 877 1036 /* 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}}1037 {ROLE1, 1, YES, YES, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}}, 1038 {ROLE2, 1, YES, YES, YES, 0, 0, 0, 0, {PJ_SUCCESS, PJNATH_ESTUNTIMEDOUT, -1}} 880 1039 }; 881 1040 … … 970 1129 { 971 1130 "Concurrency test", 972 0x FFFF,1131 0x1FFF, 973 1132 /* 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}}1133 {ROLE1, 1, YES, YES, YES, CLIENT_IPV4, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}}, 1134 {ROLE2, 1, YES, YES, YES, CLIENT_IPV4, 0, 0, 0, {PJ_SUCCESS, PJ_SUCCESS, PJ_SUCCESS}} 976 1135 }; 977 1136 struct sess_param test_param;
Note: See TracChangeset
for help on using the changeset viewer.