1struct st_mysql_client_plugin {
2  int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(void); int (*options)(const char *option, const void *);
3};
4struct MYSQL;
5#include "plugin_auth_common.h"
6struct MYSQL_PLUGIN_VIO_INFO {
7  enum {
8    MYSQL_VIO_INVALID,
9    MYSQL_VIO_TCP,
10    MYSQL_VIO_SOCKET,
11    MYSQL_VIO_PIPE,
12    MYSQL_VIO_MEMORY
13  } protocol;
14  int socket;
15};
16typedef struct MYSQL_PLUGIN_VIO {
17  int (*read_packet)(struct MYSQL_PLUGIN_VIO *vio, unsigned char **buf);
18  int (*write_packet)(struct MYSQL_PLUGIN_VIO *vio, const unsigned char *packet,
19                      int packet_len);
20  void (*info)(struct MYSQL_PLUGIN_VIO *vio,
21               struct MYSQL_PLUGIN_VIO_INFO *info);
22} MYSQL_PLUGIN_VIO;
23struct auth_plugin_t {
24  int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(void); int (*options)(const char *option, const void *);
25  int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct MYSQL *mysql);
26};
27typedef struct auth_plugin_t st_mysql_client_plugin_AUTHENTICATION;
28struct st_mysql_client_plugin *mysql_load_plugin(struct MYSQL *mysql,
29                                                 const char *name, int type,
30                                                 int argc, ...);
31struct st_mysql_client_plugin *mysql_load_plugin_v(struct MYSQL *mysql,
32                                                   const char *name, int type,
33                                                   int argc, va_list args);
34struct st_mysql_client_plugin *mysql_client_find_plugin(struct MYSQL *mysql,
35                                                        const char *name,
36                                                        int type);
37struct st_mysql_client_plugin *mysql_client_register_plugin(
38    struct MYSQL *mysql, struct st_mysql_client_plugin *plugin);
39int mysql_plugin_options(struct st_mysql_client_plugin *plugin,
40                         const char *option, const void *value);
41