php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
mysqlnd_wireprotocol.h File Reference

Go to the source code of this file.

Data Structures

struct  st_mysqlnd_packet_methods
 
struct  st_mysqlnd_packet_header
 
struct  st_mysqlnd_packet_greet
 
struct  st_mysqlnd_packet_auth
 
struct  st_mysqlnd_packet_auth_response
 
struct  st_mysqlnd_packet_change_auth_response
 
struct  st_mysqlnd_packet_ok
 
struct  st_mysqlnd_packet_command
 
struct  st_mysqlnd_packet_eof
 
struct  st_mysqlnd_packet_rset_header
 
struct  st_mysqlnd_packet_res_field
 
struct  st_mysqlnd_packet_row
 
struct  st_mysqlnd_packet_stats
 
struct  st_mysqlnd_packet_prepare_response
 
struct  st_mysqlnd_packet_chg_user_resp
 
struct  st_mysqlnd_packet_sha256_pk_request
 
struct  st_mysqlnd_packet_sha256_pk_request_response
 
struct  st_mysqlnd_packet_cached_sha2_result
 

Macros

#define MYSQLND_HEADER_SIZE   4
 
#define COMPRESSED_HEADER_SIZE   3
 
#define MYSQLND_NULL_LENGTH   (zend_ulong) ~0
 
#define PACKET_WRITE(conn, packet)
 
#define PACKET_READ(conn, packet)
 
#define PACKET_FREE(packet)
 

Typedefs

typedef struct st_mysqlnd_packet_methods mysqlnd_packet_methods
 
typedef struct st_mysqlnd_packet_header MYSQLND_PACKET_HEADER
 
typedef struct st_mysqlnd_packet_greet MYSQLND_PACKET_GREET
 
typedef struct st_mysqlnd_packet_auth MYSQLND_PACKET_AUTH
 
typedef struct st_mysqlnd_packet_auth_response MYSQLND_PACKET_AUTH_RESPONSE
 
typedef struct st_mysqlnd_packet_change_auth_response MYSQLND_PACKET_CHANGE_AUTH_RESPONSE
 
typedef struct st_mysqlnd_packet_ok MYSQLND_PACKET_OK
 
typedef struct st_mysqlnd_packet_command MYSQLND_PACKET_COMMAND
 
typedef struct st_mysqlnd_packet_eof MYSQLND_PACKET_EOF
 
typedef struct st_mysqlnd_packet_rset_header MYSQLND_PACKET_RSET_HEADER
 
typedef struct st_mysqlnd_packet_res_field MYSQLND_PACKET_RES_FIELD
 
typedef struct st_mysqlnd_packet_row MYSQLND_PACKET_ROW
 
typedef struct st_mysqlnd_packet_stats MYSQLND_PACKET_STATS
 
typedef struct st_mysqlnd_packet_prepare_response MYSQLND_PACKET_PREPARE_RESPONSE
 
typedef struct st_mysqlnd_packet_chg_user_resp MYSQLND_PACKET_CHG_USER_RESPONSE
 
typedef struct st_mysqlnd_packet_sha256_pk_request MYSQLND_PACKET_SHA256_PK_REQUEST
 
typedef struct st_mysqlnd_packet_sha256_pk_request_response MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE
 
typedef struct st_mysqlnd_packet_cached_sha2_result MYSQLND_PACKET_CACHED_SHA2_RESULT
 

Functions

zend_ulong php_mysqlnd_net_field_length (const zend_uchar **packet)
 
zend_ucharphp_mysqlnd_net_store_length (zend_uchar *packet, const uint64_t length)
 
size_t php_mysqlnd_net_store_length_size (uint64_t length)
 
enum_func_status php_mysqlnd_rowp_read_binary_protocol (MYSQLND_ROW_BUFFER *row_buffer, zval *fields, unsigned int field_count, const MYSQLND_FIELD *fields_metadata, bool as_int_or_float, MYSQLND_STATS *stats)
 
enum_func_status php_mysqlnd_rowp_read_text_protocol (MYSQLND_ROW_BUFFER *row_buffer, zval *fields, unsigned int field_count, const MYSQLND_FIELD *fields_metadata, bool as_int_or_float, MYSQLND_STATS *stats)
 
PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORYmysqlnd_protocol_payload_decoder_factory_init (MYSQLND_CONN_DATA *conn, const bool persistent)
 
PHPAPI void mysqlnd_protocol_payload_decoder_factory_free (MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *const payload_decoder_factory)
 

Variables

PHPAPI const char mysqlnd_read_header_name []
 
PHPAPI const char mysqlnd_read_body_name []
 
PHPAPI const char *const mysqlnd_command_to_text [COM_END]
 
PHPAPI const char *const mysqlnd_empty_string
 

Macro Definition Documentation

◆ COMPRESSED_HEADER_SIZE

#define COMPRESSED_HEADER_SIZE   3

Definition at line 22 of file mysqlnd_wireprotocol.h.

◆ MYSQLND_HEADER_SIZE

#define MYSQLND_HEADER_SIZE   4

Definition at line 21 of file mysqlnd_wireprotocol.h.

◆ MYSQLND_NULL_LENGTH

#define MYSQLND_NULL_LENGTH   (zend_ulong) ~0

Definition at line 24 of file mysqlnd_wireprotocol.h.

◆ PACKET_FREE

#define PACKET_FREE ( packet)
Value:
do { \
DBG_INF_FMT("PACKET_FREE(%p)", packet); \
if ((packet)->header.m->free_mem) { \
((packet)->header.m->free_mem((packet))); \
} \
} while (0);
header(string $header, bool $replace=true, int $response_code=0)

Definition at line 34 of file mysqlnd_wireprotocol.h.

◆ PACKET_READ

#define PACKET_READ ( conn,
packet )
Value:
((packet)->header.m->read_from_net((conn), (packet)))

Definition at line 33 of file mysqlnd_wireprotocol.h.

◆ PACKET_WRITE

#define PACKET_WRITE ( conn,
packet )
Value:
((packet)->header.m->write_to_net((conn), (packet)))

Definition at line 32 of file mysqlnd_wireprotocol.h.

Typedef Documentation

◆ MYSQLND_PACKET_AUTH

◆ MYSQLND_PACKET_AUTH_RESPONSE

◆ MYSQLND_PACKET_CACHED_SHA2_RESULT

◆ MYSQLND_PACKET_CHANGE_AUTH_RESPONSE

◆ MYSQLND_PACKET_CHG_USER_RESPONSE

◆ MYSQLND_PACKET_COMMAND

◆ MYSQLND_PACKET_EOF

◆ MYSQLND_PACKET_GREET

◆ MYSQLND_PACKET_HEADER

◆ mysqlnd_packet_methods

◆ MYSQLND_PACKET_OK

◆ MYSQLND_PACKET_PREPARE_RESPONSE

◆ MYSQLND_PACKET_RES_FIELD

◆ MYSQLND_PACKET_ROW

◆ MYSQLND_PACKET_RSET_HEADER

◆ MYSQLND_PACKET_SHA256_PK_REQUEST

◆ MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE

◆ MYSQLND_PACKET_STATS

Function Documentation

◆ mysqlnd_protocol_payload_decoder_factory_free()

PHPAPI void mysqlnd_protocol_payload_decoder_factory_free ( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *const payload_decoder_factory)

Definition at line 2692 of file mysqlnd_wireprotocol.c.

◆ mysqlnd_protocol_payload_decoder_factory_init()

PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decoder_factory_init ( MYSQLND_CONN_DATA * conn,
const bool persistent )

Definition at line 2680 of file mysqlnd_wireprotocol.c.

◆ php_mysqlnd_net_field_length()

zend_ulong php_mysqlnd_net_field_length ( const zend_uchar ** packet)

Definition at line 94 of file mysqlnd_wireprotocol.c.

◆ php_mysqlnd_net_store_length()

zend_uchar * php_mysqlnd_net_store_length ( zend_uchar * packet,
const uint64_t length )

Definition at line 153 of file mysqlnd_wireprotocol.c.

◆ php_mysqlnd_net_store_length_size()

size_t php_mysqlnd_net_store_length_size ( uint64_t length)

Definition at line 180 of file mysqlnd_wireprotocol.c.

◆ php_mysqlnd_rowp_read_binary_protocol()

enum_func_status php_mysqlnd_rowp_read_binary_protocol ( MYSQLND_ROW_BUFFER * row_buffer,
zval * fields,
unsigned int field_count,
const MYSQLND_FIELD * fields_metadata,
bool as_int_or_float,
MYSQLND_STATS * stats )

Definition at line 1454 of file mysqlnd_wireprotocol.c.

◆ php_mysqlnd_rowp_read_text_protocol()

enum_func_status php_mysqlnd_rowp_read_text_protocol ( MYSQLND_ROW_BUFFER * row_buffer,
zval * fields,
unsigned int field_count,
const MYSQLND_FIELD * fields_metadata,
bool as_int_or_float,
MYSQLND_STATS * stats )

Definition at line 1562 of file mysqlnd_wireprotocol.c.

Variable Documentation

◆ mysqlnd_command_to_text

PHPAPI const char* const mysqlnd_command_to_text[COM_END]
extern

Definition at line 47 of file mysqlnd_wireprotocol.c.

◆ mysqlnd_empty_string

PHPAPI const char* const mysqlnd_empty_string
extern

Definition at line 35 of file mysqlnd_wireprotocol.c.

◆ mysqlnd_read_body_name

PHPAPI const char mysqlnd_read_body_name[]
extern

Definition at line 39 of file mysqlnd_wireprotocol.c.

◆ mysqlnd_read_header_name

PHPAPI const char mysqlnd_read_header_name[]
extern

Definition at line 38 of file mysqlnd_wireprotocol.c.