blob: 59241b22b09d02ad6aaf09277740fab85f837276 [file] [log] [blame]
Dragan Dosen59bb97a2017-06-02 12:03:16 +02001/*
2 * Mod Defender for HAProxy
3 *
4 * Copyright 2017 HAProxy Technologies, Dragan Dosen <ddosen@haproxy.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 3 of the License, or (at your option) any later version.
10 *
11 */
12#ifndef __DEFENDER_H__
13#define __DEFENDER_H__
14
Willy Tarreaue6ce10b2020-06-04 15:33:47 +020015#include <haproxy/sample-t.h>
Dragan Dosen59bb97a2017-06-02 12:03:16 +020016
17struct defender_request {
18 struct sample clientip;
19 struct sample id;
20 struct sample method;
21 struct sample path;
22 struct sample query;
23 struct sample version;
24 struct sample headers;
25 struct sample body;
26};
27
28struct defender_header {
29 struct {
30 char *str;
31 uint64_t len;
32 } name;
33 struct {
34 char *str;
35 uint64_t len;
36 } value;
37};
38
39int defender_init(const char *config_file, const char *log_file);
40int defender_process_request(struct worker *worker, struct defender_request *request);
41
42#endif /* __DEFENDER_H__ */