1 #ifndef _DATABIN_H_
2 #define _DATABIN_H_
3 
4 /*******************************************************************************
5 * NAME
6 *       databingen - fill a buffer with a data pattern
7 *
8 * SYNOPSIS
9 *       (void) databingen(mode, buffer, bsize, offset)
10 *       int     mode;
11 *       char    *buffer;
12 *       int     bsize;
13 *	int 	offset;
14 *
15 * DESCRIPTION
16 *       datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes
17 *       of data of the form indicated by 'mode'.
18 *	All modes (expect r -random) are file offset based.
19 *	This allows more than process to do writing to the file without
20 *	corrupting it if the same modes were used.
21 *	They data modes to choose from, these are:
22 *
23 *               'a' - writes an alternating bit pattern (i.e. 0x5555555...)
24 *
25 *               'c' - writes a checkerboard pattern (i.e. 0xff00ff00ff00...)
26 *
27 *		'C' - writes counting pattern (i.e. 0 - 07, 0 - 07, ...);
28 *
29 *		'o' - writes all bits set (i.e. 0xffffffffffffff...)
30 *
31 *		'z' - writes all bits cleared (i.e. 0x000000000...);
32 *
33 *               'r' - writes random integers
34 *
35 * RETURN VALUE
36 *       None
37 *
38 *******************************************************************************/
39 
40 void databingen( int mode, char *buffer, int bsize, int offset );
41 
42 int databinchk( int mode, char *buffer, int bsize, int offset, char **errmsg);
43 
44 #endif
45