#include "flow_error.h"
#include "util_math.h"
#include "common_defs.h"
#include "flow_print.h"
#include "flow_packet.h"
#include "bitop.h"
Go to the source code of this file.
Defines | |
#define | FROM_INITIATOR 1 |
#define | FROM_RESPONDER 2 |
#define | FLOW_REVERSED 0x00000001 |
#define | FLOW_CLOSEME 0x00000002 |
Typedefs | |
typedef _FLOWDATA | FLOWDATA |
typedef _FLOWKEY | FLOWKEY |
typedef _FLOWSTATS | FLOWSTATS |
typedef _FLOW | FLOW |
Enumerations | |
enum | FLOW_POSITION { FLOW_NEW, FLOW_FIRST_BIDIRECTIONAL, FLOW_ADDITIONAL, FLOW_SHUTDOWN, FLOW_MAX } |
enum | FLOWHASHID { HASH1 = 1, HASH2 = 2 } |
Functions | |
int | flow_init (FLOW *flow, char protocol, u_int32_t init_address, u_int16_t init_port, u_int32_t resp_address, u_int16_t resp_port) |
int | flow_alloc (int family, FLOW **flow, int *size) |
static INLINE void | flow_mark (FLOW *flow, int flags) |
static INLINE int | flow_checkflag (FLOW *flow, u_long flags) |
int | flowkey_reverse (FLOWKEY *key) |
int | flowkey_make (FLOWKEY *key, FLOWPACKET *p) |
int | flowkey_print (FLOWKEY *key) |
int | flowkey_normalize (FLOWKEY *dst, const FLOWKEY *src) |
int | flowkeycmp_fcn (const void *s1, const void *s2, size_t n) |
|
shutdown this flow ASAP Definition at line 16 of file flow.h. Referenced by CheckFlowShutdown(). |
|
this flow was swapped |
|
Definition at line 11 of file flow.h. Referenced by CheckFlowShutdown(), flowcache_find(), FlowPreprocessor(), flowstat_increment(), ps_tracker_update_ip(), ps_tracker_update_tcp(), and ps_tracker_update_udp(). |
|
Definition at line 12 of file flow.h. Referenced by flowcache_find(), FlowPreprocessor(), flowstat_increment(), ps_filter_ignore(), ps_tracker_update_ip(), ps_tracker_update_tcp(), and ps_tracker_update_udp(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
Calloc a FLOW object of the right type -- this function is not needed
Definition at line 59 of file flow.c. References FLOW_ENOMEM, FLOW_ENULL, FLOW_SUCCESS, and NULL. |
|
Check to see if a particular flag exists
Definition at line 99 of file flow.h. References _FLOWSTATS::flow_flags, and _FLOW::stats. Referenced by CheckFlowShutdown(). |
|
have not done anything with the flow->data section yet Definition at line 22 of file flow.c. References FLOW_EINVALID, FLOW_ENULL, flow_printf(), FLOW_SUCCESS, flowstat_clear(), _FLOWKEY::init_address, _FLOWKEY::init_port, _FLOW::key, NULL, _FLOWKEY::protocol, _FLOWKEY::resp_address, _FLOWKEY::resp_port, and _FLOW::stats. Referenced by flowcache_newflow(). |
|
Mark a flow with a particular flag
Definition at line 88 of file flow.h. References _FLOWSTATS::flow_flags, and _FLOW::stats. |
|
Given a packet, generate a key.
Definition at line 94 of file flow.c. References FLOW_EINVALID, FLOW_ENULL, FLOW_SUCCESS, GetIPv4DstIp(), GetIPv4DstPort(), GetIPv4Proto(), GetIPv4SrcIp(), GetIPv4SrcPort(), _FLOWKEY::init_address, _FLOWKEY::init_port, IsIPv4Packet(), memset, _FLOWKEY::protocol, _FLOWKEY::resp_address, and _FLOWKEY::resp_port. Referenced by FlowPreprocessor(). |
|
Copy into dst from src and normalize the results so that things will hash to the same entry no matter what. This should only be used for SEARCHING as it doesn't store much else.
Definition at line 153 of file flow.c. References _FLOWKEY::init_address, _FLOWKEY::init_port, _FLOWKEY::protocol, _FLOWKEY::resp_address, and _FLOWKEY::resp_port. Referenced by flowcache_find(), flowcache_newflow(), and flowcache_releaseflow(). |
|
print out a key to a file stream
Definition at line 134 of file flow.c. References flow_printf(), _FLOWKEY::init_address, _FLOWKEY::init_port, _FLOWKEY::protocol, _FLOWKEY::resp_address, and _FLOWKEY::resp_port. Referenced by flow_callbacks(), FlowPreprocessor(), and flowps_newflow_callback(). |
|
|
|
perform key comparison
Definition at line 186 of file flow.c. References _FLOWKEY::init_address, _FLOWKEY::init_port, _FLOWKEY::protocol, _FLOWKEY::resp_address, and _FLOWKEY::resp_port. Referenced by flowcache_init(). |