Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Priority Clarification #176

Open
dulive opened this issue Nov 8, 2021 · 3 comments
Open

Plugin Priority Clarification #176

dulive opened this issue Nov 8, 2021 · 3 comments
Labels
question Further information is requested

Comments

@dulive
Copy link
Contributor

dulive commented Nov 8, 2021

Hello,

What is exactly the purpose of the priority in the plugins?

By looking at the source code, more precisely at lib/plugins.c, the only thing it seems to be used for is to specify the initialization order of the plugins, is this right?

@dulive dulive changed the title Plugin Priority Clarification [Question] Plugin Priority Clarification Nov 8, 2021
@ossama-othman ossama-othman added the question Further information is requested label Nov 8, 2021
@ossama-othman
Copy link
Member

That's correct. The plugin priority feature was based on the (removed) ELL plugin API.

@dulive
Copy link
Contributor Author

dulive commented Nov 9, 2021

Couldn't it also be used for defining the event receiving order for the functions that use l_hashmap_foreach, (i.e. mptcpd_plugin_new_interface, mptcpd_plugin_update_interface, mptcpd_plugin_delete_interface, mptcpd_plugin_new_local_address and mptcpd_plugin_delete_local_address)?

At first this probably appears that would do the same thing, but if with it, higher priority plugins could also control if the events should also be processed by lower priority plugins would simplify the development of a lot of plugins.

An example where this would be very useful is when developing/using a security focused plugin. Currently this type of plugins have to be massive, that do everything, from the security check to configuring endpoints. This make them most of the times useless or hard to use since they can't be used together with other plugins. However, if the events would go from the higher priority to the lower priority plugins, and if plugins could control if this flux of events should continue to lower priority plugins, security focused plugins (or any other type of plugins that suffer the same problem) would easily integrate with others plugins, as with the addr_adv plugin to configure the endpoints.

It could also be interesting if plugins could send/forward events to lower priority events. This would be very useful when a plugin doesn't have enough information or it's still not ready to take a decision, it could buffer them and when it can take the decision it could also forward the buffered events to the lower priority plugins.

@dulive
Copy link
Contributor Author

dulive commented Nov 9, 2021

I should probably open a new issue with this.

@dulive dulive changed the title [Question] Plugin Priority Clarification Plugin Priority Clarification Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants