Branch data Line data Source code
1 : : // $Id:$
2 : :
3 : : #ifndef binpac_bro_h
4 : : #define binpac_bro_h
5 : :
6 : : class Analyzer;
7 : : class Val;
8 : : class PortVal;
9 : :
10 : : #include "util.h"
11 : : #include "Analyzer.h"
12 : : #include "Val.h"
13 : : #include "event.bif.func_h"
14 : :
15 : : #include "binpac.h"
16 : :
17 : : namespace binpac {
18 : :
19 : : typedef Analyzer* BroAnalyzer;
20 : : typedef Val* BroVal;
21 : : typedef PortVal* BroPortVal;
22 : : typedef StringVal* BroStringVal;
23 : :
24 : : inline StringVal* string_to_val(string const &str)
25 : : {
26 : : return new StringVal(str.c_str());
27 : : }
28 : :
29 : 0 : inline StringVal* bytestring_to_val(const_bytestring const &str)
30 : : {
31 : 0 : return new StringVal(str.length(), (const char*) str.begin());
32 : : }
33 : :
34 : : } // namespace binpac
35 : :
36 : : extern int FLAGS_use_binpac;
37 : :
38 : : #endif
|