When a connection with a provider is being established, the connect method is called. The provider argument specifies the provider which should be connected. The args are tool specific arguments that can be used allowing the connection to be configured a certain way. The tool should create a new dedicated connection object, which register itself with the provider using the dedicated interface. The connection object created is returned by the connect function. If, for any reason, the tool cannot successfully connect to the provider, NULL should be returned to indicate failure.
If a connection should be removed, the disconnect method is called. The conn_obj argument is the connection object returned earlier in connect. It is up to the tool to delete the created object which should unregister itself from the provider.
SIM_INTERFACE(instrumentation_tool) { conf_object_t *(*connect)( conf_object_t *NOTNULL obj, conf_object_t *NOTNULL provider, attr_value_t args); void (*disconnect)( conf_object_t *NOTNULL obj, conf_object_t *NOTNULL conn_obj); }; #define INSTRUMENTATION_TOOL_INTERFACE "instrumentation_tool"