xref: /freebsd/contrib/sendmail/libmilter/docs/xxfi_body.html (revision e92d3f3ffe83a6ed7eaafac70da9cf4fafe13243)
140266059SGregory Neil Shapiro<html>
240266059SGregory Neil Shapiro<head><title>xxfi_body</title></head>
340266059SGregory Neil Shapiro<body>
4e92d3f3fSGregory Neil Shapiro<!--
5e92d3f3fSGregory Neil Shapiro$Id: xxfi_body.html,v 1.12 2003/03/05 19:57:55 ca Exp $
6e92d3f3fSGregory Neil Shapiro-->
740266059SGregory Neil Shapiro<h1>xxfi_body</h1>
840266059SGregory Neil Shapiro
940266059SGregory Neil Shapiro<table border="0" cellspacing=4 cellpadding=4>
1040266059SGregory Neil Shapiro<!---------- Synopsis ----------->
1140266059SGregory Neil Shapiro<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
1240266059SGregory Neil Shapiro<pre>
1340266059SGregory Neil Shapiro#include &lt;libmilter/mfapi.h&gt;
1440266059SGregory Neil Shapirosfsistat (*xxfi_body)(
1540266059SGregory Neil Shapiro	SMFICTX * ctx,
1640266059SGregory Neil Shapiro	unsigned char * bodyp,
1740266059SGregory Neil Shapiro	size_t len
1840266059SGregory Neil Shapiro);
1940266059SGregory Neil Shapiro</pre>
2040266059SGregory Neil ShapiroHandle a piece of a message's body.
2140266059SGregory Neil Shapiro</td></tr>
2240266059SGregory Neil Shapiro
2340266059SGregory Neil Shapiro<!----------- Description ---------->
2440266059SGregory Neil Shapiro<tr><th valign="top" align=left>DESCRIPTION</th><td>
2540266059SGregory Neil Shapiro<table border="1" cellspacing=1 cellpadding=4>
2640266059SGregory Neil Shapiro<tr align="left" valign=top>
2740266059SGregory Neil Shapiro<th width="80">Called When</th>
2840266059SGregory Neil Shapiro<td>xxfi_body is called zero or more times between xxfi_eoh and xxfi_eom.</td>
2940266059SGregory Neil Shapiro</tr>
3040266059SGregory Neil Shapiro<tr align="left" valign=top>
3140266059SGregory Neil Shapiro<th>Default Behavior</th>
3240266059SGregory Neil Shapiro<td>Do nothing; return SMFIS_CONTINUE.</td>
3340266059SGregory Neil Shapiro</tr>
3440266059SGregory Neil Shapiro</table>
3540266059SGregory Neil Shapiro
3640266059SGregory Neil Shapiro<!----------- Arguments ---------->
3740266059SGregory Neil Shapiro<tr><th valign="top" align=left>ARGUMENTS</th><td>
3840266059SGregory Neil Shapiro    <table border="1" cellspacing=0>
3940266059SGregory Neil Shapiro    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
4040266059SGregory Neil Shapiro    <tr valign="top"><td>ctx</td>
4140266059SGregory Neil Shapiro	<td>Opaque context structure.
4240266059SGregory Neil Shapiro	</td></tr>
4340266059SGregory Neil Shapiro    <tr valign="top"><td>bodyp</td>
4440266059SGregory Neil Shapiro	<td>Pointer to the start of this block of body data.  bodyp is not valid outside this call to xxfi_body.
4540266059SGregory Neil Shapiro	</td></tr>
4640266059SGregory Neil Shapiro    <tr valign="top"><td>len</td>
4740266059SGregory Neil Shapiro	<td>The amount of data pointed to by bodyp.
4840266059SGregory Neil Shapiro	</td></tr>
4940266059SGregory Neil Shapiro    </table>
5040266059SGregory Neil Shapiro</td></tr>
5140266059SGregory Neil Shapiro
5240266059SGregory Neil Shapiro<!----------- Notes ---------->
5340266059SGregory Neil Shapiro<tr>
5440266059SGregory Neil Shapiro<th valign="top" align=left>NOTES</th>
5540266059SGregory Neil Shapiro<td>
5640266059SGregory Neil Shapiro<ul>
5740266059SGregory Neil Shapiro<li>bodyp points to a sequence of bytes.
5840266059SGregory Neil ShapiroIt is <em>not</em> a C string (a sequence of characters that is terminated by '\0').
5940266059SGregory Neil ShapiroTherefore, do not use the usual C string functions like strlen() on this byte block.
6040266059SGregory Neil ShapiroMoreover, the byte sequence may contain '\0' characters inside the block.
6140266059SGregory Neil ShapiroHence even if a trailing '\0' is added, C string functions may still fail
6240266059SGregory Neil Shapiroto work as expected.
6340266059SGregory Neil Shapiro<li>Since message bodies can be very large, defining xxfi_body can
6440266059SGregory Neil Shapirosignificantly impact filter performance.
6540266059SGregory Neil Shapiro<li>End-of-lines are represented as received from SMTP (normally CR/LF).
6640266059SGregory Neil Shapiro<li>Later filters will see body changes made by earlier ones.
6740266059SGregory Neil Shapiro<li>Message bodies may be sent in multiple chunks, with one call to
6840266059SGregory Neil Shapiro    xxfi_body per chunk.
6940266059SGregory Neil Shapiro</ul>
7040266059SGregory Neil Shapiro</td>
7140266059SGregory Neil Shapiro</tr>
7240266059SGregory Neil Shapiro</table>
7340266059SGregory Neil Shapiro
7440266059SGregory Neil Shapiro<hr size="1">
7540266059SGregory Neil Shapiro<font size="-1">
765ef517c0SGregory Neil ShapiroCopyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
7740266059SGregory Neil ShapiroAll rights reserved.
7840266059SGregory Neil Shapiro<br>
7940266059SGregory Neil ShapiroBy using this file, you agree to the terms and conditions set
805ef517c0SGregory Neil Shapiroforth in the LICENSE.
8140266059SGregory Neil Shapiro</font>
8240266059SGregory Neil Shapiro</body>
8340266059SGregory Neil Shapiro</html>
84