Allow default function/hook/event parameters. Addresses #972.

And changed the endianness parameter of bytestring_to_count() BIF to
default to false (big endian), mostly just to prove that the BIF parser
doesn't choke on default parameters.
This commit is contained in:
Jon Siwek 2013-05-07 14:32:22 -05:00
parent 69c7363147
commit e2a1d4a233
14 changed files with 239 additions and 28 deletions

View file

@ -25,7 +25,10 @@ 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);
BuiltinFuncArg(const char* arg_name, const char* arg_type_str,
const char* arg_attr_str = "");
void SetAttrStr(const char* arg_attr_str) { attr_str = arg_attr_str; };
const char* Name() const { return name; }
int Type() const { return type; }
@ -39,6 +42,7 @@ protected:
const char* name;
int type;
const char* type_str;
const char* attr_str;
};
#endif