[CLEANUP] move remaining stats sockets code to dumpstats
The remains of the stats socket code has nothing to do in proto_uxst
anymore and must move to dumpstats. The code is much cleaner and more
structured. It was also an opportunity to rename AN_REQ_UNIX_STATS
as AN_REQ_STATS_SOCK as the stats socket is no longer unix-specific
either.
The last item refering to stats in proto_uxst is the setting of the
task's nice value which should in fact come from the listener.
diff --git a/include/common/defaults.h b/include/common/defaults.h
index f0873cf..966ef4f 100644
--- a/include/common/defaults.h
+++ b/include/common/defaults.h
@@ -64,8 +64,8 @@
// max # args on a configuration line
#define MAX_LINE_ARGS 64
-// max # args on a uxts socket
-#define MAX_UXST_ARGS 16
+// max # args on a stats socket
+#define MAX_STATS_ARGS 16
// max # of added headers per request
#define MAX_NEWHDR 10
diff --git a/include/proto/dumpstats.h b/include/proto/dumpstats.h
index 844879a..a0167a7 100644
--- a/include/proto/dumpstats.h
+++ b/include/proto/dumpstats.h
@@ -44,6 +44,8 @@
#define STATS_ST_REP 2
#define STATS_ST_CLOSE 3
+int stats_sock_parse_request(struct session *s, char *line);
+int stats_sock_req_analyser(struct session *s, struct buffer *req, int an_bit);
int stats_dump_raw(struct session *s, struct buffer *rep, struct uri_auth *uri);
void stats_dump_raw_to_buffer(struct session *s, struct buffer *req);
int stats_dump_http(struct session *s, struct buffer *rep, struct uri_auth *uri);
diff --git a/include/types/buffers.h b/include/types/buffers.h
index 0553116..b9836b2 100644
--- a/include/types/buffers.h
+++ b/include/types/buffers.h
@@ -113,7 +113,7 @@
#define AN_REQ_HTTP_INNER 0x00000020 /* inner processing of HTTP request */
#define AN_REQ_HTTP_TARPIT 0x00000040 /* wait for end of HTTP tarpit */
#define AN_REQ_HTTP_BODY 0x00000080 /* inspect HTTP request body */
-#define AN_REQ_UNIX_STATS 0x00000100 /* process unix stats socket request */
+#define AN_REQ_STATS_SOCK 0x00000100 /* process stats socket request */
#define AN_RTR_HTTP_HDR 0x00000200 /* inspect HTTP response headers */
#define AN_REQ_PRST_RDP_COOKIE 0x00000400 /* persistence on rdp cookie */