2 <HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
5 $Id: smfi_opensocket.html,v 1.6 2006/12/21 18:30:35 ca Exp $
7 <H1>smfi_opensocket</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>
18 Attempt to create the interface socket MTAs will use to connect to the
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>
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>
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
52 <!----------- Return values ---------->
54 <TH valign="top" align=left>RETURN VALUES</TH>
56 <TD>smfi_opensocket will fail and return MI_FAILURE if:
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.
63 Otherwise, it will return MI_SUCCESS
71 Copyright (c) 2003 Sendmail, Inc. and its suppliers.
74 By using this file, you agree to the terms and conditions set