9
* Loads the specified plugin
10
* The plugin symbols are loaded localy and not available for symbol resolution, but should be requested
11
* with pcilib_plugin_get_symbol() instead.
12
* @param[in] name - the plugin name (with extension, but without path)
13
* @return - dlopen'ed plugin or NULL in the case of error
8
15
void *pcilib_plugin_load(const char *name);
18
* Cleans up the loaded plugin
19
* @param[in] plug - plugin loaded with pcilib_plugin_load()
9
21
void pcilib_plugin_close(void *plug);
24
* Resolves the specified symbol in the plugin
25
* @param[in] plug - plugin loaded with pcilib_plugin_load()
26
* @param[in] symbol - name of the symbol
27
* @return - pointer to the symbol or NULL if not found
10
29
void *pcilib_plugin_get_symbol(void *plug, const char *symbol);
11
const pcilib_model_description_t *pcilib_get_plugin_model(pcilib_t *pcilib, void *plug, unsigned short vendor_id, unsigned short device_id, const char *model);
12
const pcilib_model_description_t *pcilib_find_plugin_model(pcilib_t *pcilib, unsigned short vendor_id, unsigned short device_id, const char *model);
32
* Verifies if plugin can handle the hardware and requests appropriate model description
33
* @param[in,out] ctx - pcilib context
34
* @param[in] plug - plugin loaded with pcilib_plugin_load()
35
* @param[in] vendor_id - Vendor ID reported by hardware
36
* @param[in] device_id - Device ID reported by hardware
37
* @param[in] model - the requested pcilib model or NULL for autodetction
38
* @return - the appropriate model description or NULL if the plugin does not handle the installed hardware or requested model
40
const pcilib_model_description_t *pcilib_get_plugin_model(pcilib_t *ctx, void *plug, unsigned short vendor_id, unsigned short device_id, const char *model);
43
* Finds the appropriate plugin and returns model description.
45
* The function sequentially loads plugins available in ::PCILIB_PLUGIN_DIR and
46
* checks if they support the installed hardware and requested model. If hardware
47
* is not supported, the plugin is immideately unloaded. On a first success
48
* the model description is returned to caller and no further plguins are loaded.
49
* If no suitable plugin is found, the NULL is returned.
51
* If model is specified, first a plugin with the same name is loaded and check performed
52
* if it can handle the installed hardware. If not, we iterate over all available
55
* @param[in,out] ctx - pcilib context
56
* @param[in] vendor_id - Vendor ID reported by hardware
57
* @param[in] device_id - Device ID reported by hardware
58
* @param[in] model - the requested pcilib model or NULL for autodetction
59
* @return - the appropriate model description or NULL if no plugin found able to handle the installed hardware or requested model
61
const pcilib_model_description_t *pcilib_find_plugin_model(pcilib_t *ctx, unsigned short vendor_id, unsigned short device_id, const char *model);