REORG: include: move peers.h to haproxy/peers{,-t}.h

The cfg_peers external declaration was moved to the main file instead
of the type one. A few types were still missing from the proto, causing
warnings in the functions prototypes (proxy, stick_table).
diff --git a/include/types/peers.h b/include/haproxy/peers-t.h
similarity index 96%
rename from include/types/peers.h
rename to include/haproxy/peers-t.h
index 33d40ec..ea96751 100644
--- a/include/types/peers.h
+++ b/include/haproxy/peers-t.h
@@ -1,5 +1,5 @@
 /*
- * include/types/peers.h
+ * include/haproxy/peers-t.h
  * This file defines everything related to peers.
  *
  * Copyright 2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
@@ -19,18 +19,20 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_PEERS_H
-#define _TYPES_PEERS_H
+#ifndef _HAPROXY_PEERS_T_H
+#define _HAPROXY_PEERS_T_H
 
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <import/eb32tree.h>
+
 #include <haproxy/dict-t.h>
+#include <haproxy/thread-t.h>
 #include <haproxy/api-t.h>
 #include <haproxy/list-t.h>
-#include <import/eb32tree.h>
 
 
 struct shared_table {
@@ -131,7 +133,5 @@
 	size_t max_entries;
 };
 
-extern struct peers *cfg_peers;
-
-#endif /* _TYPES_PEERS_H */
+#endif /* _HAPROXY_PEERS_T_H */
 
diff --git a/include/proto/peers.h b/include/haproxy/peers.h
similarity index 86%
rename from include/proto/peers.h
rename to include/haproxy/peers.h
index 93bb322..10fd8d8 100644
--- a/include/proto/peers.h
+++ b/include/haproxy/peers.h
@@ -1,5 +1,5 @@
 /*
- * include/proto/peers.h
+ * include/haproxy/peers.h
  * This file defines function prototypes for peers management.
  *
  * Copyright 2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
@@ -19,15 +19,25 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_PEERS_H
-#define _PROTO_PEERS_H
+#ifndef _HAPROXY_PEERS_H
+#define _HAPROXY_PEERS_H
 
 #include <haproxy/api.h>
 #include <haproxy/connection.h>
-#include <haproxy/ticks.h>
+#include <haproxy/obj_type.h>
+#include <haproxy/peers-t.h>
 #include <haproxy/time.h>
+
+#include <types/proxy.h>
+#include <types/stick_table.h>
 #include <types/stream.h>
-#include <types/peers.h>
+
+extern struct peers *cfg_peers;
+
+int peers_init_sync(struct peers *peers);
+int peers_alloc_dcache(struct peers *peers);
+void peers_register_table(struct peers *, struct stktable *table);
+void peers_setup_frontend(struct proxy *fe);
 
 #if defined(USE_OPENSSL)
 static inline enum obj_type *peer_session_target(struct peer *p, struct stream *s)
@@ -54,10 +64,5 @@
 }
 #endif
 
-int peers_init_sync(struct peers *peers);
-int peers_alloc_dcache(struct peers *peers);
-void peers_register_table(struct peers *, struct stktable *table);
-void peers_setup_frontend(struct proxy *fe);
-
-#endif /* _PROTO_PEERS_H */
+#endif /* _HAPROXY_PEERS_H */
 
diff --git a/include/types/stick_table.h b/include/types/stick_table.h
index 0ee7b95..2918381 100644
--- a/include/types/stick_table.h
+++ b/include/types/stick_table.h
@@ -32,7 +32,7 @@
 #include <haproxy/dict-t.h>
 #include <haproxy/pool-t.h>
 #include <haproxy/freq_ctr-t.h>
-#include <types/peers.h>
+#include <haproxy/peers-t.h>
 #include <haproxy/sample-t.h>
 
 /* The types of extra data we can store in a stick table */
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 6051b15..0a0c315 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -52,6 +52,7 @@
 #include <haproxy/listener.h>
 #include <haproxy/mailers-t.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/peers-t.h>
 #include <haproxy/pool.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
@@ -62,7 +63,6 @@
 
 #include <types/filters.h>
 #include <haproxy/global.h>
-#include <types/peers.h>
 #include <types/stats.h>
 
 #include <proto/acl.h>
@@ -75,7 +75,7 @@
 #include <haproxy/protocol.h>
 #include <proto/http_ana.h>
 #include <proto/proxy.h>
-#include <proto/peers.h>
+#include <haproxy/peers.h>
 #include <haproxy/sample.h>
 #include <proto/session.h>
 #include <proto/server.h>
diff --git a/src/cli.c b/src/cli.c
index 63d2b58..48539fd 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -35,6 +35,7 @@
 #include <haproxy/listener.h>
 #include <haproxy/mworker-t.h>
 #include <haproxy/pattern-t.h>
+#include <haproxy/peers.h>
 #include <haproxy/sample-t.h>
 #include <haproxy/task.h>
 #include <haproxy/tools.h>
diff --git a/src/haproxy.c b/src/haproxy.c
index 9b0d767..bfbfa05 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -99,6 +99,7 @@
 #include <haproxy/net_helper.h>
 #include <haproxy/openssl-compat.h>
 #include <haproxy/pattern.h>
+#include <haproxy/peers.h>
 #include <haproxy/sample.h>
 #include <haproxy/regex.h>
 #include <haproxy/signal.h>
@@ -115,7 +116,6 @@
 #include <types/filters.h>
 #include <haproxy/global.h>
 #include <types/acl.h>
-#include <types/peers.h>
 
 #include <proto/acl.h>
 #include <haproxy/activity.h>
diff --git a/src/mworker.c b/src/mworker.c
index eeedb4c..091a6df 100644
--- a/src/mworker.c
+++ b/src/mworker.c
@@ -22,12 +22,12 @@
 #include <haproxy/list.h>
 #include <haproxy/listener.h>
 #include <haproxy/mworker.h>
+#include <haproxy/peers.h>
 #include <haproxy/signal.h>
 #include <haproxy/version.h>
 
 #include <types/cli.h>
 #include <haproxy/global.h>
-#include <types/peers.h>
 
 #include <proto/cli.h>
 #include <haproxy/fd.h>
diff --git a/src/peers.c b/src/peers.c
index c1c9588..8ffe421 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -25,13 +25,13 @@
 #include <haproxy/frontend.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/peers.h>
 #include <haproxy/task.h>
 #include <haproxy/signal.h>
 #include <haproxy/time.h>
 #include <haproxy/tools.h>
 #include <haproxy/thread.h>
 
-#include <types/peers.h>
 #include <types/stats.h>
 
 #include <proto/acl.h>
@@ -40,7 +40,6 @@
 #include <proto/cli.h>
 #include <haproxy/fd.h>
 #include <proto/log.h>
-#include <proto/peers.h>
 #include <proto/proxy.h>
 #include <proto/session.h>
 #include <proto/stream.h>
diff --git a/src/proxy.c b/src/proxy.c
index bb686e7..c66927d 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -23,6 +23,7 @@
 #include <haproxy/global.h>
 #include <haproxy/listener.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/peers.h>
 #include <haproxy/pool.h>
 #include <haproxy/task.h>
 #include <haproxy/time.h>
@@ -32,7 +33,6 @@
 
 #include <haproxy/capture-t.h>
 #include <types/cli.h>
-#include <types/peers.h>
 #include <types/stats.h>
 
 #include <proto/applet.h>
diff --git a/src/stick_table.c b/src/stick_table.c
index aad4071..835b0a6 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -21,6 +21,7 @@
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 #include <haproxy/net_helper.h>
+#include <haproxy/peers.h>
 #include <haproxy/task.h>
 #include <haproxy/tcp_rules.h>
 #include <haproxy/tools.h>
@@ -42,7 +43,6 @@
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/stick_table.h>
-#include <proto/peers.h>
 
 /* structure used to return a table key built from a sample */
 static THREAD_LOCAL struct stktable_key static_table_key;