2 <HEAD><TITLE>smfi_version()</TITLE></HEAD>
5 $Id: smfi_version.html,v 1.6 2008/05/02 23:06:26 ca Exp $
7 <H1>smfi_version()</H1>
9 <TABLE BORDER="0" CELLSPACING=4 CELLPADDING=4>
10 <!---------- Synopsis ----------->
11 <TR><TH VALIGN="TOP" ALIGN=LEFT WIDTH=100>SYNOPSIS</TH><TD>
13 #include <libmilter/mfapi.h>
20 Get the (runtime) version of libmilter.
23 <!----------- Description ---------->
24 <TR><TH VALIGN="TOP" ALIGN=LEFT>DESCRIPTION</TH><TD>
25 <TABLE BORDER="1" CELLSPACING=1 CELLPADDING=4>
26 <TR ALIGN="LEFT" VALIGN=TOP>
27 <TH WIDTH="80">Called When</TH>
28 <TD>smfi_version may be called at any time.</TD>
30 <TR ALIGN="LEFT" VALIGN=TOP>
31 <TH WIDTH="80">Effects</TH>
36 <!----------- Arguments ---------->
37 <TR><TH VALIGN="TOP" ALIGN=LEFT>ARGUMENTS</TH><TD>
38 <TABLE BORDER="1" CELLSPACING=0>
39 <TR BGCOLOR="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
40 <TR VALIGN="TOP"><TD>pmajor</TD>
41 <TD>Pointer to an unsigned int variable to store major version number.
43 <TR VALIGN="TOP"><TD>pminor</TD>
44 <TD>Pointer to an unsigned int variable to store minor version number.
46 <TR VALIGN="TOP"><TD>ppl</TD>
47 <TD>Pointer to an unsigned int variable to store patch level number.
52 <!----------- Return values ---------->
54 <TH VALIGN="TOP" ALIGN=LEFT>RETURN VALUES</TH>
55 <TD>smfi_version returns MI_SUCCESS.</TD>
60 Note: the compile time version of libmilter is available in the macro
61 <CODE>SMFI_VERSION</CODE>.
62 To extract the major and minor version as well as the current patch level
63 from this macro, the macros
64 <CODE>SM_LM_VRS_MAJOR(v)</CODE>,
65 <CODE>SM_LM_VRS_MINOR(v)</CODE>, and
66 <CODE>SM_LM_VRS_PLVL(v)</CODE>
67 can be used, respectively.
68 A milter can check the
69 <CODE>SMFI_VERSION</CODE>
70 macro to determine which functions to use
71 (at compile time via C preprocessor statements).
72 Using this macro and the
73 <CODE>smfi_version()</CODE>
75 a milter can determine at runtime whether it has been (dynamically)
76 linked against the expected libmilter version.
77 Such a function should only compare the major and minor version,
79 i.e., the libmilter library will be compatible despite
80 different patch levels.
85 Copyright (c) 2006-2008 Sendmail, Inc. and its suppliers.
88 By using this file, you agree to the terms and conditions set