Remove unused attributes

Removed attributes &postprocessor and &match from documentation
and source code.  Removed undocumented attribute &attr from
source code.  Removed internal attribute (&tracked) from documentation.
This commit is contained in:
Daniel Thayer 2012-12-10 15:43:13 -06:00
parent e8482fef99
commit cb7fd7c87c
6 changed files with 4 additions and 23 deletions

View file

@ -663,20 +663,12 @@ scripting language supports the following built-in attributes.
``&synchronized`` variable is automatically propagated to all peers ``&synchronized`` variable is automatically propagated to all peers
when it changes. when it changes.
.. bro:attr:: &postprocessor
.. TODO: needs to be documented.
.. bro:attr:: &encrypt .. bro:attr:: &encrypt
Encrypts files right before writing them to disk. Encrypts files right before writing them to disk.
.. TODO: needs to be documented in more detail. .. TODO: needs to be documented in more detail.
.. bro:attr:: &match
.. TODO: needs to be documented.
.. bro:attr:: &raw_output .. bro:attr:: &raw_output
Opens a file in raw mode, i.e., non-ASCII characters are not Opens a file in raw mode, i.e., non-ASCII characters are not
@ -710,6 +702,3 @@ scripting language supports the following built-in attributes.
.. TODO: needs documented .. TODO: needs documented
.. bro:attr:: (&tracked)
.. TODO: needs documented or removed if it's not used anywhere.

View file

@ -14,8 +14,8 @@ const char* attr_name(attr_tag t)
"&rotate_interval", "&rotate_size", "&rotate_interval", "&rotate_size",
"&add_func", "&delete_func", "&expire_func", "&add_func", "&delete_func", "&expire_func",
"&read_expire", "&write_expire", "&create_expire", "&read_expire", "&write_expire", "&create_expire",
"&persistent", "&synchronized", "&postprocessor", "&persistent", "&synchronized",
"&encrypt", "&match", "&encrypt",
"&raw_output", "&mergeable", "&priority", "&raw_output", "&mergeable", "&priority",
"&group", "&log", "&error_handler", "&type_column", "&group", "&log", "&error_handler", "&type_column",
"(&tracked)", "(&tracked)",
@ -337,11 +337,6 @@ void Attributes::CheckAttr(Attr* a)
Error("&rotate_size only applicable to files"); Error("&rotate_size only applicable to files");
break; break;
case ATTR_POSTPROCESSOR:
if ( type->Tag() != TYPE_FILE )
Error("&postprocessor only applicable to files");
break;
case ATTR_ENCRYPT: case ATTR_ENCRYPT:
if ( type->Tag() != TYPE_FILE ) if ( type->Tag() != TYPE_FILE )
Error("&encrypt only applicable to files"); Error("&encrypt only applicable to files");

View file

@ -25,9 +25,7 @@ typedef enum {
ATTR_EXPIRE_CREATE, ATTR_EXPIRE_CREATE,
ATTR_PERSISTENT, ATTR_PERSISTENT,
ATTR_SYNCHRONIZED, ATTR_SYNCHRONIZED,
ATTR_POSTPROCESSOR,
ATTR_ENCRYPT, ATTR_ENCRYPT,
ATTR_MATCH,
ATTR_RAW_OUTPUT, ATTR_RAW_OUTPUT,
ATTR_MERGEABLE, ATTR_MERGEABLE,
ATTR_PRIORITY, ATTR_PRIORITY,

View file

@ -56,7 +56,7 @@ public:
// Rotates the logfile. Returns rotate_info. // Rotates the logfile. Returns rotate_info.
RecordVal* Rotate(); RecordVal* Rotate();
// Set &rotate_interval, &rotate_size, &postprocessor, // Set &rotate_interval, &rotate_size,
// and &raw_output attributes. // and &raw_output attributes.
void SetAttrs(Attributes* attrs); void SetAttrs(Attributes* attrs);

View file

@ -17,7 +17,7 @@
%token TOK_STRING TOK_SUBNET TOK_SWITCH TOK_TABLE %token TOK_STRING TOK_SUBNET TOK_SWITCH TOK_TABLE
%token TOK_TIME TOK_TIMEOUT TOK_TIMER TOK_TYPE TOK_UNION TOK_VECTOR TOK_WHEN %token TOK_TIME TOK_TIMEOUT TOK_TIMER TOK_TYPE TOK_UNION TOK_VECTOR TOK_WHEN
%token TOK_ATTR_ADD_FUNC TOK_ATTR_ATTR TOK_ATTR_ENCRYPT TOK_ATTR_DEFAULT %token TOK_ATTR_ADD_FUNC TOK_ATTR_ENCRYPT TOK_ATTR_DEFAULT
%token TOK_ATTR_OPTIONAL TOK_ATTR_REDEF TOK_ATTR_ROTATE_INTERVAL %token TOK_ATTR_OPTIONAL TOK_ATTR_REDEF TOK_ATTR_ROTATE_INTERVAL
%token TOK_ATTR_ROTATE_SIZE TOK_ATTR_DEL_FUNC TOK_ATTR_EXPIRE_FUNC %token TOK_ATTR_ROTATE_SIZE TOK_ATTR_DEL_FUNC TOK_ATTR_EXPIRE_FUNC
%token TOK_ATTR_EXPIRE_CREATE TOK_ATTR_EXPIRE_READ TOK_ATTR_EXPIRE_WRITE %token TOK_ATTR_EXPIRE_CREATE TOK_ATTR_EXPIRE_READ TOK_ATTR_EXPIRE_WRITE

View file

@ -319,7 +319,6 @@ vector return TOK_VECTOR;
when return TOK_WHEN; when return TOK_WHEN;
&add_func return TOK_ATTR_ADD_FUNC; &add_func return TOK_ATTR_ADD_FUNC;
&attr return TOK_ATTR_ATTR;
&create_expire return TOK_ATTR_EXPIRE_CREATE; &create_expire return TOK_ATTR_EXPIRE_CREATE;
&default return TOK_ATTR_DEFAULT; &default return TOK_ATTR_DEFAULT;
&delete_func return TOK_ATTR_DEL_FUNC; &delete_func return TOK_ATTR_DEL_FUNC;