2005-02-20 14:27:00 +00:00
|
|
|
#ifndef _KEY_VALUE_H_
|
|
|
|
#define _KEY_VALUE_H_
|
2016-03-19 15:14:35 +00:00
|
|
|
#include "first.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2018-03-25 07:45:05 +00:00
|
|
|
#include "base_decls.h"
|
|
|
|
#include "buffer.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2018-07-01 00:11:53 +00:00
|
|
|
struct burl_parts_t; /* declaration */
|
2019-11-21 05:15:51 +00:00
|
|
|
struct cond_match_t; /* declaration */
|
2018-04-17 04:53:40 +00:00
|
|
|
struct pcre_keyvalue; /* declaration */
|
2018-03-25 07:45:05 +00:00
|
|
|
|
2018-04-17 04:53:40 +00:00
|
|
|
typedef struct pcre_keyvalue_ctx {
|
2019-11-21 05:15:51 +00:00
|
|
|
struct cond_match_t *cache;
|
2018-07-01 00:11:53 +00:00
|
|
|
struct burl_parts_t *burl;
|
2019-11-21 05:15:51 +00:00
|
|
|
int cond_match_count;
|
2018-04-17 04:53:40 +00:00
|
|
|
int m;
|
|
|
|
} pcre_keyvalue_ctx;
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2019-11-10 04:20:13 +00:00
|
|
|
struct pcre_keyvalue *kv;
|
|
|
|
uint32_t used;
|
|
|
|
uint16_t x0;
|
|
|
|
uint16_t x1;
|
2016-01-30 13:59:10 +00:00
|
|
|
} pcre_keyvalue_buffer;
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2019-11-10 04:20:13 +00:00
|
|
|
__attribute_cold__
|
2021-03-15 09:41:50 +00:00
|
|
|
__attribute_malloc__
|
2021-03-17 00:27:05 +00:00
|
|
|
__attribute_returns_nonnull__
|
2005-02-20 14:27:00 +00:00
|
|
|
pcre_keyvalue_buffer *pcre_keyvalue_buffer_init(void);
|
2019-11-10 04:20:13 +00:00
|
|
|
|
|
|
|
__attribute_cold__
|
2021-03-14 12:09:58 +00:00
|
|
|
int pcre_keyvalue_buffer_append(log_error_st *errh, pcre_keyvalue_buffer *kvb, const buffer *key, const buffer *value, int pcre_jit);
|
2019-11-10 04:20:13 +00:00
|
|
|
|
|
|
|
__attribute_cold__
|
2005-02-20 14:27:00 +00:00
|
|
|
void pcre_keyvalue_buffer_free(pcre_keyvalue_buffer *kvb);
|
2019-11-10 04:20:13 +00:00
|
|
|
|
|
|
|
handler_t pcre_keyvalue_buffer_process(const pcre_keyvalue_buffer *kvb, pcre_keyvalue_ctx *ctx, const buffer *input, buffer *result);
|
|
|
|
|
|
|
|
__attribute_cold__
|
2018-05-01 04:20:26 +00:00
|
|
|
void pcre_keyvalue_burl_normalize_key(buffer *k, buffer *t);
|
2019-11-10 04:20:13 +00:00
|
|
|
|
|
|
|
__attribute_cold__
|
2018-05-01 04:20:26 +00:00
|
|
|
void pcre_keyvalue_burl_normalize_value(buffer *v, buffer *t);
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
#endif
|