#include "../config.h"
#include "../engine/hlbr.h"
Go to the source code of this file.
Data Structures | |
struct | save_rec |
struct | save_bin |
struct | save_query |
Defines | |
#define | MAX_QUERY_RESULTS 128 |
#define | MAX_SAVES 1024 |
#define | MAX_SAVES_PER_BIN 128 |
Typedefs | |
typedef save_rec | SaveRec |
typedef save_bin | SaveBin |
typedef save_query | SaveQuery |
Functions | |
int | InitCache () |
int | SavePacket (int PacketSlot, char *Key, int KeyLen, int timeout) |
SaveQuery * | GetAndLockSavedPackets (char *Key, int KeyLen) |
void | UnlockSavedQuery (SaveQuery *q) |
void | FreeSaveQuery (SaveQuery *q) |
#define MAX_QUERY_RESULTS 128 |
#define MAX_SAVES 1024 |
#define MAX_SAVES_PER_BIN 128 |
typedef struct save_query SaveQuery |
void FreeSaveQuery | ( | SaveQuery * | q | ) |
Definition at line 123 of file packet_cache.c.
References FREE_SAVED_1, FreeSaved(), hlbr_mutex_lock(), hlbr_mutex_unlock(), save_query::NumResults, SavedMutex, SaveLockID, and save_query::Saves.
SaveQuery* GetAndLockSavedPackets | ( | char * | Key, | |
int | KeyLen | |||
) |
Definition at line 260 of file packet_cache.c.
References DEBUG, GET_SAVED_1, GET_SAVED_2, GET_SAVED_3, Globals, HashKey(), hlbr_mutex_lock(), hlbr_mutex_unlock(), save_bin::Items, save_rec::Key, save_rec::KeyLen, packet_rec::LockID, save_rec::LockID, MAX_QUERY_RESULTS, packet_rec::Mutex, save_rec::Mutex, save_bin::NumInBin, save_query::NumResults, save_query::Packets, global_vars::Packets, save_rec::PacketSlot, SavedMutex, SaveLockID, save_query::Saves, Saves, and SBins.
int InitCache | ( | ) |
int SavePacket | ( | int | PacketSlot, | |
char * | Key, | |||
int | KeyLen, | |||
int | timeout | |||
) |
Definition at line 198 of file packet_cache.c.
References FALSE, GetFreeSaved(), Globals, HashKey(), hlbr_mutex_lock(), hlbr_mutex_unlock(), save_rec::InUse, save_bin::Items, save_rec::Key, save_rec::KeyLen, packet_rec::LockID, MAX_SAVES_PER_BIN, packet_rec::Mutex, save_rec::NextTime, save_bin::NumInBin, global_vars::Packets, save_rec::PacketSlot, SAVE_PACKET_1, SAVE_PACKET_2, packet_rec::SaveCount, SavedMutex, SaveLockID, Saves, SaveTimeHead, SaveTimeTail, SBins, save_rec::Timeout, TimeoutSavedPackets(), TRUE, and packet_rec::tv.
void UnlockSavedQuery | ( | SaveQuery * | q | ) |
Definition at line 314 of file packet_cache.c.
References Globals, hlbr_mutex_lock(), hlbr_mutex_unlock(), save_rec::Mutex, packet_rec::Mutex, save_query::NumResults, global_vars::Packets, save_rec::PacketSlot, SavedMutex, SaveLockID, save_query::Saves, Saves, and UNLOCK_SAVED_1.