![]() |
MySQL 8.0.43
Source Code Documentation
|
#include "sql/item_inetfunc.h"#include "my_config.h"#include <stdio.h>#include <string.h>#include <sys/types.h>#include "my_byteorder.h"#include "my_dbug.h"#include "my_inttypes.h"#include "mysql/udf_registration_types.h"#include "mysqld_error.h"#include "sql/current_thd.h"#include "sql/derror.h"#include "sql/enum_query_type.h"#include "sql/item.h"#include "sql/sql_error.h"#include "sql_string.h"#include <netinet/in.h>Functions | |
| static bool | str_to_ipv4 (const char *str, int str_length, in_addr *ipv4_address) |
| Tries to convert given string to binary IPv4-address representation. More... | |
| static bool | str_to_ipv6 (const char *str, int str_length, in6_addr *ipv6_address) |
| Tries to convert given string to binary IPv6-address representation. More... | |
| static void | ipv4_to_str (const in_addr *ipv4, char *str) |
| Converts IPv4-binary-address to a string. More... | |
| static void | ipv6_to_str (const in6_addr *ipv6, char *str) |
| Converts IPv6-binary-address to a string. More... | |
Variables | |
| static const int | IN_ADDR_SIZE = sizeof(in_addr) |
| static const int | IN6_ADDR_SIZE = sizeof(in6_addr) |
| static const int | IN6_ADDR_NUM_WORDS = IN6_ADDR_SIZE / 2 |
| static const char | HEX_DIGITS [] = "0123456789abcdef" |
|
static |
Converts IPv4-binary-address to a string.
This function is a portable alternative to inet_ntop(AF_INET).
| [in] | ipv4 | IPv4-address data (byte array) |
| [out] | str | A buffer to store string representation of IPv4-address. It must be at least of INET_ADDRSTRLEN. |
|
static |
Converts IPv6-binary-address to a string.
This function is a portable alternative to inet_ntop(AF_INET6).
| [in] | ipv6 | IPv6-address data (byte array) |
| [out] | str | A buffer to store string representation of IPv6-address. It must be at least of INET6_ADDRSTRLEN. |
|
static |
Tries to convert given string to binary IPv4-address representation.
This is a portable alternative to inet_pton(AF_INET).
| str | String to convert. | |
| str_length | String length. | |
| [out] | ipv4_address | Buffer to store IPv4-address. |
| false | Given string does not represent an IPv4-address. |
| true | The string has been converted successfully. |
|
static |
Tries to convert given string to binary IPv6-address representation.
This is a portable alternative to inet_pton(AF_INET6).
| str | String to convert. | |
| str_length | String length. | |
| [out] | ipv6_address | Buffer to store IPv6-address. |
| false | Given string does not represent an IPv6-address. |
| true | The string has been converted successfully. |
|
static |
|
static |
|
static |
|
static |