BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy


   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo FML Function Reference

Fchksum, Fchksum32(3fml)


Fchksum(), Fchksum32() - compute checksum for fielded buffer


#include <stdio.h> 
#include "fml.h"
Fchksum(FBFR *fbfr)
#include "fml32.h"
Fchksum32(FBFR32 *fbfr)


For extra-reliable I/O, a checksum may be calculated using Fchksum() and stored in a fielded buffer being written out. fbfr is a pointer to a fielded buffer. The stored checksum may be inspected by the receiving process to verify that the entire buffer was received.

For values of type FLD_PTR, the name of the pointer field (rather than the pointer or the data referenced by the pointer) is included in the checksum calculation.

Fchksum32() is used with 32-bit FML.

A thread in a multithreaded application may issue a call to Fchksum() or Fchksum32() while running in any context state, including TPINVALIDCONTEXT.

Return Values

On success, Fchksum() returns the checksum. This function returns -1 on error and sets Ferror to indicate the error condition.


Under the following conditions, Fchksum() fails and sets Ferror to:


"fielded buffer not aligned"
The buffer does not begin on the proper boundary.


"buffer not fielded"
The buffer is not a fielded buffer or has not been initialized by Finit().

See Also

Introduction to FML Functions, Fread, Fread32(3fml), Fwrite, Fwrite32(3fml)