summaryrefslogtreecommitdiff
path: root/memc-nginx-module-0.20/src/ngx_http_memc_util.h
blob: e83fbbb00bcd29f2f24c1ef254e7103f49672c44 (plain)
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
/*
 * Copyright (C) Yichun Zhang (agentzh)
 */


#ifndef NGX_HTTP_MEMC_UTIL_H
#define NGX_HTTP_MEMC_UTIL_H

#include <ngx_core.h>
#include <ngx_http.h>
#include "ngx_http_memc_module.h"

#ifndef NGX_UINT32_LEN
#define NGX_UINT32_LEN (NGX_INT32_LEN - 1)
#endif

#ifndef NGX_UINT64_LEN
#define NGX_UINT64_LEN (NGX_INT64_LEN - 1)
#endif

#define ngx_http_memc_strcmp_const(a, b)                                     \
    ngx_strncmp(a, b, sizeof(b) - 1)

ngx_http_memc_cmd_t ngx_http_memc_parse_cmd(u_char *data, size_t len,
        ngx_flag_t *is_storage_cmd);

ngx_http_upstream_srv_conf_t *ngx_http_memc_upstream_add(
        ngx_http_request_t *r, ngx_url_t *url);


#endif /* NGX_HTTP_MEMC_UTIL_H */