NAF Core Library
libnaf 0.6.0 API documentation

dynflow.h

Go to the documentation of this file.
00001 /*
00002  ** dynflow.h
00003  ** NAF dynamic flow allocation and manipulation
00004  **
00005  ** ------------------------------------------------------------------------
00006  ** Copyright (C) 2005-2007 Carnegie Mellon University. All Rights Reserved.
00007  ** ------------------------------------------------------------------------
00008  ** Authors: Brian Trammell <bht@cert.org>
00009  ** ------------------------------------------------------------------------
00010  ** GNU General Public License (GPL) Rights pursuant to Version 2, June 1991
00011  ** Government Purpose License Rights (GPLR) pursuant to DFARS 252.225-7013
00012  ** ------------------------------------------------------------------------
00013  */
00014 
00022 /* idem hack */
00023 #ifndef _NAF_DYNFLOW_H_
00024 #define _NAF_DYNFLOW_H_
00025 
00026 #include <naf/autoinc.h>
00027 #include <naf/nafcore.h>
00028 
00038 NAFlowKey       *naf_flowkey_alloc(
00039     GMemChunk           *keychunk,
00040     NAFlowKey           *key);
00041   
00052 NAFlowVal       *naf_flowval_alloc(
00053     GMemChunk           *valchunk,
00054     NAFlowVal           *val);
00055 
00064 NAFlowVUC       *naf_flowvuc_alloc(
00065     GMemChunk           *vucchunk);
00066 
00078 NAFlow          *naf_flow_alloc(
00079     GMemChunk           *flowchunk,
00080     NAFlowKey           *key,
00081     NAFlowVal           *val);
00082 
00091 uint32_t naf_flowkey_hash(
00092     NAFlowKey       *key);
00093 
00103 gboolean naf_flowkey_equal(
00104     NAFlowKey       *a,
00105     NAFlowKey       *b);
00106 
00121 int naf_flowkey_cmp(
00122     const void          *a, 
00123     const void          *b, 
00124     void                *u); 
00125 
00138 void naf_flowkey_mask(
00139     NAFlowKey       *in,
00140     NAFlowKey       *out,
00141     NAFlowMask      *mask);
00142 
00154 void naf_flowkey_reverse(
00155     NAFlowKey       *in,
00156     NAFlowKey       *out);
00157 
00167 void naf_flowval_reverse(
00168     NAFlowVal       *in,
00169     NAFlowVal       *out);
00170 
00180 NAFTimeSec naf_bin_time(
00181     NAFTimeSec          tv,
00182     NAFTimeSec          size);
00183 
00184 #endif