+#
+## The "Init" (Parser) function.
+#
+## This function is responsible to initialize the Parser as a class based object.
+## It has to be called once before any parsing of messages can be done.
+#
+sub Init (%) {
+ my ( $class, %args ) = @_;
+ my $self = \%args;
+
+ # Use bless to make "$self" to an object of class "$class".
+ bless($self, $class);
+
+ # Return the class object.
+ return $self;
+}
+
+#
+## The "Update" Parser settings function.
+#
+## This object based function is called to update various class settings.
+#
+sub Update (\%) {
+ my $self = shift;
+
+ # Dereference the given hash-ref and store
+ # the values into a new temporary hash.
+ my %settings = %{ $_[0] };
+
+ # Update snort priority level settings or disable it.
+ if ((defined($self->{SnortPriorityLevel})) && (exists($settings{SnortPriorityLevel}))) {
+ # Change settings.
+ $self->{SnortPriorityLevel} = $settings{SnortPriorityLevel};
+ } else {
+ # Remove setting.
+ delete $self->{SnortPriorityLevel};
+ }
+
+ # Return modified class object.
+ return $self;
+}
+