Milter smfi_version()
Fetch the runtime library version V8.14 and later
There are two versions associated with every Milter’s
code. One is the compile-time version as hardcoded
into the SMFI_VERSION
macro. The other is the
runtime version that can be fetched using this
smfi_version
() routine. The smfi_version
() routine
can be called from your main
() routine, like this:
ret
= smfi_version(pmajor
,pminor
,plevel
);
Here, the three variables
pmajor
,
pminor
, and
plevel
are pointers to
unsigned int
types. The variables pointed to will, as a result of
the call, be filled out with the corresponding
values:
pmajor
will contain the major version number for the Milter library.pminor
will contain the minor version number for the Milter library.plevel
will contain the current patch level for the Milter library.
The value returned from the call to smfi_version
() is
always MI_SUCCESS
.
These three values are the values returned by the runtime library. If you wish to compare them to the version values that existed when you built your Milter, you may use the corresponding Build-time macros:
SM_LM_VRS_MAJOR(SMFI_VERSION)
returns the major version number for the Milter library.SM_LM_VRS_MINOR(SMFI_VERSION)
returns the minor version number for the Milter library.SM
_LM_VRS_PLVL(SMFI_VERSION)
returns the current patch level for the Milter library.
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.