1168515Sgshapiro<HTML> 2168515Sgshapiro<HEAD><TITLE>xxfi_body</TITLE></HEAD> 3168515Sgshapiro<BODY> 4132943Sgshapiro<!-- 5266692Sgshapiro$Id: xxfi_body.html,v 1.18 2013-11-22 20:51:39 ca Exp $ 6132943Sgshapiro--> 7168515Sgshapiro<H1>xxfi_body</H1> 890792Sgshapiro 9168515Sgshapiro<TABLE border="0" cellspacing=4 cellpadding=4> 1090792Sgshapiro<!---------- Synopsis -----------> 11168515Sgshapiro<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD> 12168515Sgshapiro<PRE> 1390792Sgshapiro#include <libmilter/mfapi.h> 1490792Sgshapirosfsistat (*xxfi_body)( 15168515Sgshapiro SMFICTX *ctx, 16168515Sgshapiro unsigned char *bodyp, 1790792Sgshapiro size_t len 1890792Sgshapiro); 19168515Sgshapiro</PRE> 2090792SgshapiroHandle a piece of a message's body. 21168515Sgshapiro</TD></TR> 2290792Sgshapiro 2390792Sgshapiro<!----------- Description ----------> 24168515Sgshapiro<TR><TH valign="top" align=left>DESCRIPTION</TH><TD> 25168515Sgshapiro<TABLE border="1" cellspacing=1 cellpadding=4> 26168515Sgshapiro<TR align="left" valign=top> 27168515Sgshapiro<TH width="80">Called When</TH> 28168515Sgshapiro<TD>xxfi_body is called zero or more times between xxfi_eoh and xxfi_eom.</TD> 29168515Sgshapiro</TR> 30168515Sgshapiro<TR align="left" valign=top> 31168515Sgshapiro<TH>Default Behavior</TH> 32168515Sgshapiro<TD>Do nothing; return SMFIS_CONTINUE.</TD> 33168515Sgshapiro</TR> 34168515Sgshapiro</TABLE> 3590792Sgshapiro 3690792Sgshapiro<!----------- Arguments ----------> 37168515Sgshapiro<TR><TH valign="top" align=left>ARGUMENTS</TH><TD> 38168515Sgshapiro <TABLE border="1" cellspacing=0> 39168515Sgshapiro <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR> 40168515Sgshapiro <TR valign="top"><TD>ctx</TD> 41168515Sgshapiro <TD>Opaque context structure. 42168515Sgshapiro </TD></TR> 43168515Sgshapiro <TR valign="top"><TD>bodyp</TD> 44168515Sgshapiro <TD>Pointer to the start of this block of body data. bodyp is not valid outside this call to xxfi_body. 45168515Sgshapiro </TD></TR> 46168515Sgshapiro <TR valign="top"><TD>len</TD> 47168515Sgshapiro <TD>The amount of data pointed to by bodyp. 48168515Sgshapiro </TD></TR> 49168515Sgshapiro </TABLE> 50168515Sgshapiro</TD></TR> 5190792Sgshapiro 5290792Sgshapiro<!----------- Notes ----------> 53168515Sgshapiro<TR> 54168515Sgshapiro<TH valign="top" align=left>NOTES</TH> 55168515Sgshapiro<TD> 56168515Sgshapiro<UL> 57168515Sgshapiro<LI>bodyp points to a sequence of bytes. 58168515SgshapiroIt is <EM>not</EM> a C string (a sequence of characters that is terminated by '\0'). 59168515SgshapiroTherefore, do not use the usual C string functions like <CODE>strlen(3)</CODE> 60168515Sgshapiroon this byte block. 6190792SgshapiroMoreover, the byte sequence may contain '\0' characters inside the block. 6290792SgshapiroHence even if a trailing '\0' is added, C string functions may still fail 6390792Sgshapiroto work as expected. 64168515Sgshapiro<LI>Since message bodies can be very large, defining xxfi_body can 6590792Sgshapirosignificantly impact filter performance. 66168515Sgshapiro<LI>End-of-lines are represented as received from SMTP (normally CR/LF). 67168515Sgshapiro<LI>Later filters will see body changes made by earlier ones. 68168515Sgshapiro<LI>Message bodies may be sent in multiple chunks, with one call to 6990792Sgshapiro xxfi_body per chunk. 70168515Sgshapiro<LI>Return 71168515Sgshapiro<A HREF="api.html#SMFIS_SKIP">SMFIS_SKIP</A> 72168515Sgshapiroif a milter has received sufficiently many 73168515Sgshapirobody chunks to make a decision, 74168515Sgshapirobut still wants to invoke 75168515Sgshapiromessage modification functions that are only allowed to be called from 76168515Sgshapiro<A HREF="xxfi_eom.html">xxfi_eom()</A>. 77168515SgshapiroNote: the milter <EM>must</EM> 78168515Sgshapiro<A HREF="xxfi_negotiate.html">negotiate</A> 79168515Sgshapirothis behavior with the MTA, i.e., it must check whether 80168515Sgshapirothe protocol action 81168515Sgshapiro<A HREF="xxfi_negotiate.html#SMFIP_SKIP"><CODE>SMFIP_SKIP</CODE></A> 82168515Sgshapirois available and if so, the milter must request it. 83168515Sgshapiro</UL> 84168515Sgshapiro</TD> 85168515Sgshapiro</TR> 86168515Sgshapiro</TABLE> 8790792Sgshapiro 88168515Sgshapiro<HR size="1"> 89168515Sgshapiro<FONT size="-1"> 90261363SgshapiroCopyright (c) 2000-2003, 2007 Proofpoint, Inc. and its suppliers. 9190792SgshapiroAll rights reserved. 92168515Sgshapiro<BR> 9390792SgshapiroBy using this file, you agree to the terms and conditions set 94112810Sgshapiroforth in the LICENSE. 95168515Sgshapiro</FONT> 96168515Sgshapiro</BODY> 97168515Sgshapiro</HTML> 98