diff options
Diffstat (limited to 'src/vlib/unix/plugin.h')
-rw-r--r-- | src/vlib/unix/plugin.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/vlib/unix/plugin.h b/src/vlib/unix/plugin.h index c9a33ccd96a..4beae43d504 100644 --- a/src/vlib/unix/plugin.h +++ b/src/vlib/unix/plugin.h @@ -67,6 +67,33 @@ typedef CLIB_PACKED(struct { }) vlib_plugin_registration_t; /* *INDENT-ON* */ +/* + * Plugins may also use this registration format, which is + * easy enough to emit from e.g. a golang compiler. + */ +typedef struct +{ + uword data_segment_offset; + uword length; +} vlib_r2_string_t; + +typedef struct +{ + int default_disabled; + vlib_r2_string_t version; + vlib_r2_string_t version_required; + vlib_r2_string_t overrides; + vlib_r2_string_t early_init; + vlib_r2_string_t description; +} vlib_plugin_r2_t; + +#define foreach_r2_string_field \ +_(version) \ +_(version_required) \ +_(overrides) \ +_(early_init) \ +_(description) + typedef struct { u8 *name; |