1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-13 23:13:24 +00:00

Output statistics per option and SIGUSR1

This commit is contained in:
Gerhard Rieger 2023-10-26 18:42:41 +02:00
parent 2af6089436
commit c2196d6f15
17 changed files with 304 additions and 26 deletions

9
xio.h
View file

@ -85,8 +85,9 @@ enum xiotag {
XIO_TAG_RDONLY, /* this is a single read-only stream */
XIO_TAG_WRONLY, /* this is a single write-only stream */
XIO_TAG_RDWR, /* this is a single read-write stream */
XIO_TAG_DUAL /* this is a dual stream, consisting of two single
XIO_TAG_DUAL, /* this is a dual stream, consisting of two single
streams */
XIO_TAG_CLOSED=8, /* close, additional bit */
} ;
/* Keep condition consistent with xioopts.h:GROUP_*! */
@ -278,6 +279,12 @@ typedef struct single {
} tun;
#endif /* WITH_TUN */
} para;
#if WITH_STATS
unsigned long long blocks_read;
unsigned long long bytes_read;
unsigned long long blocks_written;
unsigned long long bytes_written;
#endif /* WITH_STATS */
} xiosingle_t;
/* rw: 0..read, 1..write, 2..r/w */