1d0cef73dSGregory Neil Shapiro<HTML> 2d0cef73dSGregory Neil Shapiro<HEAD><TITLE>xxfi_body</TITLE></HEAD> 3d0cef73dSGregory Neil Shapiro<BODY> 4e92d3f3fSGregory Neil Shapiro<!-- 54313cc83SGregory Neil Shapiro$Id: xxfi_body.html,v 1.18 2013-11-22 20:51:39 ca Exp $ 6e92d3f3fSGregory Neil Shapiro--> 7d0cef73dSGregory Neil Shapiro<H1>xxfi_body</H1> 840266059SGregory Neil Shapiro 9d0cef73dSGregory Neil Shapiro<TABLE border="0" cellspacing=4 cellpadding=4> 1040266059SGregory Neil Shapiro<!---------- Synopsis -----------> 11d0cef73dSGregory Neil Shapiro<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD> 12d0cef73dSGregory Neil Shapiro<PRE> 1340266059SGregory Neil Shapiro#include <libmilter/mfapi.h> 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); 19d0cef73dSGregory Neil Shapiro</PRE> 2040266059SGregory Neil ShapiroHandle a piece of a message's body. 21d0cef73dSGregory Neil Shapiro</TD></TR> 2240266059SGregory Neil Shapiro 2340266059SGregory Neil Shapiro<!----------- Description ----------> 24d0cef73dSGregory Neil Shapiro<TR><TH valign="top" align=left>DESCRIPTION</TH><TD> 25d0cef73dSGregory Neil Shapiro<TABLE border="1" cellspacing=1 cellpadding=4> 26d0cef73dSGregory Neil Shapiro<TR align="left" valign=top> 27d0cef73dSGregory Neil Shapiro<TH width="80">Called When</TH> 28d0cef73dSGregory Neil Shapiro<TD>xxfi_body is called zero or more times between xxfi_eoh and xxfi_eom.</TD> 29d0cef73dSGregory Neil Shapiro</TR> 30d0cef73dSGregory Neil Shapiro<TR align="left" valign=top> 31d0cef73dSGregory Neil Shapiro<TH>Default Behavior</TH> 32d0cef73dSGregory Neil Shapiro<TD>Do nothing; return SMFIS_CONTINUE.</TD> 33d0cef73dSGregory Neil Shapiro</TR> 34d0cef73dSGregory Neil Shapiro</TABLE> 355b0945b5SGregory Neil Shapiro</TD></TR> 3640266059SGregory Neil Shapiro 3740266059SGregory Neil Shapiro<!----------- Arguments ----------> 38d0cef73dSGregory Neil Shapiro<TR><TH valign="top" align=left>ARGUMENTS</TH><TD> 39d0cef73dSGregory Neil Shapiro <TABLE border="1" cellspacing=0> 40d0cef73dSGregory Neil Shapiro <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR> 41d0cef73dSGregory Neil Shapiro <TR valign="top"><TD>ctx</TD> 42d0cef73dSGregory Neil Shapiro <TD>Opaque context structure. 43d0cef73dSGregory Neil Shapiro </TD></TR> 44d0cef73dSGregory Neil Shapiro <TR valign="top"><TD>bodyp</TD> 45d0cef73dSGregory Neil Shapiro <TD>Pointer to the start of this block of body data. bodyp is not valid outside this call to xxfi_body. 46d0cef73dSGregory Neil Shapiro </TD></TR> 47d0cef73dSGregory Neil Shapiro <TR valign="top"><TD>len</TD> 48d0cef73dSGregory Neil Shapiro <TD>The amount of data pointed to by bodyp. 49d0cef73dSGregory Neil Shapiro </TD></TR> 50d0cef73dSGregory Neil Shapiro </TABLE> 51d0cef73dSGregory Neil Shapiro</TD></TR> 5240266059SGregory Neil Shapiro 5340266059SGregory Neil Shapiro<!----------- Notes ----------> 54d0cef73dSGregory Neil Shapiro<TR> 55d0cef73dSGregory Neil Shapiro<TH valign="top" align=left>NOTES</TH> 56d0cef73dSGregory Neil Shapiro<TD> 57d0cef73dSGregory Neil Shapiro<UL> 58d0cef73dSGregory Neil Shapiro<LI>bodyp points to a sequence of bytes. 59d0cef73dSGregory Neil ShapiroIt is <EM>not</EM> a C string (a sequence of characters that is terminated by '\0'). 60d0cef73dSGregory Neil ShapiroTherefore, do not use the usual C string functions like <CODE>strlen(3)</CODE> 61d0cef73dSGregory Neil Shapiroon this byte block. 6240266059SGregory Neil ShapiroMoreover, the byte sequence may contain '\0' characters inside the block. 6340266059SGregory Neil ShapiroHence even if a trailing '\0' is added, C string functions may still fail 6440266059SGregory Neil Shapiroto work as expected. 65d0cef73dSGregory Neil Shapiro<LI>Since message bodies can be very large, defining xxfi_body can 6640266059SGregory Neil Shapirosignificantly impact filter performance. 67*d39bd2c1SGregory Neil Shapiro<LI>End-of-lines are represented as received from SMTP (normally CRLF). 68d0cef73dSGregory Neil Shapiro<LI>Later filters will see body changes made by earlier ones. 69d0cef73dSGregory Neil Shapiro<LI>Message bodies may be sent in multiple chunks, with one call to 7040266059SGregory Neil Shapiro xxfi_body per chunk. 71d0cef73dSGregory Neil Shapiro<LI>Return 72d0cef73dSGregory Neil Shapiro<A HREF="api.html#SMFIS_SKIP">SMFIS_SKIP</A> 73d0cef73dSGregory Neil Shapiroif a milter has received sufficiently many 74d0cef73dSGregory Neil Shapirobody chunks to make a decision, 75d0cef73dSGregory Neil Shapirobut still wants to invoke 76d0cef73dSGregory Neil Shapiromessage modification functions that are only allowed to be called from 77d0cef73dSGregory Neil Shapiro<A HREF="xxfi_eom.html">xxfi_eom()</A>. 78d0cef73dSGregory Neil ShapiroNote: the milter <EM>must</EM> 79d0cef73dSGregory Neil Shapiro<A HREF="xxfi_negotiate.html">negotiate</A> 80d0cef73dSGregory Neil Shapirothis behavior with the MTA, i.e., it must check whether 81d0cef73dSGregory Neil Shapirothe protocol action 82d0cef73dSGregory Neil Shapiro<A HREF="xxfi_negotiate.html#SMFIP_SKIP"><CODE>SMFIP_SKIP</CODE></A> 83d0cef73dSGregory Neil Shapirois available and if so, the milter must request it. 84d0cef73dSGregory Neil Shapiro</UL> 85d0cef73dSGregory Neil Shapiro</TD> 86d0cef73dSGregory Neil Shapiro</TR> 87d0cef73dSGregory Neil Shapiro</TABLE> 8840266059SGregory Neil Shapiro 89d0cef73dSGregory Neil Shapiro<HR size="1"> 90d0cef73dSGregory Neil Shapiro<FONT size="-1"> 915dd76dd0SGregory Neil ShapiroCopyright (c) 2000-2003, 2007 Proofpoint, Inc. and its suppliers. 9240266059SGregory Neil ShapiroAll rights reserved. 93d0cef73dSGregory Neil Shapiro<BR> 9440266059SGregory Neil ShapiroBy using this file, you agree to the terms and conditions set 955ef517c0SGregory Neil Shapiroforth in the LICENSE. 96d0cef73dSGregory Neil Shapiro</FONT> 97d0cef73dSGregory Neil Shapiro</BODY> 98d0cef73dSGregory Neil Shapiro</HTML> 99