FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
plugin.h
Go to the documentation of this file.
1 /*
2  * plugin.h: plugin handling
3  *
4  * Copyright (c) 2015 Cisco and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __included_plugin_h__
19 #define __included_plugin_h__
20 
21 #include <sys/types.h>
22 #include <sys/stat.h>
23 #include <unistd.h>
24 
25 typedef struct
26 {
27  u8 *name;
28  struct stat file_info;
29  void *handle;
31 
32 typedef struct
33 {
34  /* loaded plugin info */
35  plugin_info_t *plugin_info;
36  uword *plugin_by_name_hash;
37 
38  /* paths and name filters */
39  u8 *plugin_path;
40  u8 *plugin_name_filter;
43 
44  /* plugin configs and hash by name */
45  plugin_config_t *configs;
46  uword *config_index_by_name;
47 
48  /* usual */
51 
53 
54 int vat_plugin_init (vat_main_t * vam);
56 
57 #endif
58 
59 /*
60  * fd.io coding-style-patch-verification: ON
61  *
62  * Local Variables:
63  * eval: (c-set-style "gnu")
64  * End:
65  */
char * vat_plugin_path
Definition: plugin.c:183
unsigned char u8
Definition: types.h:56
char * vat_plugin_name_filter
Definition: plugin.c:185
int vat_load_new_plugins(plugin_main_t *pm)
Definition: plugin.c:100
int vat_plugin_init(vat_main_t *vam)
Definition: plugin.c:188
plugin_main_t vat_plugin_main
Definition: plugin.c:24
int vlib_main(vlib_main_t *volatile vm, unformat_input_t *input)
Definition: main.c:1695
u64 uword
Definition: types.h:112