25#ifndef PROTOCORE_PROXY_PROTOCOL_H
26#define PROTOCORE_PROXY_PROTOCOL_H
30#if PROTOCORE_ENABLE_PROXY_PROTOCOL
38#define PROXY_V2_SIG_LEN 12
39#define PROXY_V2_VER_CMD_PROXY 0x21
40#define PROXY_V2_VER_CMD_LOCAL 0x20
41#define PROXY_V2_FAM_TCP4 0x11
61} ProxyProtocolParseArgs;
72} ProxyProtocolV1BuildArgs;
83} ProxyProtocolV2BuildArgs;
115 ProxyProtocolParseArgs parse_args;
116 ProxyProtocolV1BuildArgs v1_build_args;
117 ProxyProtocolV2BuildArgs v2_build_args;
123extern ProxyProtocolVars ProxyProtocolV;
128 void (*
const parse)(uint8_t *work);
129 void (*
const v1_build)(uint8_t *work);
130 void (*
const v2_build)(uint8_t *work);
135void protocore_proxy_protocol_parse(uint8_t *work);
136void protocore_proxy_protocol_v1_build(uint8_t *work);
137void protocore_proxy_protocol_v2_build(uint8_t *work);
143static const ProxyProtocolNs ProxyProtocol __attribute__((unused)) = {
144 .parse = protocore_proxy_protocol_parse,
145 .v1_build = protocore_proxy_protocol_v1_build,
146 .v2_build = protocore_proxy_protocol_v2_build,
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS