Function libseccomp::check_api
source · [−]pub fn check_api(
min_level: u32,
expected: ScmpVersion
) -> Result<bool, SeccompError>
Expand description
Checks that both the libseccomp API level and the libseccomp version being used are equal to or greater than the specified API level and version.
This function returns Ok(true)
if both the libseccomp API level and the
libseccomp version are equal to or greater than the specified API level and
version, Ok(false)
otherwise.
Arguments
min_level
- The libseccomp API level you want to checkexpected
- The libseccomp version you want to check
Errors
If an issue is encountered getting the current API level or version, an error will be returned.
Examples
assert!(check_api(3, ScmpVersion::from((2, 4, 0)))?);