Lines Matching refs:p
192 char *p, *q; in get_options() local
208 p = argv[i]; in get_options()
209 if( ( q = strchr( p, '=' ) ) == NULL ) in get_options()
210 exit_usage( p, NULL ); in get_options()
213 if( strcmp( p, "server_addr" ) == 0 ) in get_options()
215 else if( strcmp( p, "server_port" ) == 0 ) in get_options()
217 else if( strcmp( p, "listen_addr" ) == 0 ) in get_options()
219 else if( strcmp( p, "listen_port" ) == 0 ) in get_options()
221 else if( strcmp( p, "duplicate" ) == 0 ) in get_options()
225 exit_usage( p, q ); in get_options()
227 else if( strcmp( p, "delay" ) == 0 ) in get_options()
231 exit_usage( p, q ); in get_options()
233 else if( strcmp( p, "delay_ccs" ) == 0 ) in get_options()
237 exit_usage( p, q ); in get_options()
239 else if( strcmp( p, "delay_cli" ) == 0 || in get_options()
240 strcmp( p, "delay_srv" ) == 0 ) in get_options()
247 if( strcmp( p, "delay_cli" ) == 0 ) in get_options()
261 p, MAX_DELAYED_HS ); in get_options()
262 exit_usage( p, NULL ); in get_options()
276 else if( strcmp( p, "drop" ) == 0 ) in get_options()
280 exit_usage( p, q ); in get_options()
282 else if( strcmp( p, "pack" ) == 0 ) in get_options()
291 else if( strcmp( p, "mtu" ) == 0 ) in get_options()
295 exit_usage( p, q ); in get_options()
297 else if( strcmp( p, "bad_ad" ) == 0 ) in get_options()
301 exit_usage( p, q ); in get_options()
304 else if( strcmp( p, "bad_cid" ) == 0 ) in get_options()
309 else if( strcmp( p, "protect_hvr" ) == 0 ) in get_options()
313 exit_usage( p, q ); in get_options()
315 else if( strcmp( p, "protect_len" ) == 0 ) in get_options()
319 exit_usage( p, q ); in get_options()
321 else if( strcmp( p, "inject_clihlo" ) == 0 ) in get_options()
325 exit_usage( p, q ); in get_options()
327 else if( strcmp( p, "seed" ) == 0 ) in get_options()
331 exit_usage( p, q ); in get_options()
334 exit_usage( p, NULL ); in get_options()
515 void print_packet( const packet *p, const char *why ) in print_packet() argument
520 elapsed_time(), p->way, p->type, p->len ); in print_packet()
523 elapsed_time(), p->way, p->type, p->len, why ); in print_packet()
527 p->way, p->type, p->len ); in print_packet()
530 p->way, p->type, p->len, why ); in print_packet()
557 int send_packet( const packet *p, const char *why ) in send_packet() argument
560 mbedtls_net_context *dst = p->dst; in send_packet()
565 strcmp( p->type, "ClientHello" ) == 0 ) in send_packet()
567 memcpy( &initial_clihlo, p, sizeof( packet ) ); in send_packet()
573 strcmp( p->type, "CID" ) == 0 && in send_packet()
577 memcpy( buf, p->buf, p->len ); in send_packet()
581 print_packet( p, "modified CID" ); in send_packet()
583 if( ( ret = dispatch_data( dst, buf, p->len ) ) <= 0 ) in send_packet()
592 strcmp( p->type, "ApplicationData" ) == 0 ) in send_packet()
595 memcpy( buf, p->buf, p->len ); in send_packet()
597 if( p->len <= 13 ) in send_packet()
604 print_packet( p, "corrupted" ); in send_packet()
607 if( ( ret = dispatch_data( dst, buf, p->len ) ) <= 0 ) in send_packet()
614 print_packet( p, why ); in send_packet()
615 if( ( ret = dispatch_data( dst, p->buf, p->len ) ) <= 0 ) in send_packet()
623 strcmp( p->type, "ApplicationData" ) != 0 && in send_packet()
626 print_packet( p, "duplicated" ); in send_packet()
628 if( ( ret = dispatch_data( dst, p->buf, p->len ) ) <= 0 ) in send_packet()
638 strcmp( p->type, "ApplicationData" ) == 0 ) in send_packet()