2007-04-09 01:38:51 +00:00
|
|
|
<HTML>
|
|
|
|
<HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
|
|
|
|
<BODY>
|
2004-08-01 01:04:57 +00:00
|
|
|
<!--
|
2008-08-28 04:33:50 +00:00
|
|
|
$Id: smfi_opensocket.html,v 1.7 2008/01/31 17:29:33 ca Exp $
|
2004-08-01 01:04:57 +00:00
|
|
|
-->
|
2007-04-09 01:38:51 +00:00
|
|
|
<H1>smfi_opensocket</H1>
|
2004-08-01 01:04:57 +00:00
|
|
|
|
2007-04-09 01:38:51 +00:00
|
|
|
<TABLE border="0" cellspacing=4 cellpadding=4>
|
2004-08-01 01:04:57 +00:00
|
|
|
<!---------- Synopsis ----------->
|
2007-04-09 01:38:51 +00:00
|
|
|
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
|
|
|
<PRE>
|
2004-08-01 01:04:57 +00:00
|
|
|
#include <libmilter/mfapi.h>
|
|
|
|
int smfi_opensocket(
|
|
|
|
bool rmsocket
|
|
|
|
);
|
2007-04-09 01:38:51 +00:00
|
|
|
</PRE>
|
2004-08-01 01:04:57 +00:00
|
|
|
Attempt to create the interface socket MTAs will use to connect to the
|
|
|
|
filter.
|
2007-04-09 01:38:51 +00:00
|
|
|
</TD></TR>
|
2004-08-01 01:04:57 +00:00
|
|
|
|
|
|
|
<!----------- Description ---------->
|
2007-04-09 01:38:51 +00:00
|
|
|
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
|
|
|
<TABLE border="1" cellspacing=1 cellpadding=4>
|
|
|
|
<TR align="left" valign=top>
|
|
|
|
<TH width="80">Called When</TH>
|
2008-08-28 04:33:50 +00:00
|
|
|
<TD>Called only from program mainline,
|
|
|
|
after calling <TT>smfi_setconn()</TT> and <TT>smfi_register()</TT>,
|
|
|
|
but before calling <TT>smfi_main()</TT>.
|
|
|
|
</TD>
|
2007-04-09 01:38:51 +00:00
|
|
|
</TR>
|
|
|
|
<TR align="left" valign=top>
|
|
|
|
<TH width="80">Effects</TH>
|
|
|
|
<TD>smfi_opensocket attempts to create the socket specified previously by
|
|
|
|
a call to <TT>smfi_setconn()</TT> which will be the interface between MTAs
|
2008-08-28 04:33:50 +00:00
|
|
|
and the filter.
|
|
|
|
This allows the calling application to ensure that the
|
|
|
|
socket can be created.
|
|
|
|
If this is not called,
|
|
|
|
<TT>smfi_main()</TT> will do so implicitly.
|
|
|
|
</TD>
|
2007-04-09 01:38:51 +00:00
|
|
|
</TR>
|
|
|
|
</TABLE>
|
2004-08-01 01:04:57 +00:00
|
|
|
|
|
|
|
<!----------- Arguments ---------->
|
2007-04-09 01:38:51 +00:00
|
|
|
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
|
|
|
<TABLE border="1" cellspacing=0>
|
|
|
|
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
|
|
|
<TR valign="top"><TD>rmsocket</TD>
|
|
|
|
<TD>A flag indicating whether or not the library should try to
|
2004-08-01 01:04:57 +00:00
|
|
|
remove any existing UNIX domain socket before trying to create
|
|
|
|
a new one.
|
2007-04-09 01:38:51 +00:00
|
|
|
</TD></TR>
|
|
|
|
</TABLE>
|
|
|
|
</TD></TR>
|
2004-08-01 01:04:57 +00:00
|
|
|
|
|
|
|
<!----------- Return values ---------->
|
2007-04-09 01:38:51 +00:00
|
|
|
<TR>
|
|
|
|
<TH valign="top" align=left>RETURN VALUES</TH>
|
2004-08-01 01:04:57 +00:00
|
|
|
|
2007-04-09 01:38:51 +00:00
|
|
|
<TD>smfi_opensocket will fail and return MI_FAILURE if:
|
|
|
|
<UL>
|
|
|
|
<LI>The interface socket could not be created for any reason.
|
|
|
|
<LI><TT>rmsocket</TT> was <TT>true</TT>, and either the socket could
|
2004-08-01 01:04:57 +00:00
|
|
|
not be examined, or exists and could not be removed.
|
2008-08-28 04:33:50 +00:00
|
|
|
<LI><TT>smfi_setconn()</TT> or <TT>smfi_register()</TT>
|
|
|
|
have not been called.
|
2007-04-09 01:38:51 +00:00
|
|
|
</UL>
|
2004-08-01 01:04:57 +00:00
|
|
|
Otherwise, it will return MI_SUCCESS
|
2007-04-09 01:38:51 +00:00
|
|
|
</TD>
|
|
|
|
</TR>
|
2004-08-01 01:04:57 +00:00
|
|
|
|
2007-04-09 01:38:51 +00:00
|
|
|
</TABLE>
|
2004-08-01 01:04:57 +00:00
|
|
|
|
2007-04-09 01:38:51 +00:00
|
|
|
<HR size="1">
|
|
|
|
<FONT size="-1">
|
2008-08-28 04:33:50 +00:00
|
|
|
Copyright (c) 2003, 2008 Sendmail, Inc. and its suppliers.
|
2004-08-01 01:04:57 +00:00
|
|
|
All rights reserved.
|
2007-04-09 01:38:51 +00:00
|
|
|
<BR>
|
2004-08-01 01:04:57 +00:00
|
|
|
By using this file, you agree to the terms and conditions set
|
|
|
|
forth in the LICENSE.
|
2007-04-09 01:38:51 +00:00
|
|
|
</FONT>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|