Lines Matching refs:net

327 MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mysqlnd_client_option …  in MYSQLND_METHOD()
334 net->data->options.net_read_buffer_size = *(unsigned int*) value; in MYSQLND_METHOD()
335 DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, net->data->options.net_read_buffer_size); in MYSQLND_METHOD()
339 net->data->options.timeout_connect = *(unsigned int*) value; in MYSQLND_METHOD()
343 zend_bool pers = net->persistent; in MYSQLND_METHOD()
344 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
345 mnd_pefree(net->data->options.ssl_key, pers); in MYSQLND_METHOD()
347 net->data->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
352 zend_bool pers = net->persistent; in MYSQLND_METHOD()
353 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
354 mnd_pefree(net->data->options.ssl_cert, pers); in MYSQLND_METHOD()
356 net->data->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
361 zend_bool pers = net->persistent; in MYSQLND_METHOD()
362 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
363 mnd_pefree(net->data->options.ssl_ca, pers); in MYSQLND_METHOD()
365 net->data->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
370 zend_bool pers = net->persistent; in MYSQLND_METHOD()
371 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
372 mnd_pefree(net->data->options.ssl_capath, pers); in MYSQLND_METHOD()
374 net->data->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
379 zend_bool pers = net->persistent; in MYSQLND_METHOD()
380 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
381 mnd_pefree(net->data->options.ssl_cipher, pers); in MYSQLND_METHOD()
383 net->data->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
388 zend_bool pers = net->persistent; in MYSQLND_METHOD()
389 if (net->data->options.ssl_passphrase) { in MYSQLND_METHOD()
390 mnd_pefree(net->data->options.ssl_passphrase, pers); in MYSQLND_METHOD()
392 net->data->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
414 net->data->options.ssl_verify_peer = val; in MYSQLND_METHOD()
418 net->data->options.timeout_read = *(unsigned int*) value; in MYSQLND_METHOD()
422 net->data->options.timeout_write = *(unsigned int*) value; in MYSQLND_METHOD()
435 MYSQLND_METHOD(mysqlnd_vio, consume_uneaten_data)(MYSQLND_VIO * const net, enum php_mysqlnd_server_… in MYSQLND_METHOD()
448 php_stream * net_stream = net->data->get_stream(net); in MYSQLND_METHOD()
467 bytes_consumed, mysqlnd_command_to_text[net->last_command]); in MYSQLND_METHOD()
470 bytes_consumed, mysqlnd_command_to_text[net->last_command]); in MYSQLND_METHOD()
473 net->last_command = cmd; in MYSQLND_METHOD()
487 MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) in MYSQLND_METHOD()
491 php_stream * net_stream = net->data->m.get_stream(net); in MYSQLND_METHOD()
499 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
501 ZVAL_STRING(&key_zval, net->data->options.ssl_key); in MYSQLND_METHOD()
506 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
508 ZVAL_STRING(&cert_zval, net->data->options.ssl_cert); in MYSQLND_METHOD()
510 if (!net->data->options.ssl_key) { in MYSQLND_METHOD()
516 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
518 ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca); in MYSQLND_METHOD()
523 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
525 ZVAL_STRING(&capath_zval, net->data->options.ssl_capath); in MYSQLND_METHOD()
530 if (net->data->options.ssl_passphrase) { in MYSQLND_METHOD()
532 ZVAL_STRING(&passphrase_zval, net->data->options.ssl_passphrase); in MYSQLND_METHOD()
537 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
539 ZVAL_STRING(&cipher_zval, net->data->options.ssl_cipher); in MYSQLND_METHOD()
548 if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DEFAULT) { in MYSQLND_METHOD()
549net->data->options.ssl_verify_peer = any_flag? MYSQLND_SSL_PEER_DEFAULT_ACTION:MYSQLND_SSL_PEER_DO… in MYSQLND_METHOD()
552 verify = net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_VERIFY? TRUE:FALSE; in MYSQLND_METHOD()
558 if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) { in MYSQLND_METHOD()
571 net->data->ssl = TRUE; in MYSQLND_METHOD()
581 if (net->data->options.timeout_read) { in MYSQLND_METHOD()
583 DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->data->options.timeout_read); in MYSQLND_METHOD()
584 tv.tv_sec = net->data->options.timeout_read; in MYSQLND_METHOD()
611 MYSQLND_METHOD(mysqlnd_vio, free_contents)(MYSQLND_VIO * net) in MYSQLND_METHOD()
613 zend_bool pers = net->persistent; in MYSQLND_METHOD()
616 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
617 mnd_pefree(net->data->options.ssl_key, pers); in MYSQLND_METHOD()
618 net->data->options.ssl_key = NULL; in MYSQLND_METHOD()
620 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
621 mnd_pefree(net->data->options.ssl_cert, pers); in MYSQLND_METHOD()
622 net->data->options.ssl_cert = NULL; in MYSQLND_METHOD()
624 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
625 mnd_pefree(net->data->options.ssl_ca, pers); in MYSQLND_METHOD()
626 net->data->options.ssl_ca = NULL; in MYSQLND_METHOD()
628 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
629 mnd_pefree(net->data->options.ssl_capath, pers); in MYSQLND_METHOD()
630 net->data->options.ssl_capath = NULL; in MYSQLND_METHOD()
632 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
633 mnd_pefree(net->data->options.ssl_cipher, pers); in MYSQLND_METHOD()
634 net->data->options.ssl_cipher = NULL; in MYSQLND_METHOD()
644 MYSQLND_METHOD(mysqlnd_vio, close_stream)(MYSQLND_VIO * const net, MYSQLND_STATS * const stats, MYS… in MYSQLND_METHOD()
648 if (net && (net_stream = net->data->m.get_stream(net))) { in MYSQLND_METHOD()
649 zend_bool pers = net->persistent; in MYSQLND_METHOD()
664 net->data->m.set_stream(net, NULL); in MYSQLND_METHOD()
674 MYSQLND_METHOD(mysqlnd_vio, init)(MYSQLND_VIO * const net, MYSQLND_STATS * const stats, MYSQLND_ERR… in MYSQLND_METHOD()
680 net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size); in MYSQLND_METHOD()
683 net->data->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size); in MYSQLND_METHOD()
709 MYSQLND_METHOD(mysqlnd_vio, get_stream)(const MYSQLND_VIO * const net) in MYSQLND_METHOD()
712 DBG_INF_FMT("%p", net? net->data->stream:NULL); in MYSQLND_METHOD()
713 DBG_RETURN(net? net->data->stream:NULL); in MYSQLND_METHOD()