On Sun, Apr 17, 2016 at 6:24 PM, Tobias Klauser <[email protected]> wrote: > On 2016-04-17 at 09:06:35 +0200, Vadim Kochan <[email protected]> wrote: >> Hi, >> >> I prepared new series for flowtop, I changed state names to this: >> >> static const char *const tcp_state2str[TCP_CONNTRACK_MAX] = { >> [TCP_CONNTRACK_NONE] = "NONE", >> [TCP_CONNTRACK_SYN_SENT] = "SYN-SNT", >> [TCP_CONNTRACK_SYN_RECV] = "SYN-RECV", >> [TCP_CONNTRACK_ESTABLISHED] = "ESTAB", >> [TCP_CONNTRACK_FIN_WAIT] = "FIN-WAIT", >> [TCP_CONNTRACK_CLOSE_WAIT] = "CLO-WAIT", >> [TCP_CONNTRACK_LAST_ACK] = "LAST-ACK", >> [TCP_CONNTRACK_TIME_WAIT] = "TIMEWAIT", > > It's a bit inconsistent without the dash (i.e. "TIME-WAIT"), but I > understand you want to keep it at max. 8 chars. > >> [TCP_CONNTRACK_CLOSE] = "CLOSE", >> [TCP_CONNTRACK_SYN_SENT2] = "SYN-SNT2", >> }; >> >> static const char *const dccp_state2str[DCCP_CONNTRACK_MAX] = { >> [DCCP_CONNTRACK_NONE] = "NONE", >> [DCCP_CONNTRACK_REQUEST] = "REQUEST", >> [DCCP_CONNTRACK_RESPOND] = "RESPOND", >> [DCCP_CONNTRACK_PARTOPEN] = "PARTOPEN", >> [DCCP_CONNTRACK_OPEN] = "OPEN", >> [DCCP_CONNTRACK_CLOSEREQ] = "CLOSEREQ", >> [DCCP_CONNTRACK_CLOSING] = "CLOSING", >> [DCCP_CONNTRACK_TIMEWAIT] = "TIMEWAIT", >> [DCCP_CONNTRACK_IGNORE] = "IGNORE", >> [DCCP_CONNTRACK_INVALID] = "INVALID", >> }; >> >> static const char *const sctp_state2str[SCTP_CONNTRACK_MAX] = { >> [SCTP_CONNTRACK_NONE] = "NONE", >> [SCTP_CONNTRACK_CLOSED] = "CLOSED", >> [SCTP_CONNTRACK_COOKIE_WAIT] = "CK-WAIT", >> [SCTP_CONNTRACK_COOKIE_ECHOED] = "CK-ECHO", >> [SCTP_CONNTRACK_ESTABLISHED] = "ESTAB", >> [SCTP_CONNTRACK_SHUTDOWN_SENT] = "SHUT-SNT", >> [SCTP_CONNTRACK_SHUTDOWN_RECD] = "SHUT-RCV", >> [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = "SHUT-ACK", >> }; >> >> I really think that now they are more understandable (even CK-WAIT), and no >> need to update man page or add help screen. I allocated 8 maximum chars >> for the "STATE" column. > > I still think it might be worthwhile to document these states (or at > least their mappings to the corresponding libnetfilter values) > somewhere at some point. But that doesn't necessarily need to be part of > your current patch :) > >> What do you think ? > > Looks good to me. > > Cheers > Tobias
I sent new series v2 where I finally decided to use 11 characters for "STATE" column, I think that at present days most of the users have enough wide terminal screen. Regards, Vadim Kochan -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
