diff --git a/include/proto/dumpstats.h b/include/proto/dumpstats.h index 0da3091c5..78ff6f76c 100644 --- a/include/proto/dumpstats.h +++ b/include/proto/dumpstats.h @@ -38,26 +38,6 @@ #define STATS_TYPE_SV 2 #define STATS_TYPE_SO 3 -/* unix stats socket states */ -#define STAT_CLI_INIT 0 /* initial state, must leave to zero ! */ -#define STAT_CLI_END 1 /* final state, let's close */ -#define STAT_CLI_GETREQ 2 /* wait for a request */ -#define STAT_CLI_OUTPUT 3 /* all states after this one are responses */ -#define STAT_CLI_PROMPT 3 /* display the prompt (first output, same code) */ -#define STAT_CLI_PRINT 4 /* display message in cli->msg */ - -#define STAT_CLI_O_INFO 5 /* dump info */ -#define STAT_CLI_O_SESS 6 /* dump sessions */ -#define STAT_CLI_O_ERR 7 /* dump errors */ -#define STAT_CLI_O_TAB 8 /* dump tables */ -#define STAT_CLI_O_CLR 9 /* clear tables */ -#define STAT_CLI_O_SET 10 /* set entries in tables */ -#define STAT_CLI_O_STAT 11 /* dump stats */ - -#define STAT_CLI_O_MAPS 12 /* list all maps */ -#define STAT_CLI_O_MAP 13 /* list all map entries of a map */ -#define STAT_CLI_O_MLOOK 14 /* lookup a map entry */ - /* HTTP stats : applet.st0 */ enum { STAT_HTTP_DONE = 0, /* finished */ diff --git a/src/dumpstats.c b/src/dumpstats.c index 51b47ca9e..c2dfe1f9a 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -63,6 +63,26 @@ #include #endif +/* stats socket states */ +enum { + STAT_CLI_INIT = 0, /* initial state, must leave to zero ! */ + STAT_CLI_END, /* final state, let's close */ + STAT_CLI_GETREQ, /* wait for a request */ + STAT_CLI_OUTPUT, /* all states after this one are responses */ + STAT_CLI_PROMPT, /* display the prompt (first output, same code) */ + STAT_CLI_PRINT, /* display message in cli->msg */ + STAT_CLI_O_INFO, /* dump info */ + STAT_CLI_O_SESS, /* dump sessions */ + STAT_CLI_O_ERR, /* dump errors */ + STAT_CLI_O_TAB, /* dump tables */ + STAT_CLI_O_CLR, /* clear tables */ + STAT_CLI_O_SET, /* set entries in tables */ + STAT_CLI_O_STAT, /* dump stats */ + STAT_CLI_O_MAPS, /* list all maps */ + STAT_CLI_O_MAP, /* list all map entries of a map */ + STAT_CLI_O_MLOOK, /* lookup a map entry */ +}; + static int stats_dump_info_to_buffer(struct stream_interface *si); static int stats_dump_full_sess_to_buffer(struct stream_interface *si, struct session *sess); static int stats_dump_sess_to_buffer(struct stream_interface *si);