Philipp Maier | b1ef8f5 | 2021-12-06 16:31:02 +0100 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #define TCP_STATS_DEFAULT_INTERVAL 0 /* secs */ |
| 4 | #define TCP_STATS_DEFAULT_BATCH_SIZE 1 /* sockets per interval */ |
| 5 | |
| 6 | struct osmo_tcp_stats_config { |
| 7 | /* poll interval in seconds, use osmo_stats_tcp_set_interval() to manipulate this value */ |
| 8 | int interval; |
| 9 | /* specify how many sockets are processed when the interval timer expires */ |
| 10 | int batch_size; |
| 11 | }; |
| 12 | extern struct osmo_tcp_stats_config *osmo_tcp_stats_config; |
| 13 | |
| 14 | int osmo_stats_tcp_osmo_fd_register(const struct osmo_fd *fd, const char *name); |
| 15 | int osmo_stats_tcp_osmo_fd_unregister(const struct osmo_fd *fd); |
| 16 | int osmo_stats_tcp_set_interval(int interval); |