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

packet_time.c File Reference

Easily allow modules to have a gettimeofday() based on packet time. More...

#include "packet_time.h"

Go to the source code of this file.

Functions

void packet_time_update (time_t cur)
time_t packet_timeofday (void)
time_t packet_first_time (void)

Variables

static time_t s_first_packet = 0
static time_t s_recent_packet = 0


Detailed Description

Easily allow modules to have a gettimeofday() based on packet time.

Author:
Chris Green <cmg@sourcefire.com>
Date:
Tue Jun 17 17:09:59 2003
In many modules in snort, especially the rate detectors need to work based off time values. It's very hard to reproduce time constraints via pcap readbacks so we either have to throttle snort or use the packet time. I choose the latter.

Definition in file packet_time.c.


Function Documentation

time_t packet_first_time void   ) 
 

Definition at line 34 of file packet_time.c.

References s_first_packet.

Referenced by flowps_get_score().

void packet_time_update time_t  cur  ) 
 

Definition at line 19 of file packet_time.c.

References s_first_packet, and s_recent_packet.

Referenced by PcapProcessPacket().

time_t packet_timeofday void   ) 
 

Definition at line 29 of file packet_time.c.

References s_recent_packet.

Referenced by flow_callbacks(), flowps_generate_flow_event(), ps_tracker_free(), ps_tracker_update_icmp(), ps_tracker_update_ip(), ps_tracker_update_tcp(), and ps_tracker_update_udp().


Variable Documentation

time_t s_first_packet = 0 [static]
 

Definition at line 16 of file packet_time.c.

Referenced by packet_first_time(), and packet_time_update().

time_t s_recent_packet = 0 [static]
 

Definition at line 17 of file packet_time.c.

Referenced by packet_time_update(), and packet_timeofday().


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