6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 * Copyright 2000,2006 The FreeRADIUS server project
21 * Copyright 2011 TekSavvy Solutions <gabe@teksavvy.com>
27 #include <freeradius-devel/ident.h>
28 RCSIDH(rlm_redis_h, "$Id$")
34 #include <freeradius-devel/modpriv.h>
35 #include <hiredis/hiredis.h>
37 typedef struct redis_socket_t {
42 typedef struct rlm_redis_t REDIS_INST;
44 typedef struct rlm_redis_t {
51 fr_connection_pool_t *pool;
53 int (*redis_query)(REDISSOCK **dissocket_p, REDIS_INST *inst, char *query);
54 int (*redis_finish_query)(REDISSOCK *dissocket);
55 size_t (*redis_escape_func)(REQUEST *request, char *out, size_t outlen, const char *in, void *);
59 #define MAX_QUERY_LEN 4096
61 int rlm_redis_query(REDISSOCK **dissocket_p, REDIS_INST *inst, char *query);
62 int rlm_redis_finish_query(REDISSOCK *dissocket);
64 #endif /* RLM_REDIS_H */