camel-casing for types

This commit is contained in:
Bernhard Amann 2011-11-21 15:45:27 -08:00
parent 92b3723b09
commit 77a517f2b5
4 changed files with 17 additions and 17 deletions

View file

@ -18,11 +18,11 @@ export {
redef enum Log::ID += { LOG }; redef enum Log::ID += { LOG };
} }
type idx: record { type Idx: record {
i: int; i: int;
}; };
type val: record { type Val: record {
b: bool; b: bool;
e: Log::ID; e: Log::ID;
c: count; c: count;
@ -40,13 +40,13 @@ type val: record {
ve: vector of int; ve: vector of int;
}; };
global servers: table[int] of val = table(); global servers: table[int] of Val = table();
event bro_init() event bro_init()
{ {
# first read in the old stuff into the table... # first read in the old stuff into the table...
Input::create_stream(A::LOG, [$source="input.log"]); Input::create_stream(A::LOG, [$source="input.log"]);
Input::add_tablefilter(A::LOG, [$name="ssh", $idx=idx, $val=val, $destination=servers]); Input::add_tablefilter(A::LOG, [$name="ssh", $idx=Idx, $val=Val, $destination=servers]);
Input::force_update(A::LOG); Input::force_update(A::LOG);
print servers; print servers;
} }

View file

@ -18,21 +18,21 @@ export {
redef enum Log::ID += { LOG }; redef enum Log::ID += { LOG };
} }
type idx: record { type Idx: record {
i: int; i: int;
}; };
type val: record { type Val: record {
b: bool; b: bool;
}; };
global servers: table[int] of val = table(); global servers: table[int] of Val = table();
event bro_init() event bro_init()
{ {
# first read in the old stuff into the table... # first read in the old stuff into the table...
Input::create_stream(A::LOG, [$source="input.log"]); Input::create_stream(A::LOG, [$source="input.log"]);
Input::add_tablefilter(A::LOG, [$name="input", $idx=idx, $val=val, $destination=servers, $want_record=F]); Input::add_tablefilter(A::LOG, [$name="input", $idx=Idx, $val=Val, $destination=servers, $want_record=F]);
Input::force_update(A::LOG); Input::force_update(A::LOG);
print servers; print servers;
} }

View file

@ -18,21 +18,21 @@ export {
redef enum Log::ID += { LOG }; redef enum Log::ID += { LOG };
} }
type idx: record { type Idx: record {
i: int; i: int;
}; };
type val: record { type Val: record {
b: bool; b: bool;
}; };
global servers: table[int] of val = table(); global servers: table[int] of Val = table();
event bro_init() event bro_init()
{ {
# first read in the old stuff into the table... # first read in the old stuff into the table...
Input::create_stream(A::LOG, [$source="input.log"]); Input::create_stream(A::LOG, [$source="input.log"]);
Input::add_tablefilter(A::LOG, [$name="input", $idx=idx, $val=val, $destination=servers]); Input::add_tablefilter(A::LOG, [$name="input", $idx=Idx, $val=Val, $destination=servers]);
Input::force_update(A::LOG); Input::force_update(A::LOG);
print servers; print servers;
} }

View file

@ -24,22 +24,22 @@ export {
redef enum Log::ID += { LOG }; redef enum Log::ID += { LOG };
} }
type idx: record { type Idx: record {
i: int; i: int;
}; };
type val: record { type Val: record {
b: bool; b: bool;
}; };
global servers: table[int] of val = table(); global servers: table[int] of Val = table();
event bro_init() event bro_init()
{ {
# first read in the old stuff into the table... # first read in the old stuff into the table...
Input::create_stream(A::LOG, [$source="input.log"]); Input::create_stream(A::LOG, [$source="input.log"]);
Input::add_tablefilter(A::LOG, [$name="input", $idx=idx, $val=val, $destination=servers, $want_record=F, Input::add_tablefilter(A::LOG, [$name="input", $idx=Idx, $val=Val, $destination=servers, $want_record=F,
$pred(typ: Input::Event, left: idx, right: bool) = { return right; } $pred(typ: Input::Event, left: Idx, right: bool) = { return right; }
]); ]);
Input::force_update(A::LOG); Input::force_update(A::LOG);
if ( 1 in servers ) { if ( 1 in servers ) {