2 * Copyright (c) 2015 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 #ifndef __included_stats_h__
16 #define __included_stats_h__
19 #include <vlib/vlib.h>
20 #include <vnet/vnet.h>
21 #include <vnet/interface.h>
23 #include <vlib/threads.h>
24 #include <vlib/unix/unix.h>
25 #include <vlibmemory/api.h>
26 #include <vlibmemory/unix_shared_memory_queue.h>
30 u32 client_index; /* in memclnt registration pool */
32 } vpe_client_registration_t;
37 volatile u32 release_hint;
41 } data_structure_lock_t;
46 pthread_t thread_self;
47 pthread_t thread_handle;
49 u32 stats_poll_interval_in_seconds;
52 uword *stats_registration_hash;
53 vpe_client_registration_t *stats_registrations;
55 /* control-plane data structure lock */
56 data_structure_lock_t *data_structure_lock;
58 /* bail out of FIB walk if set */
59 clib_longjmp_t jmp_buf;
62 vlib_main_t *vlib_main;
63 vnet_main_t *vnet_main;
64 vnet_interface_main_t *interface_main;
68 stats_main_t stats_main;
70 void dslock (stats_main_t * sm, int release_hint, int tag);
71 void dsunlock (stats_main_t * sm);
73 #endif /* __included_stats_h__ */
76 * fd.io coding-style-patch-verification: ON
79 * eval: (c-set-style "gnu")