]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move pipe.h to haproxy/pipe{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 06:32:23 +0000 (08:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
No change was needed beyond a minor cleanup.

12 files changed:
contrib/prometheus-exporter/service-prometheus.c
include/haproxy/pipe-t.h [new file with mode: 0644]
include/haproxy/pipe.h [new file with mode: 0644]
include/proto/pipe.h [deleted file]
include/types/pipe.h [deleted file]
src/cli.c
src/mux_h1.c
src/pipe.c
src/raw_sock.c
src/stats.c
src/stream.c
src/stream_interface.c

index 916e5c706cd30b531a5e644d8863b26e2e983abf..65eb44da202e5a22207adcd94221dc4f4740a464 100644 (file)
@@ -29,7 +29,7 @@
 #include <proto/frontend.h>
 #include <proto/listener.h>
 #include <proto/http_htx.h>
-#include <proto/pipe.h>
+#include <haproxy/pipe.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
 #include <proto/server.h>
diff --git a/include/haproxy/pipe-t.h b/include/haproxy/pipe-t.h
new file mode 100644 (file)
index 0000000..1a1fcfd
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * include/haproxy/pipe-t.h
+ * Pipe management - types definitions.
+ *
+ * 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
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _HAPROXY_PIPE_T_H
+#define _HAPROXY_PIPE_T_H
+
+/* A pipe is described by its read and write FDs, and the data remaining in it.
+ * The FDs are valid if there are data pending. The user is not allowed to
+ * change the FDs.
+ */
+struct pipe {
+       int data;       /* number of bytes present in the pipe  */
+       int prod;       /* FD the producer must write to ; -1 if none */
+       int cons;       /* FD the consumer must read from ; -1 if none */
+       struct pipe *next;
+};
+
+#endif /* _HAPROXY_PIPE_T_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
diff --git a/include/haproxy/pipe.h b/include/haproxy/pipe.h
new file mode 100644 (file)
index 0000000..12bd8ea
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * include/haproxy/pipe.h
+ * Pipe management - exported functions
+ *
+ * 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
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _HAPROXY_PIPE_H
+#define _HAPROXY_PIPE_H
+
+#include <haproxy/api.h>
+#include <haproxy/pipe-t.h>
+
+extern int pipes_used; /* # of pipes in use (2 fds each) */
+extern int pipes_free; /* # of pipes unused (2 fds each) */
+
+/* return a pre-allocated empty pipe. Try to allocate one if there isn't any
+ * left. NULL is returned if a pipe could not be allocated.
+ */
+struct pipe *get_pipe();
+
+/* destroy a pipe, possibly because an error was encountered on it. Its FDs
+ * will be closed and it will not be reinjected into the live pool.
+ */
+void kill_pipe(struct pipe *p);
+
+/* put back a unused pipe into the live pool. If it still has data in it, it is
+ * closed and not reinjected into the live pool. The caller is not allowed to
+ * use it once released.
+ */
+void put_pipe(struct pipe *p);
+
+#endif /* _HAPROXY_PIPE_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
diff --git a/include/proto/pipe.h b/include/proto/pipe.h
deleted file mode 100644 (file)
index 4dd3dd6..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-  include/proto/pipe.h
-  Pipe management
-
-  Copyright (C) 2000-2009 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
-  License as published by the Free Software Foundation, version 2.1
-  exclusively.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#ifndef _PROTO_PIPE_H
-#define _PROTO_PIPE_H
-
-#include <haproxy/api.h>
-#include <types/pipe.h>
-
-extern int pipes_used; /* # of pipes in use (2 fds each) */
-extern int pipes_free; /* # of pipes unused (2 fds each) */
-
-/* return a pre-allocated empty pipe. Try to allocate one if there isn't any
- * left. NULL is returned if a pipe could not be allocated.
- */
-struct pipe *get_pipe();
-
-/* destroy a pipe, possibly because an error was encountered on it. Its FDs
- * will be closed and it will not be reinjected into the live pool.
- */
-void kill_pipe(struct pipe *p);
-
-/* put back a unused pipe into the live pool. If it still has data in it, it is
- * closed and not reinjected into the live pool. The caller is not allowed to
- * use it once released.
- */
-void put_pipe(struct pipe *p);
-
-#endif /* _PROTO_PIPE_H */
-
-/*
- * Local variables:
- *  c-indent-level: 8
- *  c-basic-offset: 8
- * End:
- */
diff --git a/include/types/pipe.h b/include/types/pipe.h
deleted file mode 100644 (file)
index c646029..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-  include/types/pipe.h
-  Pipe management.
-
-  Copyright (C) 2000-2009 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
-  License as published by the Free Software Foundation, version 2.1
-  exclusively.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#ifndef _TYPES_PIPE_H
-#define _TYPES_PIPE_H
-
-#include <haproxy/api-t.h>
-
-/* A pipe is described by its read and write FDs, and the data remaining in it.
- * The FDs are valid if there are data pending. The user is not allowed to
- * change the FDs.
- */
-struct pipe {
-       int data;       /* number of bytes present in the pipe  */
-       int prod;       /* FD the producer must write to ; -1 if none */
-       int cons;       /* FD the consumer must read from ; -1 if none */
-       struct pipe *next;
-};
-
-#endif /* _TYPES_PIPE_H */
-
-/*
- * Local variables:
- *  c-indent-level: 8
- *  c-basic-offset: 8
- * End:
- */
index bdfb27091928169968a6dda4b7033312fb0dfa38..afb42b590cbd0b18ba3a78347b3fcdc7840ef9f3 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -53,7 +53,7 @@
 #include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/pattern.h>
-#include <proto/pipe.h>
+#include <haproxy/pipe.h>
 #include <haproxy/protocol.h>
 #include <proto/listener.h>
 #include <proto/map.h>
index ef22ccee18a93c3e49c8532500438e7981b60eb9..f2ba3384477236e5b7fb3a13cdd0062f9b2f4ca5 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <import/ebistree.h>
 
-#include <types/pipe.h>
+#include <haproxy/pipe-t.h>
 #include <types/proxy.h>
 #include <types/session.h>
 
index 6fe7b0524937890926214d8b15c38cd217693db1..992c77bd56495b9427d564b4a7c16fe893cbd014 100644 (file)
@@ -18,7 +18,7 @@
 #include <haproxy/pool.h>
 
 #include <types/global.h>
-#include <types/pipe.h>
+#include <haproxy/pipe-t.h>
 
 DECLARE_STATIC_POOL(pool_head_pipe, "pipe", sizeof(struct pipe));
 
index c1af72a2cc6e1b2654619d0350ef4c8db26fa352..3c64d3cab995fc845a03ad4f78db40a7e5904de2 100644 (file)
@@ -32,7 +32,7 @@
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
-#include <proto/pipe.h>
+#include <haproxy/pipe.h>
 #include <proto/raw_sock.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
index 115b9adebc2ff738f447f1eae1fd4d7bfaf4ba40..fa193bcc8d5907716c06c2b0397d9554de607cca 100644 (file)
@@ -57,7 +57,7 @@
 #include <proto/http_htx.h>
 #include <proto/log.h>
 #include <proto/pattern.h>
-#include <proto/pipe.h>
+#include <haproxy/pipe.h>
 #include <proto/listener.h>
 #include <proto/map.h>
 #include <proto/proxy.h>
index 904eaef03a7481e324933e4e3792f81e95f15f0a..b3c6a0c034f69840b78cd774c8b168bd741ae995 100644 (file)
@@ -52,7 +52,7 @@
 #include <proto/raw_sock.h>
 #include <proto/session.h>
 #include <proto/stream.h>
-#include <proto/pipe.h>
+#include <haproxy/pipe.h>
 #include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/queue.h>
index 921b19111e1700a66837e3805c761a6a4a6911be..157fa51fc4ab179226e0ef5b302e8788720a06ac 100644 (file)
 #include <proto/connection.h>
 #include <proto/http_htx.h>
 #include <proto/mux_pt.h>
-#include <proto/pipe.h>
+#include <haproxy/pipe.h>
 #include <proto/proxy.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
-#include <types/pipe.h>
+#include <haproxy/pipe-t.h>
 
 /* functions used by default on a detached stream-interface */
 static void stream_int_shutr(struct stream_interface *si);