The set_source_id method supplies the filter with an unique
source number for the filter. This function should only be called once,
the filter needs to store this number so it can be used when
calling the instrumentation_filter_slave interface
methods.
The add_slave method informs the filter that it should enable or
disable this slave too. The slave object should implement the
instrumentation_filter_slave interface which should be
used. The provider_obj parameter is the provider object that
is located behind the slave and its connection. Depending on how the filter
works, it may or may not make use of this parameter. For example, the
process-filter might detect that the filtered process is now running on a
particular processor, then it can enable this particular connection only,
given that it can match the provider_obj with the processor
currently running the tracked process.
The remove_slave method removes a slave from the filter, so it should not call it anymore.
The short_filter_config method should return a short textual description on how the filter is currently set up. This information is used in various print commands.
SIM_INTERFACE(instrumentation_filter_master) {
void (*set_source_id)(conf_object_t *obj, unsigned source_id);
bool (*add_slave)(conf_object_t *obj, conf_object_t *slave,
conf_object_t *provider_obj);
void (*remove_slave)(conf_object_t *obj, conf_object_t *slave,
conf_object_t *provider_obj);
char *(*short_filter_config)(conf_object_t *obj);
};
#define INSTRUMENTATION_FILTER_MASTER_INTERFACE "instrumentation_filter_master"