mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
Initial import of svn+ssh:://svn.icir.org/bro/trunk/bro as of r7088
This commit is contained in:
commit
61757ac78b
1383 changed files with 380824 additions and 0 deletions
46
src/bif_arg.h
Normal file
46
src/bif_arg.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
// $Id: bif_arg.h 3234 2006-06-08 02:38:11Z vern $
|
||||
|
||||
#ifndef bif_arg_h
|
||||
#define bif_arg_h
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
enum builtin_func_arg_type {
|
||||
#define DEFINE_BIF_TYPE(id, bif_type, bro_type, c_type, accessor, constructor) \
|
||||
id,
|
||||
#include "bif_type.def"
|
||||
#undef DEFINE_BIF_TYPE
|
||||
/*
|
||||
TYPE_ANY,
|
||||
TYPE_BOOL,
|
||||
TYPE_COUNT,
|
||||
TYPE_INT,
|
||||
TYPE_STRING,
|
||||
TYPE_PATTERN,
|
||||
TYPE_PORT,
|
||||
TYPE_OTHER,
|
||||
*/
|
||||
};
|
||||
|
||||
extern const char* builtin_func_arg_type_bro_name[];
|
||||
|
||||
class BuiltinFuncArg {
|
||||
public:
|
||||
BuiltinFuncArg(const char* arg_name, int arg_type);
|
||||
BuiltinFuncArg(const char* arg_name, const char* arg_type_str);
|
||||
|
||||
const char* Name() const { return name; }
|
||||
int Type() const { return type; }
|
||||
|
||||
void PrintBro(FILE* fp);
|
||||
void PrintCDef(FILE* fp, int n);
|
||||
void PrintCArg(FILE* fp, int n);
|
||||
void PrintBroValConstructor(FILE* fp);
|
||||
|
||||
protected:
|
||||
const char* name;
|
||||
int type;
|
||||
const char* type_str;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue