#include <haproxy/namespace-t.h>
#include <import/eb32tree.h>
#include <import/eb32sctree.h>
-#include <types/protocol.h>
+#include <haproxy/protocol-t.h>
/* size used for max length of decimal representation of long long int. */
#define NB_LLMAX_STR (sizeof("-9223372036854775807")-1)
/*
- * include/types/protocol.h
+ * include/haproxy/protocol-t.h
* This file defines the structures used by generic network protocols.
*
- * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TYPES_PROTOCOL_H
-#define _TYPES_PROTOCOL_H
+#ifndef _HAPROXY_PROTOCOL_T_H
+#define _HAPROXY_PROTOCOL_T_H
#include <sys/types.h>
#include <sys/socket.h>
+#include <import/eb32tree.h>
#include <haproxy/api-t.h>
#include <haproxy/list-t.h>
-#include <import/eb32tree.h>
/* some pointer types referenced below */
struct listener;
* Custom network family for str2sa parsing. Should be ok to do this since
* sa_family_t is standardized as an unsigned integer
*/
-
#define AF_CUST_SOCKPAIR (AF_MAX + 1)
#define AF_CUST_MAX (AF_MAX + 2)
# error "Can't build on the target system, AF_CUST_MAX overflow"
#endif
-
-
/* max length of a protocol name, including trailing zero */
#define PROTO_NAME_LEN 16
+/* flags for ->connect() */
+#define CONNECT_HAS_DATA 0x00000001 /* There's data available to be sent */
+#define CONNECT_DELACK_SMART_CONNECT 0x00000002 /* Use a delayed ACK if the backend has tcp-smart-connect */
+#define CONNECT_DELACK_ALWAYS 0x00000004 /* Use a delayed ACK */
+#define CONNECT_CAN_USE_TFO 0x00000008 /* We can use TFO for this connection */
+
/* This structure contains all information needed to easily handle a protocol.
* Its primary goal is to ease listeners maintenance. Specifically, the
* bind_all() primitive must be used before any fork(), and the enable_all()
struct list list; /* list of registered protocols (under proto_lock) */
};
-#define CONNECT_HAS_DATA 0x00000001 /* There's data available to be sent */
-#define CONNECT_DELACK_SMART_CONNECT 0x00000002 /* Use a delayed ACK if the backend has tcp-smart-connect */
-#define CONNECT_DELACK_ALWAYS 0x00000004 /* Use a delayed ACK */
-#define CONNECT_CAN_USE_TFO 0x00000008 /* We can use TFO for this connection */
-#endif /* _TYPES_PROTOCOL_H */
+#endif /* _HAPROXY_PROTOCOL_T_H */
/*
* Local variables:
/*
- * include/proto/protocol.h
+ * include/haproxy/protocol.h
* This file declares generic protocol management primitives.
*
- * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _PROTO_PROTOCOL_H
-#define _PROTO_PROTOCOL_H
+#ifndef _HAPROXY_PROTOCOL_H
+#define _HAPROXY_PROTOCOL_H
#include <sys/socket.h>
+#include <haproxy/protocol-t.h>
#include <haproxy/thread.h>
-#include <types/protocol.h>
extern struct protocol *__protocol_by_family[AF_CUST_MAX];
__decl_thread(extern HA_SPINLOCK_T proto_lock);
return NULL;
}
-#endif /* _PROTO_PROTOCOL_H */
+#endif /* _HAPROXY_PROTOCOL_H */
/*
* Local variables:
#include <types/listener.h>
#include <types/obj_type.h>
#include <types/port_range.h>
-#include <types/protocol.h>
+#include <haproxy/protocol-t.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <proto/mux_pt.h>
#include <proto/obj_type.h>
#include <proto/payload.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/http_ana.h>
#include <proto/proto_tcp.h>
#include <proto/proxy.h>
#include <proto/http_htx.h>
#include <proto/http_rules.h>
#include <proto/listener.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/proxy.h>
#include <proto/server.h>
#include <proto/stick_table.h>
#include <proto/lb_map.h>
#include <proto/listener.h>
#include <proto/log.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/http_ana.h>
#include <proto/proxy.h>
#include <proto/peers.h>
#include <proto/queue.h>
#include <proto/port_range.h>
#include <proto/proto_tcp.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/proxy.h>
#include <proto/server.h>
#include <proto/signal.h>
#include <proto/log.h>
#include <proto/pattern.h>
#include <proto/pipe.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/listener.h>
#include <proto/map.h>
#include <proto/proxy.h>
#include <proto/log.h>
#include <proto/mworker.h>
#include <proto/pattern.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/http_ana.h>
#include <proto/proxy.h>
#include <proto/queue.h>
#include <haproxy/time.h>
#include <types/global.h>
-#include <types/protocol.h>
+#include <haproxy/protocol-t.h>
#include <proto/acl.h>
#include <proto/connection.h>
#include <haproxy/freq_ctr.h>
#include <proto/log.h>
#include <proto/listener.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/proto_sockpair.h>
#include <proto/sample.h>
#include <proto/stream.h>
#include <haproxy/freq_ctr.h>
#include <proto/listener.h>
#include <proto/log.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/task.h>
static void sockpair_add_listener(struct listener *listener, int port);
#include <proto/listener.h>
#include <proto/log.h>
#include <proto/port_range.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/http_ana.h>
#include <proto/proto_tcp.h>
#include <proto/proxy.h>
#include <proto/fd.h>
#include <proto/listener.h>
#include <proto/log.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/task.h>
static int uxst_bind_listener(struct listener *listener, char *errmsg, int errlen);
#include <haproxy/list.h>
#include <common/standard.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
/* List head of all registered protocols */
static struct list protocols = LIST_HEAD_INIT(protocols);
#include <proto/checks.h>
#include <proto/connection.h>
#include <proto/port_range.h>
-#include <proto/protocol.h>
+#include <haproxy/protocol.h>
#include <proto/queue.h>
#include <proto/sample.h>
#include <proto/server.h>