mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
REORG: include: move spoe.h to haproxy/spoe{,-t}.h
Only minor change was to make sure all defines were before the structs in spoe-t.h, everything else went smoothly.
This commit is contained in:
parent
a264d960f6
commit
6c58ab0304
@ -21,10 +21,9 @@
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/tools.h>
|
||||
#include <haproxy/chunk.h>
|
||||
#include <haproxy/spoe.h>
|
||||
#include <haproxy/time.h>
|
||||
|
||||
#include <proto/spoe.h>
|
||||
|
||||
#include <http_core.h>
|
||||
#include <http_main.h>
|
||||
#include <http_log.h>
|
||||
|
@ -33,8 +33,7 @@
|
||||
|
||||
#include <haproxy/list.h>
|
||||
#include <haproxy/chunk.h>
|
||||
|
||||
#include <proto/spoe.h>
|
||||
#include <haproxy/spoe.h>
|
||||
|
||||
#include "spoa.h"
|
||||
#include "defender.h"
|
||||
|
@ -19,12 +19,12 @@
|
||||
#include <haproxy/global.h>
|
||||
#include <haproxy/hlua.h>
|
||||
#include <haproxy/log.h>
|
||||
#include <haproxy/spoe.h>
|
||||
#include <haproxy/time.h>
|
||||
|
||||
#include <types/stream.h>
|
||||
|
||||
#include <haproxy/arg.h>
|
||||
#include <proto/spoe.h>
|
||||
|
||||
#include <api.h>
|
||||
|
||||
|
@ -38,8 +38,7 @@
|
||||
|
||||
#include <haproxy/list.h>
|
||||
#include <haproxy/chunk.h>
|
||||
|
||||
#include <proto/spoe.h>
|
||||
#include <haproxy/spoe.h>
|
||||
|
||||
#include "spoa.h"
|
||||
#include "modsec_wrapper.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* include/types/spoe.h
|
||||
* include/haproxy/spoe-t.h
|
||||
* Macros, variables and structures for the SPOE filter.
|
||||
*
|
||||
* Copyright (C) 2017 HAProxy Technologies, Christopher Faulet <cfaulet@haproxy.com>
|
||||
@ -19,21 +19,21 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _TYPES_SPOE_H
|
||||
#define _TYPES_SPOE_H
|
||||
#ifndef _HAPROXY_SPOE_T_H
|
||||
#define _HAPROXY_SPOE_T_H
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <haproxy/buf-t.h>
|
||||
#include <haproxy/dynbuf-t.h>
|
||||
#include <haproxy/filters-t.h>
|
||||
#include <haproxy/freq_ctr-t.h>
|
||||
#include <haproxy/list-t.h>
|
||||
#include <haproxy/proxy-t.h>
|
||||
#include <haproxy/thread.h>
|
||||
|
||||
#include <haproxy/freq_ctr-t.h>
|
||||
#include <haproxy/sample-t.h>
|
||||
#include <types/stream.h>
|
||||
#include <haproxy/task-t.h>
|
||||
#include <haproxy/thread-t.h>
|
||||
#include <types/stream.h>
|
||||
|
||||
/* Type of list of messages */
|
||||
#define SPOE_MSGS_BY_EVENT 0x01
|
||||
@ -68,6 +68,14 @@
|
||||
#define SPOE_FRM_FL_FIN 0x00000001
|
||||
#define SPOE_FRM_FL_ABRT 0x00000002
|
||||
|
||||
/* Masks to get data type or flags value */
|
||||
#define SPOE_DATA_T_MASK 0x0F
|
||||
#define SPOE_DATA_FL_MASK 0xF0
|
||||
|
||||
/* Flags to set Boolean values */
|
||||
#define SPOE_DATA_FL_FALSE 0x00
|
||||
#define SPOE_DATA_FL_TRUE 0x10
|
||||
|
||||
/* All possible states for a SPOE context */
|
||||
enum spoe_ctx_state {
|
||||
SPOE_CTX_ST_NONE = 0,
|
||||
@ -161,6 +169,36 @@ enum spoe_vars_scope {
|
||||
SPOE_SCOPE_RES, /* <=> SCOPE_RES */
|
||||
};
|
||||
|
||||
/* Frame Types sent by HAProxy and by agents */
|
||||
enum spoe_frame_type {
|
||||
SPOE_FRM_T_UNSET = 0,
|
||||
|
||||
/* Frames sent by HAProxy */
|
||||
SPOE_FRM_T_HAPROXY_HELLO = 1,
|
||||
SPOE_FRM_T_HAPROXY_DISCON,
|
||||
SPOE_FRM_T_HAPROXY_NOTIFY,
|
||||
|
||||
/* Frames sent by the agents */
|
||||
SPOE_FRM_T_AGENT_HELLO = 101,
|
||||
SPOE_FRM_T_AGENT_DISCON,
|
||||
SPOE_FRM_T_AGENT_ACK
|
||||
};
|
||||
|
||||
/* All supported data types */
|
||||
enum spoe_data_type {
|
||||
SPOE_DATA_T_NULL = 0,
|
||||
SPOE_DATA_T_BOOL,
|
||||
SPOE_DATA_T_INT32,
|
||||
SPOE_DATA_T_UINT32,
|
||||
SPOE_DATA_T_INT64,
|
||||
SPOE_DATA_T_UINT64,
|
||||
SPOE_DATA_T_IPV4,
|
||||
SPOE_DATA_T_IPV6,
|
||||
SPOE_DATA_T_STR,
|
||||
SPOE_DATA_T_BIN,
|
||||
SPOE_DATA_TYPES
|
||||
};
|
||||
|
||||
|
||||
/* Describe an argument that will be linked to a message. It is a sample fetch,
|
||||
* with an optional name. */
|
||||
@ -371,43 +409,4 @@ struct spoe_appctx {
|
||||
} frag_ctx; /* Info about fragmented frames, unused for unfragmented frames */
|
||||
};
|
||||
|
||||
/* Frame Types sent by HAProxy and by agents */
|
||||
enum spoe_frame_type {
|
||||
SPOE_FRM_T_UNSET = 0,
|
||||
|
||||
/* Frames sent by HAProxy */
|
||||
SPOE_FRM_T_HAPROXY_HELLO = 1,
|
||||
SPOE_FRM_T_HAPROXY_DISCON,
|
||||
SPOE_FRM_T_HAPROXY_NOTIFY,
|
||||
|
||||
/* Frames sent by the agents */
|
||||
SPOE_FRM_T_AGENT_HELLO = 101,
|
||||
SPOE_FRM_T_AGENT_DISCON,
|
||||
SPOE_FRM_T_AGENT_ACK
|
||||
};
|
||||
|
||||
/* All supported data types */
|
||||
enum spoe_data_type {
|
||||
SPOE_DATA_T_NULL = 0,
|
||||
SPOE_DATA_T_BOOL,
|
||||
SPOE_DATA_T_INT32,
|
||||
SPOE_DATA_T_UINT32,
|
||||
SPOE_DATA_T_INT64,
|
||||
SPOE_DATA_T_UINT64,
|
||||
SPOE_DATA_T_IPV4,
|
||||
SPOE_DATA_T_IPV6,
|
||||
SPOE_DATA_T_STR,
|
||||
SPOE_DATA_T_BIN,
|
||||
SPOE_DATA_TYPES
|
||||
};
|
||||
|
||||
/* Masks to get data type or flags value */
|
||||
#define SPOE_DATA_T_MASK 0x0F
|
||||
#define SPOE_DATA_FL_MASK 0xF0
|
||||
|
||||
/* Flags to set Boolean values */
|
||||
#define SPOE_DATA_FL_FALSE 0x00
|
||||
#define SPOE_DATA_FL_TRUE 0x10
|
||||
|
||||
|
||||
#endif /* _TYPES_SPOE_H */
|
||||
#endif /* _HAPROXY_SPOE_T_H */
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* include/proto/spoe.h
|
||||
* include/haproxy/spoe.h
|
||||
* Encoding/Decoding functions for the SPOE filters (and other helpers).
|
||||
*
|
||||
* Copyright (C) 2017 HAProxy Technologies, Christopher Faulet <cfaulet@haproxy.com>
|
||||
@ -19,13 +19,13 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _PROTO_SPOE_H
|
||||
#define _PROTO_SPOE_H
|
||||
#ifndef _HAPROXY_SPOE_H
|
||||
#define _HAPROXY_SPOE_H
|
||||
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/intops.h>
|
||||
#include <haproxy/sample-t.h>
|
||||
|
||||
#include <types/spoe.h>
|
||||
#include <haproxy/spoe-t.h>
|
||||
|
||||
|
||||
/* Encode a buffer. Its length <len> is encoded as a varint, followed by a copy
|
||||
@ -348,4 +348,4 @@ spoe_decode_data(char **buf, char *end, struct sample *smp)
|
||||
return r;
|
||||
}
|
||||
|
||||
#endif /* _PROTO_SPOE_H */
|
||||
#endif /* _HAPROXY_SPOE_H */
|
@ -26,6 +26,7 @@
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/proxy.h>
|
||||
#include <haproxy/session.h>
|
||||
#include <haproxy/spoe.h>
|
||||
#include <haproxy/stream_interface.h>
|
||||
#include <haproxy/task.h>
|
||||
#include <haproxy/tcp_rules.h>
|
||||
@ -34,12 +35,10 @@
|
||||
|
||||
#include <haproxy/arg-t.h>
|
||||
#include <haproxy/global.h>
|
||||
#include <types/spoe.h>
|
||||
|
||||
#include <haproxy/arg.h>
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/freq_ctr.h>
|
||||
#include <proto/spoe.h>
|
||||
#include <proto/stream.h>
|
||||
|
||||
#if defined(DEBUG_SPOE) || defined(DEBUG_FULL)
|
||||
|
Loading…
Reference in New Issue
Block a user