1<html> 2<head><title>smfi_setconn</title></head> 3<body> 4<h1>smfi_setconn</h1> 5 6<table border="0" cellspacing=4 cellpadding=4> 7<!---------- Synopsis -----------> 8<tr><th valign="top" align=left width=150>SYNOPSIS</th><td> 9<pre> 10#include <libmilter/mfapi.h> 11int smfi_setconn( 12 char *oconn; 13); 14</pre> 15Set the socket through which this filter should communicate with sendmail. 16</td></tr> 17 18<!----------- Description ----------> 19<tr><th valign="top" align=left>DESCRIPTION</th><td> 20<table border="1" cellspacing=1 cellpadding=4> 21<tr align="left" valign=top> 22<th width="80">Called When</th> 23<td>smfi_setconn must be called once before <a href="smfi_main.html">smfi_main</a>.</td> 24</tr> 25<tr align="left" valign=top> 26<th width="80">Effects</th> 27<td>Sets the socket through which the filter communicates with sendmail.</td> 28</tr> 29</table> 30 31<!----------- Arguments ----------> 32<tr><th valign="top" align=left>ARGUMENTS</th><td> 33 <table border="1" cellspacing=0> 34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr> 35 <tr valign="top"><td>oconn</td> 36 <td>The address of the desired communication socket. 37 The address should be a NULL-terminated string in "proto:address" 38 format: 39 <ul> 40 <li><code>{unix|local}:/path/to/file</code> -- A named pipe. 41 <li><code>inet:port@{hostname|ip-address}</code> -- An IPV4 socket. 42 <li><code>inet6:port@{hostname|ip-address}</code> -- An IPV6 socket. 43 </ul> 44 </td></tr> 45 </table> 46</td></tr> 47 48<!----------- Return values ----------> 49<tr> 50<th valign="top" align=left>RETURN VALUES</th> 51 52<td>smfi_setconn will not fail on an invalid address. The failure will 53only be detected in <a href="smfi_main.html">smfi_main</a></td> 54</tr> 55 56<tr> 57<th valign="top" align=left>NOTES</th> 58 59<td> 60<ul><li>If possible, filters should not run as root when communicating over unix/local domain sockets. 61 <li>Unix/local sockets should have their permissions set to 0600 (read/write permission only for the socket's owner). 62</ul> 63</td> 64</tr> 65 66</table> 67 68<hr size="1"> 69<font size="-1"> 70Copyright (c) 2000 Sendmail, Inc. and its suppliers. 71All rights reserved. 72<br> 73By using this file, you agree to the terms and conditions set 74forth in the <a href="LICENSE.txt">LICENSE</a>. 75</font> 76</body> 77</html> 78