FD.io VPP
v19.08.3-2-gbabecb413
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;
30
}
plugin_info_t
;
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;
41
u8
*
vat_plugin_path
;
42
u8
*
vat_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 */
49
vlib_main_t
*
vlib_main
;
50
}
plugin_main_t
;
51
52
extern
plugin_main_t
vat_plugin_main
;
53
54
int
vat_plugin_init
(vat_main_t * vam);
55
int
vat_load_new_plugins
(
plugin_main_t
* pm);
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
*/
plugin_config_t
Definition:
plugin.h:81
vat_plugin_path
char * vat_plugin_path
Definition:
main.c:34
u8
unsigned char u8
Definition:
types.h:56
vat_plugin_name_filter
char * vat_plugin_name_filter
Definition:
plugin.c:182
plugin_main_t
Definition:
plugin.h:89
name
u8 name[64]
Definition:
memclnt.api:152
vat_load_new_plugins
int vat_load_new_plugins(plugin_main_t *pm)
Definition:
plugin.c:100
vat_plugin_init
int vat_plugin_init(vat_main_t *vam)
Definition:
plugin.c:185
vat_plugin_main
plugin_main_t vat_plugin_main
Definition:
plugin.c:24
vlib_main
int vlib_main(vlib_main_t *volatile vm, unformat_input_t *input)
Definition:
main.c:2014
plugin_info_t
Definition:
plugin.h:69
vlib_main_t
Definition:
main.h:83
uword
u64 uword
Definition:
types.h:112
src
vpp
api
plugin.h
Generated on Mon Oct 19 2020 14:03:59 for FD.io VPP by
1.8.13