17 #ifndef included_stat_client_h 18 #define included_stat_client_h 20 #define STAT_VERSION_MAJOR 1 21 #define STAT_VERSION_MINOR 2 32 #define STAT_SEGMENT_SOCKET_FILE "/run/vpp/stats.sock" 33 #define STAT_SEGMENT_SOCKET_FILENAME "stats.sock" 93 static inline uint64_t
97 clock_gettime (CLOCK_REALTIME, &ts);
98 return 1e9 * ts.tv_sec + ts.tv_nsec;
107 (((
char *) p +
sizeof (p)) <
126 max_time = _time_now_nsec () + sm->
timeout;
127 while (shared_header->
in_progress != 0 && _time_now_nsec () < max_time)
140 return _time_now_nsec () < max_time ? 0 : -1;
void stat_segment_data_free(stat_segment_data_t *res)
int stat_segment_connect(const char *socket_name)
stat_segment_directory_entry_t * directory_vector
stat_segment_data_t * stat_segment_dump_r(uint32_t *stats, stat_client_main_t *sm)
counter_t ** simple_counter_vec
void stat_client_free(stat_client_main_t *sm)
Combined counter to hold both packets and byte differences.
uint32_t * stat_segment_ls(uint8_t **pattern)
stat_segment_shared_header_t * shared_header
double stat_segment_heartbeat_r(stat_client_main_t *sm)
int stat_segment_connect_r(const char *socket_name, stat_client_main_t *sm)
uint64_t counter_t
64bit counters
char * stat_segment_index_to_name(uint32_t index)
char * stat_segment_index_to_name_r(uint32_t index, stat_client_main_t *sm)
static void * stat_segment_adjust(stat_client_main_t *sm, void *data)
uint32_t * stat_segment_ls_r(uint8_t **patterns, stat_client_main_t *sm)
stat_segment_data_t * stat_segment_dump(uint32_t *counter_vec)
uint8_t ** stat_segment_string_vector(uint8_t **string_vector, const char *string)
static void stat_segment_set_timeout_nsec(stat_client_main_t *sm, uint64_t timeout)
void stat_segment_disconnect_r(stat_client_main_t *sm)
stat_directory_type_t type
stat_segment_data_t * stat_segment_dump_entry_r(uint32_t index, stat_client_main_t *sm)
static void stat_segment_set_timeout(uint64_t timeout)
uint64_t stat_segment_version(void)
stat_segment_data_t * stat_segment_dump_entry(uint32_t index)
stat_client_main_t stat_client_main
void stat_segment_disconnect(void)
uint64_t stat_segment_version_r(stat_client_main_t *sm)
int stat_segment_vec_len(void *vec)
double stat_segment_heartbeat(void)
vlib_counter_t ** combined_counter_vec
static bool stat_segment_access_end(stat_segment_access_t *sa, stat_client_main_t *sm)
stat_client_main_t * stat_client_get(void)
static int stat_segment_access_start(stat_segment_access_t *sa, stat_client_main_t *sm)
void stat_segment_vec_free(void *vec)