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

Add config file access for plugins #236

Open
mjmartineau opened this issue Jun 16, 2022 · 1 comment
Open

Add config file access for plugins #236

mjmartineau opened this issue Jun 16, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@mjmartineau
Copy link
Member

Is your feature request related to a problem? Please describe.
I'm working on the ndiffports plugin, and need a way to configure the 'n' (number of ports)

Describe the solution you'd like
It would be ideal to have an API exposed to plugins where they could query for config values that are stored in mptcpd.conf, without being able to modify the in-memory copy of the mptcpd core settings. Some wrappers around l_settings_*() calls is probably sufficient.

It's not critical to deny plugins access to any settings (they are in the same memory space as the core, after all), but it does make sense to make it easy to retrieve plugin settings and hard to accidentally corrupt core settings.

Describe alternatives you've considered
Creating a whole separate config parsing infrastructure using l_settings. This would duplicate a lot of core configuration handling code, and different plugins could diverge in how they handled config files.

@ossama-othman ossama-othman added the enhancement New feature or request label Jun 16, 2022
@dulive
Copy link
Contributor

dulive commented Jun 21, 2022

Does #210 solve this issue?

It does not allow plugins to store config values in mptcpd.conf, but it allows plugins to have their own configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants