char flags; /* bit field PR_FL_* */
enum pr_mode mode; /* mode = PR_MODE_TCP, PR_MODE_HTTP, ... */
char cap; /* supported capabilities (PR_CAP_*) */
+ /* 4-bytes hole */
+
+ struct list global_list; /* list member for global proxy list */
+
unsigned int maxconn; /* max # of active streams on the frontend */
int options; /* PR_O_REDISP, PR_O_TRANSP, ... */
#include <haproxy/thread.h>
extern struct proxy *proxies_list;
+extern struct list proxies;
extern struct eb_root used_proxy_id; /* list of proxy IDs in use */
extern unsigned int error_snapshot_id; /* global ID assigned to each error then incremented */
extern struct eb_root proxy_by_name; /* tree of proxies sorted by name */
int listeners; /* # of proxy listeners, set by cfgparse */
-struct proxy *proxies_list = NULL; /* list of all existing proxies */
+struct proxy *proxies_list = NULL; /* list of main proxies */
+struct list proxies = LIST_HEAD_INIT(proxies); /* list of all proxies */
struct eb_root used_proxy_id = EB_ROOT; /* list of proxy IDs in use */
struct eb_root proxy_by_name = EB_ROOT; /* tree of proxies sorted by name */
struct eb_root defproxy_by_name = EB_ROOT; /* tree of default proxies sorted by name (dups possible) */
/* note that the node's key points to p->id */
ebpt_delete(&px->conf.by_name);
ha_free(&px->id);
+ LIST_DEL_INIT(&px->global_list);
drop_file_name(&px->conf.file);
ha_free(&px->check_command);
ha_free(&px->check_path);
{
memset(p, 0, sizeof(struct proxy));
p->obj_type = OBJ_TYPE_PROXY;
+ LIST_INIT(&p->global_list);
LIST_INIT(&p->acl);
LIST_INIT(&p->http_req_rules);
LIST_INIT(&p->http_res_rules);
if (name && !(cap & PR_CAP_INT))
proxy_store_name(px);
+ if (!(cap & PR_CAP_DEF))
+ LIST_APPEND(&proxies, &px->global_list);
+
return 1;
}