diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-03-18 07:49:08 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-03-18 12:58:07 +0100 |
commit | 48ca38c6068bd15a94b1ecf2977d3f0160bbe63b (patch) | |
tree | b15899a7dc87d400eabf56dcc67dc6f3b824addf /tcp.c | |
parent | 8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2 (diff) | |
download | passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.gz passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.bz2 passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.lz passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.xz passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.zst passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.zip |
passt: Run in background, add message logging with severities
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
-rw-r--r-- | tcp.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -354,8 +354,9 @@ enum tcp_state { FIN_WAIT_1, FIN_WAIT_1_SOCK_FIN, }; +#define TCP_STATE_STR_SIZE (FIN_WAIT_1_SOCK_FIN + 1) -static char *tcp_state_str[FIN_WAIT_1_SOCK_FIN + 1] = { +static char *tcp_state_str[TCP_STATE_STR_SIZE] __attribute((__unused__)) = { "CLOSED", "TAP_SYN_SENT", "SOCK_SYN_SENT", "TAP_SYN_RCVD", "ESTABLISHED", "ESTABLISHED_SOCK_FIN", "CLOSE_WAIT", "LAST_ACK", "FIN_WAIT_1", "FIN_WAIT_1_SOCK_FIN", @@ -480,8 +481,8 @@ static void tcp_act_clear(int s) */ static void tcp_set_state(int s, enum tcp_state state) { - fprintf(stderr, "TCP: socket %i: %s -> %s\n", s, - tcp_state_str[tc[s].s], tcp_state_str[state]); + debug("TCP: socket %i: %s -> %s", s, + tcp_state_str[tc[s].s], tcp_state_str[state]); tc[s].s = state; } |