#ifndef __IPTSTATS_H__
#define __IPTSTATS_H__

#include <ppsdk/s-pluginapi.h>

#define vMajor		0
#define vMinor		0
#define vBuild		1

#define PLGNAME		"IptStats"

#define MAGICLNG	0x9602C9BFL

#define hMskLen 13
  static const sint8 hMsk[hMskLen] = "EFGHABCDMNOPI";

#define GETSTATS	"GetStats-"
#define SETSTATS	"SetStats-"

#define intTime		0x0000012CL // 5 mins = 60 * 5
#define minTime		0x00069780L // 5 days = 60 * 60 * 24 * 5

  typedef struct
{
    uint32 seed;
    uint32 last;
    sint16 *list;
} iptStatRec, *iptStatPtr;

  Str15 *isVar = NULL;
  uint32 nbrVar = 0;

  iptStatRec *isRec = NULL;
  uint32 nbrRec = 0;

  static iptStatPtr newrec( uint32, uint32 );
  static void newvar( uint8 * );

  static iptStatPtr fndrec( uint32 );
  static uint32 fndvar( uint8 * );

  static uint32 cvtH2S( uint8 * );
  static void cvtS2H( uint32, uint8 * );

#endif /* __IPTSTATS_H__ */
