MINOR: muxes: Show muxes flags when the mux list is displayed
When the mux list is displayed on "haproxy -vv" output, the mux flags are
now diplayed. The flags meaning may be found in the configuration manual.
diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h
index 4f03aef..bccb1ab 100644
--- a/include/haproxy/connection.h
+++ b/include/haproxy/connection.h
@@ -25,6 +25,7 @@
#include <import/ist.h>
#include <haproxy/api.h>
+#include <haproxy/buf.h>
#include <haproxy/connection-t.h>
#include <haproxy/fd.h>
#include <haproxy/http_ana.h>
@@ -928,6 +929,7 @@
static inline void list_mux_proto(FILE *out)
{
struct mux_proto_list *item;
+ struct buffer *chk = get_trash_chunk();
struct ist proto;
char *mode, *side;
@@ -954,8 +956,19 @@
else
side = "NONE";
- fprintf(out, " %15s : mode=%-10s side=%-8s mux=%s\n",
- (proto.len ? proto.ptr : "<default>"), mode, side, item->mux->name);
+ chunk_reset(chk);
+ if (item->mux->flags & MX_FL_HTX)
+ chunk_strcpy(chk, "HTX");
+ if (item->mux->flags & MX_FL_CLEAN_ABRT)
+ chunk_appendf(chk, "%sCLEAN_ABRT", (b_data(chk) ? "|": ""));
+ if (item->mux->flags & MX_FL_HOL_RISK)
+ chunk_appendf(chk, "%sHOL_RISK", (b_data(chk) ? "|": ""));
+ if (item->mux->flags & MX_FL_NO_UPG)
+ chunk_appendf(chk, "%sNO_UPG", (b_data(chk) ? "|": ""));
+
+ fprintf(out, " %15s : mode=%-10s side=%-8s mux=%-8s flags=%.*s\n",
+ (proto.len ? proto.ptr : "<default>"), mode, side, item->mux->name,
+ (int)b_data(chk), b_orig(chk));
}
}