diff options
Diffstat (limited to 'examples/redis-unstable/src/cli_common.h')
| -rw-r--r-- | examples/redis-unstable/src/cli_common.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/examples/redis-unstable/src/cli_common.h b/examples/redis-unstable/src/cli_common.h deleted file mode 100644 index a5b8e44..0000000 --- a/examples/redis-unstable/src/cli_common.h +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | #ifndef __CLICOMMON_H | ||
| 2 | #define __CLICOMMON_H | ||
| 3 | |||
| 4 | #include <hiredis.h> | ||
| 5 | #include <sdscompat.h> /* Use hiredis' sds compat header that maps sds calls to their hi_ variants */ | ||
| 6 | |||
| 7 | typedef struct cliSSLconfig { | ||
| 8 | /* Requested SNI, or NULL */ | ||
| 9 | char *sni; | ||
| 10 | /* CA Certificate file, or NULL */ | ||
| 11 | char *cacert; | ||
| 12 | /* Directory where trusted CA certificates are stored, or NULL */ | ||
| 13 | char *cacertdir; | ||
| 14 | /* Skip server certificate verification. */ | ||
| 15 | int skip_cert_verify; | ||
| 16 | /* Client certificate to authenticate with, or NULL */ | ||
| 17 | char *cert; | ||
| 18 | /* Private key file to authenticate with, or NULL */ | ||
| 19 | char *key; | ||
| 20 | /* Preferred cipher list, or NULL (applies only to <= TLSv1.2) */ | ||
| 21 | char* ciphers; | ||
| 22 | /* Preferred ciphersuites list, or NULL (applies only to TLSv1.3) */ | ||
| 23 | char* ciphersuites; | ||
| 24 | } cliSSLconfig; | ||
| 25 | |||
| 26 | |||
| 27 | /* server connection information object, used to describe an ip:port pair, db num user input, and user:pass. */ | ||
| 28 | typedef struct cliConnInfo { | ||
| 29 | char *hostip; | ||
| 30 | int hostport; | ||
| 31 | int input_dbnum; | ||
| 32 | char *auth; | ||
| 33 | char *user; | ||
| 34 | } cliConnInfo; | ||
| 35 | |||
| 36 | int cliSecureConnection(redisContext *c, cliSSLconfig config, const char **err); | ||
| 37 | |||
| 38 | ssize_t cliWriteConn(redisContext *c, const char *buf, size_t buf_len); | ||
| 39 | |||
| 40 | int cliSecureInit(void); | ||
| 41 | |||
| 42 | sds readArgFromStdin(void); | ||
| 43 | |||
| 44 | sds *getSdsArrayFromArgv(int argc,char **argv, int quoted); | ||
| 45 | |||
| 46 | sds unquoteCString(char *str); | ||
| 47 | |||
| 48 | void parseRedisUri(const char *uri, const char* tool_name, cliConnInfo *connInfo, int *tls_flag); | ||
| 49 | |||
| 50 | void freeCliConnInfo(cliConnInfo connInfo); | ||
| 51 | |||
| 52 | sds escapeJsonString(sds s, const char *p, size_t len); | ||
| 53 | |||
| 54 | sds cliVersion(void); | ||
| 55 | |||
| 56 | redisContext *redisConnectWrapper(const char *ip, int port, const struct timeval tv); | ||
| 57 | redisContext *redisConnectUnixWrapper(const char *path, const struct timeval tv); | ||
| 58 | |||
| 59 | #endif /* __CLICOMMON_H */ | ||
