smfi_version()

SYNOPSIS
#include <libmilter/mfapi.h>
int smfi_version(
	unsigned int *pmajor,
	unsigned int *pminor,
	unsigned int *ppl
);
Get the (runtime) version of libmilter.
DESCRIPTION
Called When smfi_version may be called at any time.
Effects None.
ARGUMENTS
ArgumentDescription
pmajor Pointer to an unsigned int variable to store major version number.
pminor Pointer to an unsigned int variable to store minor version number.
ppl Pointer to an unsigned int variable to store patch level number.
RETURN VALUES smfi_version returns MI_SUCCESS.
Note: the compile time version of libmilter is available in the macro SMFI_VERSION. To extract the major and minor version as well as the current patch level from this macro, the macros SM_LM_VRS_MAJOR(v), SM_LM_VRS_MINOR(v), and SM_LM_VRS_PLVL(v) can be used, respectively. A milter can check the SMFI_VERSION macro to determine which functions to use (at compile time via C preprocessor statements). Using this macro and the smfi_version() function, a milter can determine at runtime whether it has been (dynamically) linked against the expected libmilter version. Such a function should only compare the major and minor version, not the patch level, i.e., the libmilter library will be compatible despite different patch levels.
Copyright (c) 2006-2008 Sendmail, Inc. and its suppliers. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the LICENSE.