Lines Matching refs:net
326 MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mysqlnd_client_option … in MYSQLND_METHOD()
333 net->data->options.net_read_buffer_size = *(unsigned int*) value; in MYSQLND_METHOD()
334 DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, net->data->options.net_read_buffer_size); in MYSQLND_METHOD()
338 net->data->options.timeout_connect = *(unsigned int*) value; in MYSQLND_METHOD()
342 zend_bool pers = net->persistent; in MYSQLND_METHOD()
343 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
344 mnd_pefree(net->data->options.ssl_key, pers); in MYSQLND_METHOD()
346 net->data->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
351 zend_bool pers = net->persistent; in MYSQLND_METHOD()
352 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
353 mnd_pefree(net->data->options.ssl_cert, pers); in MYSQLND_METHOD()
355 net->data->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
360 zend_bool pers = net->persistent; in MYSQLND_METHOD()
361 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
362 mnd_pefree(net->data->options.ssl_ca, pers); in MYSQLND_METHOD()
364 net->data->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
369 zend_bool pers = net->persistent; in MYSQLND_METHOD()
370 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
371 mnd_pefree(net->data->options.ssl_capath, pers); in MYSQLND_METHOD()
373 net->data->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
378 zend_bool pers = net->persistent; in MYSQLND_METHOD()
379 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
380 mnd_pefree(net->data->options.ssl_cipher, pers); in MYSQLND_METHOD()
382 net->data->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
387 zend_bool pers = net->persistent; in MYSQLND_METHOD()
388 if (net->data->options.ssl_passphrase) { in MYSQLND_METHOD()
389 mnd_pefree(net->data->options.ssl_passphrase, pers); in MYSQLND_METHOD()
391 net->data->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
413 net->data->options.ssl_verify_peer = val; in MYSQLND_METHOD()
417 net->data->options.timeout_read = *(unsigned int*) value; in MYSQLND_METHOD()
421 net->data->options.timeout_write = *(unsigned int*) value; in MYSQLND_METHOD()
434 MYSQLND_METHOD(mysqlnd_vio, consume_uneaten_data)(MYSQLND_VIO * const net, enum php_mysqlnd_server_… in MYSQLND_METHOD()
447 php_stream * net_stream = net->data->get_stream(net); in MYSQLND_METHOD()
470 bytes_consumed, mysqlnd_command_to_text[net->last_command]); in MYSQLND_METHOD()
473 bytes_consumed, mysqlnd_command_to_text[net->last_command]); in MYSQLND_METHOD()
476 net->last_command = cmd; in MYSQLND_METHOD()
490 MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) in MYSQLND_METHOD()
494 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()
549 …net->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()
663 net->data->m.set_stream(net, NULL); in MYSQLND_METHOD()
673 MYSQLND_METHOD(mysqlnd_vio, init)(MYSQLND_VIO * const net, MYSQLND_STATS * const stats, MYSQLND_ERR… in MYSQLND_METHOD()
679 net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size); in MYSQLND_METHOD()
682 net->data->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size); in MYSQLND_METHOD()
707 MYSQLND_METHOD(mysqlnd_vio, get_stream)(const MYSQLND_VIO * const net) in MYSQLND_METHOD()
710 DBG_INF_FMT("%p", net? net->data->stream:NULL); in MYSQLND_METHOD()
711 DBG_RETURN(net? net->data->stream:NULL); in MYSQLND_METHOD()