mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 08:24:42 +00:00
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).
This commit is contained in:
parent
126ba3a1e1
commit
3c2a7c2788
@ -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 @@ struct dcache {
|
||||
size_t max_entries;
|
||||
};
|
||||
|
||||
extern struct peers *cfg_peers;
|
||||
|
||||
#endif /* _TYPES_PEERS_H */
|
||||
#endif /* _HAPROXY_PEERS_T_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 @@ static inline struct xprt_ops *peer_xprt(struct peer *p)
|
||||
}
|
||||
#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 */
|
||||
|
@ -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 */
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user