/* toctou.H
 * John Viega
 *
 * Feb 8 2000
 */

#ifndef __TOCTOU_H__
#define __TOCTOU_H__

#include "lex.H"
#include "vulndb.H"

#define TOCTOU_A 0
#define TOCTOU_B 1
#define TOCTOU_C 2

struct TTSite
{
  VulnInfo *vuln;
  char     *source_file;
  TTSite   *next;
  int      line;
  TTSite(VulnInfo *v, char *src, int l)
  {
    vuln        = v;
    source_file = src;
    next        = 0;
    line        = l;
  }
};

struct TTBucket
{
  TTSite *calls[2];
  TTSite *ends[2];
  int num[2];

  TTBucket()
  {
    calls[0] = 0;
    calls[1] = 0;
    
    ends[0]  = 0;
    ends[1]  = 0;

    num[0]   = 0;
    num[1]   = 0;
  }
};
#endif
