1<HTML> 2<HEAD><TITLE>smfi_opensocket</TITLE></HEAD> 3<BODY>
| 1<html> 2<head><title>smfi_opensocket</title></head> 3<body>
|
4<!--
| 4<!--
|
5$Id: smfi_opensocket.html,v 1.8 2013-11-22 20:51:39 ca Exp $
| 5$Id: smfi_opensocket.html,v 1.4 2003/10/20 22:28:57 msk Exp $
|
6-->
| 6-->
|
7<H1>smfi_opensocket</H1>
| 7<h1>smfi_opensocket</h1>
|
8
| 8
|
9<TABLE border="0" cellspacing=4 cellpadding=4>
| 9<table border="0" cellspacing=4 cellpadding=4>
|
10<!---------- Synopsis ----------->
| 10<!---------- Synopsis ----------->
|
11<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD> 12<PRE>
| 11<tr><th valign="top" align=left width=150>SYNOPSIS</th><td> 12<pre>
|
13#include <libmilter/mfapi.h> 14int smfi_opensocket( 15 bool rmsocket 16);
| 13#include <libmilter/mfapi.h> 14int smfi_opensocket( 15 bool rmsocket 16);
|
17</PRE>
| 17</pre>
|
18Attempt to create the interface socket MTAs will use to connect to the 19filter.
| 18Attempt to create the interface socket MTAs will use to connect to the 19filter.
|
20</TD></TR>
| 20</td></tr>
|
21 22<!----------- Description ---------->
| 21 22<!----------- Description ---------->
|
23<TR><TH valign="top" align=left>DESCRIPTION</TH><TD> 24<TABLE border="1" cellspacing=1 cellpadding=4> 25<TR align="left" valign=top> 26<TH width="80">Called When</TH> 27<TD>Called only from program mainline, 28after calling <TT>smfi_setconn()</TT> and <TT>smfi_register()</TT>, 29but before calling <TT>smfi_main()</TT>. 30</TD> 31</TR> 32<TR align="left" valign=top> 33<TH width="80">Effects</TH> 34<TD>smfi_opensocket attempts to create the socket specified previously by 35a call to <TT>smfi_setconn()</TT> which will be the interface between MTAs 36and the filter. 37This allows the calling application to ensure that the 38socket can be created. 39If this is not called, 40<TT>smfi_main()</TT> will do so implicitly. 41</TD> 42</TR> 43</TABLE>
| 23<tr><th valign="top" align=left>DESCRIPTION</th><td> 24<table border="1" cellspacing=1 cellpadding=4> 25<tr align="left" valign=top> 26<th width="80">Called When</th> 27<td>Called only from program mainline, before calling 28<tt>smfi_main()</tt>.</td> 29</tr> 30<tr align="left" valign=top> 31<th width="80">Effects</th> 32<td>smfi_opensocket attempts to create the socket specified previously by 33a call to <tt>smfi_setconn()</tt> which will be the interface between MTAs 34and the filter. This allows the calling application to ensure that the 35socket can be created. If this is not called, <tt>smfi_main()</tt> will 36do so implicitly. </td> 37</tr> 38</table>
|
44 45<!----------- Arguments ---------->
| 39 40<!----------- Arguments ---------->
|
46<TR><TH valign="top" align=left>ARGUMENTS</TH><TD> 47 <TABLE border="1" cellspacing=0> 48 <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR> 49 <TR valign="top"><TD>rmsocket</TD> 50 <TD>A flag indicating whether or not the library should try to
| 41<tr><th valign="top" align=left>ARGUMENTS</th><td> 42 <table border="1" cellspacing=0> 43 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr> 44 <tr valign="top"><td>rmsocket</td> 45 <td>A flag indicating whether or not the library should try to
|
51 remove any existing UNIX domain socket before trying to create 52 a new one.
| 46 remove any existing UNIX domain socket before trying to create 47 a new one.
|
53 </TD></TR> 54 </TABLE> 55</TD></TR>
| 48 </td></tr> 49 </table> 50</td></tr>
|
56 57<!----------- Return values ---------->
| 51 52<!----------- Return values ---------->
|
58<TR> 59<TH valign="top" align=left>RETURN VALUES</TH>
| 53<tr> 54<th valign="top" align=left>RETURN VALUES</th>
|
60
| 55
|
61<TD>smfi_opensocket will fail and return MI_FAILURE if: 62<UL> 63 <LI>The interface socket could not be created for any reason. 64 <LI><TT>rmsocket</TT> was <TT>true</TT>, and either the socket could
| 56<td>smfi_opensocket will fail and return MI_FAILURE if: 57<ul> 58 <li>The interface socket could not be created for any reason. 59 <li><tt>rmsocket</tt> was <tt>true</tt>, and either the socket could
|
65 not be examined, or exists and could not be removed.
| 60 not be examined, or exists and could not be removed.
|
66 <LI><TT>smfi_setconn()</TT> or <TT>smfi_register()</TT> 67 have not been called. 68</UL>
| 61 <li><tt>smfi_setconn()</tt> has not been called. 62</ul>
|
69Otherwise, it will return MI_SUCCESS
| 63Otherwise, it will return MI_SUCCESS
|
70</TD> 71</TR>
| 64</td> 65</tr>
|
72
| 66
|
73</TABLE>
| 67</table>
|
74
| 68
|
75<HR size="1"> 76<FONT size="-1"> 77Copyright (c) 2003, 2008 Proofpoint, Inc. and its suppliers.
| 69<hr size="1"> 70<font size="-1"> 71Copyright (c) 2003 Sendmail, Inc. and its suppliers.
|
78All rights reserved.
| 72All rights reserved.
|
79<BR>
| 73<br>
|
80By using this file, you agree to the terms and conditions set 81forth in the LICENSE.
| 74By using this file, you agree to the terms and conditions set 75forth in the LICENSE.
|
82</FONT> 83</BODY> 84</HTML>
| 76</font> 77</body> 78</html>
|
| |