summaryrefslogtreecommitdiffstats
path: root/src/vpp/stats/stat_segment.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp/stats/stat_segment.h')
-rw-r--r--src/vpp/stats/stat_segment.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vpp/stats/stat_segment.h b/src/vpp/stats/stat_segment.h
index 0efd45ac5f0..21c7c3b0d48 100644
--- a/src/vpp/stats/stat_segment.h
+++ b/src/vpp/stats/stat_segment.h
@@ -17,6 +17,8 @@
#define included_stat_segment_h
#include <stdatomic.h>
+#include <vlib/vlib.h>
+#include <vppinfra/socket.h>
/* Default socket to exchange segment fd */
#define STAT_SEGMENT_SOCKET_FILE "/run/vpp/stats.sock"
@@ -94,4 +96,23 @@ stat_segment_pointer (void *start, uint64_t offset)
return ((char *) start + offset);
}
+typedef struct
+{
+ /* statistics segment */
+ uword *directory_vector_by_name;
+ stat_segment_directory_entry_t *directory_vector;
+ clib_spinlock_t *stat_segment_lockp;
+ clib_socket_t *socket;
+ u8 *socket_name;
+ ssize_t memory_size;
+ u8 node_counters_enabled;
+ void *heap;
+ stat_segment_shared_header_t *shared_header; /* pointer to shared memory segment */
+ int memfd;
+
+ u64 last_input_packets;
+} stat_segment_main_t;
+
+extern stat_segment_main_t stat_segment_main;
+
#endif