Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Active.h

Go to the documentation of this file.
00001 // $Id: Active.h,v 1.1 2004/07/14 20:15:39 jason Exp $
00002 
00003 #ifndef active_h
00004 #define active_h
00005 
00006 #include <string>
00007 using namespace std;
00008 
00009 #include "util.h"
00010 
00011 enum ReassemblyPolicy {
00012         RP_UNKNOWN,
00013         RP_BSD, // Left-trim to equal or lower offset frags
00014         RP_LINUX,       // Left-trim to strictly lower offset frags
00015         RP_FIRST,       // Accept only new (no previous value) octets
00016         RP_LAST // Accept all
00017 };
00018 
00019 struct NumericData {
00020         ReassemblyPolicy ip_reassem;
00021         ReassemblyPolicy tcp_reassem;
00022         unsigned short path_MTU;        // 0 = unknown
00023         unsigned char hops;     // 0 = unknown
00024         bool accepts_rst_in_window;
00025         bool accepts_rst_outside_window;
00026         bool accepts_rst_in_sequence;
00027 };
00028 
00029 // Return value is whether or not there was a known result for that
00030 // machine (actually, IP address in network order); if not, a default
00031 // is returned. Note that the map data is a string in all cases: the
00032 // numeric form is more efficient and is to be preferred ordinarily.
00033 bool get_map_result(uint32 ip_addr, const char* key, string& result);
00034 
00035 // Basically a special case of get_map_result(), but returns numbers
00036 // directly for efficiency reasons, since these are frequently
00037 // looked up. ### Perhaps a better generic mechanism is in order.
00038 bool get_map_result(uint32 ip_addr, const NumericData*& result);
00039 
00040 // Reads in AM data from the specified file (basically [IP, policy] tuples)
00041 // Should be called at initialization time.
00042 bool load_mapping_table(const char* map_file);
00043 
00044 #endif

Generated on Wed Sep 14 02:55:57 2005 for bro_docs by doxygen 1.3.5