-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmysqlnd_azure.h
57 lines (44 loc) · 2.27 KB
/
mysqlnd_azure.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Qianqian Bu <[email protected]> |
+----------------------------------------------------------------------+
*/
#ifndef MYSQLND_AZURE_H
#define MYSQLND_AZURE_H
#ifdef ZTS
#include "TSRM.h"
#endif
#include "ext/mysqlnd/mysqlnd.h"
#include "ext/mysqlnd/mysqlnd_debug.h"
#define MYSQLND_AZURE_VERSION "mysqlnd_azure-1.1.1"
/*struct to store redirection chache info in hash table*/
typedef struct st_mysqlnd_azure_redirect_info {
char* redirect_user;
char* redirect_host;
unsigned int redirect_port;
} MYSQLND_AZURE_REDIRECT_INFO;
#define MAX_REDIRECT_HOST_LEN 128
#define MAX_REDIRECT_USER_LEN 128
#define MYSQLND_AZURE_ENFORCE_REDIRECT_ERROR_NO CR_NOT_IMPLEMENTED
void mysqlnd_azure_minit_register_hooks();
int mysqlnd_azure_apply_resources();
int mysqlnd_azure_release_resources();
enum_func_status mysqlnd_azure_add_redirect_cache(const char* user, const char* host, int port, const char* redirect_user, const char* redirect_host, int redirect_port);
enum_func_status mysqlnd_azure_remove_redirect_cache(const char* user, const char* host, int port);
MYSQLND_AZURE_REDIRECT_INFO* mysqlnd_azure_find_redirect_cache(const char* user, const char* host, int port);
#if defined(ZTS) && defined(COMPILE_DL_MYSQLND_AZURE)
ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif /* MYSQLND_AZURE_H */