1<HTML> 2<HEAD><TITLE>smfi_version()</TITLE></HEAD> 3<BODY> 4<!-- 5$Id: smfi_version.html,v 1.5 2007/03/22 17:30:57 ca Exp $ 6--> 7<H1>smfi_version()</H1> 8 9<TABLE BORDER="0" CELLSPACING=4 CELLPADDING=4> 10<!---------- Synopsis -----------> 11<TR><TH VALIGN="TOP" ALIGN=LEFT WIDTH=100>SYNOPSIS</TH><TD> 12<PRE> 13#include <libmilter/mfapi.h> 14int smfi_version( 15 unsigned int *pmajor, 16 unsigned int *pminor, 17 unsigned int *ppl 18); 19</PRE> 20Get the (runtime) version of libmilter. 21</TD></TR> 22 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> 29</TR> 30<TR ALIGN="LEFT" VALIGN=TOP> 31<TH WIDTH="80">Effects</TH> 32<TD>None.</TD> 33</TR> 34</TABLE> 35 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. 42 </TD></TR> 43 <TR VALIGN="TOP"><TD>pminor</TD> 44 <TD>Pointer to an unsigned int variable to store minor version number. 45 </TD></TR> 46 <TR VALIGN="TOP"><TD>ppl</TD> 47 <TD>Pointer to an unsigned int variable to store patch level number. 48 </TD></TR> 49 </TABLE> 50</TD></TR> 51 52<!----------- Return values ----------> 53<TR> 54<TH VALIGN="TOP" ALIGN=LEFT>RETURN VALUES</TH> 55<TD>smfi_version returns MI_SUCCESS.</TD> 56</TR> 57 58</TABLE> 59 60Note: the compile time version of libmilter is available in the macro 61<CODE>SMFI_VERSION</CODE>. 62A milter can check this macro to determine which functions to use 63(at compile time via C preprocessor statements). 64Using this macro and the 65<CODE>smfi_version()</CODE> 66function, 67a milter can determine at runtime whether it has been (dynamically) 68linked against the expected libmilter version. 69To extract the major and minor version as well as the current patch level 70from this macro, the macros 71<CODE>SM_LM_VRS_MAJOR(v)</CODE>, 72<CODE>SM_LM_VRS_MINOR(v)</CODE>, and 73<CODE>SM_LM_VRS_PLVL(v)</CODE> 74can be used, respectively. 75 76 77<HR SIZE="1"> 78<FONT SIZE="-1"> 79Copyright (c) 2006, 2007 Sendmail, Inc. and its suppliers. 80All rights reserved. 81<BR> 82By using this file, you agree to the terms and conditions set 83forth in the LICENSE. 84</FONT> 85</BODY> 86</HTML> 87