simrecord.h 970 Bytes
/*
 * Copyright (C) 1996-1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * 
 * This file is part of the SimOS distribution. 
 * See LICENSE file for terms of the license. 
 *
 */


#ifndef _SIMREC_H
#define _SIMREC_H

#include "simtypes.h"

typedef struct SimRecord *SimRec;

typedef struct SimRecHeader {
   int magic;
   int version;
   unsigned int addrStart;
   int lowRes;
   int highRes;
   int bucketSize;
   int entrySize;
   char tableName[128];
   int fieldNamesLen;
} SimRecHeader;


#define SIMREC_MAGIC 0x6d737079	

extern SimRec SimRecTableInit( char *tableName,int bucketSize,
			       long lowRes, long highRes);
extern void SimRecAddHighResRange(SimRec recPtr, VA addr, unsigned long size);
extern void *SimRecBucketAddr(SimRec recPtr, VA addr);
extern int  SimRecDump(SimRec recPtr, int fd, int entrySize, 
                       char *fieldNames, int reset);
extern void SimRecReset(SimRec recPtr);
#endif /* _SIMREC_H */