]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move protocol_buffers.h to haproxy/protobuf{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 14:06:59 +0000 (16:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
There is no C file for this one, the code was placed into sample.c which
thus has a dependency on this file which itself includes sample.h. Probably
that it would be wise to split that later.

include/haproxy/arg-t.h
include/haproxy/protobuf-t.h [moved from include/types/protocol_buffers.h with 93% similarity]
include/haproxy/protobuf.h [moved from include/proto/protocol_buffers.h with 98% similarity]
src/sample.c

index 1a4208d4e940ff601f6d05a7069a272766fca258..d63d60f4e82a99294e3d5b3655ab5350e742bbf0 100644 (file)
@@ -27,9 +27,9 @@
 
 #include <haproxy/buf-t.h>
 #include <haproxy/list-t.h>
+#include <haproxy/protobuf-t.h>
 
 #include <types/vars.h>
-#include <types/protocol_buffers.h>
 #include <types/stick_table.h>
 
 /* encoding of each arg type : up to 31 types are supported */
similarity index 93%
rename from include/types/protocol_buffers.h
rename to include/haproxy/protobuf-t.h
index 35e8444ccfb0dc0c0d2b46d972c9e91c449b3561..b1a14e7014fb36c28e278725f24a098bf315bba0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/protocol_buffers.h
+ * include/haproxy/protobuf-t.h
  * This file contains structure declarations for protocol buffers.
  *
  * Copyright 2012 Willy Tarreau <w@1wt.eu>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef _TYPES_PROTOCOL_BUFFERS_H
-#define _TYPES_PROTOCOL_BUFFERS_H
+#ifndef _HAPROXY_PROTOBUF_T_H
+#define _HAPROXY_PROTOBUF_T_H
+
+#include <haproxy/api-t.h>
 
 enum protobuf_wire_type {
        PBUF_TYPE_VARINT,
@@ -75,7 +77,7 @@ struct protobuf_parser_def {
                         unsigned char *pos, size_t left, size_t vlen);
 };
 
-#endif /* _TYPES_PROTOCOL_BUFFERS_H */
+#endif /* _HAPROXY_PROTOBUF_T_H */
 
 /*
  * Local variables:
similarity index 98%
rename from include/proto/protocol_buffers.h
rename to include/haproxy/protobuf.h
index 16ccee57753459b9ee504dcd97d47058ddb6b5b2..7f46543e320860578629676ff3b72612bcb84bdc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/proto/protocol_buffers.h
+ * include/haproxy/protobuf.h
  * This file contains functions and macros declarations for protocol buffers decoding.
  *
  * Copyright 2012 Willy Tarreau <w@1wt.eu>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef _PROTO_PROTOCOL_BUFFERS_H
-#define _PROTO_PROTOCOL_BUFFERS_H
+#ifndef _HAPROXY_PROTOBUF_H
+#define _HAPROXY_PROTOBUF_H
 
-#include <inttypes.h>
+#include <haproxy/api-t.h>
 #include <haproxy/arg-t.h>
+#include <haproxy/protobuf-t.h>
 #include <haproxy/sample-t.h>
-#include <types/protocol_buffers.h>
 
 #define PBUF_VARINT_DONT_STOP_BIT       7
 #define PBUF_VARINT_DONT_STOP_BITMASK  (1 << PBUF_VARINT_DONT_STOP_BIT)
@@ -567,7 +567,7 @@ static inline int protobuf_field_lookup(const struct arg *arg_p, struct sample *
        return 0;
 }
 
-#endif /* _PROTO_PROTOCOL_BUFFERS_H */
+#endif /* _HAPROXY_PROTOBUF_H */
 
 /*
  * Local variables:
index 871db000f26362da80c0cd379c22121a908dfcbe..8ee3407c2f8595356dd389be8e22cd41393890da 100644 (file)
@@ -25,6 +25,7 @@
 #include <haproxy/hash.h>
 #include <haproxy/http.h>
 #include <haproxy/net_helper.h>
+#include <haproxy/protobuf.h>
 #include <haproxy/regex.h>
 #include <haproxy/sample.h>
 #include <haproxy/tools.h>
@@ -34,7 +35,6 @@
 #include <haproxy/arg.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
-#include <proto/protocol_buffers.h>
 #include <haproxy/sink.h>
 #include <proto/stick_table.h>
 #include <proto/vars.h>