2010-01-04 15:16:05 +00:00
|
|
|
/*
|
2012-04-27 19:52:18 +00:00
|
|
|
* include/proto/sample.h
|
|
|
|
* Functions for samples management.
|
2010-01-04 15:16:05 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2009-2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
|
2012-04-27 19:52:18 +00:00
|
|
|
* Copyright (C) 2012 Willy Tarreau <w@1wt.eu>
|
2010-01-04 15:16:05 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation, version 2.1
|
|
|
|
* exclusively.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2012-04-27 19:52:18 +00:00
|
|
|
#ifndef _PROTO_SAMPLE_H
|
|
|
|
#define _PROTO_SAMPLE_H
|
2010-01-04 15:16:05 +00:00
|
|
|
|
2012-04-27 19:52:18 +00:00
|
|
|
#include <types/sample.h>
|
2010-01-04 15:16:05 +00:00
|
|
|
#include <types/stick_table.h>
|
|
|
|
|
2012-10-29 19:44:36 +00:00
|
|
|
/* only exported for late memory allocation, do not use */
|
|
|
|
extern char *sample_trash_buf1;
|
|
|
|
extern char *sample_trash_buf2;
|
|
|
|
|
2012-04-27 19:37:17 +00:00
|
|
|
struct sample_expr *sample_parse_expr(char **str, int *idx, char *err, int err_size);
|
|
|
|
struct sample *sample_process(struct proxy *px, struct session *l4,
|
|
|
|
void *l7, unsigned int dir, struct sample_expr *expr,
|
2012-04-23 19:35:11 +00:00
|
|
|
struct sample *p);
|
2012-04-27 19:37:17 +00:00
|
|
|
void sample_register_fetches(struct sample_fetch_kw_list *psl);
|
|
|
|
void sample_register_convs(struct sample_conv_kw_list *psl);
|
2012-10-17 13:34:03 +00:00
|
|
|
struct chunk *sample_get_trash_chunk(void);
|
2012-04-27 19:52:18 +00:00
|
|
|
|
|
|
|
#endif /* _PROTO_SAMPLE_H */
|