]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/sendmail/libmilter/docs/smfi_opensocket.html
This commit was generated by cvs2svn to compensate for changes in r177572,
[FreeBSD/FreeBSD.git] / contrib / sendmail / libmilter / docs / smfi_opensocket.html
1 <HTML>
2 <HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
3 <BODY>
4 <!--
5 $Id: smfi_opensocket.html,v 1.6 2006/12/21 18:30:35 ca Exp $
6 -->
7 <H1>smfi_opensocket</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 &lt;libmilter/mfapi.h&gt;
14 int smfi_opensocket(
15         bool rmsocket
16 );
17 </PRE>
18 Attempt to create the interface socket MTAs will use to connect to the
19 filter.
20 </TD></TR>
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, 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
33 a call to <TT>smfi_setconn()</TT> which will be the interface between MTAs
34 and the filter.  This allows the calling application to ensure that the
35 socket can be created.  If this is not called, <TT>smfi_main()</TT> will
36 do so implicitly.  </TD>
37 </TR>
38 </TABLE>
39
40 <!----------- Arguments ---------->
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
46         remove any existing UNIX domain socket before trying to create
47         a new one.
48         </TD></TR>
49     </TABLE>
50 </TD></TR>
51
52 <!----------- Return values ---------->
53 <TR>
54 <TH valign="top" align=left>RETURN VALUES</TH> 
55
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
60         not be examined, or exists and could not be removed.
61     <LI><TT>smfi_setconn()</TT> has not been called.
62 </UL>
63 Otherwise, it will return MI_SUCCESS
64 </TD>
65 </TR>
66
67 </TABLE>
68
69 <HR size="1">
70 <FONT size="-1">
71 Copyright (c) 2003 Sendmail, Inc. and its suppliers.
72 All rights reserved.
73 <BR>
74 By using this file, you agree to the terms and conditions set
75 forth in the LICENSE.
76 </FONT>
77 </BODY>
78 </HTML>