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

Minimise configuration structure #316

Open
fredrikdanielmoller opened this issue Jan 26, 2021 · 1 comment
Open

Minimise configuration structure #316

fredrikdanielmoller opened this issue Jan 26, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@fredrikdanielmoller
Copy link
Collaborator

fredrikdanielmoller commented Jan 26, 2021

The configuration structure contains fields which could be calculated in pnet_init(). Remove these fields from pnet_cfg_t as to simplify stack configuration for the user.

Fields which could removed from configuration:

  • ip_cfg in pnet_if_cfg_t. Initialise by calling pnal_get_ip_address()/subnet()/gateway().
  • Parts of im_x_data.

Handled in #333:

  • eth_addr in pnet_netif_t. Initialise by calling pnal_get_macaddress().
  • port_id in pnet_port_cfg_t. Initialise as "port-001", "port-002" etc.
@fredrikdanielmoller fredrikdanielmoller added the enhancement New feature or request label Jan 26, 2021
@olbjo olbjo self-assigned this Feb 1, 2021
@olbjo olbjo removed their assignment Feb 10, 2021
@fredrikdanielmoller
Copy link
Collaborator Author

It would also be better if the configuration structure was only used as a user-visible structure optimised for user ease-of-use. Currently, it serves a double purpose as it is also stored in the pnet_t instance structure where its members are read and written.

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

2 participants