Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

scoreboard.h

Go to the documentation of this file.
00001 /**
00002  * @file   scoreboard.h
00003  * @author Chris Green <cmg@sourcefire.com>
00004  * @date   Thu Jun  5 09:46:58 2003
00005  * 
00006  * @brief  implementation of a autorecovery scoreboard
00007  * 
00008  * Right now, there are two tables and memory is shared between them
00009  * both.  In the future, they should really share the same memory pool
00010  * and the free lists should have some method for figuring out which
00011  * one a node belongs in.
00012  *
00013  * @todo add a list of the last nodes I've talked to
00014  */
00015 
00016 #ifndef _SCOREBOARD_H
00017 #define _SCOREBOARD_H
00018 
00019 #include "flowps.h"
00020 #include "sfxhash.h"
00021 
00022 
00023 
00024 #define PSENTRY_NEW     0x0001
00025 #define PSENTRY_SLIDING 0x0002
00026 
00027 /**
00028  * this is the data for an individual tracker
00029  *
00030  * currenly, all score board items have a score and 2 time's that may
00031  * be used for the time scale.
00032  */
00033 
00034 
00035 int scoreboard_init(SCOREBOARD *sbp,
00036                     char *description,
00037                     TRACKER_POSITION kind,
00038                     unsigned int rows,  int memcap);
00039 
00040 int scoreboard_destroy(SCOREBOARD *sbp);
00041 int scoreboard_add(SCOREBOARD *sbp, u_int32_t *address, SCORE_ENTRY **sepp);
00042 int scoreboard_find(SCOREBOARD *sbp, u_int32_t *address, SCORE_ENTRY **sepp);
00043 int scoreboard_remove(SCOREBOARD *sbp, u_int32_t *address);
00044 
00045 int scoreboard_move(SCOREBOARD *dst, SCOREBOARD *src, u_int32_t *address);
00046 
00047 int scoreboard_memcap(SCOREBOARD *sbp);
00048 int scoreboard_row_count(SCOREBOARD *sbp);
00049 int scoreboard_overhead_bytes(SCOREBOARD *sbp);
00050 void scoreboard_stats(SCOREBOARD *sbp, int dumpall);
00051 
00052 #endif /* _SCOREBOARD_H */

Generated on Sun May 14 14:51:15 2006 by  doxygen 1.4.2