MINOR: global: export many symbols.
The functions "val_payload_lv" and "val_hdr" are useful with lua. The lua automatic binding for sample fetchs needs to compare check functions. The "arg_type_names" permit to display error messages.
This commit is contained in:
parent
4d9a1d1a5c
commit
49f45af9aa
|
@ -48,6 +48,9 @@
|
|||
#define ARG5(m, t1, t2, t3, t4, t5) \
|
||||
(ARG4(m, t1, t2, t3, t4) + (ARGT_##t5 << (ARGM_BITS + ARGT_BITS * 4)))
|
||||
|
||||
/* Mapping between argument number and literal description. */
|
||||
extern const char *arg_type_names[];
|
||||
|
||||
/* This dummy arg list may be used by default when no arg is found, it helps
|
||||
* parsers by removing pointer checks.
|
||||
*/
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <types/session.h>
|
||||
|
||||
int fetch_rdp_cookie_name(struct session *s, struct sample *smp, const char *cname, int clen);
|
||||
int val_payload_lv(struct arg *arg, char **err_msg);
|
||||
|
||||
#endif /* _PROTO_PROTO_PAYLOAD_H */
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ enum http_meth_t find_http_meth(const char *str, const int len);
|
|||
|
||||
struct http_req_action_kw *action_http_req_custom(const char *kw);
|
||||
struct http_res_action_kw *action_http_res_custom(const char *kw);
|
||||
int val_hdr(struct arg *arg, char **err_msg);
|
||||
|
||||
static inline void http_req_keywords_register(struct http_req_action_kw_list *kw_list)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <common/standard.h>
|
||||
#include <proto/arg.h>
|
||||
|
||||
static const char *arg_type_names[ARGT_NBTYPES] = {
|
||||
const char *arg_type_names[ARGT_NBTYPES] = {
|
||||
[ARGT_STOP] = "end of arguments",
|
||||
[ARGT_UINT] = "unsigned integer",
|
||||
[ARGT_SINT] = "signed integer",
|
||||
|
|
|
@ -631,7 +631,7 @@ smp_fetch_payload(struct proxy *px, struct session *s, void *l7, unsigned int op
|
|||
* error, that the caller is responsible for freeing. The initial location must
|
||||
* either be freeable or NULL.
|
||||
*/
|
||||
static int val_payload_lv(struct arg *arg, char **err_msg)
|
||||
int val_payload_lv(struct arg *arg, char **err_msg)
|
||||
{
|
||||
if (!arg[1].data.uint) {
|
||||
memprintf(err_msg, "payload length must be > 0");
|
||||
|
|
|
@ -11364,7 +11364,7 @@ smp_fetch_url32_src(struct proxy *px, struct session *l4, void *l7, unsigned int
|
|||
* error message in case of error, that the caller is responsible for freeing.
|
||||
* The initial location must either be freeable or NULL.
|
||||
*/
|
||||
static int val_hdr(struct arg *arg, char **err_msg)
|
||||
int val_hdr(struct arg *arg, char **err_msg)
|
||||
{
|
||||
if (arg && arg[1].type == ARGT_SINT && arg[1].data.sint < -MAX_HDR_HISTORY) {
|
||||
memprintf(err_msg, "header occurrence must be >= %d", -MAX_HDR_HISTORY);
|
||||
|
|
Loading…
Reference in New Issue