mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 09:07:02 +02:00
Commit477902bd2e
("MEDIUM: connections: Get ride of the xprt_done callback.") broke the master CLI for a very obscure reason. It happens that short requests immediately terminated by a shutdown are properly received, CS_FL_EOS is correctly set, but in si_cs_recv(), we refrain from setting CF_SHUTR on the channel because CO_FL_CONNECTED was not yet set on the connection since we've not passed again through conn_fd_handler() and it was not done in conn_complete_session(). While commita8a415d31a
("BUG/MEDIUM: connections: Set CO_FL_CONNECTED in conn_complete_session()") fixed the issue, such accident may happen again as the root cause is deeper and actually comes down to the fact that CO_FL_CONNECTED is lazily set at various check points in the code but not every time we drop one wait bit. It is not the first time we face this situation. Originally this flag was used to detect the transition between WAIT_* and CONNECTED in order to call ->wake() from the FD handler. But since at least 1.8-dev1 with commit7bf3fa3c23
("BUG/MAJOR: connection: update CO_FL_CONNECTED before calling the data layer"), CO_FL_CONNECTED is always synchronized against the two others before being checked. Moreover, with the I/Os moved to tasklets, the decision to call the ->wake() function is performed after the I/Os in si_cs_process() and equivalent, which don't care about this transition either. So in essence, checking for CO_FL_CONNECTED has become a lazy wait to check for (CO_FL_WAIT_L4_CONN | CO_FL_WAIT_L6_CONN), but that always relies on someone else having synchronized it. This patch addresses it once for all by killing this flag and only checking the two others (for which a composite mask CO_FL_WAIT_L4L6 was added). This revealed a number of inconsistencies that were purposely not addressed here for the sake of bisectability: - while most places do check both L4+L6 and HANDSHAKE at the same time, some places like assign_server() or back_handle_st_con() and a few sample fetches looking for proxy protocol do check for L4+L6 but don't care about HANDSHAKE ; these ones will probably fail on TCP request session rules if the handshake is not complete. - some handshake handlers do validate that a connection is established at L4 but didn't clear CO_FL_WAIT_L4_CONN - the ->ctl method of mux_fcgi, mux_pt and mux_h1 only checks for L4+L6 before declaring the mux ready while the snd_buf function also checks for the handshake's completion. Likely the former should validate the handshake as well and we should get rid of these extra tests in snd_buf. - raw_sock_from_buf() would directly set CO_FL_CONNECTED and would only later clear CO_FL_WAIT_L4_CONN. - xprt_handshake would set CO_FL_CONNECTED itself without actually clearing CO_FL_WAIT_L4_CONN, which could apparently happen only if waiting for a pure Rx handshake. - most places in ssl_sock that were checking CO_FL_CONNECTED don't need to include the L4 check as an L6 check is enough to decide whether to wait for more info or not. It also becomes obvious when reading the test in si_cs_recv() that caused the failure mentioned above that once converted it doesn't make any sense anymore: having CS_FL_EOS set while still waiting for L4 and L6 to complete cannot happen since for CS_FL_EOS to be set, the other ones must have been validated. Some of these parts will still deserve further cleanup, and some of the observations above may induce some backports of potential bug fixes once totally analyzed in their context. The risk of breaking existing stuff is too high to blindly backport everything.
389 lines
11 KiB
C
389 lines
11 KiB
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include <types/channel.h>
|
|
#include <types/connection.h>
|
|
#include <types/http_ana.h>
|
|
#include <types/stream.h>
|
|
#include <types/stream_interface.h>
|
|
#include <types/task.h>
|
|
|
|
#define SHOW_FLAG(f,n) \
|
|
do { \
|
|
if (!((f) & (n))) break; \
|
|
(f) &= ~(n); \
|
|
printf(#n"%s", (f) ? " | " : ""); \
|
|
} while (0)
|
|
|
|
void show_chn_ana(unsigned int f)
|
|
{
|
|
printf("chn->ana = ");
|
|
|
|
if (!f) {
|
|
printf("0\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, AN_REQ_FLT_START_FE);
|
|
SHOW_FLAG(f, AN_REQ_INSPECT_FE);
|
|
SHOW_FLAG(f, AN_REQ_WAIT_HTTP);
|
|
SHOW_FLAG(f, AN_REQ_HTTP_BODY);
|
|
SHOW_FLAG(f, AN_REQ_HTTP_PROCESS_FE);
|
|
SHOW_FLAG(f, AN_REQ_SWITCHING_RULES);
|
|
SHOW_FLAG(f, AN_REQ_FLT_START_BE);
|
|
SHOW_FLAG(f, AN_REQ_INSPECT_BE);
|
|
SHOW_FLAG(f, AN_REQ_HTTP_PROCESS_BE);
|
|
SHOW_FLAG(f, AN_REQ_HTTP_TARPIT);
|
|
SHOW_FLAG(f, AN_REQ_SRV_RULES);
|
|
SHOW_FLAG(f, AN_REQ_HTTP_INNER);
|
|
SHOW_FLAG(f, AN_REQ_PRST_RDP_COOKIE);
|
|
SHOW_FLAG(f, AN_REQ_STICKING_RULES);
|
|
SHOW_FLAG(f, AN_REQ_FLT_HTTP_HDRS);
|
|
SHOW_FLAG(f, AN_REQ_HTTP_XFER_BODY);
|
|
SHOW_FLAG(f, AN_REQ_FLT_XFER_DATA);
|
|
SHOW_FLAG(f, AN_REQ_FLT_END);
|
|
|
|
SHOW_FLAG(f, AN_RES_FLT_START_FE);
|
|
SHOW_FLAG(f, AN_RES_FLT_START_BE);
|
|
SHOW_FLAG(f, AN_RES_INSPECT);
|
|
SHOW_FLAG(f, AN_RES_WAIT_HTTP);
|
|
SHOW_FLAG(f, AN_RES_STORE_RULES);
|
|
SHOW_FLAG(f, AN_RES_HTTP_PROCESS_FE);
|
|
SHOW_FLAG(f, AN_RES_HTTP_PROCESS_BE);
|
|
SHOW_FLAG(f, AN_RES_FLT_HTTP_HDRS);
|
|
SHOW_FLAG(f, AN_RES_HTTP_XFER_BODY);
|
|
SHOW_FLAG(f, AN_RES_FLT_XFER_DATA);
|
|
SHOW_FLAG(f, AN_RES_FLT_END);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
void show_chn_flags(unsigned int f)
|
|
{
|
|
printf("chn->flags = ");
|
|
|
|
if (!f) {
|
|
printf("0\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, CF_ISRESP);
|
|
SHOW_FLAG(f, CF_EOI);
|
|
SHOW_FLAG(f, CF_FLT_ANALYZE);
|
|
SHOW_FLAG(f, CF_WAKE_ONCE);
|
|
SHOW_FLAG(f, CF_NEVER_WAIT);
|
|
SHOW_FLAG(f, CF_SEND_DONTWAIT);
|
|
SHOW_FLAG(f, CF_EXPECT_MORE);
|
|
SHOW_FLAG(f, CF_DONT_READ);
|
|
SHOW_FLAG(f, CF_AUTO_CONNECT);
|
|
SHOW_FLAG(f, CF_READ_DONTWAIT);
|
|
SHOW_FLAG(f, CF_KERN_SPLICING);
|
|
SHOW_FLAG(f, CF_READ_ATTACHED);
|
|
SHOW_FLAG(f, CF_ANA_TIMEOUT);
|
|
SHOW_FLAG(f, CF_WROTE_DATA);
|
|
SHOW_FLAG(f, CF_STREAMER_FAST);
|
|
SHOW_FLAG(f, CF_STREAMER);
|
|
SHOW_FLAG(f, CF_AUTO_CLOSE);
|
|
SHOW_FLAG(f, CF_SHUTW_NOW);
|
|
SHOW_FLAG(f, CF_SHUTW);
|
|
SHOW_FLAG(f, CF_WAKE_WRITE);
|
|
SHOW_FLAG(f, CF_WRITE_ERROR);
|
|
SHOW_FLAG(f, CF_WRITE_TIMEOUT);
|
|
SHOW_FLAG(f, CF_WRITE_PARTIAL);
|
|
SHOW_FLAG(f, CF_WRITE_NULL);
|
|
SHOW_FLAG(f, CF_READ_NOEXP);
|
|
SHOW_FLAG(f, CF_SHUTR_NOW);
|
|
SHOW_FLAG(f, CF_SHUTR);
|
|
SHOW_FLAG(f, CF_READ_ERROR);
|
|
SHOW_FLAG(f, CF_READ_TIMEOUT);
|
|
SHOW_FLAG(f, CF_READ_PARTIAL);
|
|
SHOW_FLAG(f, CF_READ_NULL);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
void show_conn_flags(unsigned int f)
|
|
{
|
|
printf("conn->flags = ");
|
|
if (!f) {
|
|
printf("0\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, CO_FL_XPRT_TRACKED);
|
|
SHOW_FLAG(f, CO_FL_RCVD_PROXY);
|
|
SHOW_FLAG(f, CO_FL_PRIVATE);
|
|
SHOW_FLAG(f, CO_FL_ACCEPT_CIP);
|
|
SHOW_FLAG(f, CO_FL_ACCEPT_PROXY);
|
|
SHOW_FLAG(f, CO_FL_SSL_WAIT_HS);
|
|
SHOW_FLAG(f, CO_FL_SEND_PROXY);
|
|
SHOW_FLAG(f, CO_FL_WAIT_L6_CONN);
|
|
SHOW_FLAG(f, CO_FL_WAIT_L4_CONN);
|
|
SHOW_FLAG(f, CO_FL_ERROR);
|
|
SHOW_FLAG(f, CO_FL_SOCK_WR_SH);
|
|
SHOW_FLAG(f, CO_FL_SOCK_RD_SH);
|
|
SHOW_FLAG(f, CO_FL_SOCKS4_RECV);
|
|
SHOW_FLAG(f, CO_FL_SOCKS4_SEND);
|
|
SHOW_FLAG(f, CO_FL_EARLY_DATA);
|
|
SHOW_FLAG(f, CO_FL_EARLY_SSL_HS);
|
|
SHOW_FLAG(f, CO_FL_ADDR_TO_SET);
|
|
SHOW_FLAG(f, CO_FL_ADDR_FROM_SET);
|
|
SHOW_FLAG(f, CO_FL_WAIT_ROOM);
|
|
SHOW_FLAG(f, CO_FL_WILL_UPDATE);
|
|
SHOW_FLAG(f, CO_FL_XPRT_READY);
|
|
SHOW_FLAG(f, CO_FL_CTRL_READY);
|
|
SHOW_FLAG(f, CO_FL_XPRT_WR_ENA);
|
|
SHOW_FLAG(f, CO_FL_XPRT_RD_ENA);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
void show_cs_flags(unsigned int f)
|
|
{
|
|
printf("cs->flags = ");
|
|
if (!f) {
|
|
printf("0\n");
|
|
return;
|
|
}
|
|
SHOW_FLAG(f, CS_FL_READ_PARTIAL);
|
|
SHOW_FLAG(f, CS_FL_NOT_FIRST);
|
|
SHOW_FLAG(f, CS_FL_KILL_CONN);
|
|
SHOW_FLAG(f, CS_FL_WAIT_FOR_HS);
|
|
SHOW_FLAG(f, CS_FL_EOI);
|
|
SHOW_FLAG(f, CS_FL_EOS);
|
|
SHOW_FLAG(f, CS_FL_ERR_PENDING);
|
|
SHOW_FLAG(f, CS_FL_WANT_ROOM);
|
|
SHOW_FLAG(f, CS_FL_RCV_MORE);
|
|
SHOW_FLAG(f, CS_FL_ERROR);
|
|
SHOW_FLAG(f, CS_FL_SHWS);
|
|
SHOW_FLAG(f, CS_FL_SHWN);
|
|
SHOW_FLAG(f, CS_FL_SHRR);
|
|
SHOW_FLAG(f, CS_FL_SHRD);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
void show_si_et(unsigned int f)
|
|
{
|
|
printf("si->et = ");
|
|
if (!f) {
|
|
printf("SI_ET_NONE\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, SI_ET_QUEUE_TO);
|
|
SHOW_FLAG(f, SI_ET_QUEUE_ERR);
|
|
SHOW_FLAG(f, SI_ET_QUEUE_ABRT);
|
|
SHOW_FLAG(f, SI_ET_CONN_TO);
|
|
SHOW_FLAG(f, SI_ET_CONN_ERR);
|
|
SHOW_FLAG(f, SI_ET_CONN_ABRT);
|
|
SHOW_FLAG(f, SI_ET_CONN_RES);
|
|
SHOW_FLAG(f, SI_ET_CONN_OTHER);
|
|
SHOW_FLAG(f, SI_ET_DATA_TO);
|
|
SHOW_FLAG(f, SI_ET_DATA_ERR);
|
|
SHOW_FLAG(f, SI_ET_DATA_ABRT);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
void show_si_flags(unsigned int f)
|
|
{
|
|
printf("si->flags = ");
|
|
if (!f) {
|
|
printf("SI_FL_NONE\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, SI_FL_EXP);
|
|
SHOW_FLAG(f, SI_FL_ERR);
|
|
SHOW_FLAG(f, SI_FL_RXBLK_ROOM);
|
|
SHOW_FLAG(f, SI_FL_WAIT_DATA);
|
|
SHOW_FLAG(f, SI_FL_ISBACK);
|
|
SHOW_FLAG(f, SI_FL_DONT_WAKE);
|
|
SHOW_FLAG(f, SI_FL_INDEP_STR);
|
|
SHOW_FLAG(f, SI_FL_NOLINGER);
|
|
SHOW_FLAG(f, SI_FL_NOHALF);
|
|
SHOW_FLAG(f, SI_FL_SRC_ADDR);
|
|
SHOW_FLAG(f, SI_FL_WANT_GET);
|
|
SHOW_FLAG(f, SI_FL_CLEAN_ABRT);
|
|
SHOW_FLAG(f, SI_FL_RXBLK_CHAN);
|
|
SHOW_FLAG(f, SI_FL_RXBLK_BUFF);
|
|
SHOW_FLAG(f, SI_FL_RXBLK_ROOM);
|
|
SHOW_FLAG(f, SI_FL_RXBLK_SHUT);
|
|
SHOW_FLAG(f, SI_FL_RX_WAIT_EP);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
void show_task_state(unsigned int f)
|
|
{
|
|
printf("task->state = ");
|
|
|
|
if (!f) {
|
|
printf("TASK_SLEEPING\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, TASK_WOKEN_OTHER);
|
|
SHOW_FLAG(f, TASK_WOKEN_RES);
|
|
SHOW_FLAG(f, TASK_WOKEN_MSG);
|
|
SHOW_FLAG(f, TASK_WOKEN_SIGNAL);
|
|
SHOW_FLAG(f, TASK_WOKEN_IO);
|
|
SHOW_FLAG(f, TASK_WOKEN_TIMER);
|
|
SHOW_FLAG(f, TASK_WOKEN_INIT);
|
|
SHOW_FLAG(f, TASK_RUNNING);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
void show_txn_flags(unsigned int f)
|
|
{
|
|
printf("txn->flags = ");
|
|
|
|
if (!f) {
|
|
printf("0\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, TX_NOT_FIRST);
|
|
SHOW_FLAG(f, TX_USE_PX_CONN);
|
|
SHOW_FLAG(f, TX_WAIT_NEXT_RQ);
|
|
SHOW_FLAG(f, TX_CON_WANT_TUN);
|
|
|
|
SHOW_FLAG(f, TX_CACHE_COOK);
|
|
SHOW_FLAG(f, TX_CACHEABLE);
|
|
SHOW_FLAG(f, TX_SCK_PRESENT);
|
|
|
|
//printf("%s", f ? "" : " | ");
|
|
switch (f & TX_SCK_MASK) {
|
|
case TX_SCK_NONE: f &= ~TX_SCK_MASK ; /*printf("TX_SCK_NONE%s", f ? " | " : "");*/ break;
|
|
case TX_SCK_FOUND: f &= ~TX_SCK_MASK ; printf("TX_SCK_FOUND%s", f ? " | " : ""); break;
|
|
case TX_SCK_DELETED: f &= ~TX_SCK_MASK ; printf("TX_SCK_DELETED%s", f ? " | " : ""); break;
|
|
case TX_SCK_INSERTED: f &= ~TX_SCK_MASK ; printf("TX_SCK_INSERTED%s", f ? " | " : ""); break;
|
|
case TX_SCK_REPLACED: f &= ~TX_SCK_MASK ; printf("TX_SCK_REPLACED%s", f ? " | " : ""); break;
|
|
case TX_SCK_UPDATED: f &= ~TX_SCK_MASK ; printf("TX_SCK_UPDATED%s", f ? " | " : ""); break;
|
|
default: printf("TX_SCK_MASK(%02x)", f); f &= ~TX_SCK_MASK ; printf("%s", f ? " | " : ""); break;
|
|
}
|
|
|
|
//printf("%s", f ? "" : " | ");
|
|
switch (f & TX_CK_MASK) {
|
|
case TX_CK_NONE: f &= ~TX_CK_MASK ; /*printf("TX_CK_NONE%s", f ? " | " : "");*/ break;
|
|
case TX_CK_INVALID: f &= ~TX_CK_MASK ; printf("TX_CK_INVALID%s", f ? " | " : ""); break;
|
|
case TX_CK_DOWN: f &= ~TX_CK_MASK ; printf("TX_CK_DOWN%s", f ? " | " : ""); break;
|
|
case TX_CK_VALID: f &= ~TX_CK_MASK ; printf("TX_CK_VALID%s", f ? " | " : ""); break;
|
|
case TX_CK_EXPIRED: f &= ~TX_CK_MASK ; printf("TX_CK_EXPIRED%s", f ? " | " : ""); break;
|
|
case TX_CK_OLD: f &= ~TX_CK_MASK ; printf("TX_CK_OLD%s", f ? " | " : ""); break;
|
|
case TX_CK_UNUSED: f &= ~TX_CK_MASK ; printf("TX_CK_UNUSED%s", f ? " | " : ""); break;
|
|
default: printf("TX_CK_MASK(%02x)", f); f &= ~TX_CK_MASK ; printf("%s", f ? " | " : ""); break;
|
|
}
|
|
|
|
SHOW_FLAG(f, TX_CLTARPIT);
|
|
SHOW_FLAG(f, TX_SVALLOW);
|
|
SHOW_FLAG(f, TX_SVDENY);
|
|
SHOW_FLAG(f, TX_CLALLOW);
|
|
SHOW_FLAG(f, TX_CLDENY);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
void show_strm_flags(unsigned int f)
|
|
{
|
|
printf("strm->flags = ");
|
|
|
|
if (!f) {
|
|
printf("0\n");
|
|
return;
|
|
}
|
|
|
|
SHOW_FLAG(f, SF_SRV_REUSED);
|
|
SHOW_FLAG(f, SF_IGNORE_PRST);
|
|
|
|
//printf("%s", f ? "" : " | ");
|
|
switch (f & SF_FINST_MASK) {
|
|
case SF_FINST_R: f &= ~SF_FINST_MASK ; printf("SF_FINST_R%s", f ? " | " : ""); break;
|
|
case SF_FINST_C: f &= ~SF_FINST_MASK ; printf("SF_FINST_C%s", f ? " | " : ""); break;
|
|
case SF_FINST_H: f &= ~SF_FINST_MASK ; printf("SF_FINST_H%s", f ? " | " : ""); break;
|
|
case SF_FINST_D: f &= ~SF_FINST_MASK ; printf("SF_FINST_D%s", f ? " | " : ""); break;
|
|
case SF_FINST_L: f &= ~SF_FINST_MASK ; printf("SF_FINST_L%s", f ? " | " : ""); break;
|
|
case SF_FINST_Q: f &= ~SF_FINST_MASK ; printf("SF_FINST_Q%s", f ? " | " : ""); break;
|
|
case SF_FINST_T: f &= ~SF_FINST_MASK ; printf("SF_FINST_T%s", f ? " | " : ""); break;
|
|
}
|
|
|
|
switch (f & SF_ERR_MASK) {
|
|
case SF_ERR_LOCAL: f &= ~SF_ERR_MASK ; printf("SF_ERR_LOCAL%s", f ? " | " : ""); break;
|
|
case SF_ERR_CLITO: f &= ~SF_ERR_MASK ; printf("SF_ERR_CLITO%s", f ? " | " : ""); break;
|
|
case SF_ERR_CLICL: f &= ~SF_ERR_MASK ; printf("SF_ERR_CLICL%s", f ? " | " : ""); break;
|
|
case SF_ERR_SRVTO: f &= ~SF_ERR_MASK ; printf("SF_ERR_SRVTO%s", f ? " | " : ""); break;
|
|
case SF_ERR_SRVCL: f &= ~SF_ERR_MASK ; printf("SF_ERR_SRVCL%s", f ? " | " : ""); break;
|
|
case SF_ERR_PRXCOND: f &= ~SF_ERR_MASK ; printf("SF_ERR_PRXCOND%s", f ? " | " : ""); break;
|
|
case SF_ERR_RESOURCE: f &= ~SF_ERR_MASK ; printf("SF_ERR_RESOURCE%s", f ? " | " : ""); break;
|
|
case SF_ERR_INTERNAL: f &= ~SF_ERR_MASK ; printf("SF_ERR_INTERNAL%s", f ? " | " : ""); break;
|
|
case SF_ERR_DOWN: f &= ~SF_ERR_MASK ; printf("SF_ERR_DOWN%s", f ? " | " : ""); break;
|
|
case SF_ERR_KILLED: f &= ~SF_ERR_MASK ; printf("SF_ERR_KILLED%s", f ? " | " : ""); break;
|
|
case SF_ERR_UP: f &= ~SF_ERR_MASK ; printf("SF_ERR_UP%s", f ? " | " : ""); break;
|
|
case SF_ERR_CHK_PORT: f &= ~SF_ERR_MASK ; printf("SF_ERR_CHK_PORT%s", f ? " | " : ""); break;
|
|
}
|
|
|
|
SHOW_FLAG(f, SF_REDIRECTABLE);
|
|
SHOW_FLAG(f, SF_REDISP);
|
|
SHOW_FLAG(f, SF_CURR_SESS);
|
|
SHOW_FLAG(f, SF_MONITOR);
|
|
SHOW_FLAG(f, SF_FORCE_PRST);
|
|
SHOW_FLAG(f, SF_BE_ASSIGNED);
|
|
SHOW_FLAG(f, SF_ADDR_SET);
|
|
SHOW_FLAG(f, SF_ASSIGNED);
|
|
SHOW_FLAG(f, SF_DIRECT);
|
|
|
|
if (f) {
|
|
printf("EXTRA(0x%08x)", f);
|
|
}
|
|
putchar('\n');
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
unsigned int flags;
|
|
|
|
if (argc < 2) {
|
|
fprintf(stderr, "Usage: %s 0x<flags|state>\n", argv[0]);
|
|
exit(1);
|
|
}
|
|
|
|
flags = strtoul(argv[1], NULL, 0);
|
|
|
|
show_task_state(flags);
|
|
show_txn_flags(flags);
|
|
show_strm_flags(flags);
|
|
show_si_et(flags);
|
|
show_si_flags(flags);
|
|
show_cs_flags(flags);
|
|
show_conn_flags(flags);
|
|
show_chn_flags(flags);
|
|
show_chn_ana(flags);
|
|
|
|
return 0;
|
|
}
|