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

Default iface #261

Closed
wants to merge 4 commits into from
Closed

Default iface #261

wants to merge 4 commits into from

Conversation

regit
Copy link
Contributor

@regit regit commented Jan 21, 2013

This patchset is an implementation of https://redmine.openinfosecfoundation.org/issues/679.
it adds support for a 'default' interface in pcap, pfring and af-packet running mode. If a configuration variable is not set in a per-interface way, the value defined in 'default' interface is used.

This patch introduces a new set of functions to the ConfGetChildValue
family. They permit to look under a default node if looking under
base node as failed. This will be used to access to default parameters
for a data type (for instance, first usage will be interface).
This patch adds support for 'default' interface which is used to get
parameter values when per-interface is not defined.
@@ -286,6 +286,17 @@ int ConfGetChildValue(ConfNode *base, char *name, char **vptr)
}
}


int ConfGetChildValueWithDefault(ConfNode *base, ConfNode *dflt, char *name, char **vptr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add unittests for these api additions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@regit
Copy link
Contributor Author

regit commented Jan 21, 2013

Closing for now. I will reopen with unittest and a rebase.

@regit regit closed this Jan 21, 2013
@regit regit deleted the default-iface branch December 16, 2013 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants