#! /usr/bin/perl -w
# nagios: -epn

package Monitoring::GLPlugin::Commandline::Extraopts;
use strict;
use File::Basename;
use strict;

sub new {
  my $class = shift;
  my %params = @_;
  my $self = {
    file => $params{file},
    commandline => $params{commandline},
    config => {},
    section => 'default_no_section',
  };
  bless $self, $class;
  $self->prepare_file_and_section();
  $self->init();
  return $self;
}

sub prepare_file_and_section {
  my $self = shift;
  if (! defined $self->{file}) {
    # ./check_stuff --extra-opts
    $self->{section} = basename($0);
    $self->{file} = $self->get_default_file();
  } elsif ($self->{file} =~ /^[^@]+$/) {
    # ./check_stuff --extra-opts=special_opts
    $self->{section} = $self->{file};
    $self->{file} = $self->get_default_file();
  } elsif ($self->{file} =~ /^@(.*)/) {
    # ./check_stuff --extra-opts=@/etc/myconfig.ini
    $self->{section} = basename($0);
    $self->{file} = $1;
  } elsif ($self->{file} =~ /^(.*?)@(.*)/) {
    # ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini
    $self->{section} = $1;
    $self->{file} = $2;
  }
}

sub get_default_file {
  my $self = shift;
  foreach my $default (qw(/etc/nagios/plugins.ini
      /usr/local/nagios/etc/plugins.ini
      /usr/local/etc/nagios/plugins.ini
      /etc/opt/nagios/plugins.ini
      /etc/nagios-plugins.ini
      /usr/local/etc/nagios-plugins.ini
      /etc/opt/nagios-plugins.ini)) {
    if (-f $default) {
      return $default;
    }
  }
  return undef;
}

sub init {
  my $self = shift;
  if (! defined $self->{file}) {
    $self->{errors} = sprintf 'no extra-opts file specified and no default file found';
  } elsif (! -f $self->{file}) {
    $self->{errors} = sprintf 'could not open %s', $self->{file};
  } else {
    my $data = do { local (@ARGV, $/) = $self->{file}; <> };
    my $in_section = 'default_no_section';
    foreach my $line (split(/\n/, $data)) {
      if ($line =~ /\[(.*)\]/) {
        $in_section = $1;
      } elsif ($line =~ /(.*?)\s*=\s*(.*)/) {
        $self->{config}->{$in_section}->{$1} = $2;
      }
    }
  }
}

sub is_valid {
  my $self = shift;
  return ! exists $self->{errors};
}

sub overwrite {
  my $self = shift;
  if (scalar(keys %{$self->{config}->{default_no_section}}) > 0) {
    foreach (keys %{$self->{config}->{default_no_section}}) {
      $self->{commandline}->{$_} = $self->{config}->{default_no_section}->{$_};
    }
  }
  if (exists $self->{config}->{$self->{section}}) {
    foreach (keys %{$self->{config}->{$self->{section}}}) {
      $self->{commandline}->{$_} = $self->{config}->{$self->{section}}->{$_};
    }
  }
}

sub errors {
  my $self = shift;
  return $self->{errors} || "";
}



package Monitoring::GLPlugin::Commandline::Getopt;
use strict;
use File::Basename;
use Getopt::Long qw(:config no_ignore_case bundling);

# Standard defaults
my %DEFAULT = (
  timeout => 15,
  verbose => 0,
  license =>
"This monitoring plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
It may be used, redistributed and/or modified under the terms of the GNU
General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).",
);
# Standard arguments
my @ARGS = ({
    spec => 'usage|?',
    help => "-?, --usage\n   Print usage information",
  }, {
    spec => 'help|h',
    help => "-h, --help\n   Print detailed help screen",
  }, {
    spec => 'version|V',
    help => "-V, --version\n   Print version information",
  }, {
    #spec => 'extra-opts:s@',
    #help => "--extra-opts=[<section>[@<config_file>]]\n   Section and/or config_file from which to load extra options (may repeat)",
  }, {
    spec => 'timeout|t=i',
    help => sprintf("-t, --timeout=INTEGER\n   Seconds before plugin times out (default: %s)", $DEFAULT{timeout}),
    default => $DEFAULT{timeout},
  }, {
    spec => 'verbose|v+',
    help => "-v, --verbose\n   Show details for command-line debugging (can repeat up to 3 times)",
    default => $DEFAULT{verbose},
  },
);
# Standard arguments we traditionally display last in the help output
my %DEFER_ARGS = map { $_ => 1 } qw(timeout verbose);

sub _init {
  my ($self, %params) = @_;
  # Check params
  my %attr = (
    usage => 1,
    version => 0,
    url => 0,
    plugin => { default => $Monitoring::GLPlugin::pluginname },
    blurb => 0,
    extra => 0,
    'extra-opts' => 0,
    license => { default => $DEFAULT{license} },
    timeout => { default => $DEFAULT{timeout} },
  );

  # Add attr to private _attr hash (except timeout)
  $self->{timeout} = delete $attr{timeout};
  $self->{_attr} = { %attr };
  foreach (keys %{$self->{_attr}}) {
    if (exists $params{$_}) {
      $self->{_attr}->{$_} = $params{$_};
    } else {
      $self->{_attr}->{$_} = $self->{_attr}->{$_}->{default}
          if ref ($self->{_attr}->{$_}) eq 'HASH' &&
              exists $self->{_attr}->{$_}->{default};
    }
  }
  # Chomp _attr values
  chomp foreach values %{$self->{_attr}};

  # Setup initial args list
  $self->{_args} = [ grep { exists $_->{spec} } @ARGS ];

  $self
}

sub new {
  my ($class, @params) = @_;
  require Monitoring::GLPlugin::Commandline::Extraopts
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::Commandline::Extraopts::;
  my $self = bless {}, $class;
  $self->_init(@params);
}

sub decode_rfc3986 {
  my ($self, $password) = @_;
  if ($password && $password =~ /^rfc3986:\/\/(.*)/) {
    $password = $1;
    $password =~ s/%([A-Za-z0-9]{2})/chr(hex($1))/seg;
  }
  return $password;
}

sub add_arg {
  my ($self, %arg) = @_;
  push (@{$self->{_args}}, \%arg);
}

sub mod_arg {
  my ($self, $argname, %arg) = @_;
  foreach my $old_arg (@{$self->{_args}}) {
    next unless $old_arg->{spec} =~ /(\w+).*/ && $argname eq $1;
    foreach my $key (keys %arg) {
      $old_arg->{$key} = $arg{$key};
    }
  }
}

sub getopts {
  my ($self) = @_;
  my %commandline = ();
  $self->{opts}->{all_my_opts} = {};
  my @params = map { $_->{spec} } @{$self->{_args}};
  if (! GetOptions(\%commandline, @params)) {
    $self->print_help();
    exit 3;
  } else {
    no strict 'refs';
    no warnings 'redefine';
    if (exists $commandline{'extra-opts'}) {
      # read the extra file and overwrite other parameters
      my $extras = Monitoring::GLPlugin::Commandline::Extraopts->new(
          file => $commandline{'extra-opts'},
          commandline => \%commandline
      );
      if (! $extras->is_valid()) {
        printf "UNKNOWN - extra-opts are not valid: %s\n", $extras->errors();
        exit 3;
      } else {
        $extras->overwrite();
      }
    }
    do { $self->print_help(); exit 0; } if $commandline{help};
    do { $self->print_version(); exit 0 } if $commandline{version};
    do { $self->print_usage(); exit 3 } if $commandline{usage};
    foreach (map { $_->{spec} =~ /^([\w\-]+)/; $1; } @{$self->{_args}}) {
      my $field = $_;
      *{"$field"} = sub {
        return $self->{opts}->{$field};
      };
    }
    *{"all_my_opts"} = sub {
      return $self->{opts}->{all_my_opts};
    };
    foreach (@{$self->{_args}}) {
      $_->{spec} =~ /^([\w\-]+)/;
      my $spec = $1;
      my $envname = uc $spec;
      $envname =~ s/\-/_/g;
      if (! exists $commandline{$spec}) {
        # Kommandozeile hat oberste Prioritaet
        # Also: --option ueberschreibt NAGIOS__HOSTOPTION
        # Aaaaber: extra-opts haben immer noch Vorrang vor allem anderen.
        # https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
        # beschreibt das anders, Posix-Tools verhalten sich auch entsprechend.
        # Irgendwann wird das hier daher umgeschrieben, so dass extra-opts
        # die niedrigste Prioritaet erhalten.
        if (exists $ENV{'NAGIOS__SERVICE'.$envname}) {
          $commandline{$spec} = $ENV{'NAGIOS__SERVICE'.$envname};
        } elsif (exists $ENV{'NAGIOS__HOST'.$envname}) {
          $commandline{$spec} = $ENV{'NAGIOS__HOST'.$envname};
        }
      }
      $self->{opts}->{$spec} = $_->{default};
    }
    foreach (map { $_->{spec} =~ /^([\w\-]+)/; $1; }
        grep { exists $_->{required} && $_->{required} } @{$self->{_args}}) {
      do { $self->print_usage(); exit 3 } if ! exists $commandline{$_};
    }
    foreach (grep { exists $_->{default} } @{$self->{_args}}) {
      $_->{spec} =~ /^([\w\-]+)/;
      my $spec = $1;
      $self->{opts}->{$spec} = $_->{default};
    }
    foreach (keys %commandline) {
      $self->{opts}->{$_} = $commandline{$_};
      $self->{opts}->{all_my_opts}->{$_} = $commandline{$_};
    }
    foreach (grep { exists $_->{env} } @{$self->{_args}}) {
      $_->{spec} =~ /^([\w\-]+)/;
      my $spec = $1;
      if (exists $ENV{'NAGIOS__HOST'.$_->{env}}) {
        $self->{opts}->{$spec} = $ENV{'NAGIOS__HOST'.$_->{env}};
      }
      if (exists $ENV{'NAGIOS__SERVICE'.$_->{env}}) {
        $self->{opts}->{$spec} = $ENV{'NAGIOS__SERVICE'.$_->{env}};
      }
    }
    foreach (grep { exists $_->{aliasfor} } @{$self->{_args}}) {
      my $field = $_->{aliasfor};
      $_->{spec} =~ /^([\w\-]+)/;
      my $aliasfield = $1;
      next if $self->{opts}->{$field};
      $self->{opts}->{$field} = $self->{opts}->{$aliasfield};
      *{"$field"} = sub {
        return $self->{opts}->{$field};
      };
    }
    foreach (grep { exists $_->{decode} } @{$self->{_args}}) {
      my $decoding = $_->{decode};
      $_->{spec} =~ /^([\w\-]+)/;
      my $spec = $1;
      if (exists $self->{opts}->{$spec}) {
        if ($decoding eq "rfc3986") {
	  $self->{opts}->{$spec} =
	      $self->decode_rfc3986($self->{opts}->{$spec});
	}
      }
    }
  }
}

sub create_opt {
  my ($self, $key) = @_;
  no strict 'refs';
  *{"$key"} = sub {
      return $self->{opts}->{$key};
  };
}

sub override_opt {
  my ($self, $key, $value) = @_;
  $self->{opts}->{$key} = $value;
}

sub get {
  my ($self, $opt) = @_;
  return $self->{opts}->{$opt};
}

sub print_help {
  my ($self) = @_;
  $self->print_version();
  printf "\n%s\n", $self->{_attr}->{license};
  printf "\n%s\n\n", $self->{_attr}->{blurb};
  $self->print_usage();
  foreach (grep {
      ! (exists $_->{hidden} && $_->{hidden}) 
  } @{$self->{_args}}) {
    printf " %s\n", $_->{help};
  }
}

sub print_usage {
  my ($self) = @_;
  printf $self->{_attr}->{usage}, $self->{_attr}->{plugin};
  print "\n";
}

sub print_version {
  my ($self) = @_;
  printf "%s %s", $self->{_attr}->{plugin}, $self->{_attr}->{version};
  printf " [%s]", $self->{_attr}->{url} if $self->{_attr}->{url};
  print "\n";
}

sub print_license {
  my ($self) = @_;
  printf "%s\n", $self->{_attr}->{license};
  print "\n";
}



package Monitoring::GLPlugin::Commandline;
use strict;
use IO::File;
use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3, DEPENDENT => 4 };
our %ERRORS = (
    'OK'        => OK,
    'WARNING'   => WARNING,
    'CRITICAL'  => CRITICAL,
    'UNKNOWN'   => UNKNOWN,
    'DEPENDENT' => DEPENDENT,
);

our %STATUS_TEXT = reverse %ERRORS;
our $AUTOLOAD;


sub new {
  my ($class, %params) = @_;
  require Monitoring::GLPlugin::Commandline::Getopt
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::Commandline::Getopt::;
  my $self = {
       perfdata => [],
       messages => {
         ok => [],
         warning => [],
         critical => [],
         unknown => [],
       },
       args => [],
       opts => Monitoring::GLPlugin::Commandline::Getopt->new(%params),
       modes => [],
       statefilesdir => undef,
  };
  foreach (qw(shortname usage version url plugin blurb extra
      license timeout)) {
    $self->{$_} = $params{$_};
  }
  bless $self, $class;
  $self->{plugin} ||= $Monitoring::GLPlugin::pluginname;
  $self->{name} = $self->{plugin};
  $Monitoring::GLPlugin::plugin = $self;
}

sub AUTOLOAD {
  my ($self, @params) = @_;
  return if ($AUTOLOAD =~ /DESTROY/);
  $self->debug("AUTOLOAD %s\n", $AUTOLOAD)
        if $self->{opts}->verbose >= 2;
  if ($AUTOLOAD =~ /^.*::(add_arg|override_opt|create_opt)$/) {
    $self->{opts}->$1(@params);
  }
}

sub DESTROY {
  my ($self) = @_;
  # ohne dieses DESTROY rennt nagios_exit in obiges AUTOLOAD rein
  # und fliegt aufs Maul, weil {opts} bereits nicht mehr existiert.
  # Unerklaerliches Verhalten.
}

sub debug {
  my ($self, $format, @message) = @_;
  if ($self->opts->verbose && $self->opts->verbose > 10) {
    printf("%s: ", scalar localtime);
    printf($format, @message);
    printf "\n";
  }
  if ($Monitoring::GLPlugin::tracefile) {
    my $logfh = IO::File->new();
    $logfh->autoflush(1);
    if ($logfh->open($Monitoring::GLPlugin::tracefile, "a")) {
      $logfh->printf("%s: ", scalar localtime);
      $logfh->printf($format, @message);
      $logfh->printf("\n");
      $logfh->close();
    }
  }
}

sub opts {
  my ($self) = @_;
  return $self->{opts};
}

sub getopts {
  my ($self) = @_;
  $self->opts->getopts();
}

sub add_message {
  my ($self, $code, @messages) = @_;
  $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
  $code = lc $code;
  push @{$self->{messages}->{$code}}, @messages;
}

sub selected_perfdata {
  my ($self, $label) = @_;
  if ($self->opts->can("selectedperfdata") && $self->opts->selectedperfdata) {
    my $pattern = $self->opts->selectedperfdata;
    return ($label =~ /$pattern/i) ? 1 : 0;
  } else {
    return 1;
  }
}

sub add_perfdata {
  my ($self, %args) = @_;
#printf "add_perfdata %s\n", Data::Dumper::Dumper(\%args);
#printf "add_perfdata %s\n", Data::Dumper::Dumper($self->{thresholds});
#
# wenn warning, critical, dann wird von oben ein expliziter wert mitgegeben
# wenn thresholds
#  wenn label in 
#    warningx $self->{thresholds}->{$label}->{warning} existiert
#  dann nimm $self->{thresholds}->{$label}->{warning}
#  ansonsten thresholds->default->warning
#

  my $label = $args{label};
  my $value = $args{value};
  my $uom = $args{uom} || "";
  my $format = '%d';

  if ($self->opts->can("morphperfdata") && $self->opts->morphperfdata) {
    # 'Intel [R] Interface (\d+) usage'='nic$1'
    foreach my $key (keys %{$self->opts->morphperfdata}) {
      if ($label =~ /$key/) {
        my $replacement = '"'.$self->opts->morphperfdata->{$key}.'"';
        my $oldlabel = $label;
        $label =~ s/$key/$replacement/ee;
        if (exists $self->{thresholds}->{$oldlabel}) {
          %{$self->{thresholds}->{$label}} = %{$self->{thresholds}->{$oldlabel}};
        }
      }
    }
  }
  if ($value =~ /\./) {
    if (defined $args{places}) {
      $value = sprintf '%.'.$args{places}.'f', $value;
    } else {
      $value = sprintf "%.2f", $value;
    }
  } else {
    $value = sprintf "%d", $value;
  }
  my $warn = "";
  my $crit = "";
  my $min = defined $args{min} ? $args{min} : "";
  my $max = defined $args{max} ? $args{max} : "";
  if ($args{thresholds} || (! exists $args{warning} && ! exists $args{critical})) {
    if (exists $self->{thresholds}->{$label}->{warning}) {
      $warn = $self->{thresholds}->{$label}->{warning};
    } elsif (exists $self->{thresholds}->{default}->{warning}) {
      $warn = $self->{thresholds}->{default}->{warning};
    }
    if (exists $self->{thresholds}->{$label}->{critical}) {
      $crit = $self->{thresholds}->{$label}->{critical};
    } elsif (exists $self->{thresholds}->{default}->{critical}) {
      $crit = $self->{thresholds}->{default}->{critical};
    }
  } else {
    if ($args{warning}) {
      $warn = $args{warning};
    }
    if ($args{critical}) {
      $crit = $args{critical};
    }
  }
  if ($uom eq "%") {
    $min = 0;
    $max = 100;
  }
  if (defined $args{places}) {
    # cut off excessive decimals which may be the result of a division
    # length = places*2, no trailing zeroes
    if ($warn ne "") {
      $warn = join("", map {
          s/\.0+$//; $_
      } map {
          s/(\.[1-9]+)0+$/$1/; $_
      } map {
          /[\+\-\d\.]+/ ? sprintf '%.'.2*$args{places}.'f', $_ : $_;
      } split(/([\+\-\d\.]+)/, $warn));
    }
    if ($crit ne "") {
      $crit = join("", map {
          s/\.0+$//; $_
      } map {
          s/(\.[1-9]+)0+$/$1/; $_
      } map {
          /[\+\-\d\.]+/ ? sprintf '%.'.2*$args{places}.'f', $_ : $_;
      } split(/([\+\-\d\.]+)/, $crit));
    }
    if ($min ne "") {
      $min = join("", map {
          s/\.0+$//; $_
      } map {
          s/(\.[1-9]+)0+$/$1/; $_
      } map {
          /[\+\-\d\.]+/ ? sprintf '%.'.2*$args{places}.'f', $_ : $_;
      } split(/([\+\-\d\.]+)/, $min));
    }
    if ($max ne "") {
      $max = join("", map {
          s/\.0+$//; $_
      } map {
          s/(\.[1-9]+)0+$/$1/; $_
      } map {
          /[\+\-\d\.]+/ ? sprintf '%.'.2*$args{places}.'f', $_ : $_;
      } split(/([\+\-\d\.]+)/, $max));
    }
  }
  push @{$self->{perfdata}}, sprintf("'%s'=%s%s;%s;%s;%s;%s",
      $label, $value, $uom, $warn, $crit, $min, $max)
      if $self->selected_perfdata($label);
}

sub add_pandora {
  my ($self, %args) = @_;
  my $label = $args{label};
  my $value = $args{value};

  if ($args{help}) {
    push @{$self->{pandora}}, sprintf("# HELP %s %s", $label, $args{help});
  }
  if ($args{type}) {
    push @{$self->{pandora}}, sprintf("# TYPE %s %s", $label, $args{type});
  }
  if ($args{labels}) {
    push @{$self->{pandora}}, sprintf("%s{%s} %s", $label,
        join(",", map {
            sprintf '%s="%s"', $_, $args{labels}->{$_};
        } keys %{$args{labels}}),
        $value);
  } else {
    push @{$self->{pandora}}, sprintf("%s %s", $label, $value);
  }
}

sub add_html {
  my ($self, $line) = @_;
  push @{$self->{html}}, $line;
}

sub suppress_messages {
  my ($self) = @_;
  $self->{suppress_messages} = 1;
}

sub clear_messages {
  my ($self, $code) = @_;
  $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
  $code = lc $code;
  $self->{messages}->{$code} = [];
}

sub reduce_messages_short {
  my ($self, $message) = @_;
  $message ||= "no problems";
  if ($self->opts->report && $self->opts->report eq "short") {
    $self->clear_messages(OK);
    $self->add_message(OK, $message) if ! $self->check_messages();
  }
}

sub reduce_messages {
  my ($self, $message) = @_;
  $message ||= "no problems";
  $self->clear_messages(OK);
  $self->add_message(OK, $message) if ! $self->check_messages();
}

sub check_messages {
  my ($self, %args) = @_;

  # Add object messages to any passed in as args
  for my $code (qw(critical warning unknown ok)) {
    my $messages = $self->{messages}->{$code} || [];
    if ($args{$code}) {
      unless (ref $args{$code} eq 'ARRAY') {
        if ($code eq 'ok') {
          $args{$code} = [ $args{$code} ];
        }
      }
      push @{$args{$code}}, @$messages;
    } else {
      $args{$code} = $messages;
    }
  }
  my %arg = %args;
  $arg{join} = ' ' unless defined $arg{join};

  # Decide $code
  my $code = OK;
  $code ||= CRITICAL  if @{$arg{critical}};
  $code ||= WARNING   if @{$arg{warning}};
  $code ||= UNKNOWN   if @{$arg{unknown}};
  return $code unless wantarray;

  # Compose message
  my $message = '';
  if ($arg{join_all}) {
      $message = join( $arg{join_all},
          map { @$_ ? join( $arg{'join'}, @$_) : () }
              $arg{critical},
              $arg{warning},
              $arg{unknown},
              $arg{ok} ? (ref $arg{ok} ? $arg{ok} : [ $arg{ok} ]) : []
      );
  }

  else {
      $message ||= join( $arg{'join'}, @{$arg{critical}} )
          if $code == CRITICAL;
      $message ||= join( $arg{'join'}, @{$arg{warning}} )
          if $code == WARNING;
      $message ||= join( $arg{'join'}, @{$arg{unknown}} )
          if $code == UNKNOWN;
      $message ||= ref $arg{ok} ? join( $arg{'join'}, @{$arg{ok}} ) : $arg{ok}
          if $arg{ok};
  }

  return ($code, $message);
}

sub status_code {
  my ($self, $code) = @_;
  $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
  $code = uc $code;
  $code = $ERRORS{$code} if defined $code && exists $ERRORS{$code};
  $code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code};
  return "$STATUS_TEXT{$code}";
}

sub perfdata_string {
  my ($self) = @_;
  if (scalar (@{$self->{perfdata}})) {
    return join(" ", @{$self->{perfdata}});
  } else {
    return "";
  }
}

sub metrics_string {
  my ($self) = @_;
  if (scalar (@{$self->{metrics}})) {
    return join("\n", @{$self->{metrics}});
  } else {
    return "";
  }
}

sub html_string {
  my ($self) = @_;
  if (scalar (@{$self->{html}})) {
    return join(" ", @{$self->{html}});
  } else {
    return "";
  }
}

sub nagios_exit {
  my ($self, $code, $message, $arg) = @_;
  $code = $ERRORS{$code} if defined $code && exists $ERRORS{$code};
  $code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code};
  $message = '' unless defined $message;
  if (ref $message && ref $message eq 'ARRAY') {
      $message = join(' ', map { chomp; $_ } @$message);
  } else {
      chomp $message;
  }
  if ($self->opts->negate) {
    my $original_code = $code;
    foreach my $from (keys %{$self->opts->negate}) {
      if ((uc $from) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/ &&
          (uc $self->opts->negate->{$from}) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/) {
        if ($original_code == $ERRORS{uc $from}) {
          $code = $ERRORS{uc $self->opts->negate->{$from}};
        }
      }
    }
  }
  my $output = "$STATUS_TEXT{$code}";
  $output .= " - $message" if defined $message && $message ne '';
  if ($self->opts->can("morphmessage") && $self->opts->morphmessage) {
    # 'Intel [R] Interface (\d+) usage'='nic$1'
    # '^OK.*'="alles klar"   '^CRITICAL.*'="alles hi"
    foreach my $key (keys %{$self->opts->morphmessage}) {
      if ($output =~ /$key/) {
        my $replacement = '"'.$self->opts->morphmessage->{$key}.'"';
        $output =~ s/$key/$replacement/ee;
      }
    }
  }
  if ($self->opts->negate) {
    # negate again: --negate "UNKNOWN - no peers"=ok
    my $original_code = $code;
    foreach my $from (keys %{$self->opts->negate}) {
      if ((uc $from) !~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/ &&
          (uc $self->opts->negate->{$from}) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/) {
        if ($output =~ /$from/) {
          $code = $ERRORS{uc $self->opts->negate->{$from}};
          $output =~ s/^.*? -/$STATUS_TEXT{$code} -/;
        }
      }
    }
  }
  $output =~ s/\|/!/g if $output;
  if (scalar (@{$self->{perfdata}})) {
    $output .= " | ".$self->perfdata_string();
  }
  $output .= "\n";
  if ($self->opts->can("isvalidtime") && ! $self->opts->isvalidtime) {
    $code = OK;
    $output = "OK - outside valid timerange. check results are not relevant now. original message was: ".
        $output;
  }
  if (! exists $self->{suppress_messages}) {
    $output =~ s/[^[:ascii:]]//g;
    print $output;
  }
  exit $code;
}

sub set_thresholds {
  my ($self, %params) = @_;
  if (exists $params{metric}) {
    my $metric = $params{metric};
    # erst die hartcodierten defaultschwellwerte
    $self->{thresholds}->{$metric}->{warning} = $params{warning};
    $self->{thresholds}->{$metric}->{critical} = $params{critical};
    # dann die defaultschwellwerte von der kommandozeile
    if (defined $self->opts->warning) {
      $self->{thresholds}->{$metric}->{warning} = $self->opts->warning;
    }
    if (defined $self->opts->critical) {
      $self->{thresholds}->{$metric}->{critical} = $self->opts->critical;
    }
    # dann die ganz spezifischen schwellwerte von der kommandozeile
    if ($self->opts->warningx) { # muss nicht auf defined geprueft werden, weils ein hash ist
      # Erst schauen, ob einer * beinhaltet. Von denen wird vom Laengsten
      # bis zum Kuerzesten probiert, ob die matchen. Der laengste Match
      # gewinnt.
      my @keys = keys %{$self->opts->warningx};
      my @stringkeys = ();
      my @regexkeys = ();
      foreach my $key (sort { length($b) > length($a) } @keys) {
        if ($key =~ /\*/) {
          push(@regexkeys, $key);
        } else {
          push(@stringkeys, $key);
        }
      }
      foreach my $key (@regexkeys) {
        next if $metric !~ /$key/;
        $self->{thresholds}->{$metric}->{warning} = $self->opts->warningx->{$key};
        last;
      }
      # Anschliessend nochmal schauen, ob es einen nicht-Regex-Volltreffer gibt
      foreach my $key (@stringkeys) {
        next if $key ne $metric;
        $self->{thresholds}->{$metric}->{warning} = $self->opts->warningx->{$key};
        last;
      }
    }
    if ($self->opts->criticalx) {
      my @keys = keys %{$self->opts->criticalx};
      my @stringkeys = ();
      my @regexkeys = ();
      foreach my $key (sort { length($b) > length($a) } @keys) {
        if ($key =~ /\*/) {
          push(@regexkeys, $key);
        } else {
          push(@stringkeys, $key);
        }
      }
      foreach my $key (@regexkeys) {
        next if $metric !~ /$key/;
        $self->{thresholds}->{$metric}->{critical} = $self->opts->criticalx->{$key};
        last;
      }
      # Anschliessend nochmal schauen, ob es einen nicht-Regex-Volltreffer gibt
      foreach my $key (@stringkeys) {
        next if $key ne $metric;
        $self->{thresholds}->{$metric}->{critical} = $self->opts->criticalx->{$key};
        last;
      }
    }
  } else {
    $self->{thresholds}->{default}->{warning} =
        defined $self->opts->warning ? $self->opts->warning : defined $params{warning} ? $params{warning} : 0;
    $self->{thresholds}->{default}->{critical} =
        defined $self->opts->critical ? $self->opts->critical : defined $params{critical} ? $params{critical} : 0;
  }
}

sub force_thresholds {
  my ($self, %params) = @_;
  if (exists $params{metric}) {
    my $metric = $params{metric};
    $self->{thresholds}->{$metric}->{warning} = $params{warning} || 0;
    $self->{thresholds}->{$metric}->{critical} = $params{critical} || 0;
  } else {
    $self->{thresholds}->{default}->{warning} = $params{warning} || 0;
    $self->{thresholds}->{default}->{critical} = $params{critical} || 0;
  }
}

sub get_thresholds {
  my ($self, @params) = @_;
  if (scalar(@params) > 1) {
    my %params = @params;
    my $metric = $params{metric};
    return ($self->{thresholds}->{$metric}->{warning},
        $self->{thresholds}->{$metric}->{critical});
  } else {
    return ($self->{thresholds}->{default}->{warning},
        $self->{thresholds}->{default}->{critical});
  }
}

sub check_thresholds {
  my ($self, @params) = @_;
  my $level = $ERRORS{OK};
  my $warningrange;
  my $criticalrange;
  my $value;
  if (scalar(@params) > 1) {
    my %params = @params;
    $value = $params{value};
    my $metric = $params{metric};
    if ($metric ne 'default') {
      $warningrange = defined $params{warning} ? $params{warning} :
          (exists $self->{thresholds}->{$metric}->{warning} ?
              $self->{thresholds}->{$metric}->{warning} :
              $self->{thresholds}->{default}->{warning});
      $criticalrange = defined $params{critical} ? $params{critical} :
          (exists $self->{thresholds}->{$metric}->{critical} ?
              $self->{thresholds}->{$metric}->{critical} :
              $self->{thresholds}->{default}->{critical});
    } else {
      $warningrange = (defined $params{warning}) ?
          $params{warning} : $self->{thresholds}->{default}->{warning};
      $criticalrange = (defined $params{critical}) ?
          $params{critical} : $self->{thresholds}->{default}->{critical};
    }
  } else {
    $value = $params[0];
    $warningrange = $self->{thresholds}->{default}->{warning};
    $criticalrange = $self->{thresholds}->{default}->{critical};
  }
  if (! defined $warningrange) {
    # there was no set_thresholds for defaults, no --warning, no --warningx
  } elsif ($warningrange =~ /^([-+]?[0-9]*\.?[0-9]+)$/) {
    # warning = 10, warn if > 10 or < 0
    $level = $ERRORS{WARNING}
        if ($value > $1 || $value < 0);
  } elsif ($warningrange =~ /^([-+]?[0-9]*\.?[0-9]+):$/) {
    # warning = 10:, warn if < 10
    $level = $ERRORS{WARNING}
        if ($value < $1);
  } elsif ($warningrange =~ /^~:([-+]?[0-9]*\.?[0-9]+)$/) {
    # warning = ~:10, warn if > 10
    $level = $ERRORS{WARNING}
        if ($value > $1);
  } elsif ($warningrange =~ /^([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
    # warning = 10:20, warn if < 10 or > 20
    $level = $ERRORS{WARNING}
        if ($value < $1 || $value > $2);
  } elsif ($warningrange =~ /^@([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
    # warning = @10:20, warn if >= 10 and <= 20
    $level = $ERRORS{WARNING}
        if ($value >= $1 && $value <= $2);
  }
  if (! defined $criticalrange) {
    # there was no set_thresholds for defaults, no --critical, no --criticalx
  } elsif ($criticalrange =~ /^([-+]?[0-9]*\.?[0-9]+)$/) {
    # critical = 10, crit if > 10 or < 0
    $level = $ERRORS{CRITICAL}
        if ($value > $1 || $value < 0);
  } elsif ($criticalrange =~ /^([-+]?[0-9]*\.?[0-9]+):$/) {
    # critical = 10:, crit if < 10
    $level = $ERRORS{CRITICAL}
        if ($value < $1);
  } elsif ($criticalrange =~ /^~:([-+]?[0-9]*\.?[0-9]+)$/) {
    # critical = ~:10, crit if > 10
    $level = $ERRORS{CRITICAL}
        if ($value > $1);
  } elsif ($criticalrange =~ /^([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
    # critical = 10:20, crit if < 10 or > 20
    $level = $ERRORS{CRITICAL}
        if ($value < $1 || $value > $2);
  } elsif ($criticalrange =~ /^@([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
    # critical = @10:20, crit if >= 10 and <= 20
    $level = $ERRORS{CRITICAL}
        if ($value >= $1 && $value <= $2);
  }
  return $level;
}

sub strequal {
  my($self, $str1, $str2) = @_;
  return 1 if ! defined $str1 && ! defined $str2;
  return 0 if ! defined $str1 && defined $str2;
  return 0 if defined $str1 && ! defined $str2;
  return 1 if $str1 eq $str2;
  return 0;
}



package Monitoring::GLPlugin;

=head1 Monitoring::GLPlugin

Monitoring::GLPlugin - infrastructure functions to build a monitoring plugin

=cut

use strict;
use IO::File;
use File::Basename;
use Digest::MD5 qw(md5_hex);
use Errno;
use JSON;
use File::Slurp qw(read_file);
use Data::Dumper;
$Data::Dumper::Indent = 1;
eval {
  # avoid "used only once" because older Data::Dumper don't have this
  # use OMD please because OMD has everything!
  no warnings 'all';
  $Data::Dumper::Sparseseen = 1;
};
our $AUTOLOAD;
*VERSION = \'5.5';

use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };

{
  our $mode = undef;
  our $plugin = undef;
  our $pluginname = basename($ENV{'NAGIOS_PLUGIN'} || $0);
  our $blacklist = undef;
  our $info = [];
  our $extendedinfo = [];
  our $summary = [];
  our $variables = {};
  our $survive_sudo_env = ["LD_LIBRARY_PATH", "SHLIB_PATH"];
}

sub new {
  my ($class, %params) = @_;
  my $self = {};
  bless $self, $class;
  require Monitoring::GLPlugin::Commandline
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::Commandline::;
  require Monitoring::GLPlugin::Item
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::Item::;
  require Monitoring::GLPlugin::TableItem
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::TableItem::;
  $Monitoring::GLPlugin::plugin = Monitoring::GLPlugin::Commandline->new(%params);
  return $self;
}

sub rebless {
  my ($self, $class) = @_;
  bless $self, $class;
  $self->debug('using '.$class);
  # gilt nur fuer "echte" Fabrikate mit "Classes::" vorndran
  $self->{classified_as} = ref($self) if $class !~ /^Monitoring::GLPlugin/;
}

sub init {
  my ($self) = @_;
  if ($self->opts->can("blacklist") && $self->opts->blacklist &&
      -f $self->opts->blacklist) {
    $self->opts->blacklist = do {
        local (@ARGV, $/) = $self->opts->blacklist; <> };
  }
}

sub dumper {
  my ($self, $object) = @_;
  my $run = $object->{runtime};
  delete $object->{runtime};
  printf STDERR "%s\n", Data::Dumper::Dumper($object);
  $object->{runtime} = $run;
}

sub no_such_mode {
  my ($self) = @_;
  $self->nagios_exit(3,
      sprintf "Mode %s is not implemented for this type of device",
      $self->opts->mode
  );
  exit 3;
}

#########################################################
# framework-related. setup, options
#
sub add_default_args {
  my ($self) = @_;
  $self->add_arg(
      spec => 'mode=s',
      help => "--mode
   A keyword which tells the plugin what to do",
      required => 1,
  );
  $self->add_arg(
      spec => 'regexp',
      help => "--regexp
   Parameter name/name2/name3 will be interpreted as (perl) regular expression",
      required => 0,);
  $self->add_arg(
      spec => 'warning=s',
      help => "--warning
   The warning threshold",
      required => 0,);
  $self->add_arg(
      spec => 'critical=s',
      help => "--critical
   The critical threshold",
      required => 0,);
  $self->add_arg(
      spec => 'warningx=s%',
      help => '--warningx
   The extended warning thresholds
   e.g. --warningx db_msdb_free_pct=6: to override the threshold for a
   specific item ',
      required => 0,
  );
  $self->add_arg(
      spec => 'criticalx=s%',
      help => '--criticalx
   The extended critical thresholds',
      required => 0,
  );
  $self->add_arg(
      spec => 'units=s',
      help => "--units
   One of %, B, KB, MB, GB, Bit, KBi, MBi, GBi. (used for e.g. mode interface-usage)",
      required => 0,
  );
  $self->add_arg(
      spec => 'name=s',
      help => "--name
   The name of a specific component to check",
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'name2=s',
      help => "--name2
   The secondary name of a component",
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'name3=s',
      help => "--name3
   The tertiary name of a component",
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'extra-opts=s',
      help => "--extra-opts
   read command line arguments from an external file",
      required => 0,
  );
  $self->add_arg(
      spec => 'blacklist|b=s',
      help => '--blacklist
   Blacklist some (missing/failed) components',
      required => 0,
      default => '',
  );
  $self->add_arg(
      spec => 'mitigation=s',
      help => "--mitigation
   The parameter allows you to change a critical error to a warning.
   It works only for specific checks. Which ones? Try it out or look in the code.
   --mitigation warning ranks an error as warning which by default would be critical.",
      required => 0,
  );
  $self->add_arg(
      spec => 'lookback=s',
      help => "--lookback
   The amount of time you want to look back when calculating average rates.
   Use it for mode interface-errors or interface-usage. Without --lookback
   the time between two runs of check_nwc_health is the base for calculations.
   If you want your checkresult to be based for example on the past hour,
   use --lookback 3600. ",
      required => 0,
  );
  $self->add_arg(
      spec => 'environment|e=s%',
      help => "--environment
   Add a variable to the plugin's environment",
      required => 0,
  );
  $self->add_arg(
      spec => 'negate=s%',
      help => "--negate
   Emulate the negate plugin. --negate warning=critical --negate unknown=critical",
      required => 0,
  );
  $self->add_arg(
      spec => 'morphmessage=s%',
      help => '--morphmessage
   Modify the final output message',
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'morphperfdata=s%',
      help => "--morphperfdata
   The parameter allows you to change performance data labels.
   It's a perl regexp and a substitution.
   Example: --morphperfdata '(.*)ISATAP(.*)'='\$1patasi\$2'",
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'selectedperfdata=s',
      help => "--selectedperfdata
   The parameter allows you to limit the list of performance data. It's a perl regexp.
   Only matching perfdata show up in the output",
      required => 0,
  );
  $self->add_arg(
      spec => 'report=s',
      help => "--report
   Can be used to shorten the output",
      required => 0,
      default => 'long',
  );
  $self->add_arg(
      spec => 'multiline',
      help => '--multiline
   Multiline output',
      required => 0,
  );
  $self->add_arg(
      spec => 'with-mymodules-dyn-dir=s',
      help => "--with-mymodules-dyn-dir
   Add-on modules for the my-modes will be searched in this directory",
      required => 0,
  );
  $self->add_arg(
      spec => 'statefilesdir=s',
      help => '--statefilesdir
   An alternate directory where the plugin can save files',
      required => 0,
      env => 'STATEFILESDIR',
  );
  $self->add_arg(
      spec => 'isvalidtime=i',
      help => '--isvalidtime
   Signals the plugin to return OK if now is not a valid check time',
      required => 0,
      default => 1,
  );
  $self->add_arg(
      spec => 'reset',
      help => "--reset
   remove the state file",
      required => 0,
      hidden => 1,
  );
  $self->add_arg(
      spec => 'runas=s',
      help => "--runas
   run as a different user",
      required => 0,
      hidden => 1,
  );
  $self->add_arg(
      spec => 'shell',
      help => "--shell
   forget what you see",
      required => 0,
      hidden => 1,
  );
  $self->add_arg(
      spec => 'drecksptkdb=s',
      help => "--drecksptkdb
   This parameter must be used instead of --name, because Devel::ptkdb is stealing the latter from the command line",
      aliasfor => "name",
      required => 0,
      hidden => 1,
  );
  $self->add_arg(
      spec => 'tracefile=s',
      help => "--tracefile
   Write debugging-info to this file (if it exists)",
      required => 0,
      hidden => 1,
  );
}

sub add_default_modes {
  my ($self) = @_;
  $self->add_mode(
      internal => 'encode',
      spec => 'encode',
      alias => undef,
      help => 'encode stdin',
      hidden => 1,
  );
  $self->add_mode(
      internal => 'decode',
      spec => 'decode',
      alias => undef,
      help => 'decode stdin or --name',
      hidden => 1,
  );
}

sub add_modes {
  my ($self, $modes) = @_;
  my $modestring = "";
  my @modes = @{$modes};
  my $longest = length ((reverse sort {length $a <=> length $b} map { $_->[1] } @modes)[0]);
  my $format = "       %-".
      (length ((reverse sort {length $a <=> length $b} map { $_->[1] } @modes)[0])).
      "s\t(%s)\n";
  foreach (@modes) {
    $modestring .= sprintf $format, $_->[1], $_->[3];
  }
  $modestring .= sprintf "\n";
  $Monitoring::GLPlugin::plugin->{modestring} = $modestring;
}

sub add_arg {
  my ($self, %args) = @_;
  if ($args{help} =~ /^--mode/) {
    $args{help} .= "\n".$Monitoring::GLPlugin::plugin->{modestring};
  }
  $Monitoring::GLPlugin::plugin->{opts}->add_arg(%args);
}

sub mod_arg {
  my ($self, @arg) = @_;
  $Monitoring::GLPlugin::plugin->{opts}->mod_arg(@arg);
}

sub add_mode {
  my ($self, %args) = @_;
  push(@{$Monitoring::GLPlugin::plugin->{modes}}, \%args);
  my $longest = length ((reverse sort {length $a <=> length $b} map { $_->{spec} } @{$Monitoring::GLPlugin::plugin->{modes}})[0]);
  my $format = "       %-".
      (length ((reverse sort {length $a <=> length $b} map { $_->{spec} } @{$Monitoring::GLPlugin::plugin->{modes}})[0])).
      "s\t(%s)\n";
  $Monitoring::GLPlugin::plugin->{modestring} = "";
  foreach (@{$Monitoring::GLPlugin::plugin->{modes}}) {
    $Monitoring::GLPlugin::plugin->{modestring} .= sprintf $format, $_->{spec}, $_->{help};
  }
  $Monitoring::GLPlugin::plugin->{modestring} .= "\n";
}

sub validate_args {
  my ($self) = @_;
  if ($self->opts->mode =~ /^my-([^\-.]+)/) {
    my $param = $self->opts->mode;
    $param =~ s/\-/::/g;
    $self->add_mode(
        internal => $param,
        spec => $self->opts->mode,
        alias => undef,
        help => 'my extension',
    );
  } elsif ($self->opts->mode eq 'encode') {
    my $input = <>;
    chomp $input;
    $input =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
    printf "%s\n", $input;
    exit 0;
  } elsif ($self->opts->mode eq 'decode') {
    if (! -t STDIN) {
      my $input = <>;
      chomp $input;
      $input =~ s/%([A-Za-z0-9]{2})/chr(hex($1))/seg;
      printf "%s\n", $input;
      exit OK;
    } else {
      if ($self->opts->name) {
        my $input = $self->opts->name;
        $input =~ s/%([A-Za-z0-9]{2})/chr(hex($1))/seg;
        printf "%s\n", $input;
        exit OK;
      } else {
        printf "i can't find your encoded statement. use --name or pipe it in my stdin\n";
        exit UNKNOWN;
      }
    }
  } elsif ((! grep { $self->opts->mode eq $_ } map { $_->{spec} } @{$Monitoring::GLPlugin::plugin->{modes}}) &&
      (! grep { $self->opts->mode eq $_ } map { defined $_->{alias} ? @{$_->{alias}} : () } @{$Monitoring::GLPlugin::plugin->{modes}})) {
    printf "UNKNOWN - mode %s\n", $self->opts->mode;
    $self->opts->print_help();
    exit 3;
  }
  if ($self->opts->name && $self->opts->name =~ /(%22)|(%27)/) {
    my $name = $self->opts->name;
    $name =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
    $self->override_opt('name', $name);
  }
  $Monitoring::GLPlugin::mode = (
      map { $_->{internal} }
      grep {
         ($self->opts->mode eq $_->{spec}) ||
         ( defined $_->{alias} && grep { $self->opts->mode eq $_ } @{$_->{alias}})
      } @{$Monitoring::GLPlugin::plugin->{modes}}
  )[0];
  if ($self->opts->multiline) {
    $ENV{NRPE_MULTILINESUPPORT} = 1;
  } else {
    $ENV{NRPE_MULTILINESUPPORT} = 0;
  }
  if ($self->opts->can("statefilesdir") && ! $self->opts->statefilesdir) {
    if ($^O =~ /MSWin/) {
      if (defined $ENV{TEMP}) {
        $self->override_opt('statefilesdir', $ENV{TEMP}."/".$Monitoring::GLPlugin::plugin->{name});
      } elsif (defined $ENV{TMP}) {
        $self->override_opt('statefilesdir', $ENV{TMP}."/".$Monitoring::GLPlugin::plugin->{name});
      } elsif (defined $ENV{windir}) {
        $self->override_opt('statefilesdir', File::Spec->catfile($ENV{windir}, 'Temp')."/".$Monitoring::GLPlugin::plugin->{name});
      } else {
        $self->override_opt('statefilesdir', "C:/".$Monitoring::GLPlugin::plugin->{name});
      }
    } elsif (exists $ENV{OMD_ROOT}) {
      $self->override_opt('statefilesdir', $ENV{OMD_ROOT}."/var/tmp/".$Monitoring::GLPlugin::plugin->{name});
    } else {
      $self->override_opt('statefilesdir', "/var/tmp/".$Monitoring::GLPlugin::plugin->{name});
    }
  }
  $Monitoring::GLPlugin::plugin->{statefilesdir} = $self->opts->statefilesdir
      if $self->opts->can("statefilesdir");
  if ($self->opts->can("warningx") && $self->opts->warningx) {
    foreach my $key (keys %{$self->opts->warningx}) {
      $self->set_thresholds(metric => $key,
          warning => $self->opts->warningx->{$key});
    }
  }
  if ($self->opts->can("criticalx") && $self->opts->criticalx) {
    foreach my $key (keys %{$self->opts->criticalx}) {
      $self->set_thresholds(metric => $key,
          critical => $self->opts->criticalx->{$key});
    }
  }
  $self->set_timeout_alarm() if ! $SIG{'ALRM'};
}

sub set_timeout_alarm {
  my ($self, $timeout, $handler) = @_;
  $timeout ||= $self->opts->timeout;
  $handler ||= sub {
    $self->nagios_exit(UNKNOWN,
        sprintf("%s timed out after %d seconds\n",
            $Monitoring::GLPlugin::plugin->{name}, $self->opts->timeout)
    );
  };
  use POSIX ':signal_h';
  if ($^O =~ /MSWin/) {
    local $SIG{'ALRM'} = $handler;
  } else {
    my $mask = POSIX::SigSet->new( SIGALRM );
    my $action = POSIX::SigAction->new(
        $handler, $mask
    );   
    my $oldaction = POSIX::SigAction->new();
    sigaction(SIGALRM ,$action ,$oldaction );
  }    
  alarm(int($timeout)); # 1 second before the global unknown timeout
}

#########################################################
# global helpers
#
sub set_variable {
  my ($self, $key, $value) = @_;
  $Monitoring::GLPlugin::variables->{$key} = $value;
}

sub get_variable {
  my ($self, $key, $fallback) = @_;
  return exists $Monitoring::GLPlugin::variables->{$key} ?
      $Monitoring::GLPlugin::variables->{$key} : $fallback;
}

sub debug {
  my ($self, $format, @message) = @_;
  if ($self->get_variable("verbose") &&
      $self->get_variable("verbose") > $self->get_variable("verbosity", 10)) {
    printf("%s: ", scalar localtime);
    printf($format, @message);
    printf "\n";
  }
  if ($Monitoring::GLPlugin::tracefile) {
    my $logfh = IO::File->new();
    $logfh->autoflush(1);
    if ($logfh->open($Monitoring::GLPlugin::tracefile, "a")) {
      $logfh->printf("%s: ", scalar localtime);
      $logfh->printf($format, @message);
      $logfh->printf("\n");
      $logfh->close();
    }
  }
}

sub filter_namex {
  my ($self, $opt, $name) = @_;
  if ($opt) {
    if ($self->opts->regexp) {
      if ($name =~ /$opt/i) {
        return 1;
      }
    } else {
      if (lc $opt eq lc $name) {
        return 1;
      }
    }
  } else {
    return 1;
  }
  return 0;
}

sub filter_name {
  my ($self, $name) = @_;
  return $self->filter_namex($self->opts->name, $name);
}

sub filter_name2 {
  my ($self, $name) = @_;
  return $self->filter_namex($self->opts->name2, $name);
}

sub filter_name3 {
  my ($self, $name) = @_;
  return $self->filter_namex($self->opts->name3, $name);
}

sub version_is_minimum {
  my ($self, $version) = @_;
  my $installed_version;
  my $newer = 1;
  if ($self->get_variable("version")) {
    $installed_version = $self->get_variable("version");
  } elsif (exists $self->{version}) {
    $installed_version = $self->{version};
  } else {
    return 0;
  }
  my @v1 = map { $_ eq "x" ? 0 : $_ } split(/\./, $version);
  my @v2 = split(/\./, $installed_version);
  if (scalar(@v1) > scalar(@v2)) {
    push(@v2, (0) x (scalar(@v1) - scalar(@v2)));
  } elsif (scalar(@v2) > scalar(@v1)) {
    push(@v1, (0) x (scalar(@v2) - scalar(@v1)));
  }
  foreach my $pos (0..$#v1) {
    if ($v2[$pos] > $v1[$pos]) {
      $newer = 1;
      last;
    } elsif ($v2[$pos] < $v1[$pos]) {
      $newer = 0;
      last;
    }
  }
  return $newer;
}

sub accentfree {
  my ($self, $text) = @_;
  # thanks mycoyne who posted this accent-remove-algorithm
  # http://www.experts-exchange.com/Programming/Languages/Scripting/Perl/Q_23275533.html#a21234612
  my @transformed;
  my %replace = (
    '9a' => 's', '9c' => 'oe', '9e' => 'z', '9f' => 'Y', 'c0' => 'A', 'c1' => 'A',
    'c2' => 'A', 'c3' => 'A', 'c4' => 'A', 'c5' => 'A', 'c6' => 'AE', 'c7' => 'C',
    'c8' => 'E', 'c9' => 'E', 'ca' => 'E', 'cb' => 'E', 'cc' => 'I', 'cd' => 'I',
    'ce' => 'I', 'cf' => 'I', 'd0' => 'D', 'd1' => 'N', 'd2' => 'O', 'd3' => 'O',
    'd4' => 'O', 'd5' => 'O', 'd6' => 'O', 'd8' => 'O', 'd9' => 'U', 'da' => 'U',
    'db' => 'U', 'dc' => 'U', 'dd' => 'Y', 'e0' => 'a', 'e1' => 'a', 'e2' => 'a',
    'e3' => 'a', 'e4' => 'a', 'e5' => 'a', 'e6' => 'ae', 'e7' => 'c', 'e8' => 'e',
    'e9' => 'e', 'ea' => 'e', 'eb' => 'e', 'ec' => 'i', 'ed' => 'i', 'ee' => 'i',
    'ef' => 'i', 'f0' => 'o', 'f1' => 'n', 'f2' => 'o', 'f3' => 'o', 'f4' => 'o',
    'f5' => 'o', 'f6' => 'o', 'f8' => 'o', 'f9' => 'u', 'fa' => 'u', 'fb' => 'u',
    'fc' => 'u', 'fd' => 'y', 'ff' => 'y',
    '8a' => 'S', '8c' => 'CE', '9a' => 's', '9c' => 'oe', '9f' => 'Y', 'a2' => 'o', 'aa' => 'a',
    'b2' => '2', 'b3' => '3', 'b9' => '1', 'bc' => '1/4', 'bd' => '1/2', 'be' => '3/4',
    'c0' => 'A', 'c1' => 'A', 'c2' => 'A', 'c3' => 'A', 'c4' => 'A', 'c5' => 'A', 'c6' => 'AE',
    'c7' => 'C', 'c8' => 'E', 'c9' => 'E', 'ca' => 'E', 'cb' => 'E',
    'cc' => 'I', 'cd' => 'I', 'ce' => 'I', 'cf' => 'I', 'd0' => 'D', 'd1' => 'N',
    'd2' => 'O', 'd3' => 'O', 'd4' => 'O', 'd5' => 'O', 'd6' => 'O',
    'd8' => 'O', 'd9' => 'U', 'da' => 'U', 'db' => 'U', 'dc' => 'U', 'dd' => 'Y',
    'df' => 'ss', 'e0' => 'a', 'e1' => 'a', 'e2' => 'a', 'e3' => 'a', 'e4' => 'a', 'e5' => 'a',
    'e6' => 'ae', 'e7' => 'c', 'e8' => 'e', 'e9' => 'e', 'ea' => 'e', 'eb' => 'e',
    'ec' => 'i', 'ed' => 'i', 'ee' => 'i', 'ef' => 'i', 'f1' => 'n',
    'f2' => 'o', 'f3' => 'o', 'f4' => 'o', 'f5' => 'o', 'f6' => 'o', 'f8' => 'o',
    'f9' => 'u', 'fa' => 'u', 'fb' => 'u', 'fc' => 'u', 'fd' => 'y', 'ff' => 'yy',
  );
  my @letters = split //, $text;;
  for (my $i = 0; $i <= $#letters; $i++) {
    my $hex = sprintf "%x", ord($letters[$i]);
    $letters[$i] = $replace{$hex} if (exists $replace{$hex});
  }
  push @transformed, @letters;
  $text = join '', @transformed;
  $text =~ s/[[:^ascii:]]//g;
  return $text;
}

sub dump {
  my ($self, $indent) = @_;
  $indent = $indent ? " " x $indent : "";
  if ($self->can("internal_name")) {
    printf "%s[%s]\n", $indent, $self->internal_name();
  } else {
    my $class = ref($self);
    $class =~ s/^.*:://;
    printf "%s[%s]\n", $indent, uc $class;
  }
  foreach (grep !/^(info|trace|warning|critical|blacklisted|extendedinfo|flat_indices|indices)$/, sort keys %{$self}) {
    printf "%s%s: %s\n", $indent, $_, $self->{$_} if defined $self->{$_} && ref($self->{$_}) ne "ARRAY";
  }
  if ($self->{info}) {
    printf "%sinfo: %s\n", $indent, $self->{info};
  }
  foreach (grep !/^(info|trace|warning|critical|blacklisted|extendedinfo|flat_indices|indices)$/, sort keys %{$self}) {
    if (defined $self->{$_} && ref($self->{$_}) eq "ARRAY") {
      my $have_flat_indices = 1;
      foreach my $obj (@{$self->{$_}}) {
        $have_flat_indices = 0 if (ref($obj) ne "HASH" || ! exists $obj->{flat_indices});
      }
      if ($have_flat_indices) {
        foreach my $obj (sort {
            join('', map { sprintf("%30d",$_) } split( /\./, $a->{flat_indices})) cmp
            join('', map { sprintf("%30d",$_) } split( /\./, $b->{flat_indices}))
        } @{$self->{$_}}) {
          $obj->dump();
        }
      } else {
        foreach my $obj (@{$self->{$_}}) {
          $obj->dump() if UNIVERSAL::can($obj, "isa") && $obj->can("dump");
        }
      }
    } elsif (defined $self->{$_} && ref($self->{$_}) =~ /^Classes::/) {
      $self->{$_}->dump(2) if UNIVERSAL::can($self->{$_}, "isa") && $self->{$_}->can("dump");
    }
  }
  printf "\n";
}

sub table_ascii {
  my ($self, $table, $titles) = @_;
  my $text = "";
  my $column_length = {};
  my $column = 0;
  foreach (@{$titles}) {
    $column_length->{$column++} = length($_);
  }
  foreach my $tr (@{$table}) {
    @{$tr} = map { ref($_) eq "ARRAY" ? $_->[0] : $_; } @{$tr};
    $column = 0;
    foreach my $td (@{$tr}) {
      if (length($td) > $column_length->{$column}) {
        $column_length->{$column} = length($td);
      }
      $column++;
    }
  }
  $column = 0;
  foreach (@{$titles}) {
    $column_length->{$column} = "%".($column_length->{$column} + 3)."s";
    $column++;
  }
  $column = 0;
  foreach (@{$titles}) {
    $text .= sprintf $column_length->{$column++}, $_;
  }
  $text .= "\n";
  foreach my $tr (@{$table}) {
    $column = 0;
    foreach my $td (@{$tr}) {
      $text .= sprintf $column_length->{$column++}, $td;
    }
    $text .= "\n";
  }
  return $text;
}

sub table_html {
  my ($self, $table, $titles) = @_;
  my $text = "";
  $text .= "<table style=\"border-collapse:collapse; border: 1px solid black;\">";
  $text .= "<tr>";
  foreach (@{$titles}) {
    $text .= sprintf "<th style=\"text-align: left; padding-left: 4px; padding-right: 6px;\">%s</th>", $_;
  }
  $text .= "</tr>";
  foreach my $tr (@{$table}) {
    $text .= "<tr>";
    foreach my $td (@{$tr}) {
      my $class = "statusOK";
      if (ref($td) eq "ARRAY") {
        $class = {
          0 => "statusOK",
          1 => "statusWARNING",
          2 => "statusCRITICAL",
          3 => "statusUNKNOWN",
        }->{$td->[1]};
        $td = $td->[0];
      }
      $text .= sprintf "<td style=\"text-align: left; padding-left: 4px; padding-right: 6px;\" class=\"%s\">%s</td>", $class, $td;
    }
    $text .= "</tr>";
  }
  $text .= "</table>";
  return $text;
}

sub load_my_extension {
  my ($self) = @_;
  if ($self->opts->mode =~ /^my-([^-.]+)/) {
    my $class = $1;
    my $loaderror = undef;
    substr($class, 0, 1) = uc substr($class, 0, 1);
    if (! $self->opts->get("with-mymodules-dyn-dir")) {
      $self->override_opt("with-mymodules-dyn-dir", "");
    }
    my $plugin_name = $Monitoring::GLPlugin::pluginname;
    $plugin_name =~ /check_(.*?)_health/;
    my $deprecated_class = "DBD::".(uc $1)."::Server";
    $plugin_name = "Check".uc(substr($1, 0, 1)).substr($1, 1)."Health";
    foreach my $libpath (split(":", $self->opts->get("with-mymodules-dyn-dir"))) {
      foreach my $extmod (glob $libpath."/".$plugin_name."*.pm") {
        my $stderrvar;
        *SAVEERR = *STDERR;
        open OUT ,'>',\$stderrvar;
        *STDERR = *OUT;
        eval {
          $self->debug(sprintf "loading module %s", $extmod);
          require $extmod;
        };
        *STDERR = *SAVEERR;
        if ($@) {
          $loaderror = $extmod;
          $self->debug(sprintf "failed loading module %s: %s", $extmod, $@);
        }
      }
    }
    my $original_class = ref($self);
    my $original_init = $self->can("init");
    $self->compatibility_class() if $self->can('compatibility_class');
    bless $self, "My$class";
    $self->compatibility_methods() if $self->can('compatibility_methods') &&
        $self->isa($deprecated_class);
    if ($self->isa("Monitoring::GLPlugin")) {
      my $new_init = $self->can("init");
      if ($new_init == $original_init) {
          $self->add_unknown(
              sprintf "Class %s needs an init() method", ref($self));
      } else {
        # now go back to check_*_health.pl where init() will be called
      }
    } else {
      bless $self, $original_class;
      $self->add_unknown(
          sprintf "Class %s is not a subclass of Monitoring::GLPlugin%s",
              "My$class",
              $loaderror ? sprintf " (syntax error in %s?)", $loaderror : "" );
      my ($code, $message) = $self->check_messages(join => ', ', join_all => ', ');
      $self->nagios_exit($code, $message);
    }
  }
}

sub number_of_bits {
  my ($self, $unit) = @_;
  # https://en.wikipedia.org/wiki/Data_rate_units
  my $bits = {
    'bit' => 1,			# Bit per second
    'B' => 8,			# Byte per second, 8 bits per second
    'kbit' => 1000,		# Kilobit per second, 1,000 bits per second
    'kb' => 1000,		# Kilobit per second, 1,000 bits per second
    'Kibit' => 1024,		# Kibibit per second, 1,024 bits per second
    'kB' => 8000,		# Kilobyte per second, 8,000 bits per second
    'KiB' => 8192,		# Kibibyte per second, 1,024 bytes per second
    'Mbit' => 1000000,		# Megabit per second, 1,000,000 bits per second
    'Mb' => 1000000,		# Megabit per second, 1,000,000 bits per second
    'Mibit' => 1048576,		# Mebibit per second, 1,024 kibibits per second
    'MB' => 8000000,		# Megabyte per second, 1,000 kilobytes per second
    'MiB' => 8388608,		# Mebibyte per second, 1,024 kibibytes per second
    'Gbit' => 1000000000,	# Gigabit per second, 1,000 megabits per second
    'Gb' => 1000000000,		# Gigabit per second, 1,000 megabits per second
    'Gibit' => 1073741824,	# Gibibit per second, 1,024 mebibits per second
    'GB' => 8000000000,		# Gigabyte per second, 1,000 megabytes per second
    'GiB' => 8589934592,	# Gibibyte per second, 8192 mebibits per second
    'Tbit' => 1000000000000,	# Terabit per second, 1,000 gigabits per second
    'Tb' => 1000000000000,	# Terabit per second, 1,000 gigabits per second
    'Tibit' => 1099511627776,	# Tebibit per second, 1,024 gibibits per second
    'TB' => 8000000000000,	# Terabyte per second, 1,000 gigabytes per second
    # eigene kreationen
    'Bits' => 1,
    'Bit' => 1,			# Bit per second
    'KB' => 1024,		# Kilobyte (like disk kilobyte)
    'KBi' => 1024,		# -"-
    'MBi' => 1024 * 1024,	# Megabyte (like disk megabyte)
    'GBi' => 1024 * 1024 * 1024, # Gigybate (like disk gigybyte)
  };
  if (exists $bits->{$unit}) {
    return $bits->{$unit};
  } else {
    return 0;
  }
}


#########################################################
# runtime methods
#
sub mode : lvalue {
  my ($self) = @_;
  $Monitoring::GLPlugin::mode;
}

sub statefilesdir {
  my ($self) = @_;
  return $Monitoring::GLPlugin::plugin->{statefilesdir};
}

sub opts { # die beiden _nicht_ in AUTOLOAD schieben, das kracht!
  my ($self) = @_;
  return $Monitoring::GLPlugin::plugin->opts();
}

sub getopts {
  my ($self, $envparams) = @_;
  $envparams ||= [];
  my $needs_restart = 0;
  my @restart_opts = ();
  $Monitoring::GLPlugin::plugin->getopts();
  # es kann sein, dass beim aufraeumen zum schluss als erstes objekt
  # das $Monitoring::GLPlugin::plugin geloescht wird. in anderen destruktoren
  # (insb. fuer dbi disconnect) steht dann $self->opts->verbose
  # nicht mehr zur verfuegung bzw. $Monitoring::GLPlugin::plugin->opts ist undef.
  $self->set_variable("verbose", $self->opts->verbose);
  $Monitoring::GLPlugin::tracefile = $self->opts->tracefile ?
      $self->opts->tracefile :
      $self->system_tmpdir()."/".$Monitoring::GLPlugin::pluginname.".trace";
  if (! -f $Monitoring::GLPlugin::tracefile) {
    $Monitoring::GLPlugin::tracefile = undef;
  }
  #
  # die gueltigkeit von modes wird bereits hier geprueft und nicht danach
  # in validate_args. (zwischen getopts und validate_args wird
  # normalerweise classify aufgerufen, welches bereits eine verbindung
  # zum endgeraet herstellt. bei falschem mode waere das eine verschwendung
  # bzw. durch den exit3 ein evt. unsauberes beenden der verbindung.
  if ((! grep { $self->opts->mode eq $_ } map { $_->{spec} } @{$Monitoring::GLPlugin::plugin->{modes}}) &&
      (! grep { $self->opts->mode eq $_ } map { defined $_->{alias} ? @{$_->{alias}} : () } @{$Monitoring::GLPlugin::plugin->{modes}})) {
    if ($self->opts->mode !~ /^my-/) {
      printf "UNKNOWN - mode %s\n", $self->opts->mode;
      $self->opts->print_help();
      exit 3;
    }
  }
  if ($self->opts->environment) {
    # wenn die gewuenschten Environmentvariablen sich von den derzeit
    # gesetzten unterscheiden, dann restart. Denn $ENV aendert
    # _nicht_ das Environment des laufenden Prozesses. 
    # $ENV{ZEUGS} = 1 bedeutet lediglich, dass $ENV{ZEUGS} bei weiterer
    # Verwendung 1 ist, bedeutet aber _nicht_, dass diese Variable 
    # im Environment des laufenden Prozesses existiert.
    foreach (keys %{$self->opts->environment}) {
      if ((! $ENV{$_}) || ($ENV{$_} ne $self->opts->environment->{$_})) {
        $needs_restart = 1;
        $ENV{$_} = $self->opts->environment->{$_};
        $self->debug(sprintf "new %s=%s forces restart\n", $_, $ENV{$_});
      }
    }
  }
  if ($self->opts->runas) {
    # exec sudo $0 ... und dann ohne --runas
    $needs_restart = 1;
    # wenn wir environmentvariablen haben, die laut survive_sudo_env als
    # wichtig erachtet werden, dann muessen wir die ueber einen moeglichen
    # sudo-aufruf rueberretten, also in zusaetzliche --environment umwandenln.
    # sudo putzt das Environment naemlich aus.
    foreach my $survive_env (@{$Monitoring::GLPlugin::survive_sudo_env}) {
      if ($ENV{$survive_env} && ! scalar(grep { /^$survive_env=/ }
          keys %{$self->opts->environment})) {
        $self->opts->environment->{$survive_env} = $ENV{$survive_env};
        printf STDERR "add important --environment %s=%s\n",
            $survive_env, $ENV{$survive_env} if $self->opts->verbose >= 2;
        push(@restart_opts, '--environment');
        push(@restart_opts, sprintf '%s=%s',
            $survive_env, $ENV{$survive_env});
      }
    }
  }
  if ($needs_restart) {
    foreach my $option (keys %{$self->opts->all_my_opts}) {
      # der fliegt raus, sonst gehts gleich wieder in needs_restart rein
      next if $option eq "runas";
      foreach my $spec (map { $_->{spec} } @{$Monitoring::GLPlugin::plugin->opts->{_args}}) {
        if ($spec =~ /^([\-\w]+)[\?\+:\|\w+]*=(.*)/) {
          if ($1 eq $option && $2 =~ /s%/) {
            foreach (keys %{$self->opts->$option()}) {
              push(@restart_opts, sprintf "--%s", $option);
              push(@restart_opts, sprintf "%s=%s", $_, $self->opts->$option()->{$_});
            }
          } elsif ($1 eq $option) {
            push(@restart_opts, sprintf "--%s", $option);
            push(@restart_opts, sprintf "%s", $self->opts->$option());
          }
        } elsif ($spec eq $option) {
          push(@restart_opts, sprintf "--%s", $option);
        }
      }
    }
    if ($self->opts->runas && ($> == 0)) {
      # Ja, es gibt so Narrische, die gehen mit check_by_ssh als root
      # auf Datenbankmaschinen drauf und lassen dann dort check_oracle_health
      # laufen. Damit OPS$-Anmeldung dann funktioniert, wird mit --runas
      # auf eine andere Kennung umgeschwenkt. Diese Kennung gleich fuer
      # ssh zu verwenden geht aus Sicherheitsgruenden nicht. Narrische halt.
      exec "su", "-c", sprintf("%s %s", $0, join(" ", @restart_opts)), "-", $self->opts->runas;
    } elsif ($self->opts->runas) {
      exec "sudo", "-S", "-u", $self->opts->runas, $0, @restart_opts;
    } else {
      exec $0, @restart_opts;
      # dadurch werden SHLIB oder LD_LIBRARY_PATH sauber gesetzt, damit beim
      # erneuten Start libclntsh.so etc. gefunden werden.
    }
    exit;
  }
  if ($self->opts->shell) {
    # So komme ich bei den Narrischen zu einer root-Shell.
    system("/bin/sh");
  }
}


sub add_ok {
  my ($self, $message) = @_;
  $message ||= $self->{info};
  $self->add_message(OK, $message);
}

sub add_warning {
  my ($self, $message) = @_;
  $message ||= $self->{info};
  $self->add_message(WARNING, $message);
}

sub add_critical {
  my ($self, $message) = @_;
  $message ||= $self->{info};
  $self->add_message(CRITICAL, $message);
}

sub add_unknown {
  my ($self, $message) = @_;
  $message ||= $self->{info};
  $self->add_message(UNKNOWN, $message);
}

sub add_ok_mitigation {
  my ($self, $message) = @_;
  if (defined $self->opts->mitigation()) {
    $self->add_message($self->opts->mitigation(), $message);
  } else {
    $self->add_ok($message);
  }
}

sub add_warning_mitigation {
  my ($self, $message) = @_;
  if (defined $self->opts->mitigation()) {
    $self->add_message($self->opts->mitigation(), $message);
  } else {
    $self->add_warning($message);
  }
}

sub add_critical_mitigation {
  my ($self, $message) = @_;
  if (defined $self->opts->mitigation()) {
    $self->add_message($self->opts->mitigation(), $message);
  } else {
    $self->add_critical($message);
  }
}

sub add_unknown_mitigation {
  my ($self, $message) = @_;
  if (defined $self->opts->mitigation()) {
    $self->add_message($self->opts->mitigation(), $message);
  } else {
    $self->add_unknown($message);
  }
}

sub add_message {
  my ($self, $level, $message) = @_;
  $message ||= $self->{info};
  $Monitoring::GLPlugin::plugin->add_message($level, $message)
      unless $self->is_blacklisted();
  if (exists $self->{failed}) {
    if ($level == UNKNOWN && $self->{failed} == OK) {
      $self->{failed} = $level;
    } elsif ($level > $self->{failed}) {
      $self->{failed} = $level;
    }
  }
}

sub clear_ok {
  my ($self) = @_;
  $self->clear_messages(OK);
}

sub clear_warning {
  my ($self) = @_;
  $self->clear_messages(WARNING);
}

sub clear_critical {
  my ($self) = @_;
  $self->clear_messages(CRITICAL);
}

sub clear_unknown {
  my ($self) = @_;
  $self->clear_messages(UNKNOWN);
}

sub clear_all { # deprecated, use clear_messages
  my ($self) = @_;
  $self->clear_ok();
  $self->clear_warning();
  $self->clear_critical();
  $self->clear_unknown();
}

sub set_level {
  my ($self, $code) = @_;
  $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
  $code = lc $code;
  if (! exists $self->{tmp_level}) {
    $self->{tmp_level} = {
      ok => 0,
      warning => 0,
      critical => 0,
      unknown => 0,
    };
  }
  $self->{tmp_level}->{$code}++;
}

sub get_level {
  my ($self) = @_;
  return OK if ! exists $self->{tmp_level};
  my $code = OK;
  return CRITICAL if $self->{tmp_level}->{critical};
  return WARNING  if $self->{tmp_level}->{warning};
  return UNKNOWN  if $self->{tmp_level}->{unknown};
  return $code;
}

#########################################################
# blacklisting
#
sub blacklist {
  my ($self) = @_;
  $self->{blacklisted} = 1;
}

sub add_blacklist {
  my ($self, $list) = @_;
  $Monitoring::GLPlugin::blacklist = join('/',
      (split('/', $self->opts->blacklist), $list));
}

sub is_blacklisted {
  my ($self) = @_;
  if (! $self->opts->can("blacklist")) {
    return 0;
  }
  if (! exists $self->{blacklisted}) {
    $self->{blacklisted} = 0;
  }
  if (exists $self->{blacklisted} && $self->{blacklisted}) {
    return $self->{blacklisted};
  }
  # FAN:459,203/TEMP:102229/ENVSUBSYSTEM
  # FAN_459,FAN_203,TEMP_102229,ENVSUBSYSTEM
  # ALERT:(The Storage Center is not able to access Tiebreaker)/TEMP:102229
  if ($self->opts->blacklist =~ /_/) {
    foreach my $bl_item (split(/,/, $self->opts->blacklist)) {
      if ($bl_item eq $self->internal_name()) {
        $self->{blacklisted} = 1;
      }
    }
  } else {
    foreach my $bl_items (split(/\//, $self->opts->blacklist)) {
      if ($bl_items =~ /^(\w+):([\:\d\-\.,]+)$/) {
        my $bl_type = $1;
        my $bl_names = $2;
        foreach my $bl_name (split(/,/, $bl_names)) {
          if ($bl_type."_".$bl_name eq $self->internal_name()) {
            $self->{blacklisted} = 1;
          }
        }
      } elsif ($bl_items =~ /^(\w+):\((.*)\)$/ and $self->can("internal_content")) {
        my $bl_type = $1;
        my $bl_pattern = qr/$2/;
        if ($self->internal_name() =~ /^${bl_type}_/) {
          if ($self->internal_content() =~ /$bl_pattern/) {
            $self->{blacklisted} = 1;
          }
        }
      } elsif ($bl_items =~ /^(\w+)$/) {
        if ($bl_items eq $self->internal_name()) {
          $self->{blacklisted} = 1;
        }
      }
    }
  }
  return $self->{blacklisted};
}

#########################################################
# additional info
#
sub add_info {
  my ($self, $info) = @_;
  $info = $self->is_blacklisted() ? $info.' (blacklisted)' : $info;
  $self->{info} = $info;
  push(@{$Monitoring::GLPlugin::info}, $info);
}

sub annotate_info {
  my ($self, $annotation) = @_;
  my $lastinfo = pop(@{$Monitoring::GLPlugin::info});
  $lastinfo .= sprintf ' (%s)', $annotation;
  $self->{info} = $lastinfo;
  push(@{$Monitoring::GLPlugin::info}, $lastinfo);
}

sub add_extendedinfo {  # deprecated
  my ($self, $info) = @_;
  $self->{extendedinfo} = $info;
  return if ! $self->opts->extendedinfo;
  push(@{$Monitoring::GLPlugin::extendedinfo}, $info);
}

sub get_info {
  my ($self, $separator) = @_;
  $separator ||= ' ';
  return join($separator , @{$Monitoring::GLPlugin::info});
}

sub get_last_info {
  my ($self) = @_;
  return pop(@{$Monitoring::GLPlugin::info});
}

sub get_extendedinfo {
  my ($self, $separator) = @_;
  $separator ||= ' ';
  return join($separator, @{$Monitoring::GLPlugin::extendedinfo});
}

sub add_summary {  # deprecated
  my ($self, $summary) = @_;
  push(@{$Monitoring::GLPlugin::summary}, $summary);
}

sub get_summary {
  my ($self) = @_;
  return join(', ', @{$Monitoring::GLPlugin::summary});
}

#########################################################
# persistency
#
sub valdiff {
  my ($self, $pparams, @keys) = @_;
  my %params = %{$pparams};
  my $now = time;
  my $newest_history_set = {};
  $params{freeze} = 0 if ! $params{freeze};
  my $mode = "normal";
  if ($self->opts->lookback && $self->opts->lookback == 99999 && $params{freeze} == 0) {
    $mode = "lookback_freeze_chill";
  } elsif ($self->opts->lookback && $self->opts->lookback == 99999 && $params{freeze} == 1) {
    $mode = "lookback_freeze_shockfrost";
  } elsif ($self->opts->lookback && $self->opts->lookback == 99999 && $params{freeze} == 2) {
    $mode = "lookback_freeze_defrost";
  } elsif ($self->opts->lookback) {
    $mode = "lookback";
  }
  # lookback=99999, freeze=0(default)
  #  nimm den letzten lauf und schreib ihn nach {cold}
  #  vergleich dann
  #    wenn es frozen gibt, vergleich frozen und den letzten lauf
  #    sonst den letzten lauf und den aktuellen lauf
  # lookback=99999, freeze=1
  #  wird dann aufgerufen,wenn nach dem freeze=0 ein problem festgestellt wurde
  #     (also als 2.valdiff hinterher)
  #  schreib cold nach frozen
  # lookback=99999, freeze=2
  #  wird dann aufgerufen,wenn nach dem freeze=0 wieder alles ok ist
  #     (also als 2.valdiff hinterher)
  #  loescht frozen
  #
  my $last_values = $self->load_state(%params) || eval {
    my $empty_events = {};
    foreach (@keys) {
      if (ref($self->{$_}) eq "ARRAY") {
        $empty_events->{$_} = [];
      } else {
        $empty_events->{$_} = 0;
      }
    }
    $empty_events->{timestamp} = 0;
    if ($mode eq "lookback") {
      $empty_events->{lookback_history} = {};
    } elsif ($mode eq "lookback_freeze_chill") {
      $empty_events->{cold} = {};
      $empty_events->{frozen} = {};
    }
    $empty_events;
  };
  $self->{'delta_timestamp'} = $now - $last_values->{timestamp};
  foreach (@keys) {
    if ($mode eq "lookback_freeze_chill") {
      # die werte vom letzten lauf wegsichern.
      # vielleicht gibts gleich einen freeze=1, dann muessen die eingefroren werden
      if (exists $last_values->{$_}) {
        if (ref($self->{$_}) eq "ARRAY") {
          $last_values->{cold}->{$_} = [];
          foreach my $value (@{$last_values->{$_}}) {
            push(@{$last_values->{cold}->{$_}}, $value);
          }
        } else {
          $last_values->{cold}->{$_} = $last_values->{$_};
        }
      } else {
        if (ref($self->{$_}) eq "ARRAY") {
          $last_values->{cold}->{$_} = [];
        } else {
          $last_values->{cold}->{$_} = 0;
        }
      }
      # es wird so getan, als sei der frozen wert vom letzten lauf
      if (exists $last_values->{frozen}->{$_}) {
        if (ref($self->{$_}) eq "ARRAY") {
          $last_values->{$_} = [];
          foreach my $value (@{$last_values->{frozen}->{$_}}) {
            push(@{$last_values->{$_}}, $value);
          }
        } else {
          $last_values->{$_} = $last_values->{frozen}->{$_};
        }
      }
    } elsif ($mode eq "lookback") {
      # find a last_value in the history which fits lookback best
      # and overwrite $last_values->{$_} with historic data
      if (exists $last_values->{lookback_history}->{$_}) {
        foreach my $date (sort {$a <=> $b} keys %{$last_values->{lookback_history}->{$_}}) {
            $newest_history_set->{$_} = $last_values->{lookback_history}->{$_}->{$date};
            $newest_history_set->{timestamp} = $date;
        }
        foreach my $date (sort {$a <=> $b} keys %{$last_values->{lookback_history}->{$_}}) {
          if ($date >= ($now - $self->opts->lookback)) {
            $last_values->{$_} = $last_values->{lookback_history}->{$_}->{$date};
            $last_values->{timestamp} = $date;
            $self->{'delta_timestamp'} = $now - $last_values->{timestamp};
            if (ref($last_values->{$_}) eq "ARRAY") {
              $self->debug(sprintf "oldest value of %s within lookback is size %s (age %d)",
                  $_, scalar(@{$last_values->{$_}}), $now - $date);
            } else {
              $self->debug(sprintf "oldest value of %s within lookback is %s (age %d)",
                  $_, $last_values->{$_}, $now - $date);
            }
            last;
          } else {
            $self->debug(sprintf "deprecate %s of age %d", $_, time - $date);
            delete $last_values->{lookback_history}->{$_}->{$date};
          }
        }
      }
    }
    if ($mode eq "normal" || $mode eq "lookback" || $mode eq "lookback_freeze_chill") {
      if (exists $self->{$_} && defined $self->{$_} && $self->{$_} =~ /^\d+\.*\d*$/) {
        # $VAR1 = { 'sysStatTmSleepCycles' => '',
        # no idea why this happens, but we can repair it.
        $last_values->{$_} = $self->{$_} if ! (exists $last_values->{$_} && defined $last_values->{$_} && $last_values->{$_} ne "");
        if ($self->{$_} >= $last_values->{$_}) {
          $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_};
        } elsif ($self->{$_} eq $last_values->{$_}) {
          # dawischt! in einem fall wurde 131071.999023438 >= 131071.999023438 da oben nicht erkannt
          # subtrahieren ging auch daneben, weil ein winziger negativer wert rauskam.
          $self->{'delta_'.$_} = 0;
        } else {
          if ($mode =~ /lookback_freeze/) {
            # hier koennen delta-werte auch negativ sein, wenn z.b. peers verschwinden
            $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_};
          } elsif (exists $params{lastarray}) {
            $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_};
          } else {
            # vermutlich db restart und zaehler alle auf null
            $self->{'delta_'.$_} = $self->{$_};
          }
        }
        $self->debug(sprintf "delta_%s %f", $_, $self->{'delta_'.$_});
        $self->{$_.'_per_sec'} = $self->{'delta_timestamp'} ?
            $self->{'delta_'.$_} / $self->{'delta_timestamp'} : 0;
      } elsif (ref($self->{$_}) eq "ARRAY") {
        if ((! exists $last_values->{$_} || ! defined $last_values->{$_}) && exists $params{lastarray}) {
          # innerhalb der lookback-zeit wurde nichts in der lookback_history
          # gefunden. allenfalls irgendwas aelteres. normalerweise
          # wuerde jetzt das array als [] initialisiert.
          # d.h. es wuerde ein delta geben, @found s.u.
          # wenn man das nicht will, sondern einfach aktuelles array mit
          # dem array des letzten laufs vergleichen will, setzt man lastarray
          $last_values->{$_} = %{$newest_history_set} ?
              $newest_history_set->{$_} : []
        } elsif ((! exists $last_values->{$_} || ! defined $last_values->{$_}) && ! exists $params{lastarray}) {
          $last_values->{$_} = [] if ! exists $last_values->{$_};
        } elsif (exists $last_values->{$_} && ! defined $last_values->{$_}) {
          # $_ kann es auch ausserhalb des lookback_history-keys als normalen
          # key geben. der zeigt normalerweise auf den entspr. letzten
          # lookback_history eintrag. wurde der wegen ueberalterung abgeschnitten
          # ist der hier auch undef.
          $last_values->{$_} = %{$newest_history_set} ?
              $newest_history_set->{$_} : []
        }
        my %saved = map { $_ => 1 } @{$last_values->{$_}};
        my %current = map { $_ => 1 } @{$self->{$_}};
        my @found = grep(!defined $saved{$_}, @{$self->{$_}});
        my @lost = grep(!defined $current{$_}, @{$last_values->{$_}});
        $self->{'delta_found_'.$_} = \@found;
        $self->{'delta_lost_'.$_} = \@lost;
      } else {
        # nicht ganz sauber, aber das artet aus, wenn man jedem uninitialized hinterherstochert.
        # wem das nicht passt, der kann gerne ein paar tage debugging beauftragen.
        # das kostet aber mehr als drei kugeln eis.
        $last_values->{$_} = 0 if ! (exists $last_values->{$_} && defined $last_values->{$_} && $last_values->{$_} ne "");
        $self->{$_} = 0 if ! (exists $self->{$_} && defined $self->{$_} && $self->{$_} ne "");
        $self->{'delta_'.$_} = 0;
      }
    }
  }
  $params{save} = eval {
    my $empty_events = {};
    foreach (@keys) {
      $empty_events->{$_} = $self->{$_};
      if ($mode =~ /lookback_freeze/) {
        if (exists $last_values->{frozen}->{$_}) {
          if (ref($last_values->{frozen}->{$_}) eq "ARRAY") {
            @{$empty_events->{cold}->{$_}} = @{$last_values->{frozen}->{$_}};
          } else {
            $empty_events->{cold}->{$_} = $last_values->{frozen}->{$_};
          }
        } else {
          if (ref($last_values->{cold}->{$_}) eq "ARRAY") {
            @{$empty_events->{cold}->{$_}} = @{$last_values->{cold}->{$_}};
          } else {
            $empty_events->{cold}->{$_} = $last_values->{cold}->{$_};
          }
        }
        $empty_events->{cold}->{timestamp} = $last_values->{cold}->{timestamp};
      }
      if ($mode eq "lookback_freeze_shockfrost") {
        if (ref($empty_events->{cold}->{$_}) eq "ARRAY") {
          @{$empty_events->{frozen}->{$_}} = @{$empty_events->{cold}->{$_}};
        } else {
          $empty_events->{frozen}->{$_} = $empty_events->{cold}->{$_};
        }
        $empty_events->{frozen}->{timestamp} = $now;
      }
    }
    $empty_events->{timestamp} = $now;
    if ($mode eq "lookback") {
      $empty_events->{lookback_history} = $last_values->{lookback_history};
      foreach (@keys) {
        if (ref($self->{$_}) eq "ARRAY") {
          @{$empty_events->{lookback_history}->{$_}->{$now}} = @{$self->{$_}};
        } else {
          $empty_events->{lookback_history}->{$_}->{$now} = $self->{$_};
        }
      }
    }
    if ($mode eq "lookback_freeze_defrost") {
      delete $empty_events->{freeze};
    }
    $empty_events;
  };
  $self->save_state(%params);
}

sub create_statefilesdir {
  my ($self) = @_;
  if (! -d $self->statefilesdir()) {
    eval {
      use File::Path;
      mkpath $self->statefilesdir();
    };
    if ($@ || ! -w $self->statefilesdir()) {
      $self->add_message(UNKNOWN,
        sprintf "cannot create status dir %s! check your filesystem (permissions/usage/integrity) and disk devices", $self->statefilesdir());
    }
  } elsif (! -w $self->statefilesdir()) {
    $self->add_message(UNKNOWN,
        sprintf "cannot write status dir %s! check your filesystem (permissions/usage/integrity) and disk devices", $self->statefilesdir());
  }
}

sub create_statefile {
  my ($self, %params) = @_;
  my $extension = "";
  $extension .= $params{name} ? '_'.$params{name} : '';
  $extension =~ s/\//_/g;
  $extension =~ s/\(/_/g;
  $extension =~ s/\)/_/g;
  $extension =~ s/\*/_/g;
  $extension =~ s/\s/_/g;
  return sprintf "%s/%s%s", $self->statefilesdir(),
      $self->clean_path($self->mode), $self->clean_path(lc $extension);
}

sub clean_path {
  my ($self, $path) = @_;
  if ($^O =~ /MSWin/) {
    $path =~ s/:/_/g;
  }
  return $path;
}

sub schimpf {
  my ($self) = @_;
  printf "statefilesdir %s is not writable.\nYou didn't run this plugin as root, didn't you?\n", $self->statefilesdir();
}

# $self->protect_value('1.1-flat_index', 'cpu_busy', 'percent');
sub protect_value {
  my ($self, $ident, $key, $validfunc) = @_;
  if (ref($validfunc) ne "CODE" && $validfunc eq "percent") {
    $validfunc = sub {
      my $value = shift;
      return 0 if ! defined $value;
      return 0 if $value !~ /^[-+]?([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
      return ($value < 0 || $value > 100) ? 0 : 1;
    };
  } elsif (ref($validfunc) ne "CODE" && $validfunc eq "positive") {
    $validfunc = sub {
      my $value = shift;
      return 0 if ! defined $value;
      return 0 if $value !~ /^[-+]?([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
      return ($value < 0) ? 0 : 1;
    };
  }
  if (&$validfunc($self->{$key})) {
    $self->save_state(name => 'protect_'.$ident.'_'.$key, save => {
        $key => $self->{$key},
        exception => 0,
    });
  } else {
    # if the device gives us an clearly wrong value, simply use the last value.
    my $laststate = $self->load_state(name => 'protect_'.$ident.'_'.$key) || {
        exception => 0,
    };
    $self->debug(sprintf "self->{%s} is %s and invalid for the %dth time",
        $key, defined $self->{$key} ? $self->{$key} : "<undef>",
         $laststate->{exception} + 1);
    if ($laststate->{exception} <= 5) {
      # but only 5 times.
      # if the error persists, somebody has to check the device.
      $self->{$key} = $laststate->{$key};
    }
    $self->save_state(name => 'protect_'.$ident.'_'.$key, save => {
        $key => $laststate->{$key},
        exception => ++$laststate->{exception},
    });
  }
}

sub save_state {
  my ($self, %params) = @_;
  $self->create_statefilesdir();
  my $statefile = $self->create_statefile(%params);
  my $tmpfile = $statefile.$$.rand();
  if ((ref($params{save}) eq "HASH") && exists $params{save}->{timestamp}) {
    $params{save}->{localtime} = scalar localtime $params{save}->{timestamp};
  }
  my $seekfh = IO::File->new();
  if ($seekfh->open($tmpfile, "w")) {
    my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
    my $jsonscalar = $coder->encode($params{save});
    $seekfh->print($jsonscalar);
    # the very time-consuming old way.
    # $seekfh->printf("%s", Data::Dumper::Dumper($params{save}));
    $seekfh->flush();
    $seekfh->close();
    $self->debug(sprintf "saved %s to %s",
        Data::Dumper::Dumper($params{save}), $statefile);
  }
  if (! rename $tmpfile, $statefile) {
    $self->add_message(UNKNOWN,
        sprintf "cannot write status file %s! check your filesystem (permissions/usage/integrity) and disk devices", $statefile);
  }
}

sub load_state {
  my ($self, %params) = @_;
  my $statefile = $self->create_statefile(%params);
  if ( -f $statefile) {
    our $VAR1;
    eval {
      delete $INC{$statefile} if exists $INC{$statefile}; # else unit tests fail
      my $jsonscalar = read_file($statefile);
      my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
      $VAR1 = $coder->decode($jsonscalar);
    };
    if($@) {
      $self->debug(sprintf "json load from %s failed. fallback", $statefile);
      eval {
        require $statefile;
      };
      if($@) {
        printf "FATAL: Could not load old state in perl format!\n";
      }
    }
    $self->debug(sprintf "load %s from %s", Data::Dumper::Dumper($VAR1), $statefile);
    return $VAR1;
  } else {
    return undef;
  }
}

#########################################################
# daemon mode
#
sub check_pidfile {
  my ($self) = @_;
  my $fh = IO::File->new();
  if ($fh->open($self->{pidfile}, "r")) {
    my $pid = $fh->getline();
    $fh->close();
    if (! $pid) {
      $self->debug("Found pidfile %s with no valid pid. Exiting.",
          $self->{pidfile});
      return 0;
    } else {
      $self->debug("Found pidfile %s with pid %d", $self->{pidfile}, $pid);
      kill 0, $pid;
      if ($! == Errno::ESRCH) {
        $self->debug("This pidfile is stale. Writing a new one");
        $self->write_pidfile();
        return 1;
      } else {
        $self->debug("This pidfile is held by a running process. Exiting");
        return 0;
      }
    }
  } else {
    $self->debug("Found no pidfile. Writing a new one");
    $self->write_pidfile();
    return 1;
  }
}

sub write_pidfile {
  my ($self) = @_;
  if (! -d dirname($self->{pidfile})) {
    eval "require File::Path;";
    if (defined(&File::Path::mkpath)) {
      import File::Path;
      eval { mkpath(dirname($self->{pidfile})); };
    } else {
      my @dirs = ();
      map {
          push @dirs, $_;
          mkdir(join('/', @dirs))
              if join('/', @dirs) && ! -d join('/', @dirs);
      } split(/\//, dirname($self->{pidfile}));
    }
  }
  my $fh = IO::File->new();
  $fh->autoflush(1);
  if ($fh->open($self->{pidfile}, "w")) {
    $fh->printf("%s", $$);
    $fh->close();
  } else {
    $self->debug("Could not write pidfile %s", $self->{pidfile});
    die "pid file could not be written";
  }
}

sub system_vartmpdir {
  my ($self) = @_;
  if ($^O =~ /MSWin/) {
    return $self->system_tmpdir();
  } else {
    return "/var/tmp/".$Monitoring::GLPlugin::pluginname;
  }
}

sub system_tmpdir {
  my ($self) = @_;
  if ($^O =~ /MSWin/) {
    return $ENV{TEMP} if defined $ENV{TEMP};
    return $ENV{TMP} if defined $ENV{TMP};
    return File::Spec->catfile($ENV{windir}, 'Temp')
        if defined $ENV{windir};
    return 'C:\Temp';
  } else {
    return "/tmp";
  }
}

sub convert_scientific_numbers {
  my ($self, $n) = @_;
  # mostly used to convert numbers in scientific notation
  if ($n =~ /^\s*\d+\s*$/) {
    return $n;
  } elsif ($n =~ /^\s*([-+]?)(\d*[\.,]*\d*)[eE]{1}([-+]?)(\d+)\s*$/) {
    my ($vor, $num, $sign, $exp) = ($1, $2, $3, $4);
    $n =~ s/E/e/g;
    $n =~ s/,/\./g;
    $num =~ s/,/\./g;
    my $sig = $sign eq '-' ? "." . ($exp - 1 + length $num) : '';
    my $dec = sprintf "%${sig}f", $n;
    $dec =~ s/\.[0]+$//g;
    return $dec;
  } elsif ($n =~ /^\s*([-+]?)(\d+)[\.,]*(\d*)\s*$/) {
    return $1.$2.".".$3;
  } elsif ($n =~ /^\s*(.*?)\s*$/) {
    return $1;
  } else {
    return $n;
  }
}

sub compatibility_methods {
  my ($self) = @_;
  # add_perfdata
  # add_message
  # nagios_exit
  # ->{warningrange}
  # ->{criticalrange}
  # ...
  $self->{warningrange} = ($self->get_thresholds())[0];
  $self->{criticalrange} = ($self->get_thresholds())[1];
  my $old_init = $self->can('init');
  my %params = (
    'mode' => join('::', split(/-/, $self->opts->mode)),
    'name' => $self->opts->name,
    'name2' => $self->opts->name2,
  );
  {
    no strict 'refs';
    no warnings 'redefine';
    *{ref($self).'::init'} = sub {
      $self->$old_init(%params);
      $self->nagios(%params);
    };
    *{ref($self).'::add_nagios'} = \&{"Monitoring::GLPlugin::add_message"};
    *{ref($self).'::add_nagios_ok'} = \&{"Monitoring::GLPlugin::add_ok"};
    *{ref($self).'::add_nagios_warning'} = \&{"Monitoring::GLPlugin::add_warning"};
    *{ref($self).'::add_nagios_critical'} = \&{"Monitoring::GLPlugin::add_critical"};
    *{ref($self).'::add_nagios_unknown'} = \&{"Monitoring::GLPlugin::add_unknown"};
    *{ref($self).'::add_perfdata'} = sub {
      my $self = shift;
      my $message = shift;
      foreach my $perfdata (split(/\s+/, $message)) {
      my ($label, $perfstr) = split(/=/, $perfdata);
      my ($value, $warn, $crit, $min, $max) = split(/;/, $perfstr);
      $value =~ /^([\d\.\-\+]+)(.*)$/;
      $value = $1;
      my $uom = $2;
      $Monitoring::GLPlugin::plugin->add_perfdata(
        label => $label,
        value => $value,
        uom => $uom,
        warn => $warn,
        crit => $crit,
        min => $min,
        max => $max,
      );
      }
    };
    *{ref($self).'::check_thresholds'} = sub {
      my $self = shift;
      my $value = shift;
      my $defaultwarningrange = shift;
      my $defaultcriticalrange = shift;
      $Monitoring::GLPlugin::plugin->set_thresholds(
          metric => 'default',
          warning => $defaultwarningrange,
          critical => $defaultcriticalrange,
      );
      $self->{warningrange} = ($self->get_thresholds())[0];
      $self->{criticalrange} = ($self->get_thresholds())[1];
      return $Monitoring::GLPlugin::plugin->check_thresholds(
          metric => 'default',
          value => $value,
          warning => $defaultwarningrange,
          critical => $defaultcriticalrange,
      );
    };
  }
}

sub AUTOLOAD {
  my ($self, @params) = @_;
  return if ($AUTOLOAD =~ /DESTROY/);
  $self->debug("AUTOLOAD %s\n", $AUTOLOAD)
        if $self->opts->verbose >= 2;
  if ($AUTOLOAD =~ /^(.*)::analyze_and_check_(.*)_subsystem$/) {
    my $class = $1;
    my $subsystem = $2;
    my $analyze = sprintf "analyze_%s_subsystem", $subsystem;
    my $check = sprintf "check_%s_subsystem", $subsystem;
    if (@params) {
      # analyzer class
      my $subsystem_class = shift @params;
      $self->{components}->{$subsystem.'_subsystem'} = $subsystem_class->new();
      $self->debug(sprintf "\$self->{components}->{%s_subsystem} = %s->new()",
          $subsystem, $subsystem_class);
    } else {
      $self->$analyze();
      $self->debug("call %s()", $analyze);
    }
    $self->$check();
  } elsif ($AUTOLOAD =~ /^(.*)::check_(.*)_subsystem$/) {
    my $class = $1;
    my $subsystem = sprintf "%s_subsystem", $2;
    $self->{components}->{$subsystem}->check();
    $self->{components}->{$subsystem}->dump()
        if $self->opts->verbose >= 2;
  } elsif ($AUTOLOAD =~ /^.*::(status_code|check_messages|nagios_exit|html_string|perfdata_string|selected_perfdata|check_thresholds|get_thresholds|opts|pandora_string|strequal)$/) {
    return $Monitoring::GLPlugin::plugin->$1(@params);
  } elsif ($AUTOLOAD =~ /^.*::(reduce_messages|reduce_messages_short|clear_messages|suppress_messages|add_html|add_perfdata|override_opt|create_opt|set_thresholds|force_thresholds|add_pandora)$/) {
    $Monitoring::GLPlugin::plugin->$1(@params);
  } elsif ($AUTOLOAD =~ /^.*::mod_arg_(.*)$/) {
    return $Monitoring::GLPlugin::plugin->mod_arg($1, @params);
  } else {
    $self->debug("AUTOLOAD: class %s has no method %s\n",
        ref($self), $AUTOLOAD);
  }
}



package Monitoring::GLPlugin::Item;
our @ISA = qw(Monitoring::GLPlugin);

use strict;

sub new {
  my ($class, %params) = @_;
  my $self = {
    blacklisted => 0,
    info => undef,
    extendedinfo => undef,
  };
  bless $self, $class;
  $self->init(%params);
  return $self;
}

sub check {
  my ($self, $lists) = @_;
  my @lists = $lists ? @{$lists} : grep { ref($self->{$_}) eq "ARRAY" } keys %{$self};
  foreach my $list (@lists) {
    $self->add_info('checking '.$list);
    foreach my $element (@{$self->{$list}}) {
      $element->blacklist() if $self->is_blacklisted();
      $element->check();
    }
  }
}

sub init_subsystems {
  my ($self, $subsysref) = @_;
  foreach (@{$subsysref}) {
    my ($subsys, $class) = @{$_};
    $self->{$subsys} = $class->new()
        if (! $self->opts->subsystem || grep {
            $_ eq $subsys;
        } map {
            s/^\s+|\s+$//g;
            $_;
        } split /,/, $self->opts->subsystem);
  }
}

sub check_subsystems {
  my ($self) = @_;
  my @subsystems = grep { $_ =~ /.*_subsystem$/ } keys %{$self};
  foreach (@subsystems) {
    $self->{$_}->check();
  }
  $self->reduce_messages_short(join(", ",
      map {
          sprintf "%s working fine", $_;
      } map {
          s/^\s+|\s+$//g;
          $_;
      } split /,/, $self->opts->subsystem
  )) if $self->opts->subsystem;
}

sub dump_subsystems {
  my ($self) = @_;
  my @subsystems = grep { $_ =~ /.*_subsystem$/ } keys %{$self};
  foreach (@subsystems) {
    $self->{$_}->dump();
  }
}



package Monitoring::GLPlugin::TableItem;
our @ISA = qw(Monitoring::GLPlugin::Item);

use strict;

sub new {
  my ($class, %params) = @_;
  my $self = {};
  bless $self, $class;
  foreach (keys %params) {
    $self->{$_} = $params{$_};
  }
  if ($self->can("finish")) {
    $self->finish(%params);
  }
  return $self;
}

sub check {
  my ($self) = @_;
  # some tableitems are not checkable, they are only used to enhance other
  # items (e.g. sensorthresholds enhance sensors)
  # normal tableitems should have their own check-method
}



package Monitoring::GLPlugin::SNMP;
our @ISA = qw(Monitoring::GLPlugin);
# ABSTRACT: helper functions to build a snmp-based monitoring plugin

use strict;
use File::Basename;
use Digest::MD5 qw(md5_hex);
use JSON;
use File::Slurp qw(read_file);
use Module::Load;
use AutoLoader;
our $AUTOLOAD;

use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };

{
  our $mode = undef;
  our $plugin = undef;
  our $blacklist = undef;
  our $session = undef;
  our $rawdata = {};
  our $tablecache = {};
  our $info = [];
  our $extendedinfo = [];
  our $summary = [];
  our $oidtrace = [];
  our $uptime = 0;
}

sub new {
  my ($class, %params) = @_;
  require Monitoring::GLPlugin
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::;
  require Monitoring::GLPlugin::SNMP::MibsAndOids
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::SNMP::MibsAndOids::;
  require Monitoring::GLPlugin::SNMP::CSF
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::SNMP::CSF::;
  require Monitoring::GLPlugin::SNMP::Item
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::SNMP::Item::;
  require Monitoring::GLPlugin::SNMP::TableItem
      if ! grep /BEGIN/, keys %Monitoring::GLPlugin::SNMP::TableItem::;
  my $self = Monitoring::GLPlugin->new(%params);
  bless $self, $class;
  return $self;
}

sub v2tov3 {
  my ($self) = @_;
  if ($self->opts->community && $self->opts->community =~ /^snmpv3(.)(.+)/) {
    my $separator = $1;
    my ($authprotocol, $authpassword, $privprotocol, $privpassword,
        $username, $contextengineid, $contextname) = split(/$separator/, $2);
    $self->override_opt('authprotocol', $authprotocol)
        if defined($authprotocol) && $authprotocol;
    $self->override_opt('authpassword', $authpassword)
        if defined($authpassword) && $authpassword;
    $self->override_opt('privprotocol', $privprotocol)
        if defined($privprotocol) && $privprotocol;
    $self->override_opt('privpassword', $privpassword)
        if defined($privpassword) && $privpassword;
    $self->override_opt('username', $username) 
        if defined($username) && $username;
    $self->override_opt('contextengineid', $contextengineid)
        if defined($contextengineid) && $contextengineid;
    $self->override_opt('contextname', $contextname)
        if defined($contextname) && $contextname;
    $self->override_opt('community', undef) ;
    $self->override_opt('protocol', '3') ;
  }
  if (($self->opts->authpassword || $self->opts->authprotocol ||
      $self->opts->privpassword || $self->opts->privprotocol) && 
      $self->opts->protocol ne '3') {
    $self->override_opt('protocol', '3') ;
  }
  if ($self->opts->community2 && $self->opts->community2 =~ /^snmpv3(.)(.+)/) {
    my $separator = $1;
    $self->create_opt('authprotocol2');
    $self->create_opt('authpassword2');
    $self->create_opt('privprotocol2');
    $self->create_opt('privpassword2');
    $self->create_opt('username2');
    $self->create_opt('contextengineid2');
    $self->create_opt('contextname2');
    my ($authprotocol, $authpassword, $privprotocol, $privpassword,
        $username, $contextengineid, $contextname) = split(/$separator/, $2);
    $self->override_opt('authprotocol2', $authprotocol)
        if defined($authprotocol) && $authprotocol;
    $self->override_opt('authpassword2', $authpassword)
        if defined($authpassword) && $authpassword;
    $self->override_opt('privprotocol2', $privprotocol)
        if defined($privprotocol) && $privprotocol;
    $self->override_opt('privpassword2', $privpassword)
        if defined($privpassword) && $privpassword;
    $self->override_opt('username2', $username)
        if defined($username) && $username;
    $self->override_opt('contextengineid2', $contextengineid)
        if defined($contextengineid) && $contextengineid;
    $self->override_opt('contextname2', $contextname)
        if defined($contextname) && $contextname;
    $self->override_opt('community2', undef);
  }
}

sub add_snmp_modes {
  my ($self) = @_;
  $self->add_mode(
      internal => 'device::uptime',
      spec => 'uptime',
      alias => undef,
      help => 'Check the uptime of the device',
  );
  $self->add_mode(
      internal => 'device::walk',
      spec => 'walk',
      alias => undef,
      help => 'Show snmpwalk command with the oids necessary for a simulation',
  );
  $self->add_mode(
      internal => 'device::walkbulk',
      spec => 'bulkwalk',
      alias => undef,
      help => 'Show snmpbulkwalk command with the oids necessary for a simulation',
      hidden => 1,
  );
  $self->add_mode(
      internal => 'device::supportedmibs',
      spec => 'supportedmibs',
      alias => undef,
      help => 'Shows the names of the mibs which this devices has implemented (only lausser may run this command)',
  );
  $self->add_mode(
      internal => 'device::supportedoids',
      spec => 'supportedoids',
      alias => undef,
      help => 'Shows the names of the oids which this devices has implemented (only lausser may run this command)',
  );
}

sub add_snmp_args {
  my ($self) = @_;
  $self->add_arg(
      spec => 'hostname|H=s',
      help => '--hostname
   Hostname or IP-address of the switch or router',
      required => 0,
      env => 'HOSTNAME',
  );
  $self->add_arg(
      spec => 'port=i',
      help => '--port
   The SNMP port to use (default: 161)',
      required => 0,
      default => 161,
  );
  $self->add_arg(
      spec => 'domain=s',
      help => '--domain
   The transport domain to use (default: udp/ipv4, other possible values: udp6, udp/ipv6, tcp, tcp4, tcp/ipv4, tcp6, tcp/ipv6)',
      required => 0,
      default => 'udp',
  );
  $self->add_arg(
      spec => 'protocol|P=s',
      help => '--protocol
   The SNMP protocol to use (default: 2c, other possibilities: 1,3)',
      required => 0,
      default => '2c',
  );
  $self->add_arg(
      spec => 'community|C=s',
      help => '--community
   SNMP community of the server (SNMP v1/2 only)',
      required => 0,
      default => 'public',
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'username:s',
      help => '--username
   The securityName for the USM security model (SNMPv3 only)',
      required => 0,
  );
  $self->add_arg(
      spec => 'authpassword:s',
      help => '--authpassword
   The authentication password for SNMPv3',
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'authprotocol:s',
      help => '--authprotocol
   The authentication protocol for SNMPv3 (md5|sha)',
      required => 0,
  );
  $self->add_arg(
      spec => 'privpassword:s',
      help => '--privpassword
   The password for authPriv security level',
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => 'privprotocol=s',
      help => '--privprotocol
   The private protocol for SNMPv3 (des|aes|aes128|3des|3desde)',
      required => 0,
  );
  $self->add_arg(
      spec => 'contextengineid=s',
      help => '--contextengineid
   The context engine id for SNMPv3 (10 to 64 hex characters)',
      required => 0,
  );
  $self->add_arg(
      spec => 'contextname=s',
      help => '--contextname
   The context name for SNMPv3 (empty represents the "default" context)',
      required => 0,
  );
  $self->add_arg(
      spec => 'community2=s',
      help => '--community2
   SNMP community which can be used to switch the context during runtime',
      required => 0,
      decode => "rfc3986",
  );
  $self->add_arg(
      spec => '--join-communities',
      help => '--join-communities
   It --community2 is used, run the query with community, then community2
   and add up both results. The default is to use community for the initial
   handshake and community2 for querying (bgp and ospf)',
      required => 0,
      default => 0,
  );
  $self->add_arg(
      spec => 'snmpwalk=s',
      help => '--snmpwalk
   A file with the output of a snmpwalk (used for simulation)
   Use it instead of --hostname',
      required => 0,
      env => 'SNMPWALK',
  );
  $self->add_arg(
      spec => 'servertype=s',
      help => '--servertype
     The type of the network device: cisco (default). Use it if auto-detection
     is not possible',
      required => 0,
  );
  $self->add_arg(
      spec => 'oids=s',
      help => '--oids
   A list of oids which are downloaded and written to a cache file.
   Use it together with --mode oidcache',
      required => 0,
  );
  $self->add_arg(
      spec => 'offline:i',
      help => '--offline
   The maximum number of seconds since the last update of cache file before
   it is considered too old',
      required => 0,
      env => 'OFFLINE',
  );
}

sub validate_args {
  my ($self) = @_;
  $self->SUPER::validate_args();
  if ($self->opts->mode =~ /^(bulk)*walk/) {
    if ($self->opts->snmpwalk && $self->opts->hostname) {
      if ($self->check_messages == CRITICAL) {
        # gemecker vom super-validierer, der sicherstellt, dass die datei
        # snmpwalk existiert. in diesem fall wird sie aber erst neu angelegt,
        # also schnauze.
        my ($code, $message) = $self->check_messages;
        if ($message eq sprintf("file %s not found", $self->opts->snmpwalk)) {
          $self->clear_critical;
        }
      }
      # snmp agent wird abgefragt, die ergebnisse landen in einem file
      # opts->snmpwalk ist der filename. da sich die ganzen get_snmp_table/object-aufrufe
      # an das walkfile statt an den agenten halten wuerden, muss opts->snmpwalk geloescht
      # werden. stattdessen wird opts->snmpdump als traeger des dateinamens mitgegeben.
      # nur sinnvoll mit mode=walk
      $self->create_opt('snmpdump');
      $self->override_opt('snmpdump', $self->opts->snmpwalk);
      $self->override_opt('snmpwalk', undef);
    } elsif (! $self->opts->snmpwalk && $self->opts->hostname) {
      # snmp agent wird abgefragt, die ergebnisse landen in einem file, dessen name
      # nicht vorgegeben ist
      $self->create_opt('snmpdump');
    }
  } else {    
    if ($self->opts->snmpwalk && ! $self->opts->hostname) {
      # normaler aufruf, mode != walk, oid-quelle ist eine datei
      $self->override_opt('hostname', 'snmpwalk.file'.md5_hex($self->opts->snmpwalk))
    } elsif ($self->opts->snmpwalk && $self->opts->hostname) {
      # snmpwalk hat vorrang
      $self->override_opt('hostname', undef);
    }
  }
}

sub init {
  my ($self) = @_;
  if ($self->mode =~ /device::(bulk)*walk/) {
    my @trees = ();
    my $name = $Monitoring::GLPlugin::pluginname;
    $name =~ s/.*\///g;
    $name = sprintf "/tmp/snmpwalk_%s_%s", $name, $self->opts->hostname;
    if ($self->opts->oids) {
      # create pid filename
      # already running?;x
      @trees = split(",", $self->opts->oids);

    } elsif ($self->can("trees")) {
      @trees = $self->trees;
      push(@trees, "1.3.6.1.2.1.1");
    } else {
      @trees = ("1.3.6.1.2.1", "1.3.6.1.4.1");
    }
    if ($self->opts->snmpdump) {
      $name = $self->opts->snmpdump;
    }
    $self->opts->override_opt("protocol", $1) if $self->opts->protocol =~ /^v(.*)/;
    if (defined $self->opts->offline) {
      $self->{pidfile} = $name.".pid";
      if (! $self->check_pidfile()) {
        $self->debug("Exiting because another walk is already running");
        printf STDERR "Exiting because another walk is already running\n";
        exit 3;
      }
      $self->write_pidfile();
      my $timedout = 0;
      my $snmpwalkpid = 0;
      $SIG{'ALRM'} = sub {
        $timedout = 1;
        printf "UNKNOWN - %s timed out after %d seconds\n",
            $Monitoring::GLPlugin::plugin->{name}, $self->opts->timeout;
        kill 9, $snmpwalkpid;
      };
      alarm($self->opts->timeout);
      unlink $name.".partial";
      while (! $timedout && @trees) {
        my $tree = shift @trees;
        $SIG{CHLD} = 'IGNORE';
        my $cmd = sprintf "%s -ObentU -v%s -c %s %s %s >> %s",
            ($self->mode =~ /bulk/) ? "snmpbulkwalk" : "snmpwalk",
            $self->opts->protocol,
            $self->opts->community,
            $self->opts->hostname,
            $tree, $name.".partial";
        $self->debug($cmd);
        $snmpwalkpid = fork;
        if (not $snmpwalkpid) {
          exec($cmd);
        } else {
          wait();
        }
      }
      rename $name.".partial", $name if ! $timedout;
      -f $self->{pidfile} && unlink $self->{pidfile};
      if ($timedout) {
        printf "CRITICAL - timeout. There are still %d snmpwalks left\n", scalar(@trees);
        exit 3;
      } else {
        printf "OK - all requested oids are in %s\n", $name;
      }
    } else {
      my @credentials = ();
      my $credmapping = {
        "-community" => "-c",
        "-privpassword" => "-X",
        "-privprotocol" => "-x",
        "-authpassword" => "-A",
        "-authprotocol" => "-a",
        "-username" => "-u",
        "-context" => "-n",
        "-version" => "-v",
      };
      foreach (keys %{$Monitoring::GLPlugin::SNMP::session_params}) {
        if (exists $credmapping->{$_}) {
          push(@credentials, sprintf "%s '%s'",
              $credmapping->{$_},
              $Monitoring::GLPlugin::SNMP::session_params->{$_}
          );
        }
      }
      if (grep(/-X/, @credentials) and grep(/-A/, @credentials)) {
        push(@credentials, "-l authPriv");
      } elsif (grep(/-A/, @credentials)) {
        push(@credentials, "-l authNoPriv");
      } else {
        push(@credentials, "-l noAuthNoPriv");
      }
      my $credentials = join(" ", @credentials);
      $credentials =~ s/-v2 /-v2c /g;
      printf "rm -f %s\n", $name;
      foreach (@trees) {
        printf "%s -ObentU %s %s %s >> %s\n",
            ($self->mode =~ /bulk/) ? "snmpbulkwalk -t 15 -r 20" : "snmpwalk",
            $credentials,
            $self->opts->hostname,
            $_, $name;
      }
    }
    exit 0;
  } elsif ($self->mode =~ /device::uptime/) {
    $self->add_info(sprintf 'device is up since %s',
        $self->human_timeticks($self->{uptime}));
    $self->set_thresholds(warning => '15:', critical => '5:');
    $self->add_message($self->check_thresholds($self->{uptime} / 60));
    $self->add_perfdata(
        label => 'uptime',
        value => $self->{uptime} / 60,
        places => 0,
    );
    if ($self->opts->report ne 'short') {
      $self->add_ok($self->pretty_sysdesc($self->{productname}));
    }
    my ($code, $message) = $self->check_messages(join => ', ', join_all => ', ');
    $Monitoring::GLPlugin::plugin->nagios_exit($code, $message);
  } elsif ($self->mode =~ /device::supportedmibs/) {
    our $mibdepot = [];
    my $unknowns = {};
    my @outputlist = ();
    %{$unknowns} = %{$self->rawdata};
    if ($self->opts->name && -f $self->opts->name) {
      eval { require $self->opts->name };
      $self->add_critical($@) if $@;
    } elsif ($self->opts->name && ! -f $self->opts->name) {
      $self->add_unknown("where is --name mibdepotfile?");
    }
    push(@{$mibdepot}, ['1.3.6.1.2.1.60', 'ietf', 'v2', 'ACCOUNTING-CONTROL-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.238', 'ietf', 'v2', 'ADSL2-LINE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.238.2', 'ietf', 'v2', 'ADSL2-LINE-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.94.3', 'ietf', 'v2', 'ADSL-LINE-EXT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.94', 'ietf', 'v2', 'ADSL-LINE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.94.2', 'ietf', 'v2', 'ADSL-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.74', 'ietf', 'v2', 'AGENTX-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.123', 'ietf', 'v2', 'AGGREGATE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.118', 'ietf', 'v2', 'ALARM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.23', 'ietf', 'v2', 'APM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.3', 'ietf', 'v2', 'APPC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.13.1', 'ietf', 'v1', 'APPLETALK-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.27', 'ietf', 'v2', 'APPLICATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.62', 'ietf', 'v2', 'APPLICATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.5', 'ietf', 'v2', 'APPN-DLUR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.4', 'ietf', 'v2', 'APPN-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.4', 'ietf', 'v2', 'APPN-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.4.0', 'ietf', 'v2', 'APPN-TRAP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.49', 'ietf', 'v2', 'APS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.117', 'ietf', 'v2', 'ARC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.37.1.14', 'ietf', 'v2', 'ATM2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.59', 'ietf', 'v2', 'ATM-ACCOUNTING-INFORMATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.37', 'ietf', 'v2', 'ATM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.37', 'ietf', 'v2', 'ATM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.37.3', 'ietf', 'v2', 'ATM-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.15', 'ietf', 'v2', 'BGP4-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.15', 'ietf', 'v2', 'BGP4-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.122', 'ietf', 'v2', 'BLDG-HVAC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.17.1', 'ietf', 'v1', 'BRIDGE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.17', 'ietf', 'v2', 'BRIDGE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.19', 'ietf', 'v2', 'CHARACTER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.94', 'ietf', 'v2', 'CIRCUIT-IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.1.1', 'ietf', 'v1', 'CLNS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.1.1', 'ietf', 'v1', 'CLNS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.132', 'ietf', 'v2', 'COFFEE-POT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.89', 'ietf', 'v2', 'COPS-CLIENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.18.1', 'ietf', 'v1', 'DECNET-PHIV-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.21', 'ietf', 'v2', 'DIAL-CONTROL-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.108', 'ietf', 'v2', 'DIFFSERV-CONFIG-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.97', 'ietf', 'v2', 'DIFFSERV-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.66', 'ietf', 'v2', 'DIRECTORY-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.88', 'ietf', 'v2', 'DISMAN-EVENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.90', 'ietf', 'v2', 'DISMAN-EXPRESSION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.82', 'ietf', 'v2', 'DISMAN-NSLOOKUP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.82', 'ietf', 'v2', 'DISMAN-NSLOOKUP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.80', 'ietf', 'v2', 'DISMAN-PING-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.80', 'ietf', 'v2', 'DISMAN-PING-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.63', 'ietf', 'v2', 'DISMAN-SCHEDULE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.63', 'ietf', 'v2', 'DISMAN-SCHEDULE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.64', 'ietf', 'v2', 'DISMAN-SCRIPT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.64', 'ietf', 'v2', 'DISMAN-SCRIPT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.81', 'ietf', 'v2', 'DISMAN-TRACEROUTE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.81', 'ietf', 'v2', 'DISMAN-TRACEROUTE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.46', 'ietf', 'v2', 'DLSW-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.32.2', 'ietf', 'v2', 'DNS-RESOLVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.32.1', 'ietf', 'v2', 'DNS-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.127.5', 'ietf', 'v2', 'DOCS-BPI-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.69', 'ietf', 'v2', 'DOCS-CABLE-DEVICE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.69', 'ietf', 'v2', 'DOCS-CABLE-DEVICE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.126', 'ietf', 'v2', 'DOCS-IETF-BPI2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.132', 'ietf', 'v2', 'DOCS-IETF-CABLE-DEVICE-NOTIFICATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.127', 'ietf', 'v2', 'DOCS-IETF-QOS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.125', 'ietf', 'v2', 'DOCS-IETF-SUBMGT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.127', 'ietf', 'v2', 'DOCS-IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.127', 'ietf', 'v2', 'DOCS-IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.45', 'ietf', 'v2', 'DOT12-IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.53', 'ietf', 'v2', 'DOT12-RPTR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.155', 'ietf', 'v2', 'DOT3-EPON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.158', 'ietf', 'v2', 'DOT3-OAM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.2.2.1.1', 'ietf', 'v1', 'DPI20-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.82', 'ietf', 'v2', 'DS0BUNDLE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.81', 'ietf', 'v2', 'DS0-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.18', 'ietf', 'v2', 'DS1-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.18', 'ietf', 'v2', 'DS1-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.18', 'ietf', 'v2', 'DS1-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.30', 'ietf', 'v2', 'DS3-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.30', 'ietf', 'v2', 'DS3-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.29', 'ietf', 'v2', 'DSA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.26', 'ietf', 'v2', 'DSMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.7', 'ietf', 'v2', 'EBN-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.167', 'ietf', 'v2', 'EFM-CU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.47', 'ietf', 'v2', 'ENTITY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.47', 'ietf', 'v2', 'ENTITY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.47', 'ietf', 'v2', 'ENTITY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.99', 'ietf', 'v2', 'ENTITY-SENSOR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.131', 'ietf', 'v2', 'ENTITY-STATE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.130', 'ietf', 'v2', 'ENTITY-STATE-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.70', 'ietf', 'v2', 'ETHER-CHIPSET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.7', 'ietf', 'v1', 'EtherLike-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.7', 'ietf', 'v1', 'EtherLike-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.35', 'ietf', 'v2', 'EtherLike-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.35', 'ietf', 'v2', 'EtherLike-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.35', 'ietf', 'v2', 'EtherLike-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.35', 'ietf', 'v2', 'EtherLike-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.224', 'ietf', 'v2', 'FCIP-MGMT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.56', 'ietf', 'v2', 'FC-MGMT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.15.73.1', 'ietf', 'v1', 'FDDI-SMT73-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.75', 'ietf', 'v2', 'FIBRE-CHANNEL-FE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.111', 'ietf', 'v2', 'Finisher-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.40', 'ietf', 'v2', 'FLOW-METER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.40', 'ietf', 'v2', 'FLOW-METER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.32', 'ietf', 'v2', 'FRAME-RELAY-DTE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.86', 'ietf', 'v2', 'FR-ATM-PVC-SERVICE-IWF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.47', 'ietf', 'v2', 'FR-MFR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.44', 'ietf', 'v2', 'FRNETSERV-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.44', 'ietf', 'v2', 'FRNETSERV-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.44', 'ietf', 'v2', 'FRNETSERV-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.95', 'ietf', 'v2', 'FRSLD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.16', 'ietf', 'v2', 'GMPLS-LABEL-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.15', 'ietf', 'v2', 'GMPLS-LSR-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.12', 'ietf', 'v2', 'GMPLS-TC-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.13', 'ietf', 'v2', 'GMPLS-TE-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.98', 'ietf', 'v2', 'GSMP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.29', 'ietf', 'v2', 'HC-ALARM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.107', 'ietf', 'v2', 'HC-PerfHist-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.20.5', 'ietf', 'v2', 'HC-RMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.25.1', 'ietf', 'v1', 'HOST-RESOURCES-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.25.1', 'ietf', 'v2', 'HOST-RESOURCES-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.6.1.5', 'ietf', 'v2', 'HPR-IP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.6', 'ietf', 'v2', 'HPR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.106', 'ietf', 'v2', 'IANA-CHARSET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.110', 'ietf', 'v2', 'IANA-FINISHER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.152', 'ietf', 'v2', 'IANA-GMPLS-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.30', 'ietf', 'v2', 'IANAifType-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.128', 'ietf', 'v2', 'IANA-IPPM-METRICS-REGISTRY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.119', 'ietf', 'v2', 'IANA-ITU-ALARM-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.154', 'ietf', 'v2', 'IANA-MAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.109', 'ietf', 'v2', 'IANA-PRINTER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.2.6.2.13.1.1', 'ietf', 'v1', 'IBM-6611-APPN-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.166', 'ietf', 'v2', 'IF-CAP-STACK-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.230', 'ietf', 'v2', 'IFCP-MGMT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.77', 'ietf', 'v2', 'IF-INVERTED-STACK-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.31', 'ietf', 'v2', 'IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.31', 'ietf', 'v2', 'IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.31', 'ietf', 'v2', 'IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.85', 'ietf', 'v2', 'IGMP-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.76', 'ietf', 'v2', 'INET-ADDRESS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.76', 'ietf', 'v2', 'INET-ADDRESS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.76', 'ietf', 'v2', 'INET-ADDRESS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.52.5', 'ietf', 'v2', 'INTEGRATED-SERVICES-GUARANTEED-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.52', 'ietf', 'v2', 'INTEGRATED-SERVICES-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.27', 'ietf', 'v2', 'INTERFACETOPN-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.17', 'ietf', 'v2', 'IPATM-IPMC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.57', 'ietf', 'v2', 'IPATM-IPMC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.4.24', 'ietf', 'v2', 'IP-FORWARD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.4.24', 'ietf', 'v2', 'IP-FORWARD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.168', 'ietf', 'v2', 'IPMCAST-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.48', 'ietf', 'v2', 'IP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.48', 'ietf', 'v2', 'IP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.83', 'ietf', 'v2', 'IPMROUTE-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.46', 'ietf', 'v2', 'IPOA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.141', 'ietf', 'v2', 'IPS-AUTH-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.153', 'ietf', 'v2', 'IPSEC-SPD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.103', 'ietf', 'v2', 'IPV6-FLOW-LABEL-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.56', 'ietf', 'v2', 'IPV6-ICMP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.55', 'ietf', 'v2', 'IPV6-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.91', 'ietf', 'v2', 'IPV6-MLD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.86', 'ietf', 'v2', 'IPV6-TCP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.87', 'ietf', 'v2', 'IPV6-UDP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.142', 'ietf', 'v2', 'ISCSI-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.20', 'ietf', 'v2', 'ISDN-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.138', 'ietf', 'v2', 'ISIS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.163', 'ietf', 'v2', 'ISNS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.121', 'ietf', 'v2', 'ITU-ALARM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.120', 'ietf', 'v2', 'ITU-ALARM-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.2699.1.1', 'ietf', 'v2', 'Job-Monitoring-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.95', 'ietf', 'v2', 'L2TP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.165', 'ietf', 'v2', 'LANGTAG-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.227', 'ietf', 'v2', 'LMP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.227', 'ietf', 'v2', 'LMP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.101', 'ietf', 'v2', 'MALLOC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.26.1', 'ietf', 'v1', 'MAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.26.6', 'ietf', 'v2', 'MAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.26.6', 'ietf', 'v2', 'MAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.26.6', 'ietf', 'v2', 'MAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.26.6', 'ietf', 'v2', 'MAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.171', 'ietf', 'v2', 'MIDCOM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.38.1', 'ietf', 'v1', 'MIOX25-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.44', 'ietf', 'v2', 'MIP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.133', 'ietf', 'v2', 'MOBILEIPV6-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.38', 'ietf', 'v2', 'Modem-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.8', 'ietf', 'v2', 'MPLS-FTN-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.11', 'ietf', 'v2', 'MPLS-L3VPN-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.9', 'ietf', 'v2', 'MPLS-LC-ATM-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.10', 'ietf', 'v2', 'MPLS-LC-FR-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.5', 'ietf', 'v2', 'MPLS-LDP-ATM-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.6', 'ietf', 'v2', 'MPLS-LDP-FRAME-RELAY-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.7', 'ietf', 'v2', 'MPLS-LDP-GENERIC-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.9.10.65', 'ietf', 'v2', 'MPLS-LDP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.4', 'ietf', 'v2', 'MPLS-LDP-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.2', 'ietf', 'v2', 'MPLS-LSR-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.1', 'ietf', 'v2', 'MPLS-TC-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.166.3', 'ietf', 'v2', 'MPLS-TE-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.92', 'ietf', 'v2', 'MSDP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.28', 'ietf', 'v2', 'MTA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.28', 'ietf', 'v2', 'MTA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.28', 'ietf', 'v2', 'MTA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.123', 'ietf', 'v2', 'NAT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.27', 'ietf', 'v2', 'NETWORK-SERVICES-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.27', 'ietf', 'v2', 'NETWORK-SERVICES-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.71', 'ietf', 'v2', 'NHRP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.92', 'ietf', 'v2', 'NOTIFICATION-LOG-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.133', 'ietf', 'v2', 'OPT-IF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.14', 'ietf', 'v2', 'OSPF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.14', 'ietf', 'v2', 'OSPF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.14.16', 'ietf', 'v2', 'OSPF-TRAP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.14.16', 'ietf', 'v2', 'OSPF-TRAP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.34', 'ietf', 'v2', 'PARALLEL-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.17.6', 'ietf', 'v2', 'P-BRIDGE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.58', 'ietf', 'v2', 'PerfHist-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.58', 'ietf', 'v2', 'PerfHist-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.172', 'ietf', 'v2', 'PIM-BSR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.61', 'ietf', 'v2', 'PIM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.157', 'ietf', 'v2', 'PIM-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.93', 'ietf', 'v2', 'PINT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.140', 'ietf', 'v2', 'PKTC-IETF-MTA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.169', 'ietf', 'v2', 'PKTC-IETF-SIG-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.124', 'ietf', 'v2', 'POLICY-BASED-MANAGEMENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.105', 'ietf', 'v2', 'POWER-ETHERNET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.23.4', 'ietf', 'v1', 'PPP-BRIDGE-NCP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.23.3', 'ietf', 'v1', 'PPP-IP-NCP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.23.1.1', 'ietf', 'v1', 'PPP-LCP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.23.2', 'ietf', 'v1', 'PPP-SEC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.43', 'ietf', 'v2', 'Printer-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.43', 'ietf', 'v2', 'Printer-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.79', 'ietf', 'v2', 'PTOPO-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.17.7', 'ietf', 'v2', 'Q-BRIDGE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.2.2', 'ietf', 'v2', 'RADIUS-ACC-CLIENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.2.2', 'ietf', 'v2', 'RADIUS-ACC-CLIENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.2.1', 'ietf', 'v2', 'RADIUS-ACC-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.2.1', 'ietf', 'v2', 'RADIUS-ACC-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.1.2', 'ietf', 'v2', 'RADIUS-AUTH-CLIENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.1.2', 'ietf', 'v2', 'RADIUS-AUTH-CLIENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.1.1', 'ietf', 'v2', 'RADIUS-AUTH-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.67.1.1', 'ietf', 'v2', 'RADIUS-AUTH-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.145', 'ietf', 'v2', 'RADIUS-DYNAUTH-CLIENT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.146', 'ietf', 'v2', 'RADIUS-DYNAUTH-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.31', 'ietf', 'v2', 'RAQMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.32', 'ietf', 'v2', 'RAQMON-RDS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.39', 'ietf', 'v2', 'RDBMS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.1', 'ietf', 'v1', 'RFC1066-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.1', 'ietf', 'v1', 'RFC1156-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.1', 'ietf', 'v1', 'RFC1158-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.1', 'ietf', 'v1', 'RFC1213-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.12', 'ietf', 'v1', 'RFC1229-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.7', 'ietf', 'v1', 'RFC1230-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.9', 'ietf', 'v1', 'RFC1231-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.2', 'ietf', 'v1', 'RFC1232-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.15', 'ietf', 'v1', 'RFC1233-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.13.1', 'ietf', 'v1', 'RFC1243-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.13.1', 'ietf', 'v1', 'RFC1248-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.13.1', 'ietf', 'v1', 'RFC1252-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.14.1', 'ietf', 'v1', 'RFC1253-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.15', 'ietf', 'v1', 'RFC1269-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.1', 'ietf', 'v1', 'RFC1271-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.7', 'ietf', 'v1', 'RFC1284-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.15.1', 'ietf', 'v1', 'RFC1285-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.17.1', 'ietf', 'v1', 'RFC1286-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.18.1', 'ietf', 'v1', 'RFC1289-phivMIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.31', 'ietf', 'v1', 'RFC1304-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.32', 'ietf', 'v1', 'RFC1315-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.19', 'ietf', 'v1', 'RFC1316-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.33', 'ietf', 'v1', 'RFC1317-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.34', 'ietf', 'v1', 'RFC1318-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.20.2', 'ietf', 'v1', 'RFC1353-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.4.24', 'ietf', 'v1', 'RFC1354-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.16', 'ietf', 'v1', 'RFC1381-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.5', 'ietf', 'v1', 'RFC1382-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.23.1', 'ietf', 'v1', 'RFC1389-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.7', 'ietf', 'v1', 'RFC1398-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.18', 'ietf', 'v1', 'RFC1406-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.30', 'ietf', 'v1', 'RFC1407-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.24.1', 'ietf', 'v1', 'RFC1414-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.23', 'ietf', 'v2', 'RIPv2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16', 'ietf', 'v2', 'RMON2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16', 'ietf', 'v2', 'RMON2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.1', 'ietf', 'v1', 'RMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.20.8', 'ietf', 'v2', 'RMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.112', 'ietf', 'v2', 'ROHC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.114', 'ietf', 'v2', 'ROHC-RTP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.113', 'ietf', 'v2', 'ROHC-UNCOMPRESSED-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.33', 'ietf', 'v2', 'RS-232-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.134', 'ietf', 'v2', 'RSTP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.51', 'ietf', 'v2', 'RSVP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.87', 'ietf', 'v2', 'RTP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.139', 'ietf', 'v2', 'SCSI-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.104', 'ietf', 'v2', 'SCTP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.4300.1', 'ietf', 'v2', 'SFLOW-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.149', 'ietf', 'v2', 'SIP-COMMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.36', 'ietf', 'v2', 'SIP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.151', 'ietf', 'v2', 'SIP-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.148', 'ietf', 'v2', 'SIP-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.150', 'ietf', 'v2', 'SIP-UA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.88', 'ietf', 'v2', 'SLAPM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.22', 'ietf', 'v2', 'SMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.4.4', 'ietf', 'v1', 'SMUX-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34', 'ietf', 'v2', 'SNA-NAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34', 'ietf', 'v2', 'SNA-NAU-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.41', 'ietf', 'v2', 'SNA-SDLC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.18', 'ietf', 'v2', 'SNMP-COMMUNITY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.18', 'ietf', 'v2', 'SNMP-COMMUNITY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.10', 'ietf', 'v2', 'SNMP-FRAMEWORK-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.10', 'ietf', 'v2', 'SNMP-FRAMEWORK-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.10', 'ietf', 'v2', 'SNMP-FRAMEWORK-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.21', 'ietf', 'v2', 'SNMP-IEEE802-TM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.11', 'ietf', 'v2', 'SNMP-MPD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.11', 'ietf', 'v2', 'SNMP-MPD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.11', 'ietf', 'v2', 'SNMP-MPD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.13', 'ietf', 'v2', 'SNMP-NOTIFICATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.13', 'ietf', 'v2', 'SNMP-NOTIFICATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.13', 'ietf', 'v2', 'SNMP-NOTIFICATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.14', 'ietf', 'v2', 'SNMP-PROXY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.14', 'ietf', 'v2', 'SNMP-PROXY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.14', 'ietf', 'v2', 'SNMP-PROXY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.22.1.1', 'ietf', 'v1', 'SNMP-REPEATER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.22.1.1', 'ietf', 'v1', 'SNMP-REPEATER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.22.5', 'ietf', 'v2', 'SNMP-REPEATER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.12', 'ietf', 'v2', 'SNMP-TARGET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.12', 'ietf', 'v2', 'SNMP-TARGET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.12', 'ietf', 'v2', 'SNMP-TARGET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.15', 'ietf', 'v2', 'SNMP-USER-BASED-SM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.15', 'ietf', 'v2', 'SNMP-USER-BASED-SM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.15', 'ietf', 'v2', 'SNMP-USER-BASED-SM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.20', 'ietf', 'v2', 'SNMP-USM-AES-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.101', 'ietf', 'v2', 'SNMP-USM-DH-OBJECTS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.2', 'ietf', 'v2', 'SNMPv2-M2M-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.1', 'ietf', 'v2', 'SNMPv2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.1', 'ietf', 'v2', 'SNMPv2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.1', 'ietf', 'v2', 'SNMPv2-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.3', 'ietf', 'v2', 'SNMPv2-PARTY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.6', 'ietf', 'v2', 'SNMPv2-USEC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.16', 'ietf', 'v2', 'SNMP-VIEW-BASED-ACM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.16', 'ietf', 'v2', 'SNMP-VIEW-BASED-ACM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.6.3.16', 'ietf', 'v2', 'SNMP-VIEW-BASED-ACM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.39', 'ietf', 'v2', 'SONET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.39', 'ietf', 'v2', 'SONET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.39', 'ietf', 'v2', 'SONET-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.17.3', 'ietf', 'v1', 'SOURCE-ROUTING-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.28', 'ietf', 'v2', 'SSPM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.54', 'ietf', 'v2', 'SYSAPPL-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.137', 'ietf', 'v2', 'T11-FC-FABRIC-ADDR-MGR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.162', 'ietf', 'v2', 'T11-FC-FABRIC-CONFIG-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.159', 'ietf', 'v2', 'T11-FC-FABRIC-LOCK-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.143', 'ietf', 'v2', 'T11-FC-FSPF-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.135', 'ietf', 'v2', 'T11-FC-NAME-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.144', 'ietf', 'v2', 'T11-FC-ROUTE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.161', 'ietf', 'v2', 'T11-FC-RSCN-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.176', 'ietf', 'v2', 'T11-FC-SP-AUTHENTICATION-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.178', 'ietf', 'v2', 'T11-FC-SP-POLICY-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.179', 'ietf', 'v2', 'T11-FC-SP-SA-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.175', 'ietf', 'v2', 'T11-FC-SP-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.177', 'ietf', 'v2', 'T11-FC-SP-ZONING-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.147', 'ietf', 'v2', 'T11-FC-VIRTUAL-FABRIC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.160', 'ietf', 'v2', 'T11-FC-ZONE-SERVER-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.136', 'ietf', 'v2', 'T11-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.156', 'ietf', 'v2', 'TCP-ESTATS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.23.2.29.1', 'ietf', 'v1', 'TCPIPX-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.49', 'ietf', 'v2', 'TCP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.49', 'ietf', 'v2', 'TCP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.200', 'ietf', 'v2', 'TE-LINK-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.122', 'ietf', 'v2', 'TE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.3.124', 'ietf', 'v2', 'TIME-AGGREGATE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.8', 'ietf', 'v2', 'TN3270E-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.34.9', 'ietf', 'v2', 'TN3270E-RT-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.9', 'ietf', 'v2', 'TOKENRING-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.9', 'ietf', 'v2', 'TOKENRING-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.1', 'ietf', 'v1', 'TOKEN-RING-RMON-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.42', 'ietf', 'v2', 'TOKENRING-STATION-SR-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.16.30', 'ietf', 'v2', 'TPM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.100', 'ietf', 'v2', 'TRANSPORT-ADDRESS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.116', 'ietf', 'v2', 'TRIP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.115', 'ietf', 'v2', 'TRIP-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.131', 'ietf', 'v2', 'TUNNEL-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.131', 'ietf', 'v2', 'TUNNEL-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.170', 'ietf', 'v2', 'UDPLITE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.50', 'ietf', 'v2', 'UDP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.50', 'ietf', 'v2', 'UDP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.33', 'ietf', 'v2', 'UPS-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.164', 'ietf', 'v2', 'URI-TC-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.229', 'ietf', 'v2', 'VDSL-LINE-EXT-MCM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.228', 'ietf', 'v2', 'VDSL-LINE-EXT-SCM-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.10.97', 'ietf', 'v2', 'VDSL-LINE-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.129', 'ietf', 'v2', 'VPN-TC-STD-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.68', 'ietf', 'v2', 'VRRP-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.2.1.65', 'ietf', 'v2', 'WWW-MIB']);
    push(@{$mibdepot}, ['1.3.6.1.4.1.8072', 'net-snmp', 'v2', 'NET-SNMP-MIB']);
    my $oids = $self->get_entries_by_walk(-varbindlist => [
        '1.3.6.1.2.1', '1.3.6.1.4.1', '1',
    ]);
    foreach my $mibinfo (@{$mibdepot}) {
      next if $self->opts->protocol eq "1" && $mibinfo->[2] ne "v1";
      next if $self->opts->protocol ne "1" && $mibinfo->[2] eq "v1";
      $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mibinfo->[3]} = $mibinfo->[0];
    }
    $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'MIB-2-MIB'} = "1.3.6.1.2.1";
    foreach my $mib (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids}) {
      if ($self->implements_mib($mib)) {
        push(@outputlist, [$mib, $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}]);
        $unknowns = {@{[map {
            $_, $self->rawdata->{$_}
        } grep {
            substr($_, 0, length($Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib})) ne
                $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib} || (
            substr($_, 0, length($Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib})) eq
                $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib} &&
            substr($_, length($Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}), 1) ne ".")
        } keys %{$unknowns}]}};
      }
    }
    my $toplevels = {};
    map {
        /^(1\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+)\./ and $toplevels->{$1} = 1; 
        /^(1\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+)\./ and $toplevels->{$1} = 1; 
    } keys %{$unknowns};
    foreach (sort {$a cmp $b} keys %{$toplevels}) {
      push(@outputlist, ["<unknown>", $_]);
    }
    foreach (sort {$a->[0] cmp $b->[0]} @outputlist) {
      printf "implements %s %s\n", $_->[0], $_->[1];
    }
    $self->add_ok("have fun");
    my ($code, $message) = $self->check_messages(join => ', ', join_all => ', ');
    $Monitoring::GLPlugin::plugin->nagios_exit($code, $message);
  } elsif ($self->mode =~ /device::supportedoids/) {
    my $unknowns = {};
    %{$unknowns} = %{$self->rawdata};
    my $confirmed = {};
    foreach my $mib (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids}) {
      foreach my $sym (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}}) {
        my $obj = $self->get_snmp_object($mib, $sym);
        if (defined $obj) {
          my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$sym};
          if (exists $unknowns->{$oid}) {
            $confirmed->{$oid} = sprintf '%s::%s = %s', $mib, $sym, $obj;
            delete $unknowns->{$oid};
          } elsif (exists $unknowns->{$oid.'.0'}) {
            $confirmed->{$oid.'.0'} = sprintf '%s::%s = %s', $mib, $sym, $obj;
            delete $unknowns->{$oid.'.0'};
          }
        }
        if ($sym =~ /Table$/) {
          if (my @table = $self->get_snmp_table_objects($mib, $sym)) {
            my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$sym};
            $confirmed->{$oid} = sprintf '%s::%s', $mib, $sym;
            $self->add_rawdata($oid, '--------------------');
            foreach my $line (@table) {
              if ($line->{flat_indices}) {
                foreach my $column (grep !/(flat_indices)|(indices)/, keys %{$line}) {
                  my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$column};
                  if (exists $unknowns->{$oid.'.'.$line->{flat_indices}}) {
                    $confirmed->{$oid.'.'.$line->{flat_indices}} = 
                        sprintf '%s::%s.%s = %s', $mib, $column, $line->{flat_indices}, $line->{$column};
                    delete $unknowns->{$oid.'.'.$line->{flat_indices}};
                  }
                }
              }
            }
          }
        }
      }
    }
    my @sortedoids = $self->sort_oids([keys %{$self->rawdata}]);
    foreach (@sortedoids) {
      if (exists $confirmed->{$_}) {
        printf "%s\n", $confirmed->{$_};
      } else {
        printf "%s = %s\n", $_, $unknowns->{$_};
      }
    }
  }
}

sub check_snmp_and_model {
  my ($self) = @_;
  if ($self->opts->snmpwalk) {
    my $response = {};
    if (! -f $self->opts->snmpwalk) {
      $self->add_message(CRITICAL, 
          sprintf 'file %s not found',
          $self->opts->snmpwalk);
    } elsif (-x $self->opts->snmpwalk) {
      my $cmd = sprintf "%s -ObentU -v%s -c%s %s 1.3.6.1.4.1 2>&1",
          $self->opts->snmpwalk,
          $self->opts->protocol,
          $self->opts->community,
          $self->opts->hostname;
      open(WALK, "$cmd |");
      while (<WALK>) {
        if (/^([\.\d]+) = .*?: (\-*\d+)/) {
          $response->{$1} = $2;
        } elsif (/^([\.\d]+) = .*?: "(.*?)"/) {
          $response->{$1} = $2;
          $response->{$1} =~ s/\s+$//;
        }
      }
      close WALK;
    } else {
      if (defined $self->opts->offline && $self->opts->mode ne 'walk') {
        if ((time - (stat($self->opts->snmpwalk))[9]) > $self->opts->offline) {
          $self->add_message(UNKNOWN,
              sprintf 'snmpwalk file %s is too old', $self->opts->snmpwalk);
        }
      }
      $self->opts->override_opt('hostname', 'walkhost') if $self->opts->mode ne 'walk';
      my $current_oid = undef;
      my @multiline_string = ();
      open(MESS, $self->opts->snmpwalk);
      while(<MESS>) {
        next if /No Such Object available on this agent at this OID/;
        # SNMPv2-SMI::enterprises.232.6.2.6.7.1.3.1.4 = INTEGER: 6
        if (/^([\d\.]+) = .*?INTEGER: .*\((\-*\d+)\)/) {
          # .1.3.6.1.2.1.2.2.1.8.1 = INTEGER: down(2)
          $response->{$1} = $2;
        } elsif (/^([\d\.]+) = .*?Opaque:.*?Float:.*?([\-\.\d]+)/) {
          # .1.3.6.1.4.1.2021.10.1.6.1 = Opaque: Float: 0.938965
          $response->{$1} = $2;
        } elsif (/^([\d\.]+) = STRING:\s*$/) {
          $response->{$1} = "";
        } elsif (/^([\.\d]+) = STRING: "([^"]*)$/) {
          $current_oid = $1;
          push(@multiline_string, $2);
        } elsif (/^([\d\.]+) = Network Address: (.*)/) {
          $response->{$1} = $2;
        } elsif (/^([\d\.]+) = Hex-STRING: (.*)/) {
          my $k = $1;
          my $h = $2;
          $h =~ s/\s+//g;
          $response->{$k} = pack('H*', $h);
        } elsif (/^([\d\.]+) = \w+: (\-*\d+)\s*$/) {
          $response->{$1} = $2;
        } elsif (/^([\d\.]+) = \w+: "(.*?)"/) {
          $response->{$1} = $2;
          $response->{$1} =~ s/\s+$//;
        } elsif (/^([\d\.]+) = \w+: (.*)/) {
          $response->{$1} = $2;
          $response->{$1} =~ s/\s+$//;
        } elsif (/^([\d\.]+) = (\-*\d+)/) {
          $response->{$1} = $2;
        } elsif (/^([\d\.]+) = "(.*?)"/) {
          $response->{$1} = $2;
          $response->{$1} =~ s/\s+$//;
        } elsif (/^([^"]*)"$/ && @multiline_string && $current_oid) {
          push(@multiline_string, $1);
          $response->{$current_oid} = join("\n", @multiline_string);
          $current_oid = undef;
          @multiline_string = ();
        } elsif (/^"$/ && @multiline_string && $current_oid) {
          $response->{$current_oid} = join("\n", @multiline_string);
          $current_oid = undef;
          @multiline_string = ();
        } elsif (/(.*)/ && @multiline_string && $current_oid) {
          push(@multiline_string, $1);
        }
      }
      close MESS;
    }
    foreach my $oid (keys %$response) {
      if ($oid =~ /^\./) {
        my $nodot = $oid;
        $nodot =~ s/^\.//g;
        $response->{$nodot} = $response->{$oid};
        delete $response->{$oid};
      }
    }
    # Achtung!! Der schnippelt von einem Hex-STRING, der mit 20 aufhoert,
    # das letzte Byte weg. Das muss beruecksichtigt werden, wenn man 
    # spaeter MAC-Adressen o.ae. zueueckrechnet.
    # } elsif ($self->{hwWlanRadioMac} && unpack("H12", $self->{hwWlanRadioMac}." ") =~ /(\w{2})(\w{2})(\w{2})(\w{2})(\w{2})(\w{2})/) {
    # siehe Classes::Huawei::Component::WlanSubsystem::Radio
    map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
        keys %$response;
    $self->set_rawdata($response);
  } else {
    $self->establish_snmp_session();
  }
  if (! $self->check_messages()) {
    my $tic = time;
    # Datatype TimeTicks = 1/100s
    my $sysUptime = $self->get_snmp_object('MIB-2-MIB', 'sysUpTime', 0);
    # Datatype Integer32 = 1s
    my $snmpEngineTime = $self->get_snmp_object('SNMP-FRAMEWORK-MIB', 'snmpEngineTime');
    # Datatype TimeTicks = 1/100s
    my $hrSystemUptime = $self->get_snmp_object_maybe('HOST-RESOURCES-MIB', 'hrSystemUptime');
    my $sysDescr = $self->get_snmp_object('MIB-2-MIB', 'sysDescr', 0);
    my $tac = time;
    if (defined $hrSystemUptime && $hrSystemUptime =~ /^\d+$/ && $hrSystemUptime > 0) {
      $hrSystemUptime = $self->timeticks($hrSystemUptime);
      $self->debug(sprintf 'hrSystemUptime says: up since: %s / %s',
          scalar localtime (time -  $hrSystemUptime),
          $self->human_timeticks($hrSystemUptime));
    } else {
      $hrSystemUptime = undef;
    }
    if (defined $snmpEngineTime && $snmpEngineTime =~ /^\d+$/ && $snmpEngineTime > 0) {
      $snmpEngineTime = $snmpEngineTime;
      $self->debug(sprintf 'snmpEngineTime says: up since: %s / %s',
          scalar localtime (time - $snmpEngineTime),
          $self->human_timeticks($snmpEngineTime));
    } else {
      # drecksschrott asa liefert negative werte
      # und drecksschrott socomec liefert: wrong type (should be INTEGER): NULL
      $snmpEngineTime = undef;
    }
    if (defined $sysUptime) {
      $sysUptime = $self->timeticks($sysUptime);
      $self->debug(sprintf 'sysUptime says:      up since: %s / %s',
          scalar localtime (time - $sysUptime),
          $self->human_timeticks($sysUptime));
    }
    my $best_uptime = undef;
    if ($hrSystemUptime) {
      # Bei Linux-basierten Geraeten wird snmpEngineTime viel zu haeufig
      # durchgestartet, also lieber das hier.
      $best_uptime = $hrSystemUptime;
      # Es sei denn, snmpEngineTime ist tatsaechlich groesser, dann gilt
      # wiederum dieses. Mag sein, dass der zahlenwert hier manchmal huepft
      # und ein Performancegraph Zacken bekommt, aber das ist mir egal.
      # es geht nicht um Graphen in Form einer ansteigenden Geraden, sondern
      # um das Erkennen von spontanen Reboots und das Vermeiden von
      # falschen Alarmen.
      if ($snmpEngineTime && $snmpEngineTime > $hrSystemUptime) {
        $best_uptime = $snmpEngineTime;
      }
    } elsif ($snmpEngineTime) {
      $best_uptime = $snmpEngineTime;
    } else {
      $best_uptime = $sysUptime;
    }
    if (defined $best_uptime && defined $sysDescr) {
      $self->{uptime} = $best_uptime;
      $self->{productname} = $sysDescr;
      $self->{sysobjectid} = $self->get_snmp_object('MIB-2-MIB', 'sysObjectID', 0);
      $self->debug(sprintf 'uptime: %s', $self->{uptime});
      $self->debug(sprintf 'up since: %s',
          scalar localtime (time - $self->{uptime}));
      $Monitoring::GLPlugin::SNMP::uptime = $self->{uptime};
      $self->debug('whoami: '.$self->{productname});
    } else {
      if ($tac - $tic >= ($Monitoring::GLPlugin::SNMP::session ?
          $Monitoring::GLPlugin::SNMP::session->timeout : $self->opts->timeout())) {
        $self->add_message(UNKNOWN,
            'could not contact snmp agent, timeout during snmp-get sysUptime');
      } elsif ($self->{broken_snmp_agent}) {
        # plugins may add an array of subroutines to their Classes::Device.
        # For example, check_tl_health has to deal with IBM libraries, which
        # do not show sysUptime nor sysDescr nor any other uptime oids.
        # In order to let the plugin continue with a fake uptime, one of
        # the broken_snmp_agent subroutines must return a true value after it
        # has set the uptime to 1 hour and filled out $self->{productname}
        my $mein_lieber_freund_und_kupferstecher = 0;
        foreach my $kriegst_du_die_kurve (@{$self->{broken_snmp_agent}}) {
          if (&$kriegst_du_die_kurve()) {
            $mein_lieber_freund_und_kupferstecher = 1;
            $self->debug(sprintf 'uptime: %s', $self->{uptime});
            $self->debug(sprintf 'up since: %s',
                scalar localtime (time - $self->{uptime}));
            $Monitoring::GLPlugin::SNMP::uptime = $self->{uptime};
            $self->debug('whoami: '.$self->{productname});
            return;
          }
        }
        if (! $mein_lieber_freund_und_kupferstecher) {
          $self->add_message(UNKNOWN,
              'got neither sysUptime and sysDescr nor any other useful information, is this snmp agent working correctly?');
        }
      } else {
        $self->add_message(UNKNOWN,
            'Did not receive both sysUptime and sysDescr, is this snmp agent working correctly?');
      }
      $Monitoring::GLPlugin::SNMP::session->close if $Monitoring::GLPlugin::SNMP::session;
    }
  }
}

sub pretty_sysdesc {
  my ($self, $sysDesc) = @_;
  my $prettySysDescription = undef;
  if (exists $self->{classified_as}) {
    my $now_class = ref($self);
    my $now_pretty_sysdesc = $self->can("pretty_sysdesc");
    bless $self, $self->{classified_as};
    my $classified_pretty_sysdesc = $self->can("pretty_sysdesc");
    if ($now_pretty_sysdesc && $classified_pretty_sysdesc && $now_pretty_sysdesc ne $classified_pretty_sysdesc) {
      $prettySysDescription = $self->pretty_sysdesc($sysDesc);
    } elsif (! $now_pretty_sysdesc && $classified_pretty_sysdesc) {
      $prettySysDescription = $self->pretty_sysdesc($sysDesc);
    }
    bless $self, $now_class;
  }
  return $prettySysDescription ? $prettySysDescription : $sysDesc;
}

sub establish_snmp_session {
  my ($self) = @_;
  $self->set_timeout_alarm();
  if (eval "require Net::SNMP") {
    my %params = ();
    my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
    $params{'-translate'} = [ # because we see "NULL" coming from socomec devices
      -all => 0x0,
      -nosuchobject => 1,
      -nosuchinstance => 1,
      -endofmibview => 1,
      -unsigned => 1,
    ];
    $params{'-hostname'} = $self->opts->hostname;
    $params{'-version'} = $self->opts->protocol;
    if ($self->opts->port) {
      $params{'-port'} = $self->opts->port;
    }
    if ($self->opts->domain) {
      $params{'-domain'} = $self->opts->domain;
    }
    $self->v2tov3;
    if ($self->opts->protocol eq '3') {
      $params{'-version'} = $self->opts->protocol;
      $params{'-username'} = $self->opts->username;
      if ($self->opts->authpassword) {
        $params{'-authpassword'} = $self->opts->authpassword;
      }
      if ($self->opts->authprotocol) {
        $params{'-authprotocol'} = $self->opts->authprotocol;
      }
      if ($self->opts->privpassword) {
        $params{'-privpassword'} = $self->opts->privpassword;
      }
      if ($self->opts->privprotocol) {
        $params{'-privprotocol'} = $self->opts->privprotocol;
      }
      # context hat in der session nix verloren, sondern wird
      # als zusatzinfo bei den requests mitgeschickt
      #if ($self->opts->contextengineid) {
      #  $params{'-contextengineid'} = $self->opts->contextengineid;
      #}
      #if ($self->opts->contextname) {
      #  $params{'-contextname'} = $self->opts->contextname;
      #}
    } else {
      $params{'-community'} = $self->opts->community;
    }
    # breaks cisco wlc. at least with 15, wlc did not work.
    # removing this at all may cause strange epn errors. As if only
    # certain oids were returned as undef, others not.
    # next try: 50
    $params{'-timeout'} = $self->opts->timeout() >= 60 ?
        50 : $self->opts->timeout() - 2;
    my $stderrvar = "";
    *SAVEERR = *STDERR;
    open ERR ,'>',\$stderrvar;
    *STDERR = *ERR;
    my ($session, $error) = Net::SNMP->session(%params);
    *STDERR = *SAVEERR;
    if ($stderrvar && $error && $error =~ /Time synchronization failed/) {
      # This is what you get when you have
      # - an APC ups with a buggy firmware.
      # - no chance to update it.
      # - a support contract.
      no strict 'refs';
      no warnings 'redefine';
      *{'Net::SNMP::_discovery_synchronization_cb'} = sub {
        my ($this) = @_;
        if ($this->{_security}->discovered())
        {
          $this->_error_clear();
          return $this->_discovery_complete();
        }
        return $this->_discovery_failed();
      };
      ($session, $error) = Net::SNMP->session(%params);
    }
    if (! defined $session) {
      $self->add_message(CRITICAL, 
          sprintf 'cannot create session object: %s', $error);
      $self->debug(Data::Dumper::Dumper(\%params));
    } else {
      my $max_msg_size = $session->max_msg_size();
      #$session->max_msg_size(4 * $max_msg_size);
      if ($self->opts->protocol eq "1") {
        $Monitoring::GLPlugin::SNMP::maxrepetitions = 0;
      } else {
        $Monitoring::GLPlugin::SNMP::maxrepetitions = 20;
      }
      $Monitoring::GLPlugin::SNMP::max_msg_size = $max_msg_size;
      $Monitoring::GLPlugin::SNMP::session = $session;
      $Monitoring::GLPlugin::SNMP::session_params = \%params;
    }
  } else {
    $self->add_message(CRITICAL,
        'could not find Net::SNMP module');
  }
}

sub session_translate {
  my ($self, $translation) = @_;
  $Monitoring::GLPlugin::SNMP::session->translate($translation) if
      $Monitoring::GLPlugin::SNMP::session;
}

sub establish_snmp_secondary_session {
  my ($self) = @_;
  if ($self->opts->protocol eq '3' &&
      $self->opts->can('authprotocol2') && (
      defined $self->opts->authprotocol2 ||
      defined $self->opts->authpassword2 ||
      defined $self->opts->privprotocol2 ||
      defined $self->opts->privpassword2 ||
      defined $self->opts->username2 ||
      defined $self->opts->contextengineid2 ||
      defined $self->opts->contextname2
  )) {
    my $relogin = 0;
    # bei --community2="snmpv3,..." wurde alles in xyz2 per override gesteckt
    $relogin = 1 if ! $self->strequal($self->opts->authprotocol,
        $self->opts->authprotocol2);
    $relogin = 1 if ! $self->strequal($self->opts->authpassword,
        $self->opts->authpassword2);
    $relogin = 1 if ! $self->strequal($self->opts->privprotocol,
        $self->opts->privprotocol2);
    $relogin = 1 if ! $self->strequal($self->opts->privpassword,
        $self->opts->privpassword2);
    $relogin = 1 if ! $self->strequal($self->opts->username,
        $self->opts->username2);
    if ($relogin) {
      $Monitoring::GLPlugin::SNMP::session = undef;
      $self->opts->override_opt('authprotocol',
          $self->opts->authprotocol2);
      $self->opts->override_opt('authpassword',
          $self->opts->authpassword2);
      $self->opts->override_opt('privprotocol',
          $self->opts->privprotocol2);
      $self->opts->override_opt('privpassword',
          $self->opts->privpassword2);
      $self->opts->override_opt('username',
          $self->opts->username2);
      $self->establish_snmp_session;
    }
    $self->opts->override_opt('contextengineid',
        $self->opts->contextengineid2);
    $self->opts->override_opt('contextname',
        $self->opts->contextname2);
    return 1;
  } else {
    if (defined $self->opts->community2 &&
        $self->opts->community2 ne
        $self->opts->community) {
      $Monitoring::GLPlugin::SNMP::session = undef;
      $self->opts->override_opt('community',
          $self->opts->community2) ;
      $self->establish_snmp_session;
      return 1;
    }
  }
  return 0;
}

sub reset_snmp_max_msg_size {
  my ($self) = @_;
  $self->debug(sprintf "reset snmp_max_msg_size to %s",
      $Monitoring::GLPlugin::SNMP::max_msg_size) if $Monitoring::GLPlugin::SNMP::session;
  $Monitoring::GLPlugin::SNMP::session->max_msg_size($Monitoring::GLPlugin::SNMP::max_msg_size) if $Monitoring::GLPlugin::SNMP::session;
}

sub mult_snmp_max_msg_size {
  my ($self, $factor) = @_;
  $factor ||= 10;
  $self->debug(sprintf "raise snmp_max_msg_size %d * %d", 
      $factor, $Monitoring::GLPlugin::SNMP::session->max_msg_size()) if $Monitoring::GLPlugin::SNMP::session;
  $Monitoring::GLPlugin::SNMP::session->max_msg_size($factor * $Monitoring::GLPlugin::SNMP::session->max_msg_size()) if $Monitoring::GLPlugin::SNMP::session;
}

sub bulk_baeh_reset {
  my ($self, $maxrepetitions) = @_;
  $self->reset_snmp_max_msg_size();
  $Monitoring::GLPlugin::SNMP::maxrepetitions =
      int($Monitoring::GLPlugin::SNMP::session->max_msg_size() * 0.017) if $Monitoring::GLPlugin::SNMP::session;
}

sub bulk_is_baeh {
  my ($self, $maxrepetitions) = @_;
  $maxrepetitions ||= 1;
  $Monitoring::GLPlugin::SNMP::maxrepetitions = int($maxrepetitions);
}

sub get_max_repetitions {
  my ($self) = @_;
  return $Monitoring::GLPlugin::SNMP::maxrepetitions;
}

sub no_such_model {
  my ($self) = @_;
  printf "Model %s is not implemented\n", $self->{productname};
  exit 3;
}

sub no_such_mode {
  my ($self) = @_;
  if (ref($self) eq "Classes::Generic") {
    $self->init();
  } elsif (ref($self) eq "Classes::Device") {
    $self->add_message(UNKNOWN, 'the device did not implement the mibs this plugin is asking for');
    $self->add_message(UNKNOWN,
        sprintf('unknown device%s', $self->{productname} eq 'unknown' ?
            '' : '('.$self->{productname}.')'));
  } elsif (ref($self) eq "Monitoring::GLPlugin::SNMP") {
    # uptime, offline
    $self->init();
  } else {
    eval {
      bless $self, "Classes::Generic";
      $self->init();
    };
    if ($@) {
      bless $self, "Monitoring::GLPlugin::SNMP";
      $self->init();
    }
  }
  if (ref($self) eq "Monitoring::GLPlugin::SNMP") {
    $self->nagios_exit(3,
        sprintf "Mode %s is not implemented for this type of device",
        $self->opts->mode
    );
    exit 3;
  }
}

sub uptime {
  my ($self) = @_;
  return $Monitoring::GLPlugin::SNMP::uptime;
}

sub ago_sysuptime {
  my ($self, $eventtime) = @_;
  # if there is an oid containing the value of sysUptime at the time of
  # a certain event (e.g. cipSecFailTime), this method returns the
  # time in seconds that has passed since the event.
  # sysUptime overflows at 2**32, so it is possible that the eventtime is
  # bigger than sysUptime
  # the eventtime value must come as 1/100s, do not normalize it before.
  #
  # 0-----------------|---------------X
  #                   event=2Mio      sysUptime=5.5Mio
  # event happened (5.5Mio - 2Mio) seconds ago
  #
  # 0-----------------|---------------2**32/0-----------X
  #                   event=2Mio                        sysUptime=100k
  #
  # event happened (100k + (2**32 - 2Mio)) seconds ago
  #
  my $sysUptime = $self->get_snmp_object('MIB-2-MIB', 'sysUpTime', 0);
  if ($eventtime > $sysUptime) {
    return ($sysUptime + (2**32 - $eventtime)) / 100;
  } else {
    return ($sysUptime - $eventtime) / 100;
  }
}

sub map_oid_to_class {
  my ($self, $oid, $class) = @_;
  $Monitoring::GLPlugin::SNMP::MibsAndOids::discover_ids->{$oid} = $class;
}

sub discover_suitable_class {
  my ($self) = @_;
  my $sysobj = $self->get_snmp_object('MIB-2-MIB', 'sysObjectID', 0);
  $sysobj =~ s/^\.//g;
  foreach my $oid (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::discover_ids}) {
    if ($sysobj && $oid eq $sysobj) {
      return $Monitoring::GLPlugin::SNMP::MibsAndOids::discover_ids->{$sysobj};
    }
  }
}

sub require_mib {
  my ($self, $mib) = @_;
  my $package = uc $mib;
  $package =~ s/-//g;
  if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} ||
      exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
    $self->debug("i know package "."Monitoring::GLPlugin::SNMP::MibsAndOids::".$package);
    return;
  } else {
    eval {
      my @oldkeys = ();
      $self->set_variable("verbosity", 2);
      if ($self->get_variable("verbose")) {
        my @oldkeys = exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} ?
            keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids} : 0;
      }
      $self->debug("load mib "."Monitoring::GLPlugin::SNMP::MibsAndOids::".$package);
      load "Monitoring::GLPlugin::SNMP::MibsAndOids::".$package;
      if ($self->get_variable("verbose")) {
        my @newkeys = exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} ?
            keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids} : 0;
        $self->debug(sprintf "now i know: %s", join(" ", sort @newkeys));
        $self->debug(sprintf "now i know %d keys.", scalar(@newkeys));
        if (scalar(@newkeys) <= scalar(@oldkeys)) {
          $self->debug(sprintf "from %d to %d keys. why did we load?",
              scalar(@oldkeys), scalar(@newkeys));
        }
      }
    };
    if ($@) {
      $self->debug("failed to load "."Monitoring::GLPlugin::SNMP::MibsAndOids::".$package);
    } else {
      if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::requirements->{$mib}) {
        foreach my $submib (@{$Monitoring::GLPlugin::SNMP::MibsAndOids::requirements->{$mib}}) {
          $self->require_mib($submib);
        }
      }
    }
  }
}

sub implements_mib {
  my ($self, $mib, $table) = @_;
  $self->require_mib($mib);
  if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
    return 0;
  }
  if (! $table) {
    my $sysobj = $self->get_snmp_object('MIB-2-MIB', 'sysObjectID', 0);
    $sysobj =~ s/^\.// if $sysobj;
    if ($sysobj && $sysobj eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
      $self->debug(sprintf "implements %s (sysobj exact)", $mib);
      return 1;
    }
    if ($sysobj && $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib} eq
        substr $sysobj, 0, length $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
      $self->debug(sprintf "implements %s (sysobj)", $mib);
      return 1;
    }
  }

  my $check_oid = $table ?
      $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$table} :
      $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib};

  # some mibs are only composed of tables
  my $traces;
  if ($self->opts->snmpwalk) {
    my @matches;
    # exact match  
    push(@matches, @{[map {
        $_, $self->rawdata->{$_}
    } grep {
        $_ eq $check_oid
    } keys %{$self->rawdata}]});

    # partial match (add trailing dot)  
    $check_oid =~ s/\.?$/./;
    push(@matches, @{[map {
        $_, $self->rawdata->{$_}
    } grep {
        substr($_, 0, length($check_oid)) eq $check_oid
    } keys %{$self->rawdata}]});
    $traces = {@matches};
  } else {
    my %params = (
        -varbindlist => [
            $check_oid
        ]
    );
    if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
      $params{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
      $params{-contextname} = $self->opts->contextname if $self->opts->contextname;
    }
    my $timeout = $Monitoring::GLPlugin::SNMP::session->timeout();
    $Monitoring::GLPlugin::SNMP::session->timeout(10);
    $traces = $Monitoring::GLPlugin::SNMP::session->get_next_request(%params);
    $Monitoring::GLPlugin::SNMP::session->timeout($timeout);
  }
  if ($traces && # must find oids following to the ident-oid
      ! exists $traces->{$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}} && # must not be the ident-oid
      grep { # following oid is inside this tree
          substr($_, 0, length($check_oid)) eq $check_oid
      } keys %{$traces}) {
    if (exists $traces->{$check_oid} &&
        $traces->{$check_oid} eq "endOfMibView") {
      return 0;
    }
    $self->debug(sprintf "implements %s (found traces)", $mib);
    return 1;
  }
}

sub timeticks {
  my ($self, $timestr) = @_;
  if ($timestr =~ /\((\d+)\)/) {
    # Timeticks: (20718727) 2 days, 9:33:07.27
    $timestr = $1 / 100;
  } elsif ($timestr =~ /(\d+)\s*day[s]*.*?(\d+):(\d+):(\d+)\.(\d+)/) {
    # Timeticks: 2 days, 9:33:07.27
    $timestr = $1 * 24 * 3600 + $2 * 3600 + $3 * 60 + $4;
  } elsif ($timestr =~ /(\d+):(\d+):(\d+):(\d+)\.(\d+)/) {
    # Timeticks: 0001:03:18:42.77
    $timestr = $1 * 3600 * 24 + $2 * 3600 + $3 * 60 + $4;
  } elsif ($timestr =~ /(\d+):(\d+):(\d+)\.(\d+)/) {
    # Timeticks: 9:33:07.27
    $timestr = $1 * 3600 + $2 * 60 + $3;
  } elsif ($timestr =~ /(\d+)\s*hour[s]*.*?(\d+):(\d+)\.(\d+)/) {
    # Timeticks: 3 hours, 42:17.98
    $timestr = $1 * 3600 + $2 * 60 + $3;
  } elsif ($timestr =~ /(\d+)\s*minute[s]*.*?(\d+)\.(\d+)/) {
    # Timeticks: 36 minutes, 01.96
    $timestr = $1 * 60 + $2;
  } elsif ($timestr =~ /(\d+)\.\d+\s*second[s]/) {
    # Timeticks: 01.02 seconds
    $timestr = $1;
  } elsif ($timestr =~ /^(\d+)$/) {
    $timestr = $1 / 100;
  }
  return $timestr;
}

sub human_timeticks {
  my ($self, $timeticks) = @_;
  my $days = int($timeticks / 86400);
  $timeticks -= ($days * 86400);
  my $hours = int($timeticks / 3600);
  $timeticks -= ($hours * 3600);
  my $minutes = int($timeticks / 60);
  my $seconds = $timeticks % 60;
  $days = $days < 1 ? '' : $days .'d ';
  return $days . sprintf "%dh %dm %ds", $hours, $minutes, $seconds;
}

sub internal_name {
  my ($self) = @_;
  my $class = ref($self);
  $class =~ s/^.*:://;
  if (exists $self->{flat_indices}) {
    return sprintf "%s_%s", uc $class, $self->{flat_indices};
  } else {
    return sprintf "%s", uc $class;
  }
}

################################################################
# file-related functions
#
sub create_interface_cache_file {
  my ($self) = @_;
  my $extension = "";
  if ($self->opts->snmpwalk && ! $self->opts->hostname) {
    $self->opts->override_opt('hostname',
        'snmpwalk.file'.md5_hex($self->opts->snmpwalk))
  }
  if ($self->opts->contextname) {
    $extension .= $self->opts->contextname . '_';
  }
  if ($self->opts->community) { 
    $extension .= md5_hex($self->opts->community);
  }
  $extension =~ s/\//_/g;
  $extension =~ s/\(/_/g;
  $extension =~ s/\)/_/g;
  $extension =~ s/\*/_/g;
  $extension =~ s/\s/_/g;
  return sprintf "%s/%s_interface_cache_%s", $self->statefilesdir(),
      $self->opts->hostname, lc $extension;
}

sub create_entry_cache_file {
  my ($self, $mib, $table, $key_attr_id) = @_;
  return lc sprintf "%s_%s_%s_%s_cache",
      $self->create_interface_cache_file(),
      $mib, $table, $key_attr_id;
}

sub update_entry_cache {
  my ($self, $force, $mib, $table, $key_attrs, $last_change) = @_;
  $self->debug(sprintf "last change of %s::%s was %s",
      $mib, $table, scalar localtime $last_change) if $last_change;
  my $update_deadline = time - 3600;
  if ($last_change) {
    # epoch timestamp, which is a hint when some table was last updated
    $update_deadline = ($last_change + 60)
        if $last_change > $update_deadline;
  }
  my $must_update = 0;
  if (ref($key_attrs) ne "ARRAY") {
    if ($key_attrs eq 'flat_indices') {
      # wird nur 1x verwendet bisher, bei OLD-CISCO-INTERFACES-MIB etherstats
      #my $entry = $table =~ s/Table/Entry/gr; # zu neu fuer centos6
      my $entry = $table;
      $entry =~ s/Table/Entry/g;
      my @sortednames = map {
          $_->[0]
      } sort {
          $a->[1] cmp $b->[1]
      } map {
          [$_, join '', map {
              sprintf("%30d", $_)
          } split( /\./, $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$_})];
      } grep {
          $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$_} =~ /^$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$entry}\./;
      } keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}};
      $key_attrs = $sortednames[0];
    }
    $key_attrs = [$key_attrs];
  }
  my $key_attr_id = join('#', @{$key_attrs});
  my $cache = sprintf "%s_%s_%s_cache", $mib, $table, $key_attr_id;
  my $statefile = $self->create_entry_cache_file($mib, $table, $key_attr_id);
  if ($force == -1 && -f $statefile) {
    $must_update = 1;
    # brauchts unter keinen umstaenden.
    # z.b. wenn ein vorhergehender update_interfaces_cache keine aenderungen
    # angezeigt hat, dann spart man sich hier den etherlike-update o.ae.
    $self->debug(sprintf 'skip update of %s %s %s %s cache',
        $self->opts->hostname, $self->opts->mode, $mib, $table);
  } elsif ($force != 0 || ! -f $statefile || ((stat $statefile)[9]) < ($update_deadline)) {
    $must_update = 1;
    $self->debug(sprintf 'force update of %s %s %s %s cache',
        $self->opts->hostname, $self->opts->mode, $mib, $table);
    $self->{$cache} = {};
    foreach my $entry ($self->get_snmp_table_objects($mib, $table, undef, $key_attrs)) {
      my $key = join('#', map { $entry->{$_} } @{$key_attrs});
      my $hash = $key . '-//-' . join('.', @{$entry->{indices}});
      $self->{$cache}->{$hash} = $entry->{indices};
    }
    $self->save_cache($mib, $table, $key_attrs);
  }
  $self->load_cache($mib, $table, $key_attrs);
  return $must_update;
}

sub save_cache {
  my ($self, $mib, $table, $key_attrs) = @_;
  my $cache = sprintf "%s_%s_%s_cache", $mib, $table, join('#', @{$key_attrs});
  $self->create_statefilesdir();
  my $statefile = $self->create_entry_cache_file($mib, $table, join('#', @{$key_attrs}));
  my $tmpfile = $statefile.$$.rand();
  my $fh = IO::File->new();
  if ($fh->open($tmpfile, "w")) {
    my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
    my $jsonscalar = $coder->encode($self->{$cache});
    $fh->print($jsonscalar);
    $fh->flush();
    $fh->close();
  }
  rename $tmpfile, $statefile;
  $self->debug(sprintf "saved %s to %s",
      Data::Dumper::Dumper($self->{$cache}), $statefile);
}

sub load_cache {
  my ($self, $mib, $table, $key_attrs) = @_;
  my $cache = sprintf "%s_%s_%s_cache", $mib, $table, join('#', @{$key_attrs});
  my $statefile = $self->create_entry_cache_file($mib, $table, join('#', @{$key_attrs}));
  $self->{$cache} = {};
  if ( -f $statefile) {
    my $jsonscalar = read_file($statefile);
    our $VAR1;
    eval {
      my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
      $VAR1 = $coder->decode($jsonscalar);
    };
    if($@) {
      $self->debug(sprintf "json load from %s failed. fallback", $statefile);
      delete $INC{$statefile} if exists $INC{$statefile}; # else unit tests fail
      eval "$jsonscalar";
      if($@) {
        printf "FATAL: Could not load cache in perl format!\n";
        $self->debug(sprintf "fallback perl load from %s failed", $statefile);
      }
    }
    $self->debug(sprintf "load %s", Data::Dumper::Dumper($VAR1));
    $self->{$cache} = $VAR1;
  }
}

################################################################
# top-level convenience functions
#
sub get_snmp_objects {
  my ($self, $mib, @mos) = @_;
  foreach (@mos) {
    my $value = $self->get_snmp_object($mib, $_);
    if (defined $value) {
      $self->{$_} = $value;
    }
  }
}

sub get_snmp_tables {
  my ($self, $mib, $infos) = @_;
  foreach my $info (@{$infos}) {
    my $arrayname = $info->[0];
    my $table = $info->[1];
    my $class = $info->[2];
    my $filter = $info->[3];
    my $rows = $info->[4];
    my $key_attr = $info->[5];
    $self->{$arrayname} = [] if ! exists $self->{$arrayname};
    if (! exists $Monitoring::GLPlugin::SNMP::tablecache->{$mib} || ! exists $Monitoring::GLPlugin::SNMP::tablecache->{$mib}->{$table}) {
      $Monitoring::GLPlugin::SNMP::tablecache->{$mib}->{$table} = [];
      foreach ($key_attr ?
          $self->get_snmp_table_objects_with_cache($mib, $table, $key_attr, $rows) :
          $self->get_snmp_table_objects($mib, $table, undef, $rows)) {
        push(@{$Monitoring::GLPlugin::SNMP::tablecache->{$mib}->{$table}}, $_);
        my $new_object = $class->new(%{$_});
        next if (defined $filter && ! &$filter($new_object));
        push(@{$self->{$arrayname}}, $new_object);
      }
    } else {
      $self->debug(sprintf "get_snmp_tables %s %s cache hit", $mib, $table);
      foreach (@{$Monitoring::GLPlugin::SNMP::tablecache->{$mib}->{$table}}) {
        my $new_object = $class->new(%{$_});
        next if (defined $filter && ! &$filter($new_object));
        push(@{$self->{$arrayname}}, $new_object);
      }
    }
  }
}

sub merge_tables {
  my ($self, $into, @from) = @_;
  my $into_indices = {};
  map { $into_indices->{$_->{flat_indices}} = $_ } @{$self->{$into}};
  foreach (@from) {
    foreach my $element (@{$self->{$_}}) {
      if (exists $into_indices->{$element->{flat_indices}}) {
        foreach my $key (keys %{$element}) {
          $into_indices->{$element->{flat_indices}}->{$key} = $element->{$key};
        }
      }
    }
    delete $self->{$_};
  }
}

sub merge_tables_with_code {
  my ($self, $into, @from) = @_;
  my $into_indices = {};
  my @to_del = ();
  foreach my $into_elem (@{$self->{$into}}) {
    for (my $i = 0; $i < @from; $i += 2) {
      my ($from_elems, $func) = @from[$i, $i+1];
      foreach my $from_elem (@{$self->{$from_elems}}) {
        if (&$func($into_elem, $from_elem)) {
          foreach my $key (grep !/^(info|trace|warning|critical|blacklisted|extendedinfo|flat_indices|indices)/, sort keys %{$from_elem}) {
            $into_elem->{$key} = $from_elem->{$key};
          }
        }
      }
    }
  }
  for (my $i = 0; $i < @from; $i += 2) {
    my ($from_elems, $func) = @from[$i, $i+1];
    delete $self->{$from_elems};
  }
}

sub mibs_and_oids_definition {
  my ($self, $mib, $definition, @values) = @_;
  if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} &&
      exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) {
    if (ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq "CODE") {
      return $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->(@values);
    } elsif (ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq "HASH") {
      return $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->{$values[0]};
    }
  } else {
    return "unknown_".$definition;
  }
}

sub clear_table_cache {
  my ($self, $mib, $table) = @_;
  if ($table && exists $Monitoring::GLPlugin::SNMP::tablecache->{$mib}) {
    delete $Monitoring::GLPlugin::SNMP::tablecache->{$mib}->{$table};
  } elsif ($mib) {
    delete $Monitoring::GLPlugin::SNMP::tablecache->{$mib};
  } else {
    $Monitoring::GLPlugin::SNMP::tablecache = {};
  }
}

################################################################
# 2nd level 
#
sub get_snmp_object {
  my ($self, $mib, $mo, $index) = @_;
  $self->require_mib($mib);
  my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$mo};
  if (defined $oid) {
    my $qoid = $oid.(defined $index ? '.'.$index : '');
    my $response = $self->get_request(-varbindlist => [$qoid]);
    if (defined $response->{$qoid}) {
      if ($response->{$qoid} eq 'noSuchInstance' || $response->{$qoid} eq 'noSuchObject') {
        $response->{$qoid} = undef;
      } elsif (my @symbols = $self->make_symbolic($mib, $response, [[$index]], { $oid => $mo })) {
        $response->{$oid} = $symbols[0]->{$mo};
      }
    }
    $self->debug(sprintf "GET: %s::%s (%s) : %s", $mib, $mo, $oid, defined $response->{$oid} ? $response->{$oid} : "<undef>");
    if (! defined $response->{$oid} && ! defined $index) {
      return $self->get_snmp_object($mib, $mo, 0);
    }
    return $response->{$oid};
  }
  return undef;
}

sub get_snmp_object_maybe {
    my ($self, @args) = @_;
    my $ret;

    # Just do a regular fetch when simulating
    return $self->get_snmp_object(@args) unless defined $Monitoring::GLPlugin::SNMP::session;

    # There may be no response at all. Turn the SNMP timeout down so we can
    # catch that without triggering SIGALRM
    my $orig_timeout = $Monitoring::GLPlugin::SNMP::session->timeout;
    my $new_timeout = $orig_timeout / 10;
    $new_timeout = 5 if $new_timeout > 5;
    $Monitoring::GLPlugin::SNMP::session->timeout($new_timeout);

    # Get
    $ret = $self->get_snmp_object(@args);

    # Restore timeout
    $Monitoring::GLPlugin::SNMP::session->timeout($orig_timeout);

    return $ret;
}

sub get_snmp_table_objects_with_cache {
  my ($self, $mib, $table, $key_attr, $rows, $force) = @_;
  $force ||= 0;
  $self->update_entry_cache($force, $mib, $table, $key_attr);
  my @indices = $self->get_cache_indices($mib, $table, $key_attr);
  my @entries = ();
  foreach ($self->get_snmp_table_objects($mib, $table, \@indices, $rows)) {
    push(@entries, $_);
  }
  return @entries;
}

sub get_table_row_oids {
  my ($self, $mib, $entry, $rows, $sym_lookup) = @_;
  $self->require_mib($mib);
  my $eoid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$entry}.'.';
  my $eoidlen = length($eoid);
  my @columns = scalar(@{$rows}) ?
  map {
      $sym_lookup->{$_->[1]} = $_->[0];
      $_->[1];
  } grep {
      substr($_->[1], 0, $eoidlen) eq $eoid
  } map {
      [$_, $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$_}]
  } @{$rows}
  :
  map {
      $sym_lookup->{$_->[1]} = $_->[0];
      $_->[1];
  } grep {
      substr($_->[1], 0, $eoidlen) eq $eoid
  } map {
      [$_, $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$_}]
  } keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}};
  return $self->sort_oids(\@columns);
}

# get_snmp_table_objects('MIB-Name', 'Table-Name', 'Table-Entry', [indices])
# returns array of hashrefs
sub get_snmp_table_objects {
  my ($self, $mib, $table, $indices, $rows) = @_;
  $indices ||= [];
  $rows ||= [];
  $self->require_mib($mib);
  my @entries = ();
  my @augmenting = ();
  my @augmenting_tables = ();
  my $sym_lookup = {};
  $self->debug(sprintf "get_snmp_table_objects %s %s", $mib, $table);
  if ($table =~ /^(.*?)\+(.*)/) {
    $table = $1;
    @augmenting_tables = split(/\+/, $2);
  }
  my $entry = $table;
  $entry =~ s/Table/Entry/g;
  if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} ||
      ! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$table}) {
    return ();
  }
  if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$entry}) {
    $self->debug(sprintf "table %s::%s has no entry oid", $mib, $table);
    $entry = $table;
    $entry =~ s/Table/TableEntry/g;
    if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$entry}) {
      return ();
    }
  }
  my $tableoid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$table};
  my $entryoid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$entry};
  my $augmenting_tableoid = undef;
  my @columns = $self->get_table_row_oids($mib, $entry, $rows, $sym_lookup);
  my @augmenting_columns = ();
  foreach my $augmenting_table (@augmenting_tables) {
    my $augmenting_entry = $augmenting_table;
    $augmenting_entry =~ s/Table/Entry/g;
    if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$augmenting_entry}) {
      $self->debug(sprintf "table %s::%s has no entry oid", $mib, $augmenting_table);
      $augmenting_entry = $augmenting_table;
      $augmenting_entry =~ s/Table/TableEntry/g;
      if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$augmenting_entry}) {
        $augmenting_entry = undef;
      }
    }
    if ($augmenting_entry) {
      $self->debug(sprintf "get_snmp_table_objects augment %s %s with %s", $mib, $table, $augmenting_table);
      @augmenting_columns = $self->get_table_row_oids($mib, $augmenting_entry, $rows, $sym_lookup);
      $augmenting_tableoid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$augmenting_table};
      push(@augmenting, [$augmenting_tableoid, \@augmenting_columns]);
    }
  }
  if (scalar(@{$indices}) == 1 && $indices->[0] == -1) {
    # get mini-version of a table
    my $result = $self->get_entries(
        -columns => \@columns,
    );
    foreach (@augmenting) {
      my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
      my $augmenting_result = $self->get_entries(
          -columns => \@augmenting_columns,
      );
      while (my ($key, $value) = each %{$augmenting_result}) {
        $result->{$key} = $value;
      }
    }
    my @indices = 
        $self->get_indices(
            -baseoid => $entryoid,
            -oids => [keys %{$result}]);
    @entries = map {
        $_->{indices} = shift @indices; $_
    } @entries = $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
    $self->debug(sprintf "get_snmp_table_objects mini returns %d entries",
        scalar(@entries));
  } elsif (scalar(@{$indices}) == 1) {
    my $index = join('.', @{$indices->[0]});
    my $result = $self->get_entries(
        -startindex => $index,
        -endindex => $index,
        -columns => \@columns,
    );
    foreach (@augmenting) {
      my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
      my $augmenting_result = $self->get_entries(
          -startindex => $index,
          -endindex => $index,
          -columns => \@augmenting_columns,
      );
      while (my ($key, $value) = each %{$augmenting_result}) {
        $result->{$key} = $value;
      }
    }
    @entries = map {
        $_->{indices} = shift @{$indices}; $_
    } $self->make_symbolic($mib, $result, $indices, $sym_lookup);
    $self->debug(sprintf "get_snmp_table_objects single returns %d entries",
        scalar(@entries));
  } elsif (scalar(@{$indices}) > 1) {
    my $result = {};
    my @sortedindices = $self->sort_indices($indices);
    my $startindex = $sortedindices[0];
    my $endindex = $sortedindices[$#sortedindices];
    if (0) {
      # holzweg. dicke ciscos liefern unvollstaendiges resultat, d.h.
      # bei 138,19,157 kommt nur 138..144, dann ist schluss.
      # maxrepetitions bringt nichts.
      #$result = $self->get_entries(
      #    -startindex => $startindex,
      #    -endindex => $endindex,
      #    -columns => \@columns,
      #);
      # anderer ansatz. zusammenhaengende sequenzen suchen und dann
      # mehrere bulkwalks absetzen. bringt aber nichts, wenn die indices
      # wild verstreut sind
      my @sequences = ();
      my $sequence;
      foreach my $idx (0..scalar(@sortedindices)-1) {
        if ($idx != 0 && $sortedindices[$idx] == $sortedindices[$idx-1]+1) {
          push(@{$sequence}, $sortedindices[$idx]);
        } else {
          $sequence = [$sortedindices[$idx]];
          push(@sequences, $sequence);
        }
      }
      foreach my $sequence (@sequences) {
        my $startindex = $sequence->[0];
        my $endindex = $sequence->[-1];
        my $tmp_result = $self->get_entries(
            -startindex => $startindex,
            -endindex => $endindex,
            -columns => \@columns,
        );
        while (my ($key, $value) = each %{$tmp_result}) {
          $result->{$key} = $value;
        }
      }
    } else {
      foreach my $idx (@sortedindices) {
        my $tmp_result = $self->get_entries(
            -startindex => $idx,
            -endindex => $idx,
            -columns => \@columns,
        );
        while (my ($key, $value) = each %{$tmp_result}) {
          $result->{$key} = $value;
        }
      }
    }
    foreach (@augmenting) {
      my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
      foreach my $idx (@sortedindices) {
        my $tmp_result = $self->get_entries(
            -startindex => $idx,
            -endindex => $idx,
            -columns => \@augmenting_columns,
        );
        while (my ($key, $value) = each %{$tmp_result}) {
          $result->{$key} = $value;
        }
      }
    }
    # now we have numerical_oid+index => value
    # needs to become symboic_oid => value
    @entries = map {
        $_->{indices} = shift @{$indices}; $_
    } $self->make_symbolic($mib, $result, $indices, $sym_lookup);
    $self->debug(sprintf "get_snmp_table_objects single returns %d entries",
        scalar(@entries));
  } elsif (scalar(@{$rows})) {
    my $result = $self->get_entries(
        -columns => \@columns,
    );
    foreach (@augmenting) {
      my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
      my $augmenting_result = $self->get_entries(
          -columns => \@augmenting_columns,
      );
      while (my ($key, $value) = each %{$augmenting_result}) {
        $result->{$key} = $value;
      }
    }
    my @indices =
        $self->get_indices(
            -baseoid => $entryoid,
            -oids => [keys %{$result}]);
    @entries = map {
        $_->{indices} = shift @indices; $_
    } $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
    $self->debug(sprintf "get_snmp_table_objects rows returns %d entries",
        scalar(@entries));
  } else {
    my $result = $self->get_table(
        -baseoid => $tableoid,
    );
    foreach (@augmenting) {
      my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
      my $augmenting_result = $self->get_table(
          -baseoid => $augmenting_tableoid,
      );
      while (my ($key, $value) = each %{$augmenting_result}) {
        $result->{$key} = $value;
      }
    }
    # now we have numerical_oid+index => value
    # needs to become symboic_oid => value
    my @indices = 
        $self->get_indices(
            -baseoid => $entryoid,
            -oids => [keys %{$result}]);
    @entries = map {
        $_->{indices} = shift @indices; $_
    } $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
    $self->debug(sprintf "get_snmp_table_objects default returns %d entries",
        scalar(@entries));
  }
  @entries = map { $_->{flat_indices} = join(".", @{$_->{indices}}); $_ } @entries;
  return @entries;
}

################################################################
# 3rd level functions. calling net::snmp-functions
# 
sub get_request {
  my ($self, %params) = @_;
  my @notcached = ();
  foreach my $oid (@{$params{'-varbindlist'}}) {
    $self->add_oidtrace($oid);
    if (! exists $Monitoring::GLPlugin::SNMP::rawdata->{$oid}) {
      push(@notcached, $oid);
    }
  }
  if (! $self->opts->snmpwalk && (scalar(@notcached) > 0)) {
    my %params = ();
    if ($Monitoring::GLPlugin::SNMP::session->version() == 0) {
      $params{-varbindlist} = \@notcached;
    } elsif ($Monitoring::GLPlugin::SNMP::session->version() == 1) {
      $params{-varbindlist} = \@notcached;
      #$params{-nonrepeaters} = scalar(@notcached);
    } elsif ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
      $params{-varbindlist} = \@notcached;
      $params{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
      $params{-contextname} = $self->opts->contextname if $self->opts->contextname;
    }
    my $result = $Monitoring::GLPlugin::SNMP::session->get_request(%params);
    # so, und jetzt gibts stinkstiefel, die kriegen
    # params{-varbindlist => [1.3.6.1.4.1.318.1.1.1.1.1.1]
    # und result ist
    # { 1.3.6.1.4.1.318.1.1.1.1.1.1.0 => "Smart-UPS RT 10000 XL" }
    # letzteres kommt in raw_data
    # und beim abschliessenden map wirds natuerlich nicht mehr gefunden 
    # also leeres return. <<kraftausdruck>>
    while (my ($key, $value) = each %{$result}) {
      # so, und zwei jahre spaeter kommt man drauf, dass es viele sorten 
      # von stinkstiefeln gibt. die fragt man nach 1.3.6.1.4.1.13885.120.1.3.1
      # und kriegt als antwort 1.3.6.1.4.1.13885.120.1.3.1.0=[noSuchInstance]
      # bis zum 11.10.16 wurde das in den cache geschrieben. eine etage hoeher
      # wird aber dann nach 1.3.6.1.4.1.13885.120.1.3.1.0 gefallbacked, was
      # dann prompt aus dem cache gefischt wird, anstatt den agenten zu fragen,
      # der in diesem fall eine saubere antwort liefern wuerde.
      # ergo: keine fehlermeldungen in den chache
      $self->add_rawdata($key, $value) if defined $value && $value ne 'noSuchInstance';
    }
  }
  my $result = {};
  map {
      $result->{$_} = exists $Monitoring::GLPlugin::SNMP::rawdata->{$_} ?
          $Monitoring::GLPlugin::SNMP::rawdata->{$_} :
      exists $Monitoring::GLPlugin::SNMP::rawdata->{$_.'.0'} ?
          $Monitoring::GLPlugin::SNMP::rawdata->{$_.'.0'} : undef;
  } @{$params{'-varbindlist'}};
  return $result;
}

sub get_entries_get_bulk {
  my ($self, %params) = @_;
  my $result = {};
  my %newparams = ();
  $newparams{'-startindex'} = $params{'-startindex'}
      if defined $params{'-startindex'};
  $newparams{'-endindex'} = $params{'-endindex'}
      if defined $params{'-endindex'};
  $newparams{'-columns'} = $params{'-columns'};
  if ($Monitoring::GLPlugin::SNMP::maxrepetitions) {
    $newparams{'-maxrepetitions'} = $Monitoring::GLPlugin::SNMP::maxrepetitions;
  } else {
    $newparams{'-maxrepetitions'} = 3;
  }
  $self->debug(sprintf "get_entries_get_bulk %s", Data::Dumper::Dumper(\%newparams));
  if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
    $newparams{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
    $newparams{-contextname} = $self->opts->contextname if $self->opts->contextname;
  }
  delete $newparams{'-maxrepetitions'}; # bulk howe gsagt!!
  $result = $Monitoring::GLPlugin::SNMP::session->get_entries(%newparams);
  return $result;
}

sub get_entries_get_next {
  my ($self, %params) = @_;
  my $result = {};
  my %newparams = ();
  $newparams{'-maxrepetitions'} = 0;
  $newparams{'-startindex'} = $params{'-startindex'}
      if defined $params{'-startindex'};
  $newparams{'-endindex'} = $params{'-endindex'}
      if defined $params{'-endindex'};
  $newparams{'-columns'} = $params{'-columns'};
  $self->debug(sprintf "get_entries_get_next %s", Data::Dumper::Dumper(\%newparams));
  if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
    $newparams{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
    $newparams{-contextname} = $self->opts->contextname if $self->opts->contextname;
  }
  $result = $Monitoring::GLPlugin::SNMP::session->get_entries(%newparams);
  return $result;
}

sub get_entries_get_next_1index {
  my ($self, %params) = @_;
  my $result = {};
  my %newparams = ();
  $newparams{'-startindex'} = $params{'-startindex'}
      if defined $params{'-startindex'};
  $newparams{'-endindex'} = $params{'-endindex'}
      if defined $params{'-endindex'};
  $newparams{'-columns'} = $params{'-columns'};
  $self->debug(sprintf "get_entries_get_next_1index %s", Data::Dumper::Dumper(\%newparams));
  my %singleparams = ();
  $singleparams{'-maxrepetitions'} = 0;
  if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
    $singleparams{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
    $singleparams{-contextname} = $self->opts->contextname if $self->opts->contextname;
  }
  foreach my $index ($newparams{'-startindex'}..$newparams{'-endindex'}) {
    foreach my $oid (@{$newparams{'-columns'}}) {
      $singleparams{'-columns'} = [$oid];
      $singleparams{'-startindex'} = $index;
      $singleparams{'-endindex'} =$index;
      my $singleresult = $Monitoring::GLPlugin::SNMP::session->get_entries(%singleparams);
      while (my ($key, $value) = each %{$singleresult}) {
        $result->{$key} = $value;
      }
    }
  }
  return $result;
}

sub get_entries_get_simple {
  my ($self, %params) = @_;
  my $result = {};
  my %newparams = ();
  $newparams{'-startindex'} = $params{'-startindex'}
      if defined $params{'-startindex'};
  $newparams{'-endindex'} = $params{'-endindex'}
      if defined $params{'-endindex'};
  $newparams{'-columns'} = $params{'-columns'};
  $self->debug(sprintf "get_entries_get_simple %s", Data::Dumper::Dumper(\%newparams));
  my %singleparams = ();
  if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
    $singleparams{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
    $singleparams{-contextname} = $self->opts->contextname if $self->opts->contextname;
  }
  foreach my $index ($newparams{'-startindex'}..$newparams{'-endindex'}) {
    foreach my $oid (@{$newparams{'-columns'}}) {
      $singleparams{'-varbindlist'} = [$oid.".".$index];
      my $singleresult = $Monitoring::GLPlugin::SNMP::session->get_request(%singleparams);
      while (my ($key, $value) = each %{$singleresult}) {
        if ($value eq "noSuchObject" ||
            $value eq "noSuchInstance" ||
            $value eq "endOfMibView") {
          $result->{$key} = undef;
        } else {
          $result->{$key} = $value;
        }
      }
    }
  }
  return $result;
}

sub get_entries {
  my ($self, %params) = @_;
  # [-startindex]
  # [-endindex]
  # -columns
  $params{'-columns'} = [$self->sort_oids($params{'-columns'})];
  my $result = {};
  $self->debug(sprintf "get_entries %s", Data::Dumper::Dumper(\%params));
  if (! $self->opts->snmpwalk) {
    if (scalar (@{$params{'-columns'}}) < 5 && $params{'-endindex'} && $params{'-startindex'} eq $params{'-endindex'}) {
      $result = $self->get_entries_get_simple(%params);
    } else {
      $result = $self->get_entries_get_bulk(%params);
      if (! $result) {
        $self->debug("bulk failed, retry simple");
        # The message size exceeded the buffer maxMsgSize of (\d+)
        # Message size exceeded buffer maxMsgSize
        if ($Monitoring::GLPlugin::SNMP::session->error() =~ /message size exceeded.*buffer maxMsgSize/i) {
          # old methos. might be no good idea for wan
          #$self->debug(sprintf "buffer exceeded. raise *5 for next try");
          #$self->mult_snmp_max_msg_size(5);
          $self->debug(sprintf "buffer exceeded. lower repetitions for next try");
          $self->bulk_is_baeh($self->get_max_repetitions() * 0.75);
        } elsif ($Monitoring::GLPlugin::SNMP::session->error() =~ /Authentication failure/ && $Monitoring::GLPlugin::SNMP::session->max_msg_size() > 10) {
          $self->debug("A so a Rimbfiech, so a saudumms. Aaf oamol kennda me nimmer");
          # australische Nexus. Bulkwalk mit hochgedrehten max_repetitions (*128)
          # fuehrt so so einem fake Authentication failure
          $self->mult_snmp_max_msg_size(5);
          $result = $self->get_entries(%params);
        } else {
          $self->debug($Monitoring::GLPlugin::SNMP::session->error());
        }
        if ($result) {
          # Rimbfiech fallback was successful
        } elsif (defined $params{'-endindex'} && defined $params{'-startindex'}) {
          $result = $self->get_entries_get_simple(%params);
        } else {
          $result = $self->get_entries_get_next(%params);
        }
      }
    }
    if (! $result) {
      $result = $self->get_entries_get_next(%params);
      if (! $result && defined $params{'-startindex'} && $params{'-startindex'} !~ /\./) {
        # compound indexes cannot continue, as these two methods iterate numerically
        if ($Monitoring::GLPlugin::SNMP::session->error() =~ /tooBig/i) {
          $self->debug(sprintf "answer too big");
          $result = $self->get_entries_get_next_1index(%params);
        }
        if (! $result) {
          $result = $self->get_entries_get_simple(%params);
        }
        if (! $result) {
          $self->debug(sprintf "nutzt nix\n");
        }
      }
    }
    foreach my $key (keys %{$result}) {
      if (substr($key, -1) eq " ") {
        my $value = $result->{$key};
        delete $result->{$key};
        $key =~ s/\s+$//g;
        $result->{$key} = $value;
        #
        # warum?
        #
        # %newparams ist:
        #  '-columns' => [
        #                  '1.3.6.1.2.1.2.2.1.8',
        #                  '1.3.6.1.2.1.2.2.1.13',
        #                  ...
        #                  '1.3.6.1.2.1.2.2.1.16'
        #                ],
        #  '-startindex' => '2',
        #  '-endindex' => '2'
        #
        # und $result ist:
        #  ...
        #  '1.3.6.1.2.1.2.2.1.2.2' => 'Adaptive Security Appliance \'outside\' interface',
        #  '1.3.6.1.2.1.2.2.1.16.2 ' => 4281465004,
        #  '1.3.6.1.2.1.2.2.1.13.2' => 0,
        #  ...
        #
        # stinkstiefel!
        #
      }
      $self->add_rawdata($key, $result->{$key});
    }
  } else {
    my $preresult = $self->get_matching_oids(
        -columns => $params{'-columns'});
    while (my ($key, $value) = each %{$preresult}) {
      $result->{$key} = $value;
    }
    my @sortedkeys = $self->sort_oids([keys %{$result}]);
    my @to_del = ();
    if ($params{'-startindex'}) {
      foreach my $resoid (@sortedkeys) {
        foreach my $oid (@{$params{'-columns'}}) {
          my $poid = $oid.'.';
          my $lpoid = length($poid);
          if (substr($resoid, 0, $lpoid) eq $poid) {
            my $oidpattern = $poid;
            $oidpattern =~ s/\./\\./g;
            if ($resoid =~ /^$oidpattern(.+)$/) {
              if ($1 lt $params{'-startindex'}) {
                push(@to_del, $oid.'.'.$1);
              }
            }
          }
        }
      }
    }
    if ($params{'-endindex'}) {
      foreach my $resoid (@sortedkeys) {
        foreach my $oid (@{$params{'-columns'}}) {
          my $poid = $oid.'.';
          my $lpoid = length($poid);
          if (substr($resoid, 0, $lpoid) eq $poid) {
            my $oidpattern = $poid;
            $oidpattern =~ s/\./\\./g;
            if ($resoid =~ /^$oidpattern(.+)$/) {
              if ($1 gt $params{'-endindex'}) {
                push(@to_del, $oid.'.'.$1);
              }
            }
          }
        }
      }
    }
    foreach (@to_del) {
      delete $result->{$_};
    }
  }
  return $result;
}

sub get_entries_by_walk {
  my ($self, %params) = @_;
  if (! $self->opts->snmpwalk) {
    $self->add_ok("if you get this crap working correctly, let me know");
    if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
      $params{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
      $params{-contextname} = $self->opts->contextname if $self->opts->contextname;
    }
    $self->debug(sprintf "get_tree %s", Data::Dumper::Dumper(\%params));
    my @baseoids = @{$params{-varbindlist}};
    delete $params{-varbindlist};
    if ($Monitoring::GLPlugin::SNMP::session->version() == 0) {
      foreach my $baseoid (@baseoids) {
        $params{-varbindlist} = [$baseoid];
        while (my $result = $Monitoring::GLPlugin::SNMP::session->get_next_request(%params)) {
          $params{-varbindlist} = [($Monitoring::GLPlugin::SNMP::session->var_bind_names)[0]];
        }
      }
    } else {
      $params{-maxrepetitions} = 200;
      foreach my $baseoid (@baseoids) {
        $params{-varbindlist} = [$baseoid];
        while (my $result = $Monitoring::GLPlugin::SNMP::session->get_bulk_request(%params)) {
          my @names = $Monitoring::GLPlugin::SNMP::session->var_bind_names();
          my @oids = $self->sort_oids(\@names);
          foreach (keys %{$result}) {
            $self->add_rawdata($_, $result->{$_});
          }
          $params{-varbindlist} = [pop @oids];
        }
      }
    }
  } else {
    return $self->get_matching_oids(
        -columns => $params{-varbindlist});
  }
}

sub get_table {
  my ($self, %params) = @_;
  my $tic;
  my $tac;
  $self->add_oidtrace($params{'-baseoid'});
  if (! $self->opts->snmpwalk) {
    my @notcached = ();
    if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
      $params{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
      $params{-contextname} = $self->opts->contextname if $self->opts->contextname;
    }
    if ($Monitoring::GLPlugin::SNMP::maxrepetitions) {
      # some devices (Bintec) don't like bulk-requests. They call bulk_is_baeh(), so
      # we immediately send get-next
      $params{'-maxrepetitions'} = $Monitoring::GLPlugin::SNMP::maxrepetitions;
    }
    $self->debug(sprintf "get_table %s", Data::Dumper::Dumper(\%params));
    $tic = time;
    my $result = $Monitoring::GLPlugin::SNMP::session->get_table(%params);
    $tac = time;
    if (! defined $result || (defined $result && ! %{$result})) {
      $self->debug(sprintf "get_table error: %s", 
          $Monitoring::GLPlugin::SNMP::session->error());
      my $fallback = 0;
      if ($Monitoring::GLPlugin::SNMP::session->error() =~ /message size exceeded.*buffer maxMsgSize/i) {
        # bei irrsinnigen maxrepetitions
        $self->debug(sprintf "buffer exceeded");
        #$self->reset_snmp_max_msg_size();
        if ($params{'-maxrepetitions'}) {
          $params{'-maxrepetitions'} = int($params{'-maxrepetitions'} / 2);
          $self->debug(sprintf "reduce maxrepetitions to %d",
              $params{'-maxrepetitions'});
        } else {
          $self->mult_snmp_max_msg_size(2);
        }
        $fallback = 1;
      } elsif ($Monitoring::GLPlugin::SNMP::session->error() =~ /No response from remote host/i) {
        # some agents can not handle big loads
        if ($params{'-maxrepetitions'}) {
          $params{'-maxrepetitions'} = int($params{'-maxrepetitions'} / 2);
          $self->debug(sprintf "reduce maxrepetitions to %d",
              $params{'-maxrepetitions'});
          $fallback = 1;
        }
      }
      if ($fallback) {
        $self->debug("get_table error: try fallback");
        $self->debug(sprintf "get_table %s", Data::Dumper::Dumper(\%params));
        $tic = time;
        $result = $Monitoring::GLPlugin::SNMP::session->get_table(%params);
        $tac = time;
        $self->debug(sprintf "get_table returned %d oids in %ds", scalar(keys %{$result}), $tac - $tic);
      }
      if (! defined $result || ! %{$result}) {
        $self->debug(sprintf "get_table error: %s", 
            $Monitoring::GLPlugin::SNMP::session->error());
        if (exists $params{'-maxrepetitions'} && $params{'-maxrepetitions'} > 1) {
          $params{'-maxrepetitions'} = 1;
          $self->debug("get_table error: try getnext fallback");
          $self->debug(sprintf "get_table %s", Data::Dumper::Dumper(\%params));
          $tic = time;
          $result = $Monitoring::GLPlugin::SNMP::session->get_table(%params);
          $tac = time;
          $self->debug(sprintf "get_table returned %d oids in %ds", scalar(keys %{$result}), $tac - $tic);
        }
        if (! defined $result || ! %{$result}) {
          $self->debug("get_table error: no more fallbacks. Try --protocol 1");
        }
      }
    }
    $result = {} if ! defined $result;
    # Drecksstinkstiefel Net::SNMP
    # '1.3.6.1.2.1.2.2.1.22.4 ' => 'endOfMibView',
    # '1.3.6.1.2.1.2.2.1.22.4' => '0.0',
    my $num_rows = 0;
    my @blank_keys = ();
    while (my ($key, $value) = each %{$result}) {
      $num_rows++;
      if (substr($key, -1) eq " ") {
        push(@blank_keys, $key);
      } else {
        $self->add_rawdata($key, $value);
      }
    }
    $self->debug(sprintf "get_table returned %d oids in %ds", $num_rows, $tac - $tic);
    foreach my $key (@blank_keys) {
      my $value = $result->{$key};
      delete $result->{$key};
      (my $shortkey = $key) =~ s/\s+$//g;
      if (! exists $result->{shortkey}) {
        $self->add_rawdata($shortkey, $value);
      }
    }
  }
  return $self->get_matching_oids(
      -columns => [$params{'-baseoid'}]);
}

################################################################
# helper functions
# 
sub valid_response {
  my ($self, $mib, $mo, $index) = @_;
  $self->require_mib($mib);
  if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} &&
      exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$mo}) {
    # make it numerical
    my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$mo};
    if (defined $index) {
      $oid .= '.'.$index;
    }
    my $result = $self->get_request(
        -varbindlist => [$oid]
    );
    if (! defined($result) ||
        ! defined $result->{$oid} ||
        $result->{$oid} eq 'noSuchInstance' ||
        $result->{$oid} eq 'noSuchObject' ||
        $result->{$oid} eq 'endOfMibView') {
      $self->debug(sprintf "GET: %s::%s (%s) : %s", $mib, $mo, $oid, defined $result->{$oid} ? $result->{$oid} : "<undef>");
      return undef;
    } else {
      $self->debug(sprintf "GET: %s::%s (%s) : %s", $mib, $mo, $oid, defined $result->{$oid} ? $result->{$oid} : "<undef>");
      $self->add_rawdata($oid, $result->{$oid});
      return $result->{$oid};
    }
  } else {
    return undef;
  }
}

sub get_symbol {
  my ($self, $mib, $oid) = @_;
  # "LIEBERT-GP-ENVIRONMENTAL-MIB", "1.3.6.1.4.1.476.1.42.3.4.1.1.4"
  # dahinter steckt
  # lgpEnvSupplyAirTemperature => '1.3.6.1.4.1.476.1.42.3.4.1.1.3'
  # lgpAmbientTemperature => '1.3.6.1.4.1.476.1.42.3.4.1.1.4'
  # und als info vom geraet
  # LgpEnvTemperatureMeasurementDegC = '1.3.6.1.4.1.476.1.42.3.4.1.1.4'
  # der name des temp. sensor wird ueber die oid mitgeteilt
  $self->require_mib($mib);
  $oid =~ s/^\.//g;
  foreach my $symoid
      (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}}) {
    if ($oid eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid}) {
      return $symoid;
    }
  }
  return undef;
}

# make_symbolic
# mib is the name of a mib (must be in mibs_and_oids)
# result is a hash-key oid->value
# indices is a array ref of array refs. [[1],[2],...] or [[1,0],[1,1],[2,0]..
sub make_symbolic {
  my ($self, $mib, $result, $indices, $sym_lookup) = @_;
  $self->require_mib($mib);
  my @entries = ();
  if (! wantarray && ref(\$result) eq "SCALAR" && ref(\$indices) eq "SCALAR") {
    # $self->make_symbolic('CISCO-IETF-NAT-MIB', 'cnatProtocolStatsName', $self->{cnatProtocolStatsName});
    my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$result};
    $result = { $oid => $self->{$result} };
    $indices = [[]];
  }
  foreach my $index (@{$indices}) {
    # skip [], [[]], [[undef]]
    if (ref($index) eq "ARRAY") {
      if (scalar(@{$index}) == 0) {
        next;
      } elsif (!defined $index->[0]) {
        next;
      }
    }
    my $mo = {};
    my $idx = join('.', @{$index}); # index can be multi-level
    if (! $sym_lookup) {
      foreach my $symoid
          (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}}) {
        my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid};
        if (ref($oid) ne 'HASH') {
          my $fulloid = $oid . '.'.$idx;
          if (exists $result->{$fulloid}) {
            if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}) {
              if (ref($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}) eq 'HASH') {
                if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}->{$result->{$fulloid}}) {
                  $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}->{$result->{$fulloid}};
                } else {
                  $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                }
              } elsif ($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'} =~ /^OID::(.*)/) {
                my $othermib = $1;
                if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$othermib}) {
                  # may point to another mib's definitions, which hasn't
                  # been used yet.
                  $self->require_mib($othermib);
                }
                my $value_which_is_a_oid = $result->{$fulloid};
                $value_which_is_a_oid =~ s/^\.//g;
                my @result = grep { $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$othermib}->{$_} eq $value_which_is_a_oid } keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$othermib}};
                if (scalar(@result)) {
                  $mo->{$symoid} = $result[0];
                } else {
                  $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                }
              } elsif ($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'} =~ /^(.*?)::(.*)/) {
                my $mib = $1;
                my $definition = $2;
                my $parameters = undef;
                if ($definition =~ /(.*)\((.*)\)/) {
                  $definition = $1;
                  $parameters = $2;
                }
                if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}) {
                  # may point to another mib's definitions, which hasn't
                  # been used yet.
                  $self->require_mib($mib);
                }
                if  (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} &&
                    exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
                    ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'CODE') {
                  if ($parameters) {
                    my @args = ($result->{$fulloid});
                    foreach my $parameter (split(",", $parameters)) {
                      if (! exists $mo->{$parameter}) {
                        # this happens if there are two isolated get_snmp_object calls, one for
                        # cLHaPeerIpAddressType and one for cLHaPeerIpAddress where the latter needs
                        # the symbolized value of the first. we are inside this index-loop because
                        # both have this usual extra .0 although this is not a table row.
                        # if this were a table row, $mo would know cLHaPeerIpAddressType.
                        # there's a chance that $self got cLHaPeerIpAddressType in a previous call
                        # to make_symbolic
                        if (@{$indices} and scalar(@{$indices}) == 1 and ! $indices->[0]->[0]) {
                          $mo->{$parameter} = $self->{$parameter};
                        }
                      }
                      push(@args, $mo->{$parameter});
                    }
                    $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->(@args);
                  } else {
                    $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$fulloid});
                  }
                } elsif  (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} &&
                    exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
                    ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'HASH' &&
                    exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->{$result->{$fulloid}}) {
                  $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->{$result->{$fulloid}};
                } else {
                  $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                }
              } else {
                $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                # oder $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}?
              }
            } else {
              $mo->{$symoid} = $result->{$fulloid};
            }
          }
        }
      }
    } else {
      my @sym_lookup_keys = $self->sort_oids([keys %{$sym_lookup}]);
      foreach my $oid (@sym_lookup_keys) {
        if (ref($oid) ne 'HASH') {
          my $fulloid = $oid . '.'.$idx;
          my $symoid = $sym_lookup->{$oid};
          if (exists $result->{$fulloid}) {
            if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}) {
              if (ref($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}) eq 'HASH') {
                if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}->{$result->{$fulloid}}) {
                  $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}->{$result->{$fulloid}};
                } else {
                  $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                }
              } elsif ($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'} =~ /^OID::(.*)/) {
                my $othermib = $1;
                if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$othermib}) {
                  # may point to another mib's definitions, which hasn't
                  # been used yet.
                  $self->require_mib($othermib);
                }
                my $value_which_is_a_oid = $result->{$fulloid};
                $value_which_is_a_oid =~ s/^\.//g;
                my @result = grep { $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$othermib}->{$_} eq $value_which_is_a_oid } keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$othermib}};
                if (scalar(@result)) {
                  $mo->{$symoid} = $result[0];
                } else {
                  $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                }
              } elsif ($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'} =~ /^(.*?)::(.*)/) {
                my $mib = $1;
                my $definition = $2;
                my $parameters = undef;
                if ($definition =~ /(.*)\((.*)\)/) {
                  $definition = $1;
                  $parameters = $2;
                }
                if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}) {
                  # may point to another mib's definitions, which hasn't
                  # been used yet.
                  $self->require_mib($mib);
                }
                if  (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} &&
                    exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
                    ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'CODE') {
                  if ($parameters) {
                    my @args = ($result->{$fulloid});
                    foreach my $parameter (split(",", $parameters)) {
                      if (! exists $mo->{$parameter}) {
                        if (@{$indices} and scalar(@{$indices}) == 1 and ! $indices->[0]->[0]) {
                          $mo->{$parameter} = $self->{$parameter};
                        }
                      }
                      push(@args, $mo->{$parameter});
                    }
                    $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->(@args);
                  } else {
                    $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$fulloid});
                  }
                } elsif  (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} &&
                    exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
                    ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'HASH' &&
                    exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->{$result->{$fulloid}}) {
                  $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->{$result->{$fulloid}};
                } else {
                  $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                }
              } else {
                $mo->{$symoid} = 'unknown_'.$result->{$fulloid};
                # oder $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}?
              }
            } else {
              $mo->{$symoid} = $result->{$fulloid};
            }
          }
        }
      }
    }
    push(@entries, $mo);
  }
  if (@{$indices} and scalar(@{$indices}) == 1 and !defined $indices->[0]->[0]) {
    my $mo = {};
    my @lookup_keys = ();
    if (! $sym_lookup) {
      @lookup_keys = keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}};
    } else {
      @lookup_keys = values %{$sym_lookup};
    }
    foreach my $symoid (@lookup_keys) {
      my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid};
      if (ref($oid) ne 'HASH') {
        if (exists $result->{$oid}) {
          if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}) {
            if (ref($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}) eq 'HASH') {
              if (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}->{$result->{$oid}}) {
                $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}->{$result->{$oid}};
                push(@entries, $mo);
              }
            } elsif ($Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'} =~ /^(.*?)::(.*)/) {
              my $mib = $1;
              my $definition = $2;
              my $parameters = undef;
              if ($definition =~ /(.*)\((.*)\)/) {
                $definition = $1;
                $parameters = $2;
              }
              if  (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} &&
                  exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
                  ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'CODE') {
                if ($parameters) {
                  # we come here fo resolve single oids, so $mo is always initialized new here.
                  # there's a chance that $self->{$parameters} was queried in a previous call
                  if (! exists $mo->{$parameters}) {
                    $mo->{$parameters} = $self->{$parameters};
                  }
                  $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$oid}, $mo->{$parameters});
                } else {
                  $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$oid});
                }
              } elsif  (exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} &&
                  exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
                  ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'HASH' &&
                  exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->{$result->{$oid}}) {
                $mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->{$result->{$oid}};
              } else {
                $mo->{$symoid} = 'unknown_'.$result->{$oid};
              }
            } else {
              $mo->{$symoid} = 'unknown_'.$result->{$oid};
              # oder $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}?
            }
          } else {
            $mo->{$symoid} = $result->{$oid};
          }
        }
      }
    }
    push(@entries, $mo) if keys %{$mo};
  }
  if (wantarray) {
    return @entries;
  } else {
    foreach my $entry (@entries) {
      foreach my $key (keys %{$entry}) {
        $self->{$key} = $entry->{$key};
      }
    }
  }
}

sub sort_oids {
  my ($self, $oids) = @_;
  $oids ||= [];
  my @sortedkeys = map { $_->[0] }
      sort { $a->[1] cmp $b->[1] }
          map { [$_,
                  join '', map { sprintf("%30d",$_) } split( /\./, $_)
                ] } @{$oids};
  return @sortedkeys;
}

sub sort_indices {
  my ($self, $indices) = @_;
  my @sortedindices = map { $_->[0] } 
      sort { $a->[1] cmp $b->[1] } 
          map { [$_, 
              join '', map { sprintf("%30d",$_) } split( /\./, $_) 
          ] } map { join('.', @{$_})} @{$indices}; 
  return @sortedindices;
}


sub get_matching_oids {
  my ($self, %params) = @_;
  my $result = {};
  $self->debug(sprintf "get_matching_oids %s", Data::Dumper::Dumper(\%params));
  foreach my $oid (@{$params{'-columns'}}) {
    while (my ($key, $value) = each %{$Monitoring::GLPlugin::SNMP::rawdata}) {
      # oid 1.3.6.1.4.1.9999.12.3.4
      # raw 1.3.6.1.4.1.9999.12.3.4.2.3
      # raw 1.3.6.1.4.1.9999.12.3.41.10.2
      # raw 1.3.6.1.4.1.9999.12.3.4
      if (rindex($key, $oid, 0) == 0) {
        my $len = length($oid);
        if ($len == length($key)) {
          $result->{$key} = $value;
        } elsif (substr($key, $len, 1) eq ".") {
          $result->{$key} = $value;
        }
      }
    }
    #my $oidpattern = $oid;
    #$oidpattern =~ s/\./\\./g;
    #map { $result->{$_} = $Monitoring::GLPlugin::SNMP::rawdata->{$_} }
    #    grep /^$oidpattern(?=\.|$)/, keys %{$Monitoring::GLPlugin::SNMP::rawdata};
  }
  $self->debug(sprintf "get_matching_oids returns %d from %d oids", 
      scalar(keys %{$result}), scalar(keys %{$Monitoring::GLPlugin::SNMP::rawdata}));
  return $result;
}

sub get_indices {
  my ($self, %params) = @_;
  # -baseoid : entry
  # find all oids beginning with $entry
  # then skip one field for the sequence
  # then read the next numindices fields
  my $entry = $params{'-baseoid'};
  my $entrypat = $entry;
  my %seen = ();
  $entrypat =~ s/\./\\\./g;
  map {
      $seen{$1} = 1 if /^$entrypat\.\d+\.(.*)/;
  } grep {
      rindex($_, $entry) == 0;
  } keys %{$Monitoring::GLPlugin::SNMP::rawdata};
  my @o = map {[split /\./]} sort keys %seen;
  return @o;
}

# this flattens a n-dimensional array and returns the absolute position
# of the element at position idx1,idx2,...,idxn
# element 1,2 in table 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 is at pos 6
sub get_number {
  my ($self, $indexlists, @element) = @_;
  # $indexlists = zeiger auf array aus [1, 2]
  my $dimensions = scalar(@{$indexlists->[0]});
  my @sorted = ();
  my $number = 0;
  if ($dimensions == 1) {
    @sorted =
        sort { $a->[0] <=> $b->[0] } @{$indexlists};
  } elsif ($dimensions == 2) {
    @sorted =
        sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } @{$indexlists};
  } elsif ($dimensions == 3) {
    @sorted =
        sort { $a->[0] <=> $b->[0] ||
               $a->[1] <=> $b->[1] ||
               $a->[2] <=> $b->[2] } @{$indexlists};
  }
  foreach (@sorted) {
    if ($dimensions == 1) {
      if ($_->[0] == $element[0]) {
        last;
      }
    } elsif ($dimensions == 2) {
      if ($_->[0] == $element[0] && $_->[1] == $element[1]) {
        last;
      }
    } elsif ($dimensions == 3) {
      if ($_->[0] == $element[0] &&
          $_->[1] == $element[1] &&
          $_->[2] == $element[2]) {
        last;
      }
    }
    $number++;
  }
  return ++$number;
}

################################################################
# caching functions
# 
sub set_rawdata {
  my ($self, $rawdata) = @_;
  $Monitoring::GLPlugin::SNMP::rawdata = $rawdata;
}

sub add_rawdata {
  my ($self, $oid, $value) = @_;
  $Monitoring::GLPlugin::SNMP::rawdata->{$oid} = $value;
}

sub rawdata {
  my ($self) = @_;
  return $Monitoring::GLPlugin::SNMP::rawdata;
}

sub add_oidtrace {
  my ($self, $oid) = @_;
  $self->debug("cache: ".$oid);
  push(@{$Monitoring::GLPlugin::SNMP::oidtrace}, $oid);
}

#  $self->update_entry_cache(0, $mib, $table, $key_attr);
#  my @indices = $self->get_cache_indices();
sub get_cache_indices {
  my ($self, $mib, $table, $key_attr) = @_;
  # get_cache_indices is only used by get_snmp_table_objects_with_cache
  # so if we dont use --name returning all the indices would result
  # in a step-by-step get_table_objecs(index 1...n) which could take long
  # time when used with nexus or f5 pools
  # returning () forces get_snmp_table_objects to use get_tables
  return () if ! $self->opts->name;
  if (ref($key_attr) ne "ARRAY") {
    $key_attr = [$key_attr];
  }
  my $cache = sprintf "%s_%s_%s_cache", 
      $mib, $table, join('#', @{$key_attr});
  my @indices = ();
  foreach my $key (keys %{$self->{$cache}}) {
    my ($descr, $index) = split('-//-', $key, 2);
    if ($self->opts->name) {
      if ($self->opts->regexp) {
        my $pattern = $self->opts->name;
        if ($descr =~ /$pattern/i) {
          push(@indices, $self->{$cache}->{$key});
        }
      } else {
        if ($self->opts->name =~ /^\d+$/) {
          if ($index == 1 * $self->opts->name) {
            push(@indices, [1 * $self->opts->name]);
          }
        } else {
          if (lc $descr eq lc $self->opts->name) {
            push(@indices, $self->{$cache}->{$key});
          }
        }
      }
    } else {
      push(@indices, $self->{$cache}->{$key});
    }
  }
  return @indices;
  return map { join('.', ref($_) eq "ARRAY" ? @{$_} : $_) } @indices;
}

sub get_entities {
  my ($self, $class, $filter) = @_;
  foreach ($self->get_sub_table('ENTITY-MIB', [
    'entPhysicalDescr',
    'entPhysicalName',
    'entPhysicalClass',
  ])) {
    my $new_object = $class->new(%{$_});
    next if (defined $filter && ! &$filter($new_object));
    push @{$self->{entities}}, $new_object;
  }
}

sub get_sub_table {
  my ($self, $mib, $names) = @_;
  $self->require_mib($mib);
  my @oids = map {
    $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$_}
  } @$names;
  my $result = $self->get_entries(
    -columns => \@oids
  );
  my $indices = ();
  map { if ($_ =~ /\.(\d+)$/) { $indices->{$1} = [ $1 ]; } } keys %$result;
  my @indices = values %$indices;
  my @entries = $self->make_symbolic($mib, $result, \@indices);
  @entries = map { $_->{indices} = shift @indices; $_ } @entries;
  @entries = map { $_->{flat_indices} = join(".", @{$_->{indices}}); $_ } @entries;
  return @entries;
}

sub join_table {
  my ($self, $to, $from) = @_;
  my $to_i = {};
  foreach (@$to) {
    my $i = $_->{flat_indices};
    $to_i->{$i} = $_;
  }
  foreach my $f (@$from) {
    my $i = $f->{flat_indices};
    if (exists $to_i->{$i}) {
      foreach (keys %$f) {
        next if $_ =~ /indices/;
        $to_i->{$i}->{$_} = $f->{$_};
      }
    }
  }
}




package Monitoring::GLPlugin::SNMP::SysDescPrettify;
our @ISA = qw(Monitoring::GLPlugin::SNMP);

{
  no warnings qw(once);
  $Monitoring::GLPlugin::SNMP::SysDescPrettify::vendor_rules = {
    Cisco => {
      vendor_pattern => '.*cisco.*',
      prettifier_funcs => [
        sub {
          my ($sysdescr, $session) = @_;
          if ($sysdescr =~ /(Cisco NX-OS.*? n\d+),.*(Version .*), RELEASE SOFTWARE/) {
            return $1.' '.$2;
          }
          return undef;
        },
      ],
    },
    Netgear => {
      vendor_pattern => '.*(netgear|GS\d+TP).*',
      prettifier_funcs => [
        sub {
          my ($sysdescr, $session) = @_;
          if ($sysdescr =~ /GS\d+TP/) {
            return 'Netgear '.$sysdescr;
          }
          return undef;
        },
      ],
    },
  };
}



package Monitoring::GLPlugin::SNMP::MibsAndOids;
our @ISA = qw(Monitoring::GLPlugin::SNMP);

{
  no warnings qw(once);
  $Monitoring::GLPlugin::SNMP::MibsAndOids::discover_ids = {};
  $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids = {};
  $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids = {};
  $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions = {};
  $Monitoring::GLPlugin::SNMP::MibsAndOids::origin = {};
}



package Monitoring::GLPlugin::SNMP::MibsAndOids::BROTHERMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'BROTHER-MIB'} = {
  url => '',
  name => 'BROTHER-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'BROTHER-MIB'} =
    '1.3.6.1.4.1.2435.2';

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'BROTHER-MIB'} = {
  'brother' => '1.3.6.1.4.1.2435',
  'nm' => '1.3.6.1.4.1.2435.2',
  'system' => '1.3.6.1.4.1.2435.2.3',
  'net-peripheral' => '1.3.6.1.4.1.2435.2.3.9',
  'net-printer' => '1.3.6.1.4.1.2435.2.3.9.1',
  'generalDeviceStatus' => '1.3.6.1.4.1.2435.2.3.9.1.1',
  'status' => '1.3.6.1.4.1.2435.2.3.9.1.1.2',
  'brJamPlace' => '1.3.6.1.4.1.2435.2.3.9.1.1.2.9',
  'tonerlow' => '1.3.6.1.4.1.2435.2.3.9.1.1.2.10',
  'brToner1Low' => '1.3.6.1.4.1.2435.2.3.9.1.1.2.10.1',
  'brToner2Low' => '1.3.6.1.4.1.2435.2.3.9.1.1.2.10.2',
  'brToner3Low' => '1.3.6.1.4.1.2435.2.3.9.1.1.2.10.3',
  'brToner4Low' => '1.3.6.1.4.1.2435.2.3.9.1.1.2.10.4',
  'brieee1284id' => '1.3.6.1.4.1.2435.2.3.9.1.1.7',
  'brttt1' => '1.3.6.1.4.1.2435.2.3.9.1.1.10',
  'net-MFP' => '1.3.6.1.4.1.2435.2.3.9.2',
  'fax-setup' => '1.3.6.1.4.1.2435.2.3.9.2.1',
  'autodial' => '1.3.6.1.4.1.2435.2.3.9.2.1.1',
  'onetouchDial' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.1',
  'brOneTouchDialCount' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.1.1',
  'brOneTouchDialTable' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.1.2',
  'brOneTouchDialEntry' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.1.2.1',
  'brOneTouchDialIndex' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.1.2.1.1',
  'brOneTouchDialData' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.1.2.1.2',
  'speedDial' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.2',
  'brSpeedDialCount' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.2.1',
  'brSpeedDialTable' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.2.2',
  'brSpeedDialEntry' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.2.2.1',
  'brSpeedDialIndex' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.2.2.1.1',
  'brSpeedDialData' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.2.2.1.2',
  'brDialDataAllClear' => '1.3.6.1.4.1.2435.2.3.9.2.1.1.3',
  'fax-general' => '1.3.6.1.4.1.2435.2.3.9.2.1.2',
  'brFaxReceiveMode' => '1.3.6.1.4.1.2435.2.3.9.2.1.2.1',
  'brRingDelayCount' => '1.3.6.1.4.1.2435.2.3.9.2.1.2.2',
  'brOwnFaxNumber' => '1.3.6.1.4.1.2435.2.3.9.2.1.2.3',
  'scanner-setup' => '1.3.6.1.4.1.2435.2.3.9.2.11',
  'scanToInfo' => '1.3.6.1.4.1.2435.2.3.9.2.11.1',
  'brRegisterKeyInfo' => '1.3.6.1.4.1.2435.2.3.9.2.11.1.1',
  'brUnRegisterKeyInfo' => '1.3.6.1.4.1.2435.2.3.9.2.11.1.2',
  'brNetSKeyReceiverAddress' => '1.3.6.1.4.1.2435.2.3.9.2.11.1.5',
  'mfpCapability' => '1.3.6.1.4.1.2435.2.3.9.2.101',
  'mcGeneral' => '1.3.6.1.4.1.2435.2.3.9.2.101.1',
  'mcgRemoteSetup' => '1.3.6.1.4.1.2435.2.3.9.2.101.1.11',
  'brNetRemoteSetUpSupported' => '1.3.6.1.4.1.2435.2.3.9.2.101.1.11.1',
  'brNetRemoteSetUpEnable' => '1.3.6.1.4.1.2435.2.3.9.2.101.1.11.2',
  'brNetRemoteSetUpFileFormat' => '1.3.6.1.4.1.2435.2.3.9.2.101.1.11.3',
  'brNetRemoteSetUpFileFormatDefinition' => 'BROTHER-MIB::brNetRemoteSetUpFileFormat',
  'mcFax' => '1.3.6.1.4.1.2435.2.3.9.2.101.2',
  'mcfGeneral' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.1',
  'brFaxSupported' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.1.1',
  'brIFaxSupported' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.1.3',
  'mcfNetFaxShare' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.11',
  'brNetFaxShareSupported' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.11.1',
  'brNetFaxShareEnable' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.11.2',
  'mcfNetPcFaxRx' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.12',
  'brNetPcFaxRxSupported' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.12.1',
  'brNetPcFaxRxEnable' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.12.2',
  'brNetRegisterPcFaxInfo' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.12.3',
  'mcfFaxInfomation' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.101',
  'brPhoneNumberLastFax' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.101.1',
  'brPagesSentLastFax' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.101.2',
  'brTimestampLastFax' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.101.3',
  'brFaxHeaderInfo' => '1.3.6.1.4.1.2435.2.3.9.2.101.2.101.4',
  'mcScanner' => '1.3.6.1.4.1.2435.2.3.9.2.101.3',
  'mcsNetScanner' => '1.3.6.1.4.1.2435.2.3.9.2.101.3.11',
  'brNetScannerSupported' => '1.3.6.1.4.1.2435.2.3.9.2.101.3.11.1',
  'brNetScannerEnable' => '1.3.6.1.4.1.2435.2.3.9.2.101.3.11.2',
  'mcsNetSKy' => '1.3.6.1.4.1.2435.2.3.9.2.101.3.12',
  'brNetSKeySupported' => '1.3.6.1.4.1.2435.2.3.9.2.101.3.12.1',
  'brNetSKeyEnable' => '1.3.6.1.4.1.2435.2.3.9.2.101.3.12.2',
  'mfpgeneral-setup' => '1.3.6.1.4.1.2435.2.3.9.2.111',
  'brServiceMode' => '1.3.6.1.4.1.2435.2.3.9.2.111.1',
  'brLockMode' => '1.3.6.1.4.1.2435.2.3.9.2.111.2',
  'brActivityReportSetting' => '1.3.6.1.4.1.2435.2.3.9.2.111.3',
  'netPML' => '1.3.6.1.4.1.2435.2.3.9.4',
  'netPMLmgmt' => '1.3.6.1.4.1.2435.2.3.9.4.2',
  'device' => '1.3.6.1.4.1.2435.2.3.9.4.2.1',
  'destination-subsystem1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1',
  'sleep' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.1',
  'brpowerstime' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.1.1',
  'autoc' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.2',
  'brautocont' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.2.7',
  'simm' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4',
  'specification' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1',
  'simmkind0' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.1',
  'brsimmtype0' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.1.4',
  'brsimmsize0' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.1.5',
  'simmkind1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.2',
  'brsimmtype1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.2.4',
  'brsimmsize1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.2.5',
  'simmkind2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.3',
  'brsimmtype2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.3.4',
  'brsimmsize2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.3.5',
  'simmkind3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.4',
  'brsimmtype3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.4.4',
  'brsimmsize3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.1.4.5',
  'bio1-explanation' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.3',
  'determined' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.3.1',
  'brTBD1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.1.4.3.1.4',
  'destination-subsystem2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.2',
  'printerjob' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.2.1',
  'jobend' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.2.1.1',
  'brtimeout' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.2.1.1.1',
  'brTBD2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.2.1.1.5',
  'destination-subsystem3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3',
  'prt-setup' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3',
  'prt-condition' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1',
  'brpersonality' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.1',
  'brpersonalityDefinition' => 'BROTHER-MIB::brpersonality',
  'brorientation' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.2',
  'brcopies' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.4',
  'brTBD3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.6',
  'brresolution' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.8',
  'brpageprotect' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.10',
  'brlines' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.11',
  'brpaper' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.13',
  'brpaperDefinition' => 'BROTHER-MIB::brpaper',
  'brpapertype' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.22',
  'brpapertype2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.23',
  'brpapertypeMP' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.3.3.1.26',
  'destination-subsystem4' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4',
  'print-engine' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1',
  'prt-density' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.1',
  'brdensity' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.1.5',
  'status-prt-eng' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.2',
  'tray' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3',
  'manual' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.1',
  'brmanualfeed' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.1.4',
  'traysize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3',
  'mp' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.1',
  'brmpsize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.1.1',
  'brmpsizeDefinition' => 'BROTHER-MIB::brmpsize',
  'cassette' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.2',
  'brtray1size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.2.1',
  'brtray1sizeDefinition' => 'BROTHER-MIB::brtray1size',
  'cassette2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.3',
  'brtray2size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.3.1',
  'brtray2sizeDefinition' => 'BROTHER-MIB::brtray2size',
  'cassette3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.4',
  'brtray3size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.4.1',
  'brtray3sizeDefinition' => 'BROTHER-MIB::brtray3size',
  'cassette4' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.5',
  'brtray4size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.3.3.5.1',
  'brtray4sizeDefinition' => 'BROTHER-MIB::brtray4size',
  'economy' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.6',
  'brret' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.6.5',
  'breconomode' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.4.1.6.7',
  'brorg' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5',
  'printersetup' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1',
  'general' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1',
  'brPrtGeneralEmulationTimeout' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1.1',
  'brPrtGeneralFeeder' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1.2',
  'brPrtGeneralPowerSave' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1.3',
  'brPrtGeneralBuzzer' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1.4',
  'brPrtGeneralColor' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1.5',
  'brPrtGeneralDuplex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1.6',
  'brPrtGeneralBinding' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.1.7',
  'advanced' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2',
  'brPrtAdvancedPriority' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.1',
  'brPrtAdvancedUseMPTrayFirst' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.2',
  'brPrtAdvancedMPTrayFeed' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.3',
  'brPrtAdvancedXOffset' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.4',
  'brPrtAdvancedYOffset' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.5',
  'brPrtAdvancedImageCompression' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.6',
  'autoff' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.7',
  'brPrtAdvancedAutoFormFeed' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.7.1',
  'brPrtAdvancedAutoTimeout' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.7.2',
  'brPrtAdvancedFFSuppress' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.8',
  'brPrtAdvancedTonerLowPrint' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.9',
  'brPrtAdvancedPrintDensity' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.10',
  'brPrtAdvancedInputBuffer' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.11',
  'brPrtAdvancedLanguage' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.12',
  'brPrtAdvancedLanguageDefinition' => 'BROTHER-MIB::brPrtAdvancedLanguage',
  'brSecurePrintRAMSizeMax' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.13',
  'brSecurePrintRAMSize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.14',
  'brPrtAdvancedJamRecovery' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.15',
  'brPrtAdvancedJamRecoveryDefinition' => 'BROTHER-MIB::brPrtAdvancedJamRecovery',
  'brPrtAdvancedSleepIndication' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.16',
  'brPrtAdvancedSleepIndicationDefinition' => 'BROTHER-MIB::brPrtAdvancedSleepIndication',
  'brPrtAdvancedDestination' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.17',
  'brPrtAdvancedDestinationDefinition' => 'BROTHER-MIB::brPrtAdvancedDestination',
  'brPrtAdvancedLowerLCD' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.18',
  'brPrtAdvancedLowerLCDDefinition' => 'BROTHER-MIB::brPrtAdvancedLowerLCD',
  'brPrtAdvancedAutoOnline' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.19',
  'brPrtAdvancedAutoOnlineDefinition' => 'BROTHER-MIB::brPrtAdvancedAutoOnline',
  'brPrtAdvancedButtonRepeat' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.20',
  'brPrtAdvancedMessageScroll' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.21',
  'buzzer' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.22',
  'brPrtAdvancedErrorBuzzer' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.22.1',
  'brPrtAdvancedErrorBuzzerDefinition' => 'BROTHER-MIB::brPrtAdvancedErrorBuzzer',
  'brPrtAdvancedPanelBuzzer' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.22.2',
  'brPrtAdvancedPanelBuzzerDefinition' => 'BROTHER-MIB::brPrtAdvancedPanelBuzzer',
  'brPrtAdvancedBuzzerVolume' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.22.3',
  'brPrtAdvancedBuzzerVolumeDefinition' => 'BROTHER-MIB::brPrtAdvancedBuzzerVolume',
  'brPrtAdvancedLCDDensity' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.23',
  'smallPaperSize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.51',
  'brSmallPaperSizeMP' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.51.1',
  'brSmallPaperSizeMPDefinition' => 'BROTHER-MIB::brSmallPaperSizeMP',
  'brSmallPaperSize1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.51.2',
  'brSmallPaperSize1Definition' => 'BROTHER-MIB::brSmallPaperSize1',
  'brSmallPaperSize2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.51.3',
  'brSmallPaperSize2Definition' => 'BROTHER-MIB::brSmallPaperSize2',
  'brSmallPaperSize3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.51.4',
  'brSmallPaperSize3Definition' => 'BROTHER-MIB::brSmallPaperSize3',
  'brSmallPaperSize4' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.51.5',
  'brSmallPaperSize4Definition' => 'BROTHER-MIB::brSmallPaperSize4',
  'trayPriority' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.52',
  'brPrtAdvancedTrayPriority' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.52.1',
  'brTrayPriorityCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.52.2',
  'brTrayPriorityTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.52.3',
  'brTrayPriorityEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.52.3.1',
  'brTrayPriorityIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.52.3.1.1',
  'brTrayPriorityMember' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.52.3.1.2',
  'carbonCopy' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53',
  'brCarbonCopyMode' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.1',
  'brCarbonCopyModeDefinition' => 'BROTHER-MIB::brCarbonCopyMode',
  'brCarbonCopies' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.2',
  'brCarbonCopyTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.10',
  'brCarbonCopyEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.10.1',
  'brCarbonCopyIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.10.1.1',
  'brCarbonCopyTray' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.10.1.2',
  'brCarbonCopyTrayDefinition' => 'BROTHER-MIB::brCarbonCopyTray',
  'brCarbonCopyMacro' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.10.1.3',
  'brCarbonCopyMacroDefinition' => 'BROTHER-MIB::brCarbonCopyMacro',
  'brCarbonCopyMacroID' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.53.10.1.4',
  'mediaFix' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.54',
  'brMediaFixTray1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.54.1',
  'brMediaFixTray1Definition' => 'BROTHER-MIB::brMediaFixTray1',
  'brMediaFixTray2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.54.2',
  'brMediaFixTray2Definition' => 'BROTHER-MIB::brMediaFixTray2',
  'brMediaFixTray3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.54.3',
  'brMediaFixTray3Definition' => 'BROTHER-MIB::brMediaFixTray3',
  'brMediaFixTray4' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.54.4',
  'brMediaFixTray4Definition' => 'BROTHER-MIB::brMediaFixTray4',
  'brMediaFixMP' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.54.10',
  'brMediaFixMPDefinition' => 'BROTHER-MIB::brMediaFixMP',
  'directprint' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60',
  'brDirectPrintPaperSize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.1',
  'brDirectPrintPaperSizeDefinition' => 'BROTHER-MIB::brDirectPrintPaperSize',
  'brDirectPrintMediaType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.2',
  'brDirectPrintMultipulPage' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.3',
  'brDirectPrintOrientation' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.4',
  'brDirectPrintCollate' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.5',
  'brDirectPrintOutputColor' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.6',
  'brDirectPrintPrintQuality' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.7',
  'brDirectPrintPdfOption' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.8',
  'brDirectPrintSetting' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.9',
  'brDirectPrintPdfThumbnailType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.60.10',
  'brDirectPrintPdfThumbnailTypeDefinition' => 'BROTHER-MIB::brDirectPrintPdfThumbnailType',
  'pictbridge' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.61',
  'brPictBridgePaperSize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.61.1',
  'brPictBridgePaperSizeDefinition' => 'BROTHER-MIB::brPictBridgePaperSize',
  'brPictBridgeOrientation' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.61.2',
  'brPictBridgeDateTime' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.61.3',
  'brPictBridgeFileName' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.61.4',
  'brPictBridgePrintQuality' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.61.5',
  'brPictBridgePrintSetting' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.61.6',
  'colorcorrection' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62',
  'brColorCalibration' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.1',
  'brColorCalibrationReset' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.2',
  'brAutoRegistRegistrate' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.3',
  'brAutoRegistSetInterval' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.4',
  'brRegistrationPrintChart' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.5',
  'brRegistrationXMagentaLeft' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.6',
  'brRegistrationXMagentaRight' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.7',
  'brRegistrationXCyanLeft' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.8',
  'brRegistrationXCyanRight' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.9',
  'brRegistrationXYellowLeft' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.10',
  'brRegistrationXYellowRight' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.11',
  'brRegistrationYMagenta' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.12',
  'brRegistrationYCyan' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.13',
  'brRegistrationYYellow' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.62.14',
  'funclock' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63',
  'brFuncLockSettingInit' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.1',
  'brFuncLockAdminPassword' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.2',
  'brFuncLock' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.3',
  'brFuncLockPublicFuncCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.4',
  'brFuncLockPublicTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.5',
  'brFuncLockPublicEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.5.1',
  'brFuncLockPublicFuncIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.5.1.1',
  'brFuncLockPublicFuncMember' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.5.1.2',
  'brFuncLockPublicFuncMemberDefinition' => 'BROTHER-MIB::brFuncLockPublicFuncMember',
  'brFuncLockPublicFuncSupported' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.5.1.3',
  'brFuncLockPublicFuncEnable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.5.1.4',
  'brFuncLockUserCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.6',
  'brFuncLockUserTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.7',
  'brFuncLockUserEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.7.1',
  'brFuncLockUserIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.7.1.1',
  'brFuncLockUserName' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.7.1.2',
  'brFuncLockUserPassword' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.7.1.3',
  'brFuncLockUserFuncCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.8',
  'brFuncLockUserFuncTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.9',
  'brFuncLockUserFuncEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.9.1',
  'brFuncLockUserFuncIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.9.1.1',
  'brFuncLockUserFuncMember' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.9.1.2',
  'brFuncLockUserFuncMemberDefinition' => 'BROTHER-MIB::brFuncLockUserFuncMember',
  'brFuncLockUserFuncSupported' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.9.1.3',
  'brFuncLockUserFuncEnable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.9.1.4',
  'brFuncLockSetting' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.10',
  'brFuncLockUserPrintPageCounterReset' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.20',
  'brFuncLockPublicPrintLimitEnable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.21',
  'brFuncLockPublicPrintPageMax' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.22',
  'brFuncLockPublicPrintPageCountMono' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.23',
  'brFuncLockPublicPrintPageCountColor' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.24',
  'brFuncLockUserPrintPageTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25',
  'brFuncLockUserPrintPageEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1',
  'brFuncLockUserPrintPageIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1.1',
  'brFuncLockUserPrintPageLimitEnable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1.2',
  'brFuncLockUserPrintPageCountMono' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1.3',
  'brFuncLockUserPrintPageCountColor' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1.4',
  'brFuncLockUserPrintPageMax' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1.5',
  'brFuncLockUserPrintPageCountMonoLast' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1.6',
  'brFuncLockUserPrintPageCountColorLast' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.25.1.7',
  'brFuncLockPcLoginNameAuthEnable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.26',
  'brFuncLockPcLoginNameAuthCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.27',
  'brFuncLockPcLoginNameTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.28',
  'brFuncLockPcLoginNameEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.28.1',
  'brFuncLockPcLoginNameAuthIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.28.1.1',
  'brFuncLockPcLoginName' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.28.1.2',
  'brFuncLockPcLoginNameAuthID' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.28.1.3',
  'brFuncLockPublicPrintPageCountMonoLast' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.29',
  'brFuncLockPublicPrintPageCountColorLast' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.30',
  'autocountreset' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.31',
  'brFuncLockAutoCountResetFrequency' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.31.1',
  'brFuncLockAutoCountResetTime' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.31.2',
  'brFuncLockAutoCountResetWeek' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.31.3',
  'brFuncLockAutoCountResetDate' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.2.63.31.4',
  'mail' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3',
  'brPrtMailbox' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.1',
  'brPrtMailboxProtectTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.2',
  'brPrtMailboxProtectEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.2.1',
  'brPrtMailboxProtectIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.2.1.1',
  'brPrtMailboxProtect' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.2.1.2',
  'brPrtAvoidMailboxFullTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.3',
  'brPrtAvoidMailboxFullEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.3.1',
  'brPrtAvoidMailboxFullIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.3.1.1',
  'brPrtAvoidMailboxFull' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.3.1.2',
  'brPrtMailboxOutbin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.4',
  'brPrtMailboxProtectGroup' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.5',
  'brPrtAvoidMailboxFullGroup' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.3.6',
  'finisher' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.4',
  'brPrtFinisher' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.4.1',
  'catch-tray' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.5',
  'brPrtCatchTray' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.1.5.1',
  'pagesetup' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2',
  'pcl' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1',
  'margin-p' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.1',
  'brPagePCLLeftMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.1.1',
  'brPagePCLRightMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.1.2',
  'brPagePCLTopMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.1.3',
  'brPagePCLBottomMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.1.4',
  'brPagePCLLines' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.1.5',
  'auto-p' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.2',
  'brPagePCLAutoLF' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.2.1',
  'brPagePCLAutoCR' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.2.2',
  'brPagePCLAutoWrap' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.2.3',
  'brPagePCLAutoSkip' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.1.2.4',
  'ps' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.2',
  'brPagePSPrintPSError' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.2.1',
  'brPagePSPrintPSErrorDefinition' => 'BROTHER-MIB::brPagePSPrintPSError',
  'brPagePSKeepPCLFonts' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.2.2',
  'brPagePSKeepPCLFontsDefinition' => 'BROTHER-MIB::brPagePSKeepPCLFonts',
  'brPagePSCAPTsetting' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.2.3',
  'brPagePSCAPTsettingDefinition' => 'BROTHER-MIB::brPagePSCAPTsetting',
  'gl' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3',
  'pen1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.1',
  'brPageGLPen1Size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.1.1',
  'brPageGLPen1GrayLevel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.1.2',
  'pen2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.2',
  'brPageGLPen2Size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.2.1',
  'brPageGLPen2GrayLevel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.2.2',
  'pen3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.3',
  'brPageGLPen3Size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.3.1',
  'brPageGLPen3GrayLevel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.3.2',
  'pen4' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.4',
  'brPageGLPen4Size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.4.1',
  'brPageGLPen4GrayLevel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.4.2',
  'pen5' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.5',
  'brPageGLPen5Size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.5.1',
  'brPageGLPen5GrayLevel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.5.2',
  'pen6' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.6',
  'brPageGLPen6Size' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.6.1',
  'brPageGLPen6GrayLevel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.3.6.2',
  'epson' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4',
  'margin-e' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.1',
  'brPageEPSONLeftMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.1.1',
  'brPageEPSONRightMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.1.2',
  'brPageEPSONTopMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.1.3',
  'brPageEPSONBottomMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.1.4',
  'brPageEPSONLines' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.1.5',
  'auto-e' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.2',
  'brPageEPSONAutoLF' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.2.1',
  'brPageEPSONAutoMask' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.4.2.5',
  'ibm' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5',
  'margin-i' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.1',
  'brPageIBMLeftMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.1.1',
  'brPageIBMRightMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.1.2',
  'brPageIBMTopMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.1.3',
  'brPageIBMBottomMargin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.1.4',
  'brPageIBMLines' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.1.5',
  'auto-i' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.2',
  'brPageIBMAutoLF' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.2.1',
  'brPageIBMAutoCR' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.2.2',
  'brPageIBMAutoMask' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.2.5.2.5',
  'fontsetup' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.3',
  'brFontName' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.3.1',
  'brFontPointSize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.3.2',
  'brFontPitch' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.3.3',
  'brFontSymbolSet' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.3.4',
  'controlpanel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4',
  'reset' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.1',
  'brPanelResetUser' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.1.1',
  'brPanelResetFactory' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.1.2',
  'test' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.2',
  'brPanelTestConfiguration' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.2.1',
  'brPanelTestFontList' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.2.2',
  'brPanelTestTestPage' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.2.3',
  'brPanelTestDemoPage' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.2.4',
  'panellock' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.3',
  'brPanelLockPasswd' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.3.1',
  'brPanelLock' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.3.2',
  'brPanelLockDefinition' => 'BROTHER-MIB::brPanelLock',
  'brPanelLockOn' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.3.3',
  'brPanelLockOff' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.3.4',
  'key' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4',
  'brPanelKeyOnline' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.1',
  'brPanelKeyFormFeed' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.2',
  'brPanelKeyContinue' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.3',
  'brPanelKeyMode' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.4',
  'brPanelKeyGo' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.5',
  'brPanelKeyJobCancel' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.6',
  'brPanelKeyReprint' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.7',
  'brPanelKeySecure' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.4.8',
  'panelinfo' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5',
  'brLCDMode1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.1',
  'brLCDMode1Definition' => 'BROTHER-MIB::brLCDMode1',
  'brLCDString1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.2',
  'brLCDMode2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.3',
  'brLCDMode2Definition' => 'BROTHER-MIB::brLCDMode2',
  'brLCDString2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.4',
  'brLCDString16fix' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.5',
  'brBackLightColor' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.6',
  'brBackLightColorDefinition' => 'BROTHER-MIB::brBackLightColor',
  'brLCDMode3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.7',
  'brLCDMode3Definition' => 'BROTHER-MIB::brLCDMode3',
  'brLCDString3' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.8',
  'brLCDMode4' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.9',
  'brLCDMode4Definition' => 'BROTHER-MIB::brLCDMode4',
  'brLCDString4' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.10',
  'brLCDMode5' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.11',
  'brLCDMode5Definition' => 'BROTHER-MIB::brLCDMode5',
  'brLCDString5' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.12',
  'brLCDContrast' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.4.5.13',
  'printerinfomation' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5',
  'brInfoSerialNumber' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.1',
  'brInfoType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.2',
  'version' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.3',
  'brInfoUpperMIBVer' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.3.1',
  'brInfoLowerMIBVer' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.3.2',
  'brInfoStatus' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.4',
  'brInfoNetVerUpStatus' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.5',
  'brInfoPrinterUStatus' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.6',
  'brInfoPConSupported' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.7',
  'brInfoMaintenance' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.8',
  'brInfoModelNumber' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.9',
  'brInfoModelNumberDefinition' => 'BROTHER-MIB::brInfoModelNumber',
  'brInfoCounter' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.10',
  'brInfoNextCare' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.11',
  'brInfoHDDSlot1' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.12',
  'brInfoHDDSlot2' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.13',
  'brInfoHDDInternal' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.14',
  'brInfoHDDSize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.15',
  'brInfoSolutionsCenterURL' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.16',
  'brInfoDeviceRomVersion' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.17',
  'brInfoCoverage' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.18',
  'brInfoEstimatedPagesRemaining' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.19',
  'brInfoReplaceCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.20',
  'brInfoJamCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.21',
  'brInfoJamCountClear' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.22',
  'brInfoReplaceTime' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.23',
  'brInfoDeviceSubRomVersion' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.24',
  'brInfoAlertVersion' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.25',
  'brInfoBlackPrint' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.26',
  'errorHistory' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51',
  'brErrorHistoryCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.1',
  'brErrorHistoryTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.2',
  'brErrorHistoryEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.2.1',
  'brErrorHistoryIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.2.1.1',
  'brErrorHistoryDescription' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.2.1.2',
  'brErrorHistoryAllClear' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.3',
  'brCommunicationErrorHistoryCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.11',
  'brCommunicationErrorHistoryTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.12',
  'brCommunicationErrorHistoryEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.12.1',
  'brCommunicationErrorHistoryIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.12.1.1',
  'brCommunicationErrorHistoryDescription' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.51.12.1.2',
  'printPages' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52',
  'brPrintPagesTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.1',
  'brPrintPagesEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.1.1',
  'brPrintPagesIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.1.1.1',
  'brPrintPagesPaperSize' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.1.1.2',
  'brPrintPagesPaperSizeDefinition' => 'BROTHER-MIB::brPrintPagesPaperSize',
  'brPrintPages' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.1.1.3',
  'brPrintPagesMediaPlaceTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.11',
  'brPrintPagesMediaPlaceEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.11.1',
  'brPrintPagesMediaPlaceIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.11.1.1',
  'brPrintPagesMediaPlaceType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.11.1.2',
  'brPrintPagesMediaPlaceTypeDefinition' => 'BROTHER-MIB::brPrintPagesMediaPlaceType',
  'brPrintPagesMediaPlaceCounter' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.11.1.3',
  'brPrintPagesFuncTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.21',
  'brPrintPagesFuncEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.21.1',
  'brPrintPagesFuncIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.21.1.1',
  'brPrintPagesFuncType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.21.1.2',
  'brPrintPagesFuncTypeDefinition' => 'BROTHER-MIB::brPrintPagesFuncType',
  'brPrintPagesFuncCounter' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.21.1.3',
  'brPrintPagesPaperTypeTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.31',
  'brPrintPagesPaperTypeEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.31.1',
  'brPrintPagesPaperTypeIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.31.1.1',
  'brPrintPagesPaperTypeType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.31.1.2',
  'brPrintPagesPaperTypeTypeDefinition' => 'BROTHER-MIB::brPrintPagesPaperTypeType',
  'brPrintPagesPaperTypeCounter' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.52.31.1.3',
  'capability' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53',
  'copies' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.1',
  'brCapabilityCopiesMax' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.1.1',
  'brCapabilityCopiesMin' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.1.2',
  'orientation' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.2',
  'brCapabilityOrientationCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.2.1',
  'brCapabilityOrientationTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.2.2',
  'brCapabilityOrientationEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.2.2.1',
  'brCapabilityOrientationIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.2.2.1.1',
  'brCapabilityOrientationName' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.2.2.1.2',
  'paper' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.3',
  'brCapabilityPaperCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.3.1',
  'brCapabilityPaperTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.3.2',
  'brCapabilityPaperEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.3.2.1',
  'brCapabilityPaperIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.3.2.1.1',
  'brCapabilityPaperName' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.3.2.1.2',
  'mediatype' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.4',
  'brCapabilityMediatypeCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.4.1',
  'brCapabilityMediatypeTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.4.2',
  'brCapabilityMediatypeEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.4.2.1',
  'brCapabilityMediatypeIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.4.2.1.1',
  'brCapabilityMediatypeName' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.4.2.1.2',
  'resolution' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.5',
  'brCapabilityResolutionCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.5.1',
  'brCapabilityResolutionTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.5.2',
  'brCapabilityResolutionEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.5.2.1',
  'brCapabilityResolutionIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.5.2.1.1',
  'brCapabilityResolution' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.53.5.2.1.2',
  'countinfo' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54',
  'pfkit' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.1',
  'brPfKitIndexCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.1.1',
  'brPfKitTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.1.2',
  'brPfKitEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.1.2.1',
  'brPfKitIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.1.2.1.1',
  'brPfKitType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.1.2.1.2',
  'brPfKitTypeDefinition' => 'BROTHER-MIB::brPfKitType',
  'brPfKitCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.1.2.1.3',
  'scancount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.2',
  'brScanCountIndexCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.2.1',
  'brScanCountTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.2.2',
  'brScanCountEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.2.2.1',
  'brScanCountIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.2.2.1.1',
  'brScanCountType' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.2.2.1.2',
  'brScanCountTypeDefinition' => 'BROTHER-MIB::brScanCountType',
  'brScanCountCounter' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.54.2.2.1.3',
  'firmwareupdatekeyword' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.55',
  'brFirmwareUpdateKeywordCount' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.55.1',
  'brFirmwareUpdateKeywordTable' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.55.2',
  'brFirmwareUpdateKeywordEntry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.55.2.1',
  'brFirmwareUpdateKeywordIndex' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.55.2.1.1',
  'brFirmwareUpdateKeyword' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.55.2.1.2',
  'printerstatus' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.6',
  'brStatusSleep' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.6.1',
  'secret' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.7',
  'brSecretMPRetry' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.7.1',
  'brSecretReprint' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.7.2',
  'brFontSetting' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.7.3',
  'brFontSwitchOn' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.7.4',
  'brFontSwitchOff' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.7.5',
  'adminsetting' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.8',
  'clockfunction' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.8.1',
  'brClockFuncTimeStyle' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.8.1.1',
  'brClockFuncSummerTime' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.8.1.2',
  'brClockFuncTimeZone' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.8.1.3',
  'brClockFuncZoneSet' => '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.8.1.4',
  'interface' => '1.3.6.1.4.1.2435.2.4',
  'npCard' => '1.3.6.1.4.1.2435.2.4.3',
  'npSys' => '1.3.6.1.4.1.2435.2.4.3.1',
  'npConfig' => '1.3.6.1.4.1.2435.2.4.3.1.1',
  'brBasicSettingConfigured' => '1.3.6.1.4.1.2435.2.4.3.1.1.1',
  'brBasicSettingConfiguredDefinition' => 'BROTHER-MIB::brBasicSettingConfigured',
  'adminCapa' => '1.3.6.1.4.1.2435.2.4.3.1.99',
  'brAdminCapability' => '1.3.6.1.4.1.2435.2.4.3.1.99.1',
  'userSetting' => '1.3.6.1.4.1.2435.2.4.3.1.100',
  'brUserPasswordVerify' => '1.3.6.1.4.1.2435.2.4.3.1.100.1',
  'brUserPassword' => '1.3.6.1.4.1.2435.2.4.3.1.100.2',
  'verify' => '1.3.6.1.4.1.2435.2.4.3.1.101',
  'brpsVerifyPhysAddress' => '1.3.6.1.4.1.2435.2.4.3.1.101.1',
  'npTcp' => '1.3.6.1.4.1.2435.2.4.3.6',
  'lpd' => '1.3.6.1.4.1.2435.2.4.3.6.99',
  'banner' => '1.3.6.1.4.1.2435.2.4.3.6.99.1',
  'brLPDBannerPage' => '1.3.6.1.4.1.2435.2.4.3.6.99.1.1',
  'npCtl' => '1.3.6.1.4.1.2435.2.4.3.7',
  'etherN' => '1.3.6.1.4.1.2435.2.4.3.7.99',
  'eNet' => '1.3.6.1.4.1.2435.2.4.3.7.99.1',
  'brENetModeSupported' => '1.3.6.1.4.1.2435.2.4.3.7.99.1.1',
  'brENetMode' => '1.3.6.1.4.1.2435.2.4.3.7.99.1.2',
  'npPort' => '1.3.6.1.4.1.2435.2.4.3.13',
  'funa' => '1.3.6.1.4.1.2435.2.4.3.13.10',
  'brFindPort' => '1.3.6.1.4.1.2435.2.4.3.13.10.1',
  'brFindTime' => '1.3.6.1.4.1.2435.2.4.3.13.10.2',
  'npSet' => '1.3.6.1.4.1.2435.2.4.3.99',
  'dns' => '1.3.6.1.4.1.2435.2.4.3.99.1',
  'brDNSSupported' => '1.3.6.1.4.1.2435.2.4.3.99.1.1',
  'brPrimaryDNSIP' => '1.3.6.1.4.1.2435.2.4.3.99.1.2',
  'brSecondaryDNSIP' => '1.3.6.1.4.1.2435.2.4.3.99.1.3',
  'brDNSIPSetup' => '1.3.6.1.4.1.2435.2.4.3.99.1.4',
  'brDNSIPSetupDefinition' => 'BROTHER-MIB::brDNSIPSetup',
  'brTCPIPConnectTime' => '1.3.6.1.4.1.2435.2.4.3.99.1.5',
  'brAdvancedDNSSupported' => '1.3.6.1.4.1.2435.2.4.3.99.1.6',
  'brPrimaryDNSIPAddress' => '1.3.6.1.4.1.2435.2.4.3.99.1.7',
  'brSecondaryDNSIPAddress' => '1.3.6.1.4.1.2435.2.4.3.99.1.8',
  'brPOP3ServerName' => '1.3.6.1.4.1.2435.2.4.3.99.1.9',
  'brSMTPServerName' => '1.3.6.1.4.1.2435.2.4.3.99.1.10',
  'pushstatus' => '1.3.6.1.4.1.2435.2.4.3.99.2',
  'brPushStatusSupported' => '1.3.6.1.4.1.2435.2.4.3.99.2.1',
  'priadmin' => '1.3.6.1.4.1.2435.2.4.3.99.2.2',
  'brPriMailAddress' => '1.3.6.1.4.1.2435.2.4.3.99.2.2.1',
  'brPriError' => '1.3.6.1.4.1.2435.2.4.3.99.2.2.2',
  'secadmin' => '1.3.6.1.4.1.2435.2.4.3.99.2.3',
  'brSecMailAddress' => '1.3.6.1.4.1.2435.2.4.3.99.2.3.1',
  'brSecError' => '1.3.6.1.4.1.2435.2.4.3.99.2.3.2',
  'brNotificationCount' => '1.3.6.1.4.1.2435.2.4.3.99.2.4',
  'brNotificationTable' => '1.3.6.1.4.1.2435.2.4.3.99.2.5',
  'brNotificationEntry' => '1.3.6.1.4.1.2435.2.4.3.99.2.5.1',
  'brNotificationIndex' => '1.3.6.1.4.1.2435.2.4.3.99.2.5.1.1',
  'brNotificationAddress' => '1.3.6.1.4.1.2435.2.4.3.99.2.5.1.2',
  'brNotificationStatusGroup' => '1.3.6.1.4.1.2435.2.4.3.99.2.5.1.3',
  'brNotificationShowURLInfo' => '1.3.6.1.4.1.2435.2.4.3.99.2.5.1.4',
  'brNotificationErrorRule' => '1.3.6.1.4.1.2435.2.4.3.99.2.5.1.5',
  'brNotificationRestoration' => '1.3.6.1.4.1.2435.2.4.3.99.2.5.1.6',
  'brNotificationRestorationDefinition' => 'BROTHER-MIB::brNotificationRestoration',
  'brPrintersEmailaddress' => '1.3.6.1.4.1.2435.2.4.3.99.2.6',
  'brNotificationVersion' => '1.3.6.1.4.1.2435.2.4.3.99.2.7',
  'brShowIPAddressInfo' => '1.3.6.1.4.1.2435.2.4.3.99.2.8',
  'brShowIPAddressInfoDefinition' => 'BROTHER-MIB::brShowIPAddressInfo',
  'brNotificationRuleTable' => '1.3.6.1.4.1.2435.2.4.3.99.2.50',
  'brNotificationRuleEntry' => '1.3.6.1.4.1.2435.2.4.3.99.2.50.1',
  'brNotificationRuleIndex' => '1.3.6.1.4.1.2435.2.4.3.99.2.50.1.1',
  'brNotificationStatusID' => '1.3.6.1.4.1.2435.2.4.3.99.2.50.1.2',
  'brNotificationStatusIDDefinition' => 'BROTHER-MIB::brNotificationStatusID',
  'brNotificationMainRule' => '1.3.6.1.4.1.2435.2.4.3.99.2.50.1.3',
  'brNotificationMainRuleDefinition' => 'BROTHER-MIB::brNotificationMainRule',
  'brNotificationRuleValue' => '1.3.6.1.4.1.2435.2.4.3.99.2.50.1.4',
  'pjl' => '1.3.6.1.4.1.2435.2.4.3.99.3',
  'pjlinfo' => '1.3.6.1.4.1.2435.2.4.3.99.3.1',
  'brPJLInfoOptionsTable' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.1',
  'brPJLInfoOptionsEntry' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.1.1',
  'brPJLInfoOptionsIndex' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.1.1.1',
  'brPJLInfoOptions' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.1.1.2',
  'brPJLInfoIntrayconfigTable' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.2',
  'brPJLInfoIntrayconfigEntry' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.2.1',
  'brPJLInfoIntrayconfigIndex' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.2.1.1',
  'brPJLInfoIntrayconfig' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.2.1.2',
  'brPJLInfoOuttrayconfigTable' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.3',
  'brPJLInfoOuttrayconfigEntry' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.3.1',
  'brPJLInfoOuttrayconfigIndex' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.3.1.1',
  'brPJLInfoOuttrayconfig' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.3.1.2',
  'brPJLInfoDXconfigTable' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.4',
  'brPJLInfoDXconfigEntry' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.4.1',
  'brPJLInfoDXconfigIndex' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.4.1.1',
  'brPJLInfoDXconfig' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.4.1.2',
  'brPJLInfoStorageconfigTable' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.5',
  'brPJLInfoStorageconfigEntry' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.5.1',
  'brPJLInfoStorageconfigIndex' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.5.1.1',
  'brPJLInfoStorageconfig' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.5.1.2',
  'brPJLInfoFirmwareUpdateconfigTable' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.6',
  'brPJLInfoFirmwareUpdateconfigEntry' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.6.1',
  'brPJLInfoFirmwareUpdateconfigIndex' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.1',
  'brPJLInfoFirmwareUpdateconfig' => '1.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2',
  'eMailReports' => '1.3.6.1.4.1.2435.2.4.3.99.4',
  'brEmailReportsSupported' => '1.3.6.1.4.1.2435.2.4.3.99.4.1',
  'brEmailReportsCount' => '1.3.6.1.4.1.2435.2.4.3.99.4.2',
  'brEmailReportsTable' => '1.3.6.1.4.1.2435.2.4.3.99.4.11',
  'brEmailReportsEntry' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1',
  'brEmailReportsIndex' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.1',
  'brEmailReportsAddress' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.2',
  'brEmailReportsFrequency' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.3',
  'brEmailReportsFrequencyDefinition' => 'BROTHER-MIB::brEmailReportsFrequency',
  'brEmailReportsTime' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.4',
  'brEmailReportsWeek' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.5',
  'brEmailReportsWeekDefinition' => 'BROTHER-MIB::brEmailReportsWeek',
  'brEmailReportsDate' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.6',
  'brEmailReportsSendReportNow' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.7',
  'brEmailReportsSendReportNowDefinition' => 'BROTHER-MIB::brEmailReportsSendReportNow',
  'brEmailReportsSendReportatPowerOn' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.8',
  'brEmailReportsSendReportatPowerOnDefinition' => 'BROTHER-MIB::brEmailReportsSendReportatPowerOn',
  'brEmailReportsNoRTCFrequency' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.9',
  'brEmailReportsReportFormat' => '1.3.6.1.4.1.2435.2.4.3.99.4.11.1.10',
  'brEmailReportsReportFormatDefinition' => 'BROTHER-MIB::brEmailReportsReportFormat',
  'wireless' => '1.3.6.1.4.1.2435.2.4.3.100',
  'wlInfo' => '1.3.6.1.4.1.2435.2.4.3.100.1',
  'wlCapability' => '1.3.6.1.4.1.2435.2.4.3.100.1.1',
  'brpsWLanDot11Supported' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.1',
  'brpsWLanAvailableChannel' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.2',
  'brpsWLanCapabilityEncryptModeCount' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.3',
  'brpsWLanCapabilityEncryptModeTable' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.4',
  'brpsWLanCapabilityEncryptModeEntry' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.4.1',
  'brpsWLanCapabilityEncryptModeIndex' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.4.1.1',
  'brpsWLanCapabilityEncryptModeType' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.4.1.2',
  'brpsWLanCapabilityEncryptModeTypeDefinition' => 'BROTHER-MIB::brpsWLanCapabilityEncryptModeType',
  'brpsWLanCapabilityEncryptModeDescription' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.4.1.3',
  'brpsWLanCapabilityEncryptModeSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.4.1.4',
  'brpsWLanCapabilityAuthModeCount' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.5',
  'brpsWLanCapabilityAuthModeTable' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.6',
  'brpsWLanCapabilityAuthModeEntry' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.6.1',
  'brpsWLanCapabilitAuthModeIndex' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.6.1.1',
  'brpsWLanCapabilityAuthModeType' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.6.1.2',
  'brpsWLanCapabilityAuthModeTypeDefinition' => 'BROTHER-MIB::brpsWLanCapabilityAuthModeType',
  'brpsWLanCapabilityAuthModeDescription' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.6.1.3',
  'brpsWLanCapabilityAuthModeSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.6.1.4',
  'brpsWLanCapabilityAuthEAPCount' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.7',
  'brpsWLanCapabilityAuthEAPTable' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8',
  'brpsWLanCapabilityAuthEAPEntry' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8.1',
  'brpsWLanCapabilityAuthEAPIndex' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8.1.1',
  'brpsWLanCapabilityAuthEAPType' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8.1.2',
  'brpsWLanCapabilityAuthEAPTypeDefinition' => 'BROTHER-MIB::brpsWLanCapabilityAuthEAPType',
  'brpsWLanCapabilityAuthEAPDescription' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8.1.3',
  'brpsWLanCapabilityAuthEAPSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8.1.4',
  'brpsWLanCapabilityAuthEAPSupportAuthentication' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8.1.5',
  'brpsWLanCapabilityAuthEAPSupportEncryption' => '1.3.6.1.4.1.2435.2.4.3.100.1.1.8.1.6',
  'wlGeneralInfo' => '1.3.6.1.4.1.2435.2.4.3.100.1.2',
  'brpsWLanDestination' => '1.3.6.1.4.1.2435.2.4.3.100.1.2.1',
  'brpsWLanTransmitLevel' => '1.3.6.1.4.1.2435.2.4.3.100.1.2.2',
  'brpsPit3WLanTestStatus' => '1.3.6.1.4.1.2435.2.4.3.100.1.2.3',
  'wlNetSearch' => '1.3.6.1.4.1.2435.2.4.3.100.1.11',
  'brpsWLanNetSearchSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.1',
  'brpsAvailableWLanScan' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.2',
  'brpsAvailableWLanScanWaitTime' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.3',
  'brpsAvailableWLanCount' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.10',
  'brpsAvailableWLanTable' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11',
  'brpsAvailableWLanEntry' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1',
  'brpsAvailableWLanIndex' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.1',
  'brpsAvailableWLanName' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.2',
  'brpsAvailableWLanMode' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.3',
  'brpsAvailableWLanModeDefinition' => 'BROTHER-MIB::brpsAvailableWLanMode',
  'brpsAvailableWLanCommMode' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.4',
  'brpsAvailableWLanCommModeDefinition' => 'BROTHER-MIB::brpsAvailableWLanCommMode',
  'brpsAvailableWLanChannel' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.5',
  'brpsAvailableWLanPowerLevel' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.6',
  'brpsAvailableWLanAuthMode' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.7',
  'brpsAvailableWLanAuthModeDefinition' => 'BROTHER-MIB::brpsAvailableWLanAuthMode',
  'brpsAvailableWLanEncryptMode' => '1.3.6.1.4.1.2435.2.4.3.100.1.11.11.1.8',
  'brpsAvailableWLanEncryptModeDefinition' => 'BROTHER-MIB::brpsAvailableWLanEncryptMode',
  'wlAOSS' => '1.3.6.1.4.1.2435.2.4.3.100.1.12',
  'brpsWLanAOSSSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.12.1',
  'brpsWLanAOSSIsRunnning' => '1.3.6.1.4.1.2435.2.4.3.100.1.12.2',
  'wlSES' => '1.3.6.1.4.1.2435.2.4.3.100.1.13',
  'brpsWLanSESSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.13.1',
  'wlWPS' => '1.3.6.1.4.1.2435.2.4.3.100.1.14',
  'brpsWLanWPSSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.14.1',
  'brpsWLanWPSResult' => '1.3.6.1.4.1.2435.2.4.3.100.1.14.2',
  'wlSimpleWizard' => '1.3.6.1.4.1.2435.2.4.3.100.1.15',
  'brWlanSimpleWizardSupported' => '1.3.6.1.4.1.2435.2.4.3.100.1.15.1',
  'brWlanSimpleWizardPassword' => '1.3.6.1.4.1.2435.2.4.3.100.1.15.2',
  'wlSetup' => '1.3.6.1.4.1.2435.2.4.3.100.11',
  'wlGeneral' => '1.3.6.1.4.1.2435.2.4.3.100.11.1',
  'brpsWLanAPSetupMode' => '1.3.6.1.4.1.2435.2.4.3.100.11.1.1',
  'brpsWLanAPSetupModeDefinition' => 'BROTHER-MIB::brpsWLanAPSetupMode',
  'brpsWLanMode' => '1.3.6.1.4.1.2435.2.4.3.100.11.1.2',
  'brpsWLanModeDefinition' => 'BROTHER-MIB::brpsWLanMode',
  'brpsWLanName' => '1.3.6.1.4.1.2435.2.4.3.100.11.1.3',
  'brpsWLanCommMode' => '1.3.6.1.4.1.2435.2.4.3.100.11.1.4',
  'brpsWLanCommModeDefinition' => 'BROTHER-MIB::brpsWLanCommMode',
  'brpsWLanChannel' => '1.3.6.1.4.1.2435.2.4.3.100.11.1.5',
  'wlAdvanced' => '1.3.6.1.4.1.2435.2.4.3.100.11.5',
  'brpsWLanCtsMode' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.1',
  'brpsWLanCtsModeDefinition' => 'BROTHER-MIB::brpsWLanCtsMode',
  'brpsWLanCtsRate' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.2',
  'brpsWLanCtsType' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.3',
  'brpsWLanCtsTypeDefinition' => 'BROTHER-MIB::brpsWLanCtsType',
  'brpsWLanRtsCtsThreshold' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.4',
  'brpsWLanLengthThreshold' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.5',
  'brpsWLanDataRetry' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.6',
  'brpsWLanTransmitPowerSetting' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.7',
  'brpsWLanTransmitPowerSettingDefinition' => 'BROTHER-MIB::brpsWLanTransmitPowerSetting',
  'brpsWLanDeviceType' => '1.3.6.1.4.1.2435.2.4.3.100.11.5.8',
  'brpsWLanDeviceTypeDefinition' => 'BROTHER-MIB::brpsWLanDeviceType',
  'wlAssociate' => '1.3.6.1.4.1.2435.2.4.3.100.11.11',
  'brpsWLanEncryptMode' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.1',
  'brpsWLanEncryptModeDefinition' => 'BROTHER-MIB::brpsWLanEncryptMode',
  'brpsWLanAuthMode' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.11',
  'brpsWLanAuthModeDefinition' => 'BROTHER-MIB::brpsWLanAuthMode',
  'brpsWLanAuthEAP' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.12',
  'brpsWLanAuthEAPDefinition' => 'BROTHER-MIB::brpsWLanAuthEAP',
  'brpsWLanAuthUserID' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.13',
  'brpsWLanAuthUserPass' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.14',
  'brpsWLanAssociate' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.21',
  'brpsWLanAssociateDefinition' => 'BROTHER-MIB::brpsWLanAssociate',
  'brpsWLanAssociateTestResult' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.22',
  'brpsWLanAssociateTestResultDefinition' => 'BROTHER-MIB::brpsWLanAssociateTestResult',
  'brpsWLanAssociateResult' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.23',
  'brpsWLanAssociateResultDefinition' => 'BROTHER-MIB::brpsWLanAssociateResult',
  'brpsWLanAssociateTestSupported' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.24',
  'wlWEP' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101',
  'brpsWLanWepKeyDefaultIndex' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101.1',
  'brpsWLanWepKeyTable' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101.11',
  'brpsWLanWepKeyEntry' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101.11.1',
  'brpsWLanWepKeyIndex' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101.11.1.1',
  'brpsWLanWepKeySize' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101.11.1.2',
  'brpsWLanWepKeySizeDefinition' => 'BROTHER-MIB::brpsWLanWepKeySize',
  'brpsWLanWepKeyType' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101.11.1.3',
  'brpsWLanWepKeyTypeDefinition' => 'BROTHER-MIB::brpsWLanWepKeyType',
  'brpsWLanWepKey' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.101.11.1.4',
  'wlWPA' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.102',
  'brpsWLanNetworkKey' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.102.1',
  'wlTKIP' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.103',
  'brpsWLanTKIPChangeInterval' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.103.1',
  'wlLEAP' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.104',
  'brpsWLanLEAPTimeout' => '1.3.6.1.4.1.2435.2.4.3.100.11.11.104.1',
  'wlStatus' => '1.3.6.1.4.1.2435.2.4.3.100.21',
  'wlGeneralStatus' => '1.3.6.1.4.1.2435.2.4.3.100.21.1',
  'brpsWLanOperatingMode' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.1',
  'brpsWLanRSSLevel' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.2',
  'brpsWLanCommSpeed' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.3',
  'brpsWLanOperatingChannel' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.4',
  'brpsWLanOperatingName' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.5',
  'brpsWLanOperatingCommMode' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.6',
  'brpsWLanOperatingEncryptMode' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.7',
  'brpsWLanOperatingAuthMode' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.8',
  'brpsWLanOperatingWepKeyDefaultIndex' => '1.3.6.1.4.1.2435.2.4.3.100.21.1.9',
  'brnetConfig' => '1.3.6.1.4.1.2435.2.4.3.1240',
  'brconfig' => '1.3.6.1.4.1.2435.2.4.3.1240.1',
  'brpsNodeName' => '1.3.6.1.4.1.2435.2.4.3.1240.1.1',
  'brpsSerialNumber' => '1.3.6.1.4.1.2435.2.4.3.1240.1.2',
  'brpsHardwareType' => '1.3.6.1.4.1.2435.2.4.3.1240.1.3',
  'brpsMainRevision' => '1.3.6.1.4.1.2435.2.4.3.1240.1.4',
  'brpsBootRevision' => '1.3.6.1.4.1.2435.2.4.3.1240.1.5',
  'brpsPasswordVerify' => '1.3.6.1.4.1.2435.2.4.3.1240.1.6',
  'brpsPassword' => '1.3.6.1.4.1.2435.2.4.3.1240.1.7',
  'brpsMIBVersion' => '1.3.6.1.4.1.2435.2.4.3.1240.1.8',
  'brpsOEMString' => '1.3.6.1.4.1.2435.2.4.3.1240.1.9',
  'brpsMIBMajor' => '1.3.6.1.4.1.2435.2.4.3.1240.1.10',
  'brpsMIBMinor' => '1.3.6.1.4.1.2435.2.4.3.1240.1.11',
  'brpsServerDescription' => '1.3.6.1.4.1.2435.2.4.3.1240.1.12',
  'brpsEnetMode' => '1.3.6.1.4.1.2435.2.4.3.1240.1.13',
  'brpsFlashROMSize' => '1.3.6.1.4.1.2435.2.4.3.1240.1.14',
  'brpsSNMPGetCommunity' => '1.3.6.1.4.1.2435.2.4.3.1240.1.15',
  'brpsSNMPJetAdmin' => '1.3.6.1.4.1.2435.2.4.3.1240.1.16',
  'brpsSNMPSetCommunity1' => '1.3.6.1.4.1.2435.2.4.3.1240.1.17',
  'brpsSNMPSetCommunity2' => '1.3.6.1.4.1.2435.2.4.3.1240.1.18',
  'brSupportedInfo' => '1.3.6.1.4.1.2435.2.4.3.1240.1.200',
  'brcontrol' => '1.3.6.1.4.1.2435.2.4.3.1240.2',
  'brpsTestPage' => '1.3.6.1.4.1.2435.2.4.3.1240.2.1',
  'brpsSetDefault' => '1.3.6.1.4.1.2435.2.4.3.1240.2.2',
  'brpsReset' => '1.3.6.1.4.1.2435.2.4.3.1240.2.3',
  'brpsProtectModeEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.2.4',
  'brpsProtectPassword' => '1.3.6.1.4.1.2435.2.4.3.1240.2.5',
  'brport' => '1.3.6.1.4.1.2435.2.4.3.1240.3',
  'brpsPortCount' => '1.3.6.1.4.1.2435.2.4.3.1240.3.1',
  'brpsPortInfoTable' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2',
  'brpsPortInfoEntry' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1',
  'brpsPortIndex' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.1',
  'brpsPortName' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.2',
  'brpsPortType' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.3',
  'brpsPortTypeDefinition' => 'BROTHER-MIB::brpsPortType',
  'brpsPortStatus' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.4',
  'brpsPortStatusString' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.5',
  'brpsPortProtocol' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.6',
  'brpsPortQueueSize' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.7',
  'brpsPortDescriptionString' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.8',
  'brpsPortInfoString' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.9',
  'brpsPortHTTPExtensions' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.10',
  'brpsPortSNMPExtensions' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.11',
  'brpsPortAttribute' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.12',
  'brpsPortBinaryMode' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.13',
  'brpsPortInhibitDatagramSupport' => '1.3.6.1.4.1.2435.2.4.3.1240.3.2.1.14',
  'brservice' => '1.3.6.1.4.1.2435.2.4.3.1240.4',
  'brpsServiceCount' => '1.3.6.1.4.1.2435.2.4.3.1240.4.1',
  'brpsServiceInfoTable' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2',
  'brpsServiceInfoEntry' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1',
  'brpsServiceIndex' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.1',
  'brpsServiceName' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.2',
  'brpsServicePort' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.3',
  'brpsServiceFilter' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.4',
  'brpsServiceBOT' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.5',
  'brpsServiceEOT' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.6',
  'brpsServiceMatch' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.7',
  'brpsServiceReplace' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.8',
  'brpsServiceTCPPort' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.9',
  'brpsServiceNDSTree' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.10',
  'brpsServiceNDSContext' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.11',
  'brpsServiceVines' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.12',
  'brpsServiceObsolete' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.13',
  'brpsServiceNetwareServerCount' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.14',
  'brpsServiceReceiveOnly' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.15',
  'brpsServiceTCPQueued' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.16',
  'brpsServiceProtocolLAT' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.17',
  'brpsServiceProtocolTCPIP' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.18',
  'brpsServiceProtocolNetware' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.19',
  'brpsServiceProtocolAppleTalk' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.20',
  'brpsServiceProtocolBanyan' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.21',
  'brpsServiceProtocolDLC' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.22',
  'brpsServiceProtocolNetBEUI' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.23',
  'brpsServiceNetwareServerMode' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.24',
  'brpsServiceNetwareRemotePrinterNum' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.25',
  'brpsServiceProtocolIPP' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.26',
  'brpsServiceAppleTalkType' => '1.3.6.1.4.1.2435.2.4.3.1240.4.2.1.27',
  'brpsServiceStringLimit' => '1.3.6.1.4.1.2435.2.4.3.1240.4.3',
  'brpsServiceStringInfoTable' => '1.3.6.1.4.1.2435.2.4.3.1240.4.4',
  'brpsServiceStringInfoEntry' => '1.3.6.1.4.1.2435.2.4.3.1240.4.4.1',
  'brpsServiceStringIndex' => '1.3.6.1.4.1.2435.2.4.3.1240.4.4.1.1',
  'brpsServiceString' => '1.3.6.1.4.1.2435.2.4.3.1240.4.4.1.2',
  'brpsServiceStringCount' => '1.3.6.1.4.1.2435.2.4.3.1240.4.5',
  'brpsServiceFilterCount' => '1.3.6.1.4.1.2435.2.4.3.1240.4.6',
  'brprotocol' => '1.3.6.1.4.1.2435.2.4.3.1240.5',
  'brlat' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1',
  'brpsLATSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.1',
  'brpsLATEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.2',
  'brpsLATCircuitTimer' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.3',
  'brpsLATKeepAliveTimer' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.4',
  'brpsLATReceiveBufferMax' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.5',
  'brpsLATTransmitBufferMax' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.6',
  'brpsLATTimeout' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.7',
  'brpsLATGroup' => '1.3.6.1.4.1.2435.2.4.3.1240.5.1.8',
  'brtcpip' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2',
  'brpsTCPIPSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.1',
  'brpsTCPIPEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.2',
  'brpsTCPIPAddress' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.3',
  'brpsTCPIPSubnetMask' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.4',
  'brpsTCPIPGateway' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.5',
  'brpsTCPIPMethod' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.6',
  'brpsTCPIPTimeout' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.7',
  'brpsTCPIPBootTries' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.8',
  'brpsTCPIPMaxWindow' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.9',
  'brpsTCPIPRARPNoSubnet' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.10',
  'brpsTCPIPRARPNoGateway' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.11',
  'brpsTCPIPUpdate' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.12',
  'brpsTCPIPBanner' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.13',
  'brpsTCPIPFastTimeoutEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.14',
  'brpsTCPIPLPRRetryEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.15',
  'brpsTCPIPUseMethod' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.16',
  'brpsTCPIPMethodServer' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.17',
  'brpsTCPIPAccessTable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.18',
  'brpsTCPIPAccessEntry' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.18.1',
  'brpsTCPIPAccessIndex' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.18.1.1',
  'brpsTCPIPAccessNodeAddress' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.18.1.2',
  'brpsTCPIPAccessSubnetMask' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.18.1.3',
  'brpsAdvancedTCPIPAccessSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.19',
  'brpsAdvancedTCPIPAccessEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.20',
  'brpsAdvancedTCPIPAccessAdministratorIPAddress' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.21',
  'brpsAdvancedTCPIPAccessSetting' => '1.3.6.1.4.1.2435.2.4.3.1240.5.2.22',
  'brnetware' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3',
  'brpsNetwareSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.1',
  'brpsNetwareEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.2',
  'brpsNetwareFrameType' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.3',
  'brpsNetwarePollFreq' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.4',
  'brpsNetwareAdvFreq' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.5',
  'brpsNetwarePassword' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.6',
  'brpsNetwareRestart' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.7',
  'brpsNetwareServerTable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.8',
  'brpsNetwareServerEntry' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.8.1',
  'brpsNetwareServerIndex' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.8.1.1',
  'brpsNetwareServerName' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.8.1.2',
  'brpsNetwarePasswordSet' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.9',
  'brpsNDSSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.10',
  'brpsNetwareEtherIINetInfo' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.11',
  'brpsNetwareEtherIICount' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.12',
  'brpsNetware8022NetInfo' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.13',
  'brpsNetware8022Count' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.14',
  'brpsNetware8023NetInfo' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.15',
  'brpsNetware8023Count' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.16',
  'brpsNetwareSNAPNetInfo' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.17',
  'brpsNetwareSNAPCount' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.18',
  'brpsNetwareServicingServerName' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.19',
  'brpsNetwareServicingQueueName' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.20',
  'brpsNetwareServicingServerCount' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.21',
  'brpsNetwareServicingQueueCount' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.22',
  'brpsNetwarePrintJob' => '1.3.6.1.4.1.2435.2.4.3.1240.5.3.23',
  'brappletalk' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4',
  'brpsAppleTalkSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.1',
  'brpsAppleTalkEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.2',
  'brpsAppleTalkZone' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.3',
  'brpsAppleTalkPrintJob' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.4',
  'brpsAppleTalkReadByte' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.5',
  'brpsAppleTalkWriteByte' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.6',
  'brpsAppleTalkReadError' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.7',
  'brpsAppleTalkWriteError' => '1.3.6.1.4.1.2435.2.4.3.1240.5.4.8',
  'brbanyan' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5',
  'brpsBanyanSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.1',
  'brpsBanyanEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.2',
  'brpsBanyanLoginName' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.3',
  'brpsBanyanPassword' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.4',
  'brpsBanyanHopCount' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.5',
  'brpsBanyanTimeout' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.6',
  'brpsBanyanPasswordSet' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.7',
  'brpsBanyanIPNetworkID1' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.8',
  'brpsBanyanIPNetworkID2' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.9',
  'brpsBanyanRouter1' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.10',
  'brpsBanyanRouter2' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.11',
  'brpsBanyanIPPacket' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.12',
  'brpsBanyanErrorCS' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.13',
  'brpsBanyanErrorPT' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.14',
  'brpsBanyanErrorLE' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.15',
  'brpsBanyanPrintServerStatus' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.16',
  'brpsBanyanServerAddress1' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.17',
  'brpsBanyanServerAddress2' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.18',
  'brpsBanyanIPCConnectionInformation' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.19',
  'brpsBanyanIPCSequenceError' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.20',
  'brpsBanyanIPCListen' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.21',
  'brpsBanyanSPPConnectionInformation' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.22',
  'brpsBanyanSPPSequenceError' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.23',
  'brpsBanyanSPPListen' => '1.3.6.1.4.1.2435.2.4.3.1240.5.5.24',
  'bremail' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6',
  'brpsEmailSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.1',
  'brpsEmailEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.2',
  'brpsPOP3Address' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.3',
  'brpsSMTPAddress' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.4',
  'brpsPOP3Name' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.5',
  'brpsPOP3Password' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.6',
  'brpsPOP3PollFreq' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.7',
  'brpsPOP3Timeout' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.8',
  'brpsPOP3PasswordSet' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.9',
  'brpsPOP3TotalMessage' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.10',
  'brpsPOP3TotalConnect' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.11',
  'brpsPOP3TotalConnectFailure' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.12',
  'brpsPOP3TotalConnectionLost' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.13',
  'brpsPOP3TotalUserFailure' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.14',
  'brpsPOP3TotalPasswordFailure' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.15',
  'brpsPOP3TotalIOError' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.16',
  'brpsSMTPTotalMessage' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.17',
  'brpsSMTPTotalConnect' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.18',
  'brpsSMTPTotalConnectFailure' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.19',
  'brpsSMTPTotalRecvFromFailure' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.20',
  'brpsSMTPTotalSendToFailure' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.21',
  'brpsPOP3Supported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.101',
  'brpsSMTPServerAuthMethod' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.102',
  'brpsSMTPAUTHUsername' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.103',
  'brpsSMTPAUTHPassword' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.104',
  'brpsSMTPAUTHPasswordSet' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.105',
  'brpsSmtpAUTHTimeout' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.106',
  'brpsPOPbeforeSMTPWait' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.107',
  'brpsAPOPEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.108',
  'brpsSMTPEnhancedAuthSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.150',
  'brpsAPOPSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.151',
  'brpsEmailSendTestSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.152',
  'brpsEmailRecvTestSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.153',
  'brpsChangeSMTPPortSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.154',
  'brpsSMTPPortNumber' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.155',
  'brpsChangePOP3PortSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.156',
  'brpsPOP3PortNumber' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.157',
  'brpsTmpSMTPServerName' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.170',
  'brpsTmpSMTPServerAuthMethod' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.171',
  'brpsTmpSMTPAUTHUsername' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.172',
  'brpsTmpSMTPAUTHPassword' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.173',
  'brpsTmpPOP3ServerName' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.174',
  'brpsTmpPOP3Name' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.175',
  'brpsTmpPOP3Password' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.176',
  'brpsTmpPrintersEmailaddress' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.177',
  'brpsTmpAPOPEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.178',
  'brpsTmpSMTPAUTHPasswordModified' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.179',
  'brpsTmpPOP3PasswordModified' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.180',
  'brpsTmpSMTPPortNumber' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.181',
  'brpsTmpPOP3PortNumber' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.182',
  'brpsEmailSendTestMail' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.200',
  'brpsEmailTestDestinationAddress' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.201',
  'brpsEmailSendTestCall' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.210',
  'brpsEmailRecvTestCall' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.211',
  'brpsEmailSendRecvTestCall' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.212',
  'brpsEmailTestResult' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.220',
  'brpsPOP3TotalAPOPFailure' => '1.3.6.1.4.1.2435.2.4.3.1240.5.6.221',
  'brdlc' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7',
  'brpsDLCSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.1',
  'brpsDLCEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.2',
  'brpsDLCPrintStatus' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.3',
  'brpsDLCLLCState' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.4',
  'brpsDLCLLCConnectHost' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.5',
  'brpsDLCLLCLastIFrame' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.6',
  'brpsDLCLLCRecvPacket' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.7',
  'brpsDLCLLCPortStatus' => '1.3.6.1.4.1.2435.2.4.3.1240.5.7.8',
  'brnetbeui' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8',
  'brpsNetBEUISupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.1',
  'brpsNetBEUIEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.2',
  'brpsNetBEUIDomain' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.3',
  'brpsNetBIOSIPSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.4',
  'brpsNetBIOSIPEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.5',
  'brpsNetBIOSIPMethod' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.6',
  'brpsNetBIOSPrimaryWINSAddr' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.7',
  'brpsNetBIOSSecondaryWINSAddr' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.8',
  'brpsNetBIOSPrintingSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.8.101',
  'bripp' => '1.3.6.1.4.1.2435.2.4.3.1240.5.9',
  'brpsIPPSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.9.1',
  'brpsIPPEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.9.2',
  'brIPPRegularPortEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.9.3',
  'brIPPSSLPortEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.9.4',
  'brIPPOriginalPortEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.9.5',
  'brntsend' => '1.3.6.1.4.1.2435.2.4.3.1240.5.10',
  'brpsNtSendSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.5.10.1',
  'brpsNtSendEnable' => '1.3.6.1.4.1.2435.2.4.3.1240.5.10.2',
  'brfirmware' => '1.3.6.1.4.1.2435.2.4.3.1240.6',
  'brpsFirmwareIPAddress' => '1.3.6.1.4.1.2435.2.4.3.1240.6.1',
  'brpsFirmwareHost' => '1.3.6.1.4.1.2435.2.4.3.1240.6.2',
  'brpsFirmwareFile' => '1.3.6.1.4.1.2435.2.4.3.1240.6.3',
  'brpsFirmwareReload' => '1.3.6.1.4.1.2435.2.4.3.1240.6.4',
  'brpsFirmwareDescription' => '1.3.6.1.4.1.2435.2.4.3.1240.6.5',
  'brpsFirmwareXModem' => '1.3.6.1.4.1.2435.2.4.3.1240.6.6',
  'brpsFirmwareAdvancedAddressSupported' => '1.3.6.1.4.1.2435.2.4.3.1240.6.7',
  'brpsFirmwareAdvancedAddress' => '1.3.6.1.4.1.2435.2.4.3.1240.6.8',
  'brnetConfigOpt' => '1.3.6.1.4.1.2435.2.4.3.2435',
  'broriginalprotocol' => '1.3.6.1.4.1.2435.2.4.3.2435.5',
  'broriginaltcpip' => '1.3.6.1.4.1.2435.2.4.3.2435.5.2',
  'brLPDType' => '1.3.6.1.4.1.2435.2.4.3.2435.5.2.1',
  'broriginalftp' => '1.3.6.1.4.1.2435.2.4.3.2435.5.10',
  'brFTPSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.10.1',
  'brFTPEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.10.2',
  'broriginalupnp' => '1.3.6.1.4.1.2435.2.4.3.2435.5.11',
  'brUPnPSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.11.1',
  'brUPnPEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.11.2',
  'broriginalapipa' => '1.3.6.1.4.1.2435.2.4.3.2435.5.12',
  'brAPIPASupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.12.1',
  'brAPIPAEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.12.2',
  'broriginalmdns' => '1.3.6.1.4.1.2435.2.4.3.2435.5.13',
  'brmDNSSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.13.1',
  'brmDNSEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.13.2',
  'brmDNSPrinterName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.13.3',
  'broriginalLAA' => '1.3.6.1.4.1.2435.2.4.3.2435.5.14',
  'brLAASupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.14.1',
  'brLAAMacAddress' => '1.3.6.1.4.1.2435.2.4.3.2435.5.14.2',
  'broriginalIPv6' => '1.3.6.1.4.1.2435.2.4.3.2435.5.15',
  'brIPv6Supported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.15.1',
  'brIPv6Enable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.15.2',
  'brIPv6Priority' => '1.3.6.1.4.1.2435.2.4.3.2435.5.15.3',
  'broriginaltelnet' => '1.3.6.1.4.1.2435.2.4.3.2435.5.16',
  'brtelnetSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.16.1',
  'brtelnetEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.16.2',
  'broriginalEWS' => '1.3.6.1.4.1.2435.2.4.3.2435.5.17',
  'brEWSSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.17.1',
  'brEWSEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.17.2',
  'brEWSRegularPortEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.17.3',
  'brEWSSSLPortEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.17.4',
  'broriginalSNMP' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18',
  'brSNMPSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.1',
  'brSNMPEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.2',
  'brSNMPV3Supported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.10',
  'brSNMPCommMode' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.11',
  'brSNMPV3UserName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.12',
  'brSNMPV3KeyType' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.13',
  'brSNMPV3AuthKey' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.14',
  'brSNMPV3AuthPassword' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.15',
  'brSNMPV3PrivKey' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.16',
  'brSNMPV3PrivPassword' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.17',
  'brSNMPV3ContextName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.18.18',
  'broriginalldap' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19',
  'brLdapSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.1',
  'brLdapEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.2',
  'brLdapTimeout' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.3',
  'brLdapTimeoutSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.4',
  'brLdapServerCount' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.11',
  'brLdapServerInfoTable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12',
  'brLdapServerInfoEntry' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1',
  'brLdapServerInfoIndex' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.1',
  'brLdapServerName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.2',
  'brLdapServerPort' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.3',
  'brLdapServerAuth' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.4',
  'brLdapServerAuthDefinition' => 'BROTHER-MIB::brLdapServerAuth',
  'brLdapServerUserDN' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.5',
  'brLdapServerPassword' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.6',
  'brLdapServerPasswordSet' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.7',
  'brLdapServerBaseDN' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.8',
  'brLdapServerAttrEMail' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.10',
  'brLdapServerAttrFAXNumber' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.11',
  'brLdapServerAttrDetail1' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.12',
  'brLdapServerAttrDetail2' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.13',
  'brLdapServerAttrDetail3' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.14',
  'brLdapServerAttrDetail4' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.15',
  'brLdapServerAttrDetailEnable1' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.16',
  'brLdapServerAttrDetailEnable2' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.17',
  'brLdapServerAttrDetailEnable3' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.18',
  'brLdapServerAttrDetailEnable4' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.19',
  'brLdapKerberosServerName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.20',
  'brLdapKerberosServerPort' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.12.1.21',
  'brLdapServerAttrNameCount' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.21',
  'brLdapServerAttrNameTable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.22',
  'brLdapServerAttrNameEntry' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.22.1',
  'brLdapServerAttrNameIndex' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.22.1.1',
  'brLdapServerAttrName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.22.1.2',
  'brLdapSetDefault' => '1.3.6.1.4.1.2435.2.4.3.2435.5.19.99',
  'broriginalTFTP' => '1.3.6.1.4.1.2435.2.4.3.2435.5.20',
  'brTFTPSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.20.1',
  'brTFTPEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.20.2',
  'broriginalHTTPS' => '1.3.6.1.4.1.2435.2.4.3.2435.5.21',
  'brHTTPSSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.21.1',
  'brHTTPSEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.21.2',
  'broriginalLPD' => '1.3.6.1.4.1.2435.2.4.3.2435.5.22',
  'brLPDSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.22.1',
  'brLPDEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.22.2',
  'broriginalRawPort' => '1.3.6.1.4.1.2435.2.4.3.2435.5.23',
  'brRawPortSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.23.1',
  'brRawPortEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.23.2',
  'broriginalLLTD' => '1.3.6.1.4.1.2435.2.4.3.2435.5.24',
  'brLLTDSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.24.1',
  'brLLTDEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.24.2',
  'broriginalWebServices' => '1.3.6.1.4.1.2435.2.4.3.2435.5.25',
  'brWebServicesSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.25.1',
  'brWebServicesEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.25.2',
  'brWebServicesRegularPortEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.25.3',
  'brWebServicesSSLPortEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.25.4',
  'broriginalLLMNR' => '1.3.6.1.4.1.2435.2.4.3.2435.5.26',
  'brLLMNREnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.26.1',
  'broriginalKerberos' => '1.3.6.1.4.1.2435.2.4.3.2435.5.27',
  'brKerberosSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.27.1',
  'broriginalCIFS' => '1.3.6.1.4.1.2435.2.4.3.2435.5.28',
  'brCIFSSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.28.1',
  'brCIFSEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.28.2',
  'broriginalSNTP' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29',
  'brSNTPCSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.1',
  'brSNTPCEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.2',
  'brSNTPCServerMethod' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.3',
  'brSNTPCSyncMethod' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.4',
  'brSNTPCIntervalMin' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.5',
  'brSNTPCInterval' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.6',
  'brSNTPCSyncResult' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.7',
  'brSNTPCPrimaryServerName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.8',
  'brSNTPCPrimaryServerPort' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.9',
  'brSNTPCSecondaryServerName' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.10',
  'brSNTPCSecondaryServerPort' => '1.3.6.1.4.1.2435.2.4.3.2435.5.29.11',
  'broriginalSecurity' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100',
  'brSecurityGeneralStatus' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.1',
  'brDeviceNegotiationEncryptVer' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.1.1',
  'brpsServerCertificateNum' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.1.2',
  'brSecurityGeneralSetup' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.2',
  'brSecurityDeviceNegotiation' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.10',
  'brDeviceNegotiationGetChallenge' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.10.1',
  'brDeviceNegotiationConfirmPassword' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.10.2',
  'brDeviceNegotiationChangePassword' => '1.3.6.1.4.1.2435.2.4.3.2435.5.100.10.3',
  'broriginalinternetsetting' => '1.3.6.1.4.1.2435.2.4.3.2435.10',
  'broriginalproxy' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1',
  'brProxySupported' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.1',
  'brProxyEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.2',
  'brProxyBypassServer' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.3',
  'brProxyBypassServerDefinition' => 'BROTHER-MIB::brProxyBypassServer',
  'brProxyServerCount' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.11',
  'brProxyServerInfoTable' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.12',
  'brProxyServerInfoEntry' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.12.1',
  'brProxyServerInfoIndex' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.12.1.1',
  'brProxyServerType' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.12.1.2',
  'brProxyServerTypeDefinition' => 'BROTHER-MIB::brProxyServerType',
  'brProxyServerName' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.12.1.3',
  'brProxyServerPort' => '1.3.6.1.4.1.2435.2.4.3.2435.10.1.12.1.4',
  'broriginalOtherSetting' => '1.3.6.1.4.1.2435.2.4.3.2435.20',
  'broriginalJobTermination' => '1.3.6.1.4.1.2435.2.4.3.2435.20.1',
  'brJobTerminationSupported' => '1.3.6.1.4.1.2435.2.4.3.2435.20.1.1',
  'brJobTerminationEnable' => '1.3.6.1.4.1.2435.2.4.3.2435.20.1.2',
  'broriginalSNMPTrap' => '1.3.6.1.4.1.2435.2.4.3.2435.20.2',
  'brSNMPTrapTable' => '1.3.6.1.4.1.2435.2.4.3.2435.20.2.1',
  'brSNMPTrapEntry' => '1.3.6.1.4.1.2435.2.4.3.2435.20.2.1.1',
  'brSNMPTrapIndex' => '1.3.6.1.4.1.2435.2.4.3.2435.20.2.1.1.1',
  'brTCPIPServerAddress' => '1.3.6.1.4.1.2435.2.4.3.2435.20.2.1.1.2',
  'broriginalLegacy' => '1.3.6.1.4.1.2435.2.4.3.2435.20.3',
  'brLegacyCompatible' => '1.3.6.1.4.1.2435.2.4.3.2435.20.3.1',
  'npMultiCards' => '1.3.6.1.4.1.2435.2.4.4',
  'npMultiIFSet' => '1.3.6.1.4.1.2435.2.4.4.99',
  'brMultiIFdns' => '1.3.6.1.4.1.2435.2.4.4.99.1',
  'brMultiIFDNSTable' => '1.3.6.1.4.1.2435.2.4.4.99.1.1',
  'brMultiIFDNSEntry' => '1.3.6.1.4.1.2435.2.4.4.99.1.1.1',
  'brMultiIFTCPIPDNSIPSetup' => '1.3.6.1.4.1.2435.2.4.4.99.1.1.1.1',
  'brMultiIFTCPIPDNSIPSetupDefinition' => 'BROTHER-MIB::brMultiIFTCPIPDNSIPSetup',
  'brMultiIFPrimaryDNSIPAddress' => '1.3.6.1.4.1.2435.2.4.4.99.1.1.1.2',
  'brMultiIFSecondaryDNSIPAddress' => '1.3.6.1.4.1.2435.2.4.4.99.1.1.1.3',
  'brMultiIFTCPIPConnectTime' => '1.3.6.1.4.1.2435.2.4.4.99.1.1.1.4',
  'brnetMultiIFConfig' => '1.3.6.1.4.1.2435.2.4.4.1240',
  'brMultiIFconfig' => '1.3.6.1.4.1.2435.2.4.4.1240.1',
  'brMultiIFSupported' => '1.3.6.1.4.1.2435.2.4.4.1240.1.1',
  'brMultiIFActiveIF' => '1.3.6.1.4.1.2435.2.4.4.1240.1.2',
  'brMultiIFActiveIFDefinition' => 'BROTHER-MIB::brMultiIFActiveIF',
  'brMultiIFAllSetDefault' => '1.3.6.1.4.1.2435.2.4.4.1240.1.3',
  'brMultiIFCount' => '1.3.6.1.4.1.2435.2.4.4.1240.1.4',
  'brMultiIFConfigureTable' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5',
  'brMultiIFConfigureEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1',
  'brMultiIFConfigureIndex' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.1',
  'brMultiIFType' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.2',
  'brMultiIFTypeDefinition' => 'BROTHER-MIB::brMultiIFType',
  'brMultiIFDescription' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.3',
  'brMultiIFNodeName' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.4',
  'brMultiIFInterfaceEnable' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.5',
  'brMultiIFEnetMode' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.6',
  'brMultiIFHardwareType' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.7',
  'brMultiIFNodeType' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.8',
  'brMultiIFInterfaceEnableImmediate' => '1.3.6.1.4.1.2435.2.4.4.1240.1.5.1.9',
  'brMultiIFPrimaryInterface' => '1.3.6.1.4.1.2435.2.4.4.1240.1.6',
  'brMultiIFInterfaceInformation' => '1.3.6.1.4.1.2435.2.4.4.1240.1.7',
  'brMultiIFcontrol' => '1.3.6.1.4.1.2435.2.4.4.1240.2',
  'brMultiIFControlTable' => '1.3.6.1.4.1.2435.2.4.4.1240.2.1',
  'brMultiIFControlEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.2.1.1',
  'brMultiIFSetDefault' => '1.3.6.1.4.1.2435.2.4.4.1240.2.1.1.1',
  'brMultiIFservice' => '1.3.6.1.4.1.2435.2.4.4.1240.4',
  'brMultiIFServiceTable' => '1.3.6.1.4.1.2435.2.4.4.1240.4.1',
  'brMultiIFServiceEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.4.1.1',
  'brMultiIFServiceCount' => '1.3.6.1.4.1.2435.2.4.4.1240.4.1.1.1',
  'brMultiIFServiceStringLimit' => '1.3.6.1.4.1.2435.2.4.4.1240.4.1.1.2',
  'brMultiIFServiceStringCount' => '1.3.6.1.4.1.2435.2.4.4.1240.4.1.1.3',
  'brMultiIFServiceFilterCount' => '1.3.6.1.4.1.2435.2.4.4.1240.4.1.1.4',
  'brMultiIFServiceInfoTable' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2',
  'brMultiIFServiceInfoEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1',
  'brMultiIFServiceIndex' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.1',
  'brMultiIFServiceName' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.2',
  'brMultiIFServicePort' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.3',
  'brMultiIFServiceFilter' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.4',
  'brMultiIFServiceBOT' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.5',
  'brMultiIFServiceEOT' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.6',
  'brMultiIFServiceMatch' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.7',
  'brMultiIFServiceReplace' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.8',
  'brMultiIFServiceTCPPort' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.9',
  'brMultiIFServiceNDSTree' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.10',
  'brMultiIFServiceNDSContext' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.11',
  'brMultiIFServiceVines' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.12',
  'brMultiIFServiceObsolete' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.13',
  'brMultiIFServiceNetwareServerCount' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.14',
  'brMultiIFServiceReceiveOnly' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.15',
  'brMultiIFServiceTCPQueued' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.16',
  'brMultiIFServiceProtocolLAT' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.17',
  'brMultiIFServiceProtocolTCPIP' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.18',
  'brMultiIFServiceProtocolNetware' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.19',
  'brMultiIFServiceProtocolAppleTalk' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.20',
  'brMultiIFServiceProtocolBanyan' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.21',
  'brMultiIFServiceProtocolDLC' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.22',
  'brMultiIFServiceProtocolNetBEUI' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.23',
  'brMultiIFServiceNetwareServerMode' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.24',
  'brMultiIFServiceNetwareRemotePrinterNum' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.25',
  'brMultiIFServiceProtocolIPP' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.26',
  'brMultiIFServiceAppleTalkType' => '1.3.6.1.4.1.2435.2.4.4.1240.4.2.1.27',
  'brMultiIFServiceStringInfoTable' => '1.3.6.1.4.1.2435.2.4.4.1240.4.3',
  'brMultiIFServiceStringInfoEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.4.3.1',
  'brMultiIFServiceStringIndex' => '1.3.6.1.4.1.2435.2.4.4.1240.4.3.1.1',
  'brMultiIFServiceString' => '1.3.6.1.4.1.2435.2.4.4.1240.4.3.1.2',
  'brMultiIFprotocol' => '1.3.6.1.4.1.2435.2.4.4.1240.5',
  'brMultiIFtcpip' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2',
  'brMultiIFTCPIPTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1',
  'brMultiIFTCPIPEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1',
  'brMultiIFTCPIPAddress' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.1',
  'brMultiIFTCPIPSubnetMask' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.2',
  'brMultiIFTCPIPGateway' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.3',
  'brMultiIFTCPIPMethod' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.4',
  'brMultiIFTCPIPUpdate' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.5',
  'brMultiIFTCPIPTimeout' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.6',
  'brMultiIFTCPIPBootTries' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.7',
  'brMultiIFTCPIPRARPNoSubnet' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.8',
  'brMultiIFTCPIPRARPNoGateway' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.9',
  'brMultiIFTCPIPUseMethod' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.10',
  'brMultiIFTCPIPMethodServer' => '1.3.6.1.4.1.2435.2.4.4.1240.5.2.1.1.11',
  'brMultiIFnetbeui' => '1.3.6.1.4.1.2435.2.4.4.1240.5.8',
  'brMultiIFNetBIOSTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.8.1',
  'brMultiIFNetBIOSEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.8.1.1',
  'brMultiIFNetBIOSIPMethod' => '1.3.6.1.4.1.2435.2.4.4.1240.5.8.1.1.1',
  'brMultiIFTCPIPNetBIOSPrimaryWINSAddr' => '1.3.6.1.4.1.2435.2.4.4.1240.5.8.1.1.2',
  'brMultiIFTCPIPNetBIOSSecondaryWINSAddr' => '1.3.6.1.4.1.2435.2.4.4.1240.5.8.1.1.3',
  'brMultiIFNetBEUIDomain' => '1.3.6.1.4.1.2435.2.4.4.1240.5.8.1.1.4',
  'brMultiIForiginalapipa' => '1.3.6.1.4.1.2435.2.4.4.1240.5.12',
  'brMultiIFAPIPATable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.12.1',
  'brMultiIFAPIPAEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.12.1.1',
  'brMultiIFAPIPASupported' => '1.3.6.1.4.1.2435.2.4.4.1240.5.12.1.1.1',
  'brMultiIFAPIPAEnable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.12.1.1.2',
  'brMultiIForiginalLAA' => '1.3.6.1.4.1.2435.2.4.4.1240.5.14',
  'brMultiIFLAATable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.14.1',
  'brMultiIFLAAEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.14.1.1',
  'brMultiIFLAASupported' => '1.3.6.1.4.1.2435.2.4.4.1240.5.14.1.1.1',
  'brMultiIFLAAMacAddress' => '1.3.6.1.4.1.2435.2.4.4.1240.5.14.1.1.2',
  'brMultiIForiginalIPv6' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15',
  'brMultiIFIPv6AddressCountTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.1',
  'brMultiIFIPv6AddressCountEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.1.1',
  'brMultiIFIPv6AddressCount' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.1.1.1',
  'brMultiIFIPv6AddressTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.2',
  'brMultiIFIPv6AddressEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.2.1',
  'brMultiIFIPv6AddressIndex' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.2.1.1',
  'brMultiIFIPv6Address' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.2.1.2',
  'brMultiIFIPv6UseMethod' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.2.1.3',
  'brMultiIFIPv6MethodServer' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.2.1.4',
  'brMultiIFIPv6StaticAddressCountTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.3',
  'brMultiIFIPv6StaticAddressCountEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.3.1',
  'brMultiIFIPv6StaticAddressCount' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.3.1.1',
  'brMultiIFIPv6StaticAddressTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.4',
  'brMultiIFIPv6StaticAddressEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.4.1',
  'brMultiIFIPv6StaticAddressIndex' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.4.1.1',
  'brMultiIFIPv6StaticAddressEnable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.4.1.2',
  'brMultiIFIPv6StaticAddress' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.4.1.3',
  'brMultiIFIPv6StaticAddressPrefixLength' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.4.1.4',
  'brMultiIFDNSIPv6AddressTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.5',
  'brMultiIFDNSIPv6AddressEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.5.1',
  'brMultiIFPrimaryDNSIPv6Address' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.5.1.1',
  'brMultiIFSecondaryDNSIPv6Address' => '1.3.6.1.4.1.2435.2.4.4.1240.5.15.5.1.2',
  'brMultiIForiginalWebServices' => '1.3.6.1.4.1.2435.2.4.4.1240.5.16',
  'brMultiIFWebServicesTable' => '1.3.6.1.4.1.2435.2.4.4.1240.5.16.1',
  'brMultiIFWebServicesEntry' => '1.3.6.1.4.1.2435.2.4.4.1240.5.16.1.1',
  'brMultiIFWebServicesName' => '1.3.6.1.4.1.2435.2.4.4.1240.5.16.1.1.1',
  'brMultiIFWebServicesInstanceID' => '1.3.6.1.4.1.2435.2.4.4.1240.5.16.1.1.2',
  'brMultiIFWebServicesMetadataVersion' => '1.3.6.1.4.1.2435.2.4.4.1240.5.16.1.1.3',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'BROTHER-MIB'} = {
  brMediaFixTray2 => {
    '1' => 'off',
    '2' => 'regular',
    '3' => 'thick',
    '4' => 'thicker',
    '5' => 'transparency',
    '6' => 'thin',
    '7' => 'bond',
    '8' => 'envelopes',
    '9' => 'envThick',
    '10' => 'envThin',
    '11' => 'recycled',
  },
  brMediaFixTray4 => {
    '1' => 'off',
    '2' => 'regular',
    '3' => 'thick',
    '4' => 'thicker',
    '5' => 'transparency',
    '6' => 'thin',
    '7' => 'bond',
    '8' => 'envelopes',
    '9' => 'envThick',
    '10' => 'envThin',
    '11' => 'recycled',
  },
  brPrintPagesPaperTypeType => {
    '3' => 'transparency',
    '12' => 'regularthinrecycled',
    '13' => 'thickthickerbond',
    '14' => 'envelopesenvthickenvthin',
  },
  brProxyBypassServer => {
    '1' => 'off',
    '2' => 'on',
  },
  brPfKitType => {
    '1' => 'pfkit1',
    '2' => 'pfkit2',
    '3' => 'pfkit3',
    '4' => 'pfkit4',
    '10' => 'pfkitmp',
    '20' => 'pfkitdx',
  },
  brSmallPaperSize3 => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '1000' => 'noCasette',
  },
  brProxyServerType => {
    '1' => 'http',
    '2' => 'secure',
    '3' => 'ftp',
    '4' => 'gopher',
    '5' => 'socks',
  },
  brpsWLanCapabilityAuthModeType => {
    '1' => 'opensystem',
    '2' => 'shardkey',
    '3' => 'wpa-psk',
    '4' => 'wpa-none',
    '5' => 'wpa',
    '6' => 'wpa2',
    '7' => 'leap',
    '8' => 'eapfast-none',
    '9' => 'eapfast-mschapv2',
    '10' => 'eapfast-gtc',
    '11' => 'eapfast-tls',
    '12' => 'wpa2-psk',
  },
  brSmallPaperSize4 => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '1000' => 'noCasette',
  },
  brpsWLanAuthMode => {
    '1' => 'openSystem',
    '2' => 'sharedKey',
    '3' => 'wpa-psk',
    '4' => 'wpa-none',
    '5' => 'wpa',
    '6' => 'wpa2',
    '7' => 'leap',
    '8' => 'eapfast-none',
    '9' => 'eapfast-mschapv2',
    '10' => 'eapfast-gtc',
    '11' => 'eapfast-tls',
    '12' => 'wpa2-psk',
  },
  brCarbonCopyMode => {
    '1' => 'off',
    '2' => 'on',
    '3' => 'auto',
    '4' => 'parallel',
  },
  brPrtAdvancedLowerLCD => {
    '1' => 'nonePage',
    '2' => 'counter',
    '3' => 'jobName',
  },
  brpsWLanMode => {
    '1' => 'dot11b-gAuto',
    '2' => 'dot11b',
    '3' => 'dot11g',
    '4' => 'dot11g-turbo',
  },
  brEmailReportsSendReportatPowerOn => {
    '1' => 'off',
    '2' => 'on',
  },
  brEmailReportsFrequency => {
    '1' => 'daily',
    '2' => 'weekly',
    '3' => 'monthly',
  },
  brmpsize => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
  },
  brEmailReportsReportFormat => {
    '1' => 'plaintext',
    '2' => 'xml',
  },
  brLCDMode4 => {
    '1' => 'fix',
    '2' => 'blink',
    '3' => 'scroll',
    '4' => 'blinkScroll',
  },
  brMultiIFType => {
    '1' => 'lan',
    '2' => 'wirelesslan',
  },
  brCarbonCopyMacro => {
    '1' => 'off',
    '2' => 'on',
  },
  brPictBridgePaperSize => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
  },
  brMediaFixTray3 => {
    '1' => 'off',
    '2' => 'regular',
    '3' => 'thick',
    '4' => 'thicker',
    '5' => 'transparency',
    '6' => 'thin',
    '7' => 'bond',
    '8' => 'envelopes',
    '9' => 'envThick',
    '10' => 'envThin',
    '11' => 'recycled',
  },
  brMultiIFActiveIF => {
    '1' => 'lan',
    '2' => 'wirelesslan',
    '3' => 'both',
  },
  brPrtAdvancedBuzzerVolume => {
    '1' => 'high',
    '2' => 'low',
  },
  brpersonality => {
    '1' => 'pcl',
    '2' => 'hpgl',
    '4' => 'ps',
    '5' => 'auto',
    '6' => 'ibm',
    '7' => 'epson',
    '8' => 'hbp',
  },
  brLCDMode5 => {
    '1' => 'fix',
    '2' => 'blink',
    '3' => 'scroll',
    '4' => 'blinkScroll',
  },
  brSmallPaperSize2 => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '1000' => 'noCasette',
  },
  brpsWLanCtsType => {
    '1' => 'only',
    '2' => 'rts-cts',
  },
  brMediaFixMP => {
    '1' => 'off',
    '2' => 'regular',
    '3' => 'thick',
    '4' => 'thicker',
    '5' => 'transparency',
    '6' => 'thin',
    '7' => 'bond',
    '8' => 'envelopes',
    '9' => 'envThick',
    '10' => 'envThin',
    '11' => 'recycled',
  },
  brScanCountType => {
    '1' => 'adf',
    '2' => 'fb',
    '3' => 'adfdx',
  },
  brpaper => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '923' => 'a5l',
    '924' => 'b6JIS',
    '925' => 'prc16k195x270',
    '926' => 'prc16k184x260',
    '927' => 'prc16k197x273',
    '1001' => 'auto',
  },
  brEmailReportsWeek => {
    '1' => 'sunday',
    '2' => 'monday',
    '3' => 'tuesday',
    '4' => 'wednesday',
    '5' => 'thursday',
    '6' => 'friday',
    '7' => 'saturday',
  },
  brEmailReportsSendReportNow => {
    '1' => 'off',
    '2' => 'on',
  },
  brPagePSKeepPCLFonts => {
    '1' => 'off',
    '2' => 'on',
  },
  brtray1size => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
  },
  brPrintPagesFuncType => {
    '1' => 'pcPrinttotal',
    '2' => 'faxtotal',
    '3' => 'copytotal',
    '4' => 'copycolor',
    '5' => 'pcPrintcolor',
    '6' => 'faxcolor',
    '7' => 'pcPrintmono',
    '8' => 'faxmono',
    '9' => 'copymono',
  },
  brpsWLanCtsMode => {
    '1' => 'auto',
    '2' => 'always',
    '3' => 'none',
  },
  brNotificationRestoration => {
    '1' => 'off',
    '2' => 'on',
  },
  brpsAvailableWLanEncryptMode => {
    '1' => 'none',
    '2' => 'active',
    '3' => 'wep',
    '4' => 'tkip',
  },
  brSmallPaperSizeMP => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '1000' => 'noCasette',
  },
  brPrtAdvancedLanguage => {
    '1' => 'english',
    '2' => 'danish',
    '3' => 'dutch',
    '4' => 'finish',
    '5' => 'french',
    '6' => 'german',
    '7' => 'italian',
    '8' => 'norwegian',
    '9' => 'portuguse',
    '10' => 'swedish',
    '11' => 'spanish',
    '12' => 'turkish',
    '13' => 'polish',
    '14' => 'japanese',
    '15' => 'russian',
    '16' => 'czech',
    '17' => 'hungarian',
    '18' => 'romanian',
    '19' => 'bulgarian',
    '20' => 'slovakian',
    '21' => 'chinese',
    '22' => 'brazil',
  },
  brLdapServerAuth => {
    '1' => 'anonymous',
    '2' => 'simple',
    '3' => 'kerberos',
  },
  brPrtAdvancedDestination => {
    '1' => 'standardOutputTray',
    '2' => 'oct',
    '3' => 'octStack',
  },
  brCarbonCopyTray => {
    '1' => 'tray1',
    '2' => 'tray2',
    '3' => 'tray3',
    '4' => 'tray4',
    '10' => 'mpTray',
    '11' => 'auto',
  },
  brPrtAdvancedPanelBuzzer => {
    '1' => 'off',
    '2' => 'on',
  },
  brpsWLanWepKeyType => {
    '1' => 'hex',
    '2' => 'ascii',
  },
  brtray2size => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
  },
  brpsWLanTransmitPowerSetting => {
    '1' => 'full',
    '2' => 'half',
    '3' => 'quarter',
    '4' => 'one-eighth',
    '5' => 'minimum',
    '6' => 'off',
  },
  brpsWLanAssociate => {
    '1' => 'update',
    '2' => 'print',
    '3' => 'test',
    '4' => 'applyonly',
    '5' => 'simplewizard',
  },
  brpsWLanAssociateResult => {
    '1' => 'linkOK',
    '2' => 'noSuchWLan',
    '3' => 'invalidWLanNetKey',
    '4' => 'invalidAuthUserID',
    '5' => 'invalidAuthUserPass',
  },
  brInfoModelNumber => {
    '4' => 'hl2400ce',
    '5' => 'hl3400CN',
    '6' => 'hl3260',
    '8' => 'hl2460',
    '9' => 'hl2600cn',
    '11' => 'hl3450cn',
    '13' => 'am',
    '14' => 'zlhe',
    '15' => 'zl2',
    '16' => 'jigen',
    '17' => 'aml',
    '18' => 'l4c',
    '19' => 'all',
    '20' => 'alLedModel',
    '21' => 'alLcdModel',
    '22' => 'hl4040',
    '23' => 'allchn',
    '24' => 'hl4050hl4070',
    '25' => 'all2',
    '101' => 'zlfb',
    '102' => 'zl',
    '103' => 'bh',
    '104' => 'bhfb',
    '105' => 'zlhs',
    '106' => 'bhhs',
    '107' => 'zl2fb',
    '108' => 'bhl2mfc',
    '109' => 'bhl2fb',
    '110' => 'zl2mfc',
    '111' => 'mini2',
    '112' => 'mini2adf',
    '113' => 'bh3fb',
    '114' => 'bh3mfc',
    '115' => 'allmfc',
    '116' => 'allfb',
    '117' => 'slow4c',
    '118' => 'mini2eColorLCD',
    '119' => 'mini2eColorLCDADF',
    '120' => 'alfb',
    '121' => 'dcp540',
    '122' => 'dcp750',
    '123' => 'mfc440',
    '124' => 'mfc665',
    '125' => 'mfc850',
    '126' => 'mfc860',
    '127' => 'mfc5460',
    '128' => 'mfc5860',
    '129' => 'dcp6150',
    '130' => 'dcp6260',
    '131' => 'dcp6460',
    '132' => 'dcp6860',
    '133' => 'dcp770',
    '134' => 'mfc480',
    '135' => 'acfbCIS',
    '136' => 'acfbCCD',
    '137' => 'mfc7440',
    '138' => 'mfc7840',
    '139' => 'mfc5490',
    '140' => 'mfc5890',
    '141' => 'mfc6490',
    '142' => 'dcp6690',
    '143' => 'mfc6890',
    '144' => 'dcp585',
    '145' => 'mfc490',
    '146' => 'mfc790',
    '147' => 'mfc990',
    '148' => 'mfc930',
  },
  brDirectPrintPdfThumbnailType => {
    '1' => 'alternativeImage',
    '2' => 'reductionImage',
  },
  brNetRemoteSetUpFileFormat => {
    '1' => 'rms',
    '2' => 'rmd',
    '3' => 'rmsrmd',
  },
  brpsWLanAPSetupMode => {
    '1' => 'false',
    '2' => 'true',
  },
  brPrtAdvancedErrorBuzzer => {
    '1' => 'off',
    '2' => 'normal',
    '3' => 'special',
  },
  brPrintPagesPaperSize => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '909' => 'legalA4Long',
    '910' => 'b6A5A6',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '924' => 'b6JIS',
    '999' => 'otherPage',
  },
  brShowIPAddressInfo => {
    '1' => 'off',
    '2' => 'on',
  },
  brPrtAdvancedSleepIndication => {
    '1' => 'off',
    '2' => 'dimmed',
  },
  brpsWLanAssociateTestResult => {
    '1' => 'linkOK',
    '2' => 'noSuchWLan',
    '3' => 'invalidWLanNetKey',
    '4' => 'invalidAuthUserID',
    '5' => 'invalidAuthUserPass',
  },
  brtray3size => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
  },
  brpsWLanDeviceType => {
    '1' => 'stationMode',
    '2' => 'accessPointMode',
  },
  brDirectPrintPaperSize => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '923' => 'a5l',
    '924' => 'b6jis',
    '925' => 'prc16k195x270',
    '926' => 'prc16k184x260',
    '927' => 'prc16k197x273',
  },
  brPrtAdvancedAutoOnline => {
    '1' => 'off',
    '2' => 'on',
  },
  brPagePSCAPTsetting => {
    '1' => 'off',
    '2' => 'on',
  },
  brpsWLanEncryptMode => {
    '1' => 'none',
    '2' => 'wep',
    '3' => 'tkip',
    '4' => 'aes',
  },
  brPagePSPrintPSError => {
    '1' => 'off',
    '2' => 'on',
  },
  brNotificationStatusID => {
    '1' => 'coverOpen',
    '2' => 'jam',
    '3' => 'tonerLow',
    '4' => 'tonerEmpty',
    '5' => 'userConsumableWarning',
    '6' => 'userConsumableError',
    '7' => 'servicemanConsumableWarning',
    '8' => 'servicemanConsumableError',
    '9' => 'changeDrum',
    '10' => 'memoryFull',
    '11' => 'inputMediaError',
    '12' => 'outputFull',
    '13' => 'notInstalled',
    '14' => 'machineError',
    '15' => 'otherErrors',
  },
  brpsAvailableWLanCommMode => {
    '1' => 'accesPoint',
    '2' => 'adhoc-Wi-Fi',
  },
  brLCDMode2 => {
    '1' => 'fix',
    '2' => 'blink',
    '3' => 'scroll',
  },
  brpsWLanAuthEAP => {
    '1' => 'eapMD5',
    '2' => 'eapTLS',
    '3' => 'eapTTLS',
    '4' => 'peap',
    '5' => 'leap',
    '6' => 'eapfast-none',
    '7' => 'eapfast-mschapv2',
    '8' => 'eapfast-gtc',
    '9' => 'eapfast-tls',
  },
  brpsWLanCapabilityEncryptModeType => {
    '1' => 'none',
    '2' => 'wep',
    '3' => 'tkip',
    '4' => 'aes',
    '5' => 'ckip',
  },
  brpsAvailableWLanMode => {
    '1' => 'dot11b-gAuto',
    '2' => 'dot11b',
    '3' => 'dot11g',
  },
  brNotificationMainRule => {
    '1' => 'off',
    '2' => 'everytime',
    '3' => 'times',
    '4' => 'minutes',
  },
  brpsWLanWepKeySize => {
    '1' => 'size40',
    '2' => 'size104',
  },
  brMultiIFTCPIPDNSIPSetup => {
    '1' => 'static',
    '2' => 'auto',
  },
  brLCDMode3 => {
    '1' => 'fix',
    '2' => 'blink',
    '3' => 'scroll',
    '4' => 'blinkScroll',
  },
  brtray4size => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
  },
  brpsAvailableWLanAuthMode => {
    '1' => 'none',
    '2' => 'active',
  },
  brDNSIPSetup => {
    '1' => 'static',
    '2' => 'auto',
  },
  brBackLightColor => {
    '1' => 'green',
    '2' => 'orange',
    '3' => 'red',
    '255' => 'notsupport',
  },
  brPanelLock => {
    '1' => 'off',
    '2' => 'on',
  },
  brpsPortType => {
    '1' => 'parallel',
    '2' => 'serial',
  },
  brPrintPagesMediaPlaceType => {
    '1' => 'face',
    '2' => 'back',
  },
  brSmallPaperSize1 => {
    '1' => 'executive',
    '2' => 'letter',
    '3' => 'legal',
    '24' => 'a6',
    '25' => 'a5',
    '26' => 'a4',
    '27' => 'a3ISO',
    '45' => 'b5JIS',
    '46' => 'b4JIS',
    '80' => 'monarch',
    '81' => 'com10',
    '90' => 'dl',
    '91' => 'c5',
    '99' => 'b6',
    '100' => 'b5',
    '890' => 'ledger',
    '891' => 'a3PLUS',
    '892' => 'letterShortEdge',
    '893' => 'a4ShortEdge',
    '894' => 'a4LONG',
    '895' => 'executiveShortEdge',
    '896' => 'b5ISOShortEdge',
    '897' => 'custom',
    '898' => 'a4Letter',
    '899' => 'b5Executive',
    '900' => 'envelopes',
    '901' => 'dll',
    '902' => 'hagaki',
    '903' => 'folio',
    '904' => 'organaizerJ',
    '905' => 'organaizerK',
    '906' => 'organaizerL',
    '907' => 'organaizerM',
    '908' => 'userdefined',
    '911' => 'detectsensor',
    '920' => 'inches3x5',
    '921' => 'envelopesY4',
    '922' => 'largestEnvelopesTheWest',
    '1000' => 'noCasette',
  },
  brPrtAdvancedJamRecovery => {
    '1' => 'off',
    '2' => 'on',
  },
  brLCDMode1 => {
    '1' => 'fix',
    '2' => 'blink',
    '3' => 'scroll',
    '4' => 'blinkScroll',
  },
  brpsWLanCommMode => {
    '1' => 'infrastructure',
    '2' => 'ad-Hoc-WiFi',
    '3' => 'ad-Hoc',
  },
  brFuncLockUserFuncMember => {
    '1' => 'copycolor',
    '2' => 'copybr',
    '3' => 'faxtx',
    '4' => 'faxrx',
    '5' => 'scan',
    '6' => 'print',
    '7' => 'pcc',
  },
  brFuncLockPublicFuncMember => {
    '1' => 'copycolor',
    '2' => 'copybr',
    '3' => 'faxtx',
    '4' => 'faxrx',
    '5' => 'scan',
    '6' => 'print',
    '7' => 'pcc',
  },
  brBasicSettingConfigured => {
    '1' => 'unconfigured',
    '2' => 'configured',
  },
  brpsWLanCapabilityAuthEAPType => {
    '1' => 'eap-md5',
    '2' => 'eap-tls',
    '3' => 'eap-ttls',
    '4' => 'peap',
    '5' => 'leap',
    '6' => 'eapfast-none',
    '7' => 'eapfast-mschapv2',
    '8' => 'eapfast-gtc',
    '9' => 'eapfast-tls',
  },
  brMediaFixTray1 => {
    '1' => 'off',
    '2' => 'regular',
    '3' => 'thick',
    '4' => 'thicker',
    '5' => 'transparency',
    '6' => 'thin',
    '7' => 'bond',
    '8' => 'envelopes',
    '9' => 'envThick',
    '10' => 'envThin',
    '11' => 'recycled',
  },
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::HOSTRESOURCESMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'HOST-RESOURCES-MIB'} = {
  url => '',
  name => 'HOST-RESOURCES-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'HOST-RESOURCES-MIB'} =
    '1.3.6.1.2.1.25';

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'HOST-RESOURCES-MIB'} = {
  hostResourcesMibModule => '1.3.6.1.2.1.25',
  hrSystem => '1.3.6.1.2.1.25.1',
  hrSystemUptime => '1.3.6.1.2.1.25.1.1',
  hrSystemDate => '1.3.6.1.2.1.25.1.2',
  hrSystemDateDefinition => 'MIB-2-MIB::DateAndTime',
  hrSystemInitialLoadDevice => '1.3.6.1.2.1.25.1.3',
  hrSystemInitialLoadParameters => '1.3.6.1.2.1.25.1.4',
  hrSystemNumUsers => '1.3.6.1.2.1.25.1.5',
  hrSystemProcesses => '1.3.6.1.2.1.25.1.6',
  hrSystemMaxProcesses => '1.3.6.1.2.1.25.1.7',
  hrStorage => '1.3.6.1.2.1.25.2',
  hrStorageTypes => '1.3.6.1.2.1.25.2.1',
  hrStorageTypeDefinition => 'OID::HOST-RESOURCES-MIB',
  hrStorageOther => '1.3.6.1.2.1.25.2.1.1',
  hrStorageRam => '1.3.6.1.2.1.25.2.1.2',
  hrStorageVirtualMemory => '1.3.6.1.2.1.25.2.1.3',
  hrStorageFixedDisk => '1.3.6.1.2.1.25.2.1.4',
  hrStorageRemovableDisk => '1.3.6.1.2.1.25.2.1.5',
  hrStorageFloppyDisk => '1.3.6.1.2.1.25.2.1.6',
  hrStorageCompactDisc => '1.3.6.1.2.1.25.2.1.7',
  hrStorageRamDisk => '1.3.6.1.2.1.25.2.1.8',
  hrMemorySize => '1.3.6.1.2.1.25.2.2',
  hrStorageTable => '1.3.6.1.2.1.25.2.3',
  hrStorageEntry => '1.3.6.1.2.1.25.2.3.1',
  hrStorageIndex => '1.3.6.1.2.1.25.2.3.1.1',
  hrStorageType => '1.3.6.1.2.1.25.2.3.1.2',
  hrStorageDescr => '1.3.6.1.2.1.25.2.3.1.3',
  hrStorageAllocationUnits => '1.3.6.1.2.1.25.2.3.1.4',
  hrStorageSize => '1.3.6.1.2.1.25.2.3.1.5',
  hrStorageUsed => '1.3.6.1.2.1.25.2.3.1.6',
  hrStorageAllocationFailures => '1.3.6.1.2.1.25.2.3.1.7',
  hrDevice => '1.3.6.1.2.1.25.3',
  hrDeviceTypes => '1.3.6.1.2.1.25.3.1',
  hrDeviceTypeDefinition => 'OID::HOST-RESOURCES-MIB',
  hrDeviceOther => '1.3.6.1.2.1.25.3.1.1',
  hrDeviceUnknown => '1.3.6.1.2.1.25.3.1.2',
  hrDeviceProcessor => '1.3.6.1.2.1.25.3.1.3',
  hrDeviceNetwork => '1.3.6.1.2.1.25.3.1.4',
  hrDevicePrinter => '1.3.6.1.2.1.25.3.1.5',
  hrDeviceDiskStorage => '1.3.6.1.2.1.25.3.1.6',
  hrDeviceVideo => '1.3.6.1.2.1.25.3.1.10',
  hrDeviceAudio => '1.3.6.1.2.1.25.3.1.11',
  hrDeviceCoprocessor => '1.3.6.1.2.1.25.3.1.12',
  hrDeviceKeyboard => '1.3.6.1.2.1.25.3.1.13',
  hrDeviceModem => '1.3.6.1.2.1.25.3.1.14',
  hrDeviceParallelPort => '1.3.6.1.2.1.25.3.1.15',
  hrDevicePointing => '1.3.6.1.2.1.25.3.1.16',
  hrDeviceSerialPort => '1.3.6.1.2.1.25.3.1.17',
  hrDeviceTape => '1.3.6.1.2.1.25.3.1.18',
  hrDeviceClock => '1.3.6.1.2.1.25.3.1.19',
  hrDeviceVolatileMemory => '1.3.6.1.2.1.25.3.1.20',
  hrDeviceNonVolatileMemory => '1.3.6.1.2.1.25.3.1.21',
  hrDeviceTable => '1.3.6.1.2.1.25.3.2',
  hrDeviceEntry => '1.3.6.1.2.1.25.3.2.1',
  hrDeviceIndex => '1.3.6.1.2.1.25.3.2.1.1',
  hrDeviceType => '1.3.6.1.2.1.25.3.2.1.2',
  hrDeviceDescr => '1.3.6.1.2.1.25.3.2.1.3',
  hrDeviceID => '1.3.6.1.2.1.25.3.2.1.4',
  hrDeviceStatus => '1.3.6.1.2.1.25.3.2.1.5',
  hrDeviceStatusDefinition => 'HOST-RESOURCES-MIB::hrDeviceStatus',
  hrDeviceErrors => '1.3.6.1.2.1.25.3.2.1.6',
  hrProcessorTable => '1.3.6.1.2.1.25.3.3',
  hrProcessorEntry => '1.3.6.1.2.1.25.3.3.1',
  hrProcessorFrwID => '1.3.6.1.2.1.25.3.3.1.1',
  hrProcessorLoad => '1.3.6.1.2.1.25.3.3.1.2',
  hrNetworkTable => '1.3.6.1.2.1.25.3.4',
  hrNetworkEntry => '1.3.6.1.2.1.25.3.4.1',
  hrNetworkIfIndex => '1.3.6.1.2.1.25.3.4.1.1',
  hrPrinterTable => '1.3.6.1.2.1.25.3.5',
  hrPrinterEntry => '1.3.6.1.2.1.25.3.5.1',
  hrPrinterStatus => '1.3.6.1.2.1.25.3.5.1.1',
  hrPrinterStatusDefinition => 'HOST-RESOURCES-MIB::hrPrinterStatus',
  hrPrinterDetectedErrorState => '1.3.6.1.2.1.25.3.5.1.2',
  hrPrinterDetectedErrorStateDefinition => 'HOST-RESOURCES-MIB::hrPrinterDetectedErrorState',
  hrDiskStorageTable => '1.3.6.1.2.1.25.3.6',
  hrDiskStorageEntry => '1.3.6.1.2.1.25.3.6.1',
  hrDiskStorageAccess => '1.3.6.1.2.1.25.3.6.1.1',
  hrDiskStorageAccessDefinition => 'HOST-RESOURCES-MIB::hrDiskStorageAccess',
  hrDiskStorageMedia => '1.3.6.1.2.1.25.3.6.1.2',
  hrDiskStorageMediaDefinition => 'HOST-RESOURCES-MIB::hrDiskStorageMedia',
  hrDiskStorageRemoveble => '1.3.6.1.2.1.25.3.6.1.3',
  hrDiskStorageRemovebleDefinition => 'HOST-RESOURCES-MIB::Boolean',
  hrDiskStorageCapacity => '1.3.6.1.2.1.25.3.6.1.4',
  hrPartitionTable => '1.3.6.1.2.1.25.3.7',
  hrPartitionEntry => '1.3.6.1.2.1.25.3.7.1',
  hrPartitionIndex => '1.3.6.1.2.1.25.3.7.1.1',
  hrPartitionLabel => '1.3.6.1.2.1.25.3.7.1.2',
  hrPartitionID => '1.3.6.1.2.1.25.3.7.1.3',
  hrPartitionSize => '1.3.6.1.2.1.25.3.7.1.4',
  hrPartitionFSIndex => '1.3.6.1.2.1.25.3.7.1.5',
  hrFSTable => '1.3.6.1.2.1.25.3.8',
  hrFSEntry => '1.3.6.1.2.1.25.3.8.1',
  hrFSIndex => '1.3.6.1.2.1.25.3.8.1.1',
  hrFSMountPoint => '1.3.6.1.2.1.25.3.8.1.2',
  hrFSRemoteMountPoint => '1.3.6.1.2.1.25.3.8.1.3',
  hrFSType => '1.3.6.1.2.1.25.3.8.1.4',
  hrFSAccess => '1.3.6.1.2.1.25.3.8.1.5',
  hrFSAccessDefinition => 'HOST-RESOURCES-MIB::hrFSAccess',
  hrFSBootable => '1.3.6.1.2.1.25.3.8.1.6',
  hrFSBootableDefinition => 'HOST-RESOURCES-MIB::Boolean',
  hrFSStorageIndex => '1.3.6.1.2.1.25.3.8.1.7',
  hrFSLastFullBackupDate => '1.3.6.1.2.1.25.3.8.1.8',
  hrFSLastPartialBackupDate => '1.3.6.1.2.1.25.3.8.1.9',
  hrFSTypes => '1.3.6.1.2.1.25.3.9',
  hrFSTypeDefinition => 'OID::HOST-RESOURCES-MIB',
  hrFSOther => '1.3.6.1.2.1.25.3.9.1',
  hrFSUnknown => '1.3.6.1.2.1.25.3.9.2',
  hrFSBerkeleyFFS => '1.3.6.1.2.1.25.3.9.3',
  hrFSSys5FS => '1.3.6.1.2.1.25.3.9.4',
  hrFSFat => '1.3.6.1.2.1.25.3.9.5',
  hrFSHPFS => '1.3.6.1.2.1.25.3.9.6',
  hrFSHFS => '1.3.6.1.2.1.25.3.9.7',
  hrFSMFS => '1.3.6.1.2.1.25.3.9.8',
  hrFSNTFS => '1.3.6.1.2.1.25.3.9.9',
  hrFSVNode => '1.3.6.1.2.1.25.3.9.10',
  hrFSJournaled => '1.3.6.1.2.1.25.3.9.11',
  hrFSiso9660 => '1.3.6.1.2.1.25.3.9.12',
  hrFSRockRidge => '1.3.6.1.2.1.25.3.9.13',
  hrFSNFS => '1.3.6.1.2.1.25.3.9.14',
  hrFSNetware => '1.3.6.1.2.1.25.3.9.15',
  hrFSAFS => '1.3.6.1.2.1.25.3.9.16',
  hrFSDFS => '1.3.6.1.2.1.25.3.9.17',
  hrFSAppleshare => '1.3.6.1.2.1.25.3.9.18',
  hrFSRFS => '1.3.6.1.2.1.25.3.9.19',
  hrFSDGCFS => '1.3.6.1.2.1.25.3.9.20',
  hrFSBFS => '1.3.6.1.2.1.25.3.9.21',
  hrFSFAT32 => '1.3.6.1.2.1.25.3.9.22',
  hrFSLinuxExt2 => '1.3.6.1.2.1.25.3.9.23',
  hrSWRun => '1.3.6.1.2.1.25.4',
  hrSWOSIndex => '1.3.6.1.2.1.25.4.1',
  hrSWRunTable => '1.3.6.1.2.1.25.4.2',
  hrSWRunEntry => '1.3.6.1.2.1.25.4.2.1',
  hrSWRunIndex => '1.3.6.1.2.1.25.4.2.1.1',
  hrSWRunName => '1.3.6.1.2.1.25.4.2.1.2',
  hrSWRunID => '1.3.6.1.2.1.25.4.2.1.3',
  hrSWRunPath => '1.3.6.1.2.1.25.4.2.1.4',
  hrSWRunParameters => '1.3.6.1.2.1.25.4.2.1.5',
  hrSWRunType => '1.3.6.1.2.1.25.4.2.1.6',
  hrSWRunTypeDefinition => 'HOST-RESOURCES-MIB::hrSWRunType',
  hrSWRunStatus => '1.3.6.1.2.1.25.4.2.1.7',
  hrSWRunStatusDefinition => 'HOST-RESOURCES-MIB::hrSWRunStatus',
  hrSWRunPerf => '1.3.6.1.2.1.25.5',
  hrSWRunPerfTable => '1.3.6.1.2.1.25.5.1',
  hrSWRunPerfEntry => '1.3.6.1.2.1.25.5.1.1',
  hrSWRunPerfCPU => '1.3.6.1.2.1.25.5.1.1.1',
  hrSWRunPerfMem => '1.3.6.1.2.1.25.5.1.1.2',
  hrSWInstalled => '1.3.6.1.2.1.25.6',
  hrSWInstalledLastChange => '1.3.6.1.2.1.25.6.1',
  hrSWInstalledLastUpdateTime => '1.3.6.1.2.1.25.6.2',
  hrSWInstalledTable => '1.3.6.1.2.1.25.6.3',
  hrSWInstalledEntry => '1.3.6.1.2.1.25.6.3.1',
  hrSWInstalledIndex => '1.3.6.1.2.1.25.6.3.1.1',
  hrSWInstalledName => '1.3.6.1.2.1.25.6.3.1.2',
  hrSWInstalledID => '1.3.6.1.2.1.25.6.3.1.3',
  hrSWInstalledType => '1.3.6.1.2.1.25.6.3.1.4',
  hrSWInstalledTypeDefinition => 'HOST-RESOURCES-MIB::hrSWInstalledType',
  hrSWInstalledDate => '1.3.6.1.2.1.25.6.3.1.5',
  hrConformance => '1.3.6.1.2.1.25.7',
  hrMIBCompliances => '1.3.6.1.2.1.25.7.1',
  hrMIBGroups => '1.3.6.1.2.1.25.7.2',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'HOST-RESOURCES-MIB'} = {
  hrDeviceStatus => {
    '1' => 'unknown',
    '2' => 'running',
    '3' => 'warning',
    '4' => 'testing',
    '5' => 'down',
  },
  hrSWInstalledType => {
    '1' => 'unknown',
    '2' => 'operatingSystem',
    '3' => 'deviceDriver',
    '4' => 'application',
  },
  hrPrinterStatus => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'idle',
    '4' => 'printing',
    '5' => 'warmup',
  },
  hrDiskStorageAccess => {
    '1' => 'readWrite',
    '2' => 'readOnly',
  },
  hrDiskStorageMedia => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'hardDisk',
    '4' => 'floppyDisk',
    '5' => 'opticalDiskROM',
    '6' => 'opticalDiskWORM',
    '7' => 'opticalDiskRW',
    '8' => 'ramDisk',
  },
  hrSWRunType => {
    '1' => 'unknown',
    '2' => 'operatingSystem',
    '3' => 'deviceDriver',
    '4' => 'application',
  },
  Boolean => {
    '1' => 'true',
    '2' => 'false',
  },
  hrFSAccess => {
    '1' => 'readWrite',
    '2' => 'readOnly',
  },
  hrSWRunStatus => {
    '1' => 'running',
    '2' => 'runnable',
    '3' => 'notRunnable',
    '4' => 'invalid',
  },
  hrPrinterDetectedErrorState => sub {
    my $val = shift;
    my $state = unpack("B*", $val);
    my @errors = ();
    my $errors = {
        0 => 'lowPaper',
        1 => 'noPaper',
        2 => 'lowToner',
        3 => 'noToner',
        4 => 'doorOpen',
        5 => 'jammed',
        6 => 'offline',
        7 => 'serviceRequested',
    };
    foreach my $bit (0..7) {
      if (substr($state, $bit, 1) eq "1") {
        push(@errors, $errors->{$bit});
      }
    }
    return @errors ? join("|", @errors) : 'good';
  },
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::KYOCERAPRIVATEMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'KYOCERA-Private-MIB'} = {
  url => '',
  name => 'KYOCERA-Private-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'KYOCERA-Private-MIB'} =
    '1.3.6.1.4.1.1347.43';

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'KYOCERA-Private-MIB'} = {
  kyocera => '1.3.6.1.4.1.1347',
  kcPrinter => '1.3.6.1.4.1.1347.43',
  kcprtGeneral => '1.3.6.1.4.1.1347.43.5',
  kcprtGeneralTable => '1.3.6.1.4.1.1347.43.5.1',
  kcprtGeneralEntry => '1.3.6.1.4.1.1347.43.5.1.1',
  kcprtGeneralModelName => '1.3.6.1.4.1.1347.43.5.1.1.1',
  kcprtOptionDescription => '1.3.6.1.4.1.1347.43.5.1.1.2',
  kcprtKpdlLevel => '1.3.6.1.4.1.1347.43.5.1.1.3',
  kcprtSystemUpTime => '1.3.6.1.4.1.1347.43.5.1.1.4',
  kcprtBinNumber => '1.3.6.1.4.1.1347.43.5.1.1.5',
  kcprtCardSlotCapacity => '1.3.6.1.4.1.1347.43.5.1.1.6',
  kcprtRomSlotCapacity => '1.3.6.1.4.1.1347.43.5.1.1.7',
  kcprtSimmSlotCapacity => '1.3.6.1.4.1.1347.43.5.1.1.8',
  kcprtSimmSlotUsed => '1.3.6.1.4.1.1347.43.5.1.1.9',
  kcprtOriginalMemorySize => '1.3.6.1.4.1.1347.43.5.1.1.10',
  kcprtTotalMemorySize => '1.3.6.1.4.1.1347.43.5.1.1.11',
  kcprtUserMemorySize => '1.3.6.1.4.1.1347.43.5.1.1.12',
  kcprtVirtualMemory => '1.3.6.1.4.1.1347.43.5.1.1.13',
  kcprtVirtualMemoryDefinition => 'KYOCERA-Private-MIB::kcprtVirtualMemory',
  kcprtPageMemorySize => '1.3.6.1.4.1.1347.43.5.1.1.14',
  kcprtPageMemorySizeDefinition => 'KYOCERA-Private-MIB::kcprtPageMemorySize',
  kcprtHostBufferSize => '1.3.6.1.4.1.1347.43.5.1.1.15',
  kcprtHostBuffer1stRate => '1.3.6.1.4.1.1347.43.5.1.1.16',
  kcprtHostBuffer2ndRate => '1.3.6.1.4.1.1347.43.5.1.1.17',
  kcprtHostBuffer3rdRate => '1.3.6.1.4.1.1347.43.5.1.1.18',
  kcprtHostBufferOption => '1.3.6.1.4.1.1347.43.5.1.1.19',
  kcprtHostBufferOptionDefinition => 'KYOCERA-Private-MIB::kcprtHostBufferOption',
  kcprtBufferXoffLevel => '1.3.6.1.4.1.1347.43.5.1.1.20',
  kcprtBufferXonLevel => '1.3.6.1.4.1.1347.43.5.1.1.21',
  kcprtFFTimeout => '1.3.6.1.4.1.1347.43.5.1.1.22',
  kcprtSleepTimer => '1.3.6.1.4.1.1347.43.5.1.1.23',
  kcprtWakeupStatusPage => '1.3.6.1.4.1.1347.43.5.1.1.24',
  kcprtWakeupStatusPageDefinition => 'KYOCERA-Private-MIB::kcprtWakeupStatusPage',
  kcprtOnlineControl => '1.3.6.1.4.1.1347.43.5.1.1.25',
  kcprtOnlineControlDefinition => 'KYOCERA-Private-MIB::kcprtOnlineControl',
  kcprtCopyCount => '1.3.6.1.4.1.1347.43.5.1.1.26',
  kcprtCpuTable => '1.3.6.1.4.1.1347.43.5.4',
  kcprtCpuEntry => '1.3.6.1.4.1.1347.43.5.4.1',
  kcprtCpuIndex => '1.3.6.1.4.1.1347.43.5.4.1.1',
  kcprtCpuName => '1.3.6.1.4.1.1347.43.5.4.1.2',
  kcprtCpuClock => '1.3.6.1.4.1.1347.43.5.4.1.3',
  kcprtCpuRole => '1.3.6.1.4.1.1347.43.5.4.1.4',
  kcprtCpuRoleDefinition => 'KYOCERA-Private-MIB::kcprtCpuRole',
  kcprtFirmwareVersion => '1.3.6.1.4.1.1347.43.5.4.1.5',
  kcprtFirmwareUpdata => '1.3.6.1.4.1.1347.43.5.4.1.6',
  kcprtFirmwareUpdataDefinition => 'KYOCERA-Private-MIB::kcprtFirmwareUpdata',
  kcprtOutput => '1.3.6.1.4.1.1347.43.9',
  kcprtOutputTable => '1.3.6.1.4.1.1347.43.9.1',
  kcprtOutputEntry => '1.3.6.1.4.1.1347.43.9.1.1',
  kcprtOutputIndex => '1.3.6.1.4.1.1347.43.9.1.1.1',
  kcprtOutputMode => '1.3.6.1.4.1.1347.43.9.1.1.2',
  kcprtOutputModeDefinition => 'KYOCERA-Private-MIB::kcprtOutputMode',
  kcprtOutputMultiMode => '1.3.6.1.4.1.1347.43.9.1.1.3',
  kcprtOutputMultiModeDefinition => 'KYOCERA-Private-MIB::kcprtOutputMultiMode',
  kcprtOutputGroupNumber => '1.3.6.1.4.1.1347.43.9.1.1.4',
  kcprtOutputDefaultGroup => '1.3.6.1.4.1.1347.43.9.1.1.5',
  kcprtOutputBulkStatus => '1.3.6.1.4.1.1347.43.9.1.1.6',
  kcprtOutputBulkStatusDefinition => 'KYOCERA-Private-MIB::kcprtOutputBulkStatus',
  kcprtOutputTrayMaxCapacity => '1.3.6.1.4.1.1347.43.9.1.1.7',
  kcprtTrayGroupTable => '1.3.6.1.4.1.1347.43.9.2',
  kcprtTrayGroupEntry => '1.3.6.1.4.1.1347.43.9.2.1',
  kcprtTrayGroupIndex => '1.3.6.1.4.1.1347.43.9.2.1.1',
  kcprtTrayGroupBeginIndex => '1.3.6.1.4.1.1347.43.9.2.1.2',
  kcprtTrayGroupEndIndex => '1.3.6.1.4.1.1347.43.9.2.1.3',
  kcprtOutputTrayTable => '1.3.6.1.4.1.1347.43.9.3',
  kcprtOutputTrayEntry => '1.3.6.1.4.1.1347.43.9.3.1',
  kcprtOutputTrayIndex => '1.3.6.1.4.1.1347.43.9.3.1.1',
  kcprtOutputTrayOrder => '1.3.6.1.4.1.1347.43.9.3.1.2',
  kcprtOutputTrayGroup => '1.3.6.1.4.1.1347.43.9.3.1.3',
  kcprtOutputTrayCount => '1.3.6.1.4.1.1347.43.9.3.1.4',
  kcprtMarker => '1.3.6.1.4.1.1347.43.10',
  kcprtMarkerTable => '1.3.6.1.4.1.1347.43.10.1',
  kcprtMarkerEntry => '1.3.6.1.4.1.1347.43.10.1.1',
  kcprtMarkerIndex => '1.3.6.1.4.1.1347.43.10.1.1.1',
  kcprtMarkerKirLevel => '1.3.6.1.4.1.1347.43.10.1.1.2',
  kcprtMarkerKirLevelDefinition => 'KYOCERA-Private-MIB::kcprtMarkerKirLevel',
  kcprtMarkerEcoprintLevel => '1.3.6.1.4.1.1347.43.10.1.1.3',
  kcprtMarkerEcoprintLevelDefinition => 'KYOCERA-Private-MIB::kcprtMarkerEcoprintLevel',
  kcprtMarkerAddressabilityFeedDirDeclared => '1.3.6.1.4.1.1347.43.10.1.1.4',
  kcprtMarkerAddressabilityXFeedDirDeclared => '1.3.6.1.4.1.1347.43.10.1.1.5',
  kcprtMarkerAddressablilityFeedDirChosen => '1.3.6.1.4.1.1347.43.10.1.1.6',
  kcprtMarkerAddressablilityXFeedDirChosen => '1.3.6.1.4.1.1347.43.10.1.1.7',
  kcprtChannel => '1.3.6.1.4.1.1347.43.14',
  kcprtChannelTable => '1.3.6.1.4.1.1347.43.14.1',
  kcprtChannelEntry => '1.3.6.1.4.1.1347.43.14.1.1',
  kcprtChannelIndex => '1.3.6.1.4.1.1347.43.14.1.1.1',
  kcprtChannelFunction => '1.3.6.1.4.1.1347.43.14.1.1.2',
  kcprtChannelFunctionDefinition => 'KYOCERA-Private-MIB::kcprtChannelFunction',
  kcprtMemoryResource => '1.3.6.1.4.1.1347.43.20',
  kcprtMemoryDeviceTable => '1.3.6.1.4.1.1347.43.20.1',
  kcprtMemoryDeviceEntry => '1.3.6.1.4.1.1347.43.20.1.1',
  kcprtMemoryDeviceIndex => '1.3.6.1.4.1.1347.43.20.1.1.1',
  kcprtMemoryDeviceLocation => '1.3.6.1.4.1.1347.43.20.1.1.2',
  kcprtMemoryDeviceLocationDefinition => 'KYOCERA-Private-MIB::kcprtMemoryDeviceLocation',
  kcprtMemoryDeviceType => '1.3.6.1.4.1.1347.43.20.1.1.3',
  kcprtMemoryDeviceTypeDefinition => 'KYOCERA-Private-MIB::kcprtMemoryDeviceType',
  kcprtMemoryDeviceTotalSize => '1.3.6.1.4.1.1347.43.20.1.1.4',
  kcprtMemoryDeviceUsedSize => '1.3.6.1.4.1.1347.43.20.1.1.5',
  kcprtMemoryDeviceStatus => '1.3.6.1.4.1.1347.43.20.1.1.6',
  kcprtMemoryDeviceStatusDefinition => 'KYOCERA-Private-MIB::kcprtMemoryDeviceStatus',
  kcprtPartitionTable => '1.3.6.1.4.1.1347.43.20.2',
  kcprtPartitionEntry => '1.3.6.1.4.1.1347.43.20.2.1',
  kcprtPartitionIndex => '1.3.6.1.4.1.1347.43.20.2.1.1',
  kcprtPartitionSize => '1.3.6.1.4.1.1347.43.20.2.1.2',
  kcprtPartitionLocation => '1.3.6.1.4.1.1347.43.20.2.1.3',
  kcprtPartitionResourceType => '1.3.6.1.4.1.1347.43.20.2.1.4',
  kcprtPartitionResourceTypeDefinition => 'KYOCERA-Private-MIB::kcprtPartitionResourceType',
  kcprtPartitionName => '1.3.6.1.4.1.1347.43.20.2.1.5',
  kcprtPartitionLoad => '1.3.6.1.4.1.1347.43.20.2.1.6',
  kcprtPartitionLoadDefinition => 'KYOCERA-Private-MIB::kcprtPartitionLoad',
  kcprtMacroDataTable => '1.3.6.1.4.1.1347.43.20.3',
  kcprtMacroDataEntry => '1.3.6.1.4.1.1347.43.20.3.1',
  kcprtMacroDataIndex => '1.3.6.1.4.1.1347.43.20.3.1.1',
  kcprtMacroDataName => '1.3.6.1.4.1.1347.43.20.3.1.2',
  kcprtMacroDataID => '1.3.6.1.4.1.1347.43.20.3.1.3',
  kcprtMacroDataType => '1.3.6.1.4.1.1347.43.20.3.1.4',
  kcprtMacroDataTypeDefinition => 'KYOCERA-Private-MIB::kcprtMacroDataType',
  kcprtMacroDataAutoLoad => '1.3.6.1.4.1.1347.43.20.3.1.5',
  kcprtMacroDataAutoLoadDefinition => 'KYOCERA-Private-MIB::kcprtMacroDataAutoLoad',
  kcprtMacroDataLocation => '1.3.6.1.4.1.1347.43.20.3.1.6',
  kcprtMacroDataAttribute => '1.3.6.1.4.1.1347.43.20.3.1.7',
  kcprtMacroDataAttributeDefinition => 'KYOCERA-Private-MIB::kcprtMacroDataAttribute',
  kcprtHostDataTable => '1.3.6.1.4.1.1347.43.20.4',
  kcprtHostDataEntry => '1.3.6.1.4.1.1347.43.20.4.1',
  kcprtHostDataIndex => '1.3.6.1.4.1.1347.43.20.4.1.1',
  kcprtHostDataName => '1.3.6.1.4.1.1347.43.20.4.1.2',
  kcprtHostDataLocation => '1.3.6.1.4.1.1347.43.20.4.1.3',
  kcprtHostDataAttribute => '1.3.6.1.4.1.1347.43.20.4.1.4',
  kcprtHostDataAttributeDefinition => 'KYOCERA-Private-MIB::kcprtHostDataAttribute',
  kcprtProgramDataTable => '1.3.6.1.4.1.1347.43.20.5',
  kcprtProgramDataEntry => '1.3.6.1.4.1.1347.43.20.5.1',
  kcprtProgramDataIndex => '1.3.6.1.4.1.1347.43.20.5.1.1',
  kcprtProgramDataName => '1.3.6.1.4.1.1347.43.20.5.1.2',
  kcprtProgramDataType => '1.3.6.1.4.1.1347.43.20.5.1.3',
  kcprtProgramDataTypeDefinition => 'KYOCERA-Private-MIB::kcprtProgramDataType',
  kcprtProgramDataLocation => '1.3.6.1.4.1.1347.43.20.5.1.4',
  kcprtProgramDataAttribute => '1.3.6.1.4.1.1347.43.20.5.1.5',
  kcprtProgramDataAttributeDefinition => 'KYOCERA-Private-MIB::kcprtProgramDataAttribute',
  kcprtMessageDataTable => '1.3.6.1.4.1.1347.43.20.6',
  kcprtMessageDataEntry => '1.3.6.1.4.1.1347.43.20.6.1',
  kcprtMessageDataIndex => '1.3.6.1.4.1.1347.43.20.6.1.1',
  kcprtMessageDataName => '1.3.6.1.4.1.1347.43.20.6.1.2',
  kcprtMessageDataLocation => '1.3.6.1.4.1.1347.43.20.6.1.3',
  kcprtMessageDataAttribute => '1.3.6.1.4.1.1347.43.20.6.1.4',
  kcprtMessageDataAttributeDefinition => 'KYOCERA-Private-MIB::kcprtMessageDataAttribute',
  kcprtFontDataTable => '1.3.6.1.4.1.1347.43.20.7',
  kcprtFontDataEntry => '1.3.6.1.4.1.1347.43.20.7.1',
  kcprtFontDataIndex => '1.3.6.1.4.1.1347.43.20.7.1.1',
  kcprtTypeFaceName => '1.3.6.1.4.1.1347.43.20.7.1.2',
  kcprtFontID => '1.3.6.1.4.1.1347.43.20.7.1.3',
  kcprtFontType => '1.3.6.1.4.1.1347.43.20.7.1.4',
  kcprtFontTypeDefinition => 'KYOCERA-Private-MIB::kcprtFontType',
  kcprtFontLocation => '1.3.6.1.4.1.1347.43.20.7.1.5',
  kcprtFontAttribute => '1.3.6.1.4.1.1347.43.20.7.1.6',
  kcprtFontAttributeDefinition => 'KYOCERA-Private-MIB::kcprtFontAttribute',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'KYOCERA-Private-MIB'} = {
  kcprtMessageDataAttribute => {
    '0' => 'notRegistered',
    '1' => 'registered',
  },
  kcprtFirmwareUpdata => {
    '3' => 'enabled',
    '4' => 'disabled',
  },
  kcprtPageMemorySize => {
    '1' => 'size-128KB',
    '2' => 'size-256KB',
    '3' => 'size-512KB',
    '4' => 'size-A4orLetter',
    '5' => 'size-Legal',
    '6' => 'size-doubleA4orLetter',
    '7' => 'size-doubleLegal',
  },
  kcprtMarkerKirLevel => {
    '0' => 'offOrNotSupport',
    '1' => 'light',
    '2' => 'medium',
    '3' => 'dark',
  },
  kcprtProgramDataAttribute => {
    '0' => 'notRegistered',
    '1' => 'registered',
    '2' => 'running',
  },
  kcprtOutputMode => {
    '-1' => 'notSupported',
    '0' => 'sorter',
    '1' => 'collator',
    '2' => 'stacker',
    '3' => 'mailbox',
  },
  kcprtOnlineControl => {
    '0' => 'offLine',
    '1' => 'onLine',
  },
  kcprtMarkerEcoprintLevel => {
    '0' => 'offOrNotSupport',
    '1' => 'light',
    '2' => 'medium',
    '3' => 'dark',
  },
  kcprtMemoryDeviceStatus => {
    '0' => 'readyReadWrite',
    '1' => 'readyReadOnly',
    '2' => 'notAccessible',
    '4' => 'lowBattery',
  },
  kcprtWakeupStatusPage => {
    '0' => 'disable',
    '1' => 'enable',
  },
  kcprtMemoryDeviceLocation => {
    '0' => 'icCardSlot-A',
    '1' => 'icCardslot-B',
    '2' => 'optionROMsocket',
    '3' => 'residentFont',
    '4' => 'downloadArea',
    '255' => 'others',
  },
  kcprtFontAttribute => {
    '0' => 'notRegistered',
    '1' => 'registered',
  },
  kcprtMemoryDeviceType => {
    '0' => 'rom',
    '1' => 'flash',
    '2' => 'sram',
    '3' => 'dram',
    '255' => 'others',
  },
  kcprtHostDataAttribute => {
    '0' => 'notRegistered',
    '1' => 'registered',
  },
  kcprtProgramDataType => {
    '0' => 'emulation',
    '1' => 'prescribe',
    '255' => 'others',
  },
  kcprtChannelFunction => {
    '0' => 'through',
    '1' => 'hexDump',
  },
  kcprtVirtualMemory => {
    '0' => 'notSupported',
    '1' => 'support',
  },
  kcprtCpuRole => {
    '0' => 'engine',
    '1' => 'controller',
  },
  kcprtOutputBulkStatus => {
    '-1' => 'notSupported',
    '0' => 'notFull',
    '1' => 'full',
  },
  kcprtOutputMultiMode => {
    '-1' => 'notSupported',
    '0' => 'off',
    '1' => 'id-specific',
    '2' => 'if-specific',
  },
  kcprtMacroDataAutoLoad => {
    '0' => 'off',
    '1' => 'onWithInitialize',
    '2' => 'onWithoutInitialize',
  },
  kcprtPartitionResourceType => {
    '0' => 'void',
    '3' => 'macro',
    '4' => 'hostData',
    '5' => 'programData',
    '6' => 'messageData',
    '7' => 'fontData',
  },
  kcprtFontType => {
    '0' => 'bitmap',
    '1' => 'scalable',
    '255' => 'others',
  },
  kcprtHostBufferOption => {
    '0' => 'automatic',
    '1' => 'fixed',
  },
  kcprtMacroDataType => {
    '1' => 'prescribe',
    '2' => 'pcl',
    '255' => 'others',
  },
  kcprtPartitionLoad => {
    '0' => 'notLoaded',
    '1' => 'loaded',
  },
  kcprtMacroDataAttribute => {
    '0' => 'notRegistered',
    '1' => 'registered',
  },
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKMPSMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-MPS-MIB'} = {
  url => '',
  name => 'LEXMARK-MPS-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-MPS-MIB'} =
    '1.3.6.1.4.1.641.6';

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-MPS-MIB'} = {
  mpsMibModule => '1.3.6.1.4.1.641.4.4',
  mps => '1.3.6.1.4.1.641.6',
  mpsMIBAdminInfo => '1.3.6.1.4.1.641.6.1',
  mpsMIBCompliances => '1.3.6.1.4.1.641.6.1.1',
  mpsMIBGroups => '1.3.6.1.4.1.641.6.1.2',
  device => '1.3.6.1.4.1.641.6.2',
  deviceMibLocalization => '1.3.6.1.4.1.641.6.2.1',
  deviceTable => '1.3.6.1.4.1.641.6.2.3',
  deviceEntry => '1.3.6.1.4.1.641.6.2.3.1',
  deviceIndex => '1.3.6.1.4.1.641.6.2.3.1.1',
  devicePort => '1.3.6.1.4.1.641.6.2.3.1.2',
  deviceHrDeviceIndex => '1.3.6.1.4.1.641.6.2.3.1.3',
  deviceModel => '1.3.6.1.4.1.641.6.2.3.1.4',
  deviceSerialNumber => '1.3.6.1.4.1.641.6.2.3.1.5',
  deviceMibVersion => '1.3.6.1.4.1.641.6.2.3.1.6',
  deviceInstallDate => '1.3.6.1.4.1.641.6.2.3.1.7',
  deviceMibSupportLevel => '1.3.6.1.4.1.641.6.2.3.1.8',
  deviceMibSupportLevelDefinition => 'LEXMARK-MPS-MIB::deviceMibSupportLevel',
  deviceMachineType => '1.3.6.1.4.1.641.6.2.3.1.9',
  deviceTLI => '1.3.6.1.4.1.641.6.2.3.1.10',
  inventory => '1.3.6.1.4.1.641.6.3',
  hwInventoryTable => '1.3.6.1.4.1.641.6.3.1',
  hwInventoryEntry => '1.3.6.1.4.1.641.6.3.1.1',
  hwInventoryIndex => '1.3.6.1.4.1.641.6.3.1.1.1',
  hwInventoryParentIndex => '1.3.6.1.4.1.641.6.3.1.1.2',
  hwInventoryType => '1.3.6.1.4.1.641.6.3.1.1.3',
  hwInventoryTypeDefinition => 'LEXMARK-MPS-MIB::hwInventoryType',
  hwInventoryAdminStatus => '1.3.6.1.4.1.641.6.3.1.1.4',
  hwInventoryStatus => '1.3.6.1.4.1.641.6.3.1.1.5',
  hwInventoryPartNumber => '1.3.6.1.4.1.641.6.3.1.1.6',
  hwInventorySerialNumber => '1.3.6.1.4.1.641.6.3.1.1.7',
  hwInventoryDescription => '1.3.6.1.4.1.641.6.3.1.1.8',
  hwInventoryData => '1.3.6.1.4.1.641.6.3.1.1.9',
  supplyInventoryTable => '1.3.6.1.4.1.641.6.3.2',
  supplyInventoryEntry => '1.3.6.1.4.1.641.6.3.2.1',
  supplyInventoryIndex => '1.3.6.1.4.1.641.6.3.2.1.1',
  supplyInventoryType => '1.3.6.1.4.1.641.6.3.2.1.2',
  supplyInventoryTypeDefinition => 'LEXMARK-MPS-MIB::SupplyTypeTC',
  supplyInventoryColorantValue => '1.3.6.1.4.1.641.6.3.2.1.3',
  supplyInventoryDescription => '1.3.6.1.4.1.641.6.3.2.1.4',
  supplyDynamicIndex => '1.3.6.1.4.1.641.6.3.2.1.5',
  swInventoryTable => '1.3.6.1.4.1.641.6.3.3',
  swInventoryEntry => '1.3.6.1.4.1.641.6.3.3.1',
  swInventoryIndex => '1.3.6.1.4.1.641.6.3.3.1.1',
  swInventoryParentIndex => '1.3.6.1.4.1.641.6.3.3.1.2',
  swInventoryType => '1.3.6.1.4.1.641.6.3.3.1.3',
  swInventoryTypeDefinition => 'LEXMARK-MPS-MIB::swInventoryType',
  swInventoryAdminStatus => '1.3.6.1.4.1.641.6.3.3.1.4',
  swInventoryAdminStatusDefinition => 'LEXMARK-TC-MIB::AdminStatusTC',
  swInventoryStatus => '1.3.6.1.4.1.641.6.3.3.1.5',
  swInventoryStatusDefinition => 'LEXMARK-TC-MIB::StatusTC',
  swInventoryName => '1.3.6.1.4.1.641.6.3.3.1.6',
  swInventoryRevision => '1.3.6.1.4.1.641.6.3.3.1.7',
  swInventoryDescription => '1.3.6.1.4.1.641.6.3.3.1.8',
  swInventoryHWIndex => '1.3.6.1.4.1.641.6.3.3.1.9',
  swInventoryData => '1.3.6.1.4.1.641.6.3.3.1.10',
  stats => '1.3.6.1.4.1.641.6.4',
  generalStats => '1.3.6.1.4.1.641.6.4.1',
  genCountTable => '1.3.6.1.4.1.641.6.4.1.1',
  genCountEntry => '1.3.6.1.4.1.641.6.4.1.1.1',
  genCountIndex => '1.3.6.1.4.1.641.6.4.1.1.1.1',
  genCountType => '1.3.6.1.4.1.641.6.4.1.1.1.2',
  genCountTypeDefinition => 'LEXMARK-MPS-MIB::genCountType',
  genCountUnits => '1.3.6.1.4.1.641.6.4.1.1.1.3',
  genCountValue => '1.3.6.1.4.1.641.6.4.1.1.1.4',
  paperStats => '1.3.6.1.4.1.641.6.4.2',
  paperGeneralCountTable => '1.3.6.1.4.1.641.6.4.2.1',
  paperGeneralCountEntry => '1.3.6.1.4.1.641.6.4.2.1.1',
  paperGeneralCountIndex => '1.3.6.1.4.1.641.6.4.2.1.1.1',
  paperGeneralCountType => '1.3.6.1.4.1.641.6.4.2.1.1.2',
  paperGeneralCountTypeDefinition => 'LEXMARK-MPS-MIB::paperGeneralCountType',
  paperGeneralCountUnits => '1.3.6.1.4.1.641.6.4.2.1.1.3',
  paperGeneralCountValue => '1.3.6.1.4.1.641.6.4.2.1.1.4',
  paperSidesCountTable => '1.3.6.1.4.1.641.6.4.2.2',
  paperSidesCountEntry => '1.3.6.1.4.1.641.6.4.2.2.1',
  paperSidesCountIndex => '1.3.6.1.4.1.641.6.4.2.2.1.1',
  paperSidesPaperSize => '1.3.6.1.4.1.641.6.4.2.2.1.2',
  paperSidesPaperType => '1.3.6.1.4.1.641.6.4.2.2.1.3',
  paperSidesMonoPicked => '1.3.6.1.4.1.641.6.4.2.2.1.4',
  paperSidesColorPicked => '1.3.6.1.4.1.641.6.4.2.2.1.5',
  paperSidesMonoSafe => '1.3.6.1.4.1.641.6.4.2.2.1.6',
  paperSidesColorSafe => '1.3.6.1.4.1.641.6.4.2.2.1.7',
  paperSheetsCountTable => '1.3.6.1.4.1.641.6.4.2.3',
  paperSheetsCountEntry => '1.3.6.1.4.1.641.6.4.2.3.1',
  paperSheetsCountIndex => '1.3.6.1.4.1.641.6.4.2.3.1.1',
  paperSheetsPaperSize => '1.3.6.1.4.1.641.6.4.2.3.1.2',
  paperSheetsPaperType => '1.3.6.1.4.1.641.6.4.2.3.1.3',
  paperSheetsPicked => '1.3.6.1.4.1.641.6.4.2.3.1.4',
  paperSheetsSafe => '1.3.6.1.4.1.641.6.4.2.3.1.5',
  paperNupCountTable => '1.3.6.1.4.1.641.6.4.2.4',
  paperNupCountEntry => '1.3.6.1.4.1.641.6.4.2.4.1',
  paperNupCountIndex => '1.3.6.1.4.1.641.6.4.2.4.1.1',
  paperNupNumber => '1.3.6.1.4.1.641.6.4.2.4.1.2',
  paperNupNumberDefinition => 'LEXMARK-MPS-MIB::paperNupNumber',
  paperNupSides => '1.3.6.1.4.1.641.6.4.2.4.1.3',
  paperNupLogicalSides => '1.3.6.1.4.1.641.6.4.2.4.1.4',
  paperJobSizeTable => '1.3.6.1.4.1.641.6.4.2.5',
  paperJobSizeEntry => '1.3.6.1.4.1.641.6.4.2.5.1',
  paperJobSizeIndex => '1.3.6.1.4.1.641.6.4.2.5.1.1',
  paperJobSizeMinimum => '1.3.6.1.4.1.641.6.4.2.5.1.2',
  paperJobSizeMaximum => '1.3.6.1.4.1.641.6.4.2.5.1.3',
  paperJobSizeSideCount => '1.3.6.1.4.1.641.6.4.2.5.1.4',
  paperJobSizeJobCount => '1.3.6.1.4.1.641.6.4.2.5.1.5',
  scanStats => '1.3.6.1.4.1.641.6.4.3',
  scanCountTable => '1.3.6.1.4.1.641.6.4.3.1',
  scanCountEntry => '1.3.6.1.4.1.641.6.4.3.1.1',
  scanCountIndex => '1.3.6.1.4.1.641.6.4.3.1.1.1',
  scanCountType => '1.3.6.1.4.1.641.6.4.3.1.1.2',
  scanCountTypeDefinition => 'LEXMARK-MPS-MIB::scanCountType',
  scanCountSize => '1.3.6.1.4.1.641.6.4.3.1.1.3',
  scanCountSides => '1.3.6.1.4.1.641.6.4.3.1.1.4',
  scanCountSheets => '1.3.6.1.4.1.641.6.4.3.1.1.5',
  supplyStats => '1.3.6.1.4.1.641.6.4.4',
  currentSuppliesTable => '1.3.6.1.4.1.641.6.4.4.1',
  currentSuppliesEntry => '1.3.6.1.4.1.641.6.4.4.1.1',
  currentSupplyIndex => '1.3.6.1.4.1.641.6.4.4.1.1.1',
  currentSupplyInventoryIndex => '1.3.6.1.4.1.641.6.4.4.1.1.2',
  currentSupplyType => '1.3.6.1.4.1.641.6.4.4.1.1.3',
  currentSupplyTypeDefinition => 'LEXMARK-MPS-MIB::SupplyTypeTC',
  currentSupplyColorantValue => '1.3.6.1.4.1.641.6.4.4.1.1.4',
  currentSupplyDescription => '1.3.6.1.4.1.641.6.4.4.1.1.5',
  currentSupplySerialNumber => '1.3.6.1.4.1.641.6.4.4.1.1.6',
  currentSupplyPartNumber => '1.3.6.1.4.1.641.6.4.4.1.1.7',
  currentSupplyClass => '1.3.6.1.4.1.641.6.4.4.1.1.8',
  currentSupplyClassDefinition => 'LEXMARK-MPS-MIB::currentSupplyClass',
  currentSupplyCartridgeType => '1.3.6.1.4.1.641.6.4.4.1.1.9',
  currentSupplyCartridgeTypeDefinition => 'LEXMARK-MPS-MIB::CartridgeTypeTC',
  currentSupplyInstallDate => '1.3.6.1.4.1.641.6.4.4.1.1.10',
  currentSupplyPageCountAtInstall => '1.3.6.1.4.1.641.6.4.4.1.1.11',
  currentSupplyCurrentStatus => '1.3.6.1.4.1.641.6.4.4.1.1.12',
  currentSupplyCurrentStatusDefinition => 'LEXMARK-MPS-MIB::currentSupplyCurrentStatus',
  currentSupplyCapacityUnit => '1.3.6.1.4.1.641.6.4.4.1.1.13',
  currentSupplyCapacityUnitDefinition => 'LEXMARK-TC-MIB::UnitTC',
  currentSupplyCapacity => '1.3.6.1.4.1.641.6.4.4.1.1.14',
  currentSupplyFirstKnownLevel => '1.3.6.1.4.1.641.6.4.4.1.1.15',
  currentSupplyCurrentLevel => '1.3.6.1.4.1.641.6.4.4.1.1.16',
  currentSupplyUsage => '1.3.6.1.4.1.641.6.4.4.1.1.17',
  currentSupplyCalibrations => '1.3.6.1.4.1.641.6.4.4.1.1.18',
  currentSupplyCoverage => '1.3.6.1.4.1.641.6.4.4.1.1.19',
  supplyHistoryTable => '1.3.6.1.4.1.641.6.4.4.2',
  supplyHistoryEntry => '1.3.6.1.4.1.641.6.4.4.2.1',
  supplyHistoryIndex => '1.3.6.1.4.1.641.6.4.4.2.1.1',
  supplyHistoryInventoryIndex => '1.3.6.1.4.1.641.6.4.4.2.1.2',
  supplyHistorySupplyType => '1.3.6.1.4.1.641.6.4.4.2.1.3',
  supplyHistorySupplyTypeDefinition => 'LEXMARK-MPS-MIB::SupplyTypeTC',
  supplyHistoryColorantValue => '1.3.6.1.4.1.641.6.4.4.2.1.4',
  supplyHistoryDescription => '1.3.6.1.4.1.641.6.4.4.2.1.5',
  supplyHistorySerialNumber => '1.3.6.1.4.1.641.6.4.4.2.1.6',
  supplyHistoryCartridgeType => '1.3.6.1.4.1.641.6.4.4.2.1.7',
  supplyHistoryCartridgeTypeDefinition => 'LEXMARK-MPS-MIB::CartridgeTypeTC',
  supplyHistoryInstallDate => '1.3.6.1.4.1.641.6.4.4.2.1.8',
  supplyHistoryPageCount => '1.3.6.1.4.1.641.6.4.4.2.1.9',
  supplyHistoryCapacityUnit => '1.3.6.1.4.1.641.6.4.4.2.1.10',
  supplyHistoryCapacity => '1.3.6.1.4.1.641.6.4.4.2.1.11',
  supplyHistoryLastLevel => '1.3.6.1.4.1.641.6.4.4.2.1.12',
  supplyHistoryUsage => '1.3.6.1.4.1.641.6.4.4.2.1.13',
  supplyHistoryCalibrations => '1.3.6.1.4.1.641.6.4.4.2.1.14',
  supplyHistoryCoverage => '1.3.6.1.4.1.641.6.4.4.2.1.15',
  supplyHistogramTable => '1.3.6.1.4.1.641.6.4.4.3',
  supplyHistogramEntry => '1.3.6.1.4.1.641.6.4.4.3.1',
  supplyHistogramIndex => '1.3.6.1.4.1.641.6.4.4.3.1.1',
  supplyHistogramInventoryIndex => '1.3.6.1.4.1.641.6.4.4.3.1.2',
  supplyHistogramSupplyType => '1.3.6.1.4.1.641.6.4.4.3.1.3',
  supplyHistogramSupplyTypeDefinition => 'LEXMARK-MPS-MIB::SupplyTypeTC',
  supplyHistogramColorantValue => '1.3.6.1.4.1.641.6.4.4.3.1.4',
  supplyHistogramDescription => '1.3.6.1.4.1.641.6.4.4.3.1.5',
  supplyHistogramCapacityUnit => '1.3.6.1.4.1.641.6.4.4.3.1.6',
  supplyHistogramCapacity => '1.3.6.1.4.1.641.6.4.4.3.1.7',
  supplyHistogramCount => '1.3.6.1.4.1.641.6.4.4.3.1.8',
  supplyHistogramCountUnits => '1.3.6.1.4.1.641.6.4.4.3.1.9',
  supplyHistogramWithHistoryTable => '1.3.6.1.4.1.641.6.4.4.4',
  supplyHistogramHistoryEntry => '1.3.6.1.4.1.641.6.4.4.4.1',
  supplyHistogramHistoryIndex => '1.3.6.1.4.1.641.6.4.4.4.1.1',
  supplyHistogramHistoryInventoryIndex => '1.3.6.1.4.1.641.6.4.4.4.1.2',
  supplyHistogramHistoryCountIndex => '1.3.6.1.4.1.641.6.4.4.4.1.3',
  supplyHistogramHistorySupplyType => '1.3.6.1.4.1.641.6.4.4.4.1.4',
  supplyHistogramHistorySupplyTypeDefinition => 'LEXMARK-MPS-MIB::SupplyTypeTC',
  supplyHistogramHistoryColorantValue => '1.3.6.1.4.1.641.6.4.4.4.1.5',
  supplyHistogramHistoryDescription => '1.3.6.1.4.1.641.6.4.4.4.1.6',
  supplyHistogramHistoryCapacityUnit => '1.3.6.1.4.1.641.6.4.4.4.1.7',
  supplyHistogramHistoryCapacity => '1.3.6.1.4.1.641.6.4.4.4.1.8',
  supplyHistogramHistoryCount => '1.3.6.1.4.1.641.6.4.4.4.1.9',
  supplyHistogramHistoryCountUnits => '1.3.6.1.4.1.641.6.4.4.4.1.10',
  alerts => '1.3.6.1.4.1.641.6.5',
  deviceAlertTable => '1.3.6.1.4.1.641.6.5.1',
  deviceAlertEntry => '1.3.6.1.4.1.641.6.5.1.1',
  deviceAlertIndex => '1.3.6.1.4.1.641.6.5.1.1.1',
  deviceAlertConfigTableNode => '1.3.6.1.4.1.641.6.5.1.1.2',
  deviceAlertConfigTableNodeDefinition => 'LEXMARK-MPS-MIB::deviceAlertConfigTableNode',
  deviceAlertConfigTableIndex => '1.3.6.1.4.1.641.6.5.1.1.3',
  deviceAlertSeverity => '1.3.6.1.4.1.641.6.5.1.1.4',
  deviceAlertSeverityDefinition => 'LEXMARK-MPS-MIB::SeverityTC',
  deviceAlertCode => '1.3.6.1.4.1.641.6.5.1.1.5',
  deviceAlertCodeDefinition => 'LEXMARK-MPS-MIB::AlertCodeTC',
  deviceAlertDescription => '1.3.6.1.4.1.641.6.5.1.1.6',
  deviceAlertData => '1.3.6.1.4.1.641.6.5.1.1.7',
  deviceAlertTime => '1.3.6.1.4.1.641.6.5.1.1.8',
  deviceAlertTimeDefinition => 'MIB-2-MIB::DateAndTime',
  deviceAlertSeverityLevel => '1.3.6.1.4.1.641.6.5.1.1.9',
  deviceAlertSeverityLevelDefinition => 'PRINTER-MIB::PrtAlertSeverityLevelTC',
  deviceAlertTrainingLevel => '1.3.6.1.4.1.641.6.5.1.1.10',
  deviceAlertTrainingLevelDefinition => 'PRINTER-MIB::PrtAlertTrainingLevelTC',
  deviceAlertPrtCode => '1.3.6.1.4.1.641.6.5.1.1.11',
  deviceAlertPrtCodeDefinition => 'PRINTER-MIB::PrtAlertCodeTC',
  deviceV1AlertMPS => '1.3.6.1.4.1.641.6.5.2',
  deviceV2AlertMPSPrefix => '1.3.6.1.4.1.641.6.5.2.0',
  logs => '1.3.6.1.4.1.641.6.6',
  applications => '1.3.6.1.4.1.641.6.7',
  outputfeature => '1.3.6.1.4.1.641.6.8',
  outputOptionFeatureTable => '1.3.6.1.4.1.641.6.8.1',
  outputOptionEntry => '1.3.6.1.4.1.641.6.8.1.1',
  outputOptionIndex => '1.3.6.1.4.1.641.6.8.1.1.1',
  outputOptionName => '1.3.6.1.4.1.641.6.8.1.1.2',
  outputLevelSensing => '1.3.6.1.4.1.641.6.8.1.1.3',
  outputLevelSensingDefinition => 'LEXMARK-MPS-MIB::outputLevelSensing',
  outputOffsetting => '1.3.6.1.4.1.641.6.8.1.1.4',
  outputOffsettingDefinition => 'LEXMARK-MPS-MIB::outputOffsetting',
  outputFoldSupport => '1.3.6.1.4.1.641.6.8.1.1.5',
  outputfaceOrientation => '1.3.6.1.4.1.641.6.8.1.1.6',
  outputBindingCapable => '1.3.6.1.4.1.641.6.8.1.1.7',
  outputSeparationCapable => '1.3.6.1.4.1.641.6.8.1.1.8',
  outputStitchingCapable => '1.3.6.1.4.1.641.6.8.1.1.9',
  outputPunchingCapable => '1.3.6.1.4.1.641.6.8.1.1.10',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-MPS-MIB'} = {
  scanCountType => {
    '1' => 'copyAdf',
    '2' => 'faxAdf',
    '3' => 'scanToEmailAdf',
    '4' => 'scanToNetAdf',
    '5' => 'scanToLocalHostAdf',
    '6' => 'scanToUsbAdf',
    '7' => 'scanToFtpAdf',
    '257' => 'copyFlatbed',
    '258' => 'faxFlatbed',
    '259' => 'scanToEmailFlatbed',
    '260' => 'scanToNetFlatbed',
    '261' => 'scanToLocalHostFlatbed',
    '262' => 'scanToUsbFlatbed',
    '263' => 'scanToFtpFlatbed',
    '769' => 'copyDuplex',
    '770' => 'faxDuplex',
    '771' => 'scanToEmailDuplex',
    '772' => 'scanToNetDuplex',
    '773' => 'scanToLocalHostDuplex',
    '774' => 'scanToUsbDuplex',
    '775' => 'scanToFtpDuplex',
  },
  paperGeneralCountType => {
    '1' => 'totalPicked',
    '2' => 'totalSafe',
    '3' => 'totalMonoSafe',
    '4' => 'totalColorSafe',
    '5' => 'printNHold',
    '6' => 'usbDirect',
    '16' => 'printTotal',
    '17' => 'printMono',
    '18' => 'printColor',
    '32' => 'copyTotal',
    '33' => 'copyMono',
    '34' => 'copyColor',
    '48' => 'faxTotal',
    '49' => 'faxMono',
    '50' => 'faxColor',
    '64' => 'blankTotal',
    '65' => 'blankPrint',
    '66' => 'blankCopy',
    '67' => 'blankFax',
    '80' => 'printerPageCount',
    '81' => 'modularPageCount',
    '90' => 'highlightColor',
    '91' => 'businessColor',
    '92' => 'graphicsColor',
    '100' => 'tonerDarkness1',
    '101' => 'tonerDarkness2',
    '102' => 'tonerDarkness3',
    '103' => 'tonerDarkness4',
    '104' => 'tonerDarkness5',
    '105' => 'tonerDarkness6',
    '106' => 'tonerDarkness7',
    '107' => 'tonerDarkness8',
    '108' => 'tonerDarkness9',
    '109' => 'tonerDarkness10',
    '120' => 'stapleEmpty1',
    '121' => 'stapleEmpty2',
    '122' => 'stapleEmpty3',
  },
  genCountType => {
    '1' => 'porCount',
    '2' => 'sleepCount',
    '3' => 'hibernateCount',
    '4' => 'printCalibrateCount',
    '32' => 'powerOnTime',
    '33' => 'powerActiveTime',
    '34' => 'powerIdleTime',
    '35' => 'powerSleepTime',
    '36' => 'powerHibernateTime',
    '37' => 'powerOffTime',
    '38' => 'warmupTotalTime',
    '64' => 'lifetimeBlackCoverage',
    '65' => 'lifetimeCyanCoverage',
    '66' => 'lifetimeYellowCoverage',
    '67' => 'lifetimeMagentaCoverage',
    '96' => 'faxesSent',
    '97' => 'paperJams',
    '98' => 'scannerJams',
    '99' => 'loadPaperPrompts',
    '100' => 'changePaperPrompts',
    '101' => 'coverOpens',
    '102' => 'printerIRTime',
    '128' => 'usbInsertions',
  },
  SeverityTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'informational',
    '4' => 'warning',
    '5' => 'critical',
    '6' => 'serviceRequired',
  },
  deviceMibSupportLevel => {
    '0' => 'none',
    '1' => 'minimum',
    '16' => 'value',
    '32' => 'feature',
    '48' => 'enterprise',
  },
  currentSupplyClass => {
    '1' => 'filled',
    '2' => 'consumed',
  },
  CartridgeTypeTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'invalid',
    '4' => 'shipWith',
    '5' => 'standard',
    '6' => 'highYieldStandard',
    '7' => 'extraHighYieldStandard',
    '8' => 'otherGenuine',
    '9' => 'standardGenuine',
    '10' => 'otherNonGenuine',
    '11' => 'standardNonGenuine',
    '21' => 'returnProgram',
    '22' => 'highYieldReturnProgram',
    '23' => 'extraHighYieldReturnProgram',
    '24' => 'standardReturnProgramGenuine',
    '25' => 'otherReturnProgramGenuine',
    '26' => 'standardNonReturnProgram',
    '27' => 'otherNonReturnProgram',
    '37' => 'refilledStandard',
    '38' => 'refilledHighYieldStandard',
    '39' => 'refilledExtraHighYieldStandard',
    '53' => 'refilledReturnProgram',
    '54' => 'refilledHighYieldReturnProgram',
    '55' => 'refilledExtraHighYieldReturnProgram',
  },
  currentSupplyCurrentStatus => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'ok',
    '4' => 'low',
    '5' => 'empty',
    '6' => 'invalid',
  },
  paperNupNumber => {
    '1' => 'off',
    '2' => 'twoUp',
    '3' => 'threeUp',
    '4' => 'fourUp',
    '6' => 'sixUp',
    '9' => 'nineUp',
    '12' => 'twelveUp',
    '16' => 'sixteenUp',
  },
  AlertCodeTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'coverOpen',
    '4' => 'coverClosed',
    '5' => 'interlockOpen',
    '6' => 'interlockClosed',
    '7' => 'doorOpen',
    '8' => 'doorClosed',
    '9' => 'calibrating',
    '10' => 'alignmentFailed',
    '11' => 'warrantyOverrideRequired',
    '12' => 'printHeadCarrierPathObstructed',
    '13' => 'heldJobsMayNotBeRestored',
    '14' => 'busy',
    '15' => 'waiting',
    '100' => 'subunitErrorOther',
    '101' => 'subunitLifeAlmostOver',
    '102' => 'subunitLifeOver',
    '103' => 'subunitJammed',
    '104' => 'subunitUnderTemperature',
    '105' => 'subunitOverTemperature',
    '106' => 'subunitInsufficientMemory',
    '107' => 'subunitMemoryFull',
    '108' => 'subunitNVFailure',
    '109' => 'subunitDisabled',
    '110' => 'subunitCommunicationError',
    '200' => 'supplyErrorOther',
    '201' => 'supplyOk',
    '202' => 'supplyEarlyWarning',
    '203' => 'supplyNearFull',
    '205' => 'supplyFull',
    '206' => 'supplyNearLow',
    '207' => 'supplyLow',
    '208' => 'supplyNearEmpty',
    '209' => 'supplyEmpty',
    '210' => 'supplyLifeAlmostOver',
    '211' => 'supplyLifeOver',
    '212' => 'supplyNearReplace',
    '213' => 'supplyReplace',
    '214' => 'supplyMissing',
    '215' => 'supplyInvalid',
    '216' => 'supplyDefective',
    '217' => 'supplyImproperInstall',
    '218' => 'supplyUnsupported',
    '219' => 'supplyUncalibrated',
    '300' => 'inputMediaErrorOther',
    '301' => 'inputMediaTrayMissing',
    '302' => 'inputMediaSupplyLow',
    '303' => 'inputMediaSupplyEmpty',
    '304' => 'inputMediaChangeRequest',
    '305' => 'inputMediaLoadRequest',
    '400' => 'outputMediaErrorOther',
    '401' => 'outputMediaTrayMissing',
    '402' => 'outputMediaNearFull',
    '403' => 'outputMediaFull',
    '404' => 'outputMediaEmptyRequest',
    '500' => 'mediaPathErrorOther',
    '501' => 'mediaPathPaperJam',
    '600' => 'scannerErrorOther',
    '601' => 'scannerLampWarming',
    '602' => 'scannerLampLifeWarning',
    '603' => 'scannerLampError',
    '604' => 'scannerADFJam',
    '605' => 'scannerStalled',
    '606' => 'scannerLocked',
    '607' => 'scannerDisabled',
    '700' => 'faxErrorOther',
    '701' => 'faxStorageNearFull',
    '702' => 'faxStorageFull',
    '703' => 'faxStorageSendNearFull',
    '704' => 'faxStorageSendFull',
    '705' => 'faxStorageReceiveNearFull',
    '706' => 'faxStorageReceiveFull',
    '707' => 'faxPhoneLineDisconnected',
    '708' => 'faxDisabled',
    '709' => 'faxConfigurationError',
    '800' => 'interpreterErrorOther',
    '801' => 'interpreterInsufficientMemory',
    '802' => 'interpreterOutOfMemory',
    '803' => 'interpreterComplexPage',
    '804' => 'interpreterJobHardwareMismatch',
    '805' => 'interpreterPrintDataExceedsMediaSize',
    '900' => 'emailErrorOther',
    '901' => 'emailConfigurationError',
    '1000' => 'storageErrorOther',
    '1001' => 'storageUnformatted',
    '1002' => 'storageFull',
    '20000' => 'neverError',
  },
  outputOffsetting => {
    '0' => 'notSupported',
    '1' => 'supported',
  },
  SupplyTypeTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'inkCartridge',
    '4' => 'inkBottle',
    '5' => 'inkPrinthead',
    '6' => 'toner',
    '7' => 'photoconductor',
    '8' => 'transferModule',
    '9' => 'fuser',
    '10' => 'wastetonerBox',
    '11' => 'staples',
    '12' => 'holepunchBox',
    '13' => 'tonerMicr',
    '14' => 'photoconductorMicr',
  },
  hwInventoryType => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'printEngine',
    '4' => 'electronicCard',
    '5' => 'duplexer',
    '6' => 'inputTray',
    '7' => 'outputTray',
    '8' => 'finishingDevice',
    '9' => 'scanner',
    '10' => 'faxCard',
    '11' => 'memory',
    '12' => 'nonVolitileMemory',
    '13' => 'keyboard',
    '14' => 'panel',
    '15' => 'cardSwipe',
    '16' => 'transferUnit',
    '17' => 'connectivityModule',
    '257' => 'optionUnknown',
    '258' => 'optionOther',
    '261' => 'optionDuplexer',
    '262' => 'optionInputTray',
    '263' => 'optionOutputTray',
    '264' => 'optionFinishingDevice',
    '265' => 'optionScanner',
    '266' => 'optionFaxCard',
    '267' => 'optionMemory',
    '268' => 'optionNonVolitileMemory',
    '269' => 'optionKeyboard',
    '270' => 'optionPanel',
    '271' => 'optionCardSwipe',
    '272' => 'optionTransferUnit',
  },
  outputLevelSensing => {
    '0' => 'notSupported',
    '1' => 'supported',
  },
  swInventoryType => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'operatingSystem',
    '4' => 'hardware',
    '5' => 'application',
  },
  deviceAlertConfigTableNode => {
    '0' => 'unknown',
    '2' => 'hwInventoryTable',
    '3' => 'supplyInventoryTable',
    '4' => 'swInventoryTable',
  },
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKPVTMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-PVT-MIB'} = {
  url => '',
  name => 'LEXMARK-PVT-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-PVT-MIB'} =
    '1.3.6.1.4.1.641.1.1';

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-PVT-MIB'} = {
  lexmark => '1.3.6.1.4.1.641',
  adapter => '1.3.6.1.4.1.641.1',
  opsys => '1.3.6.1.4.1.641.1.1',
  opsysCodeRev => '1.3.6.1.4.1.641.1.1.1',
  opsysJobTimeout => '1.3.6.1.4.1.641.1.1.2',
  opsysCurrentJob => '1.3.6.1.4.1.641.1.1.3',
  opsysRAMSize => '1.3.6.1.4.1.641.1.1.4',
  opsysNVRAMSize => '1.3.6.1.4.1.641.1.1.5',
  opsysROMSize => '1.3.6.1.4.1.641.1.1.6',
  opsysROMType => '1.3.6.1.4.1.641.1.1.7',
  opsysProtocols => '1.3.6.1.4.1.641.1.1.8',
  opsysTimeToReset => '1.3.6.1.4.1.641.1.1.9',
  opsysCardPartNo => '1.3.6.1.4.1.641.1.1.10',
  opsysCardEC => '1.3.6.1.4.1.641.1.1.11',
  opsysCurrentJobTable => '1.3.6.1.4.1.641.1.1.12',
  opsysCurrentJobEntry => '1.3.6.1.4.1.641.1.1.12.1',
  opsysCurrentJobEntryIndex => '1.3.6.1.4.1.641.1.1.12.1.1',
  opsysCurrentJobString => '1.3.6.1.4.1.641.1.1.12.1.2',
  opsysDeviceType => '1.3.6.1.4.1.641.1.1.13',
  opsysAdapterName => '1.3.6.1.4.1.641.1.1.14',
  opsysAdapterCapabilities => '1.3.6.1.4.1.641.1.1.15',
  lexlink => '1.3.6.1.4.1.641.1.2',
  lexlinkActivated => '1.3.6.1.4.1.641.1.2.1',
  lexlinkActivatedDefinition => 'LEXMARK-PVT-MIB::lexlinkActivated',
  lexlinkNickname => '1.3.6.1.4.1.641.1.2.2',
  lexipx => '1.3.6.1.4.1.641.1.3',
  lexipxActivated => '1.3.6.1.4.1.641.1.3.1',
  lexipxActivatedDefinition => 'LEXMARK-PVT-MIB::lexipxActivated',
  lexipxLoginName => '1.3.6.1.4.1.641.1.3.2',
  lexipxNetNumber => '1.3.6.1.4.1.641.1.3.3',
  lexipxSAPMode => '1.3.6.1.4.1.641.1.3.4',
  lexipxSAPModeDefinition => 'LEXMARK-PVT-MIB::lexipxSAPMode',
  lexipxServerMode => '1.3.6.1.4.1.641.1.3.5',
  lexipxServerModeDefinition => 'LEXMARK-PVT-MIB::lexipxServerMode',
  lexipxNumPorts => '1.3.6.1.4.1.641.1.3.6',
  lexipxPortInfoTable => '1.3.6.1.4.1.641.1.3.7',
  lexipxPortInfoEntry => '1.3.6.1.4.1.641.1.3.7.1',
  lexipxPortInfoIndex => '1.3.6.1.4.1.641.1.3.7.1.1',
  lexipxPortInfoPollIntvl => '1.3.6.1.4.1.641.1.3.7.1.2',
  lexipxPortInfoEnable => '1.3.6.1.4.1.641.1.3.7.1.3',
  lexipxPortInfoEnableDefinition => 'LEXMARK-PVT-MIB::lexipxPortInfoEnable',
  lexipxPortInfoBannerPage => '1.3.6.1.4.1.641.1.3.7.1.4',
  lexipxPortInfoBannerPageDefinition => 'LEXMARK-PVT-MIB::lexipxPortInfoBannerPage',
  lexipxNumPrefServers => '1.3.6.1.4.1.641.1.3.8',
  lexipxPrefSrvrTable => '1.3.6.1.4.1.641.1.3.9',
  lexipxPrefSrvrEntry => '1.3.6.1.4.1.641.1.3.9.1',
  lexipxPrefSrvrIndex => '1.3.6.1.4.1.641.1.3.9.1.1',
  lexipxPrefSrvrName => '1.3.6.1.4.1.641.1.3.9.1.2',
  lexipxConnSrvrTable => '1.3.6.1.4.1.641.1.3.10',
  lexipxConnSrvrEntry => '1.3.6.1.4.1.641.1.3.10.1',
  lexipxConnSrvrIndex => '1.3.6.1.4.1.641.1.3.10.1.1',
  lexipxConnSrvrName => '1.3.6.1.4.1.641.1.3.10.1.2',
  lexipxConnSrvrNet => '1.3.6.1.4.1.641.1.3.10.1.3',
  lexipxConnSrvrNode => '1.3.6.1.4.1.641.1.3.10.1.4',
  lexipxConnSrvrConnNum => '1.3.6.1.4.1.641.1.3.10.1.5',
  lexipxConnSrvrConnId => '1.3.6.1.4.1.641.1.3.10.1.6',
  lexipxConnSrvrPSConnID => '1.3.6.1.4.1.641.1.3.10.1.7',
  lexipxFrameType => '1.3.6.1.4.1.641.1.3.11',
  lexipxTrapTable => '1.3.6.1.4.1.641.1.3.12',
  lexipxTrapEntry => '1.3.6.1.4.1.641.1.3.12.1',
  lexipxTrapIndex => '1.3.6.1.4.1.641.1.3.12.1.1',
  lexipxTrapMask => '1.3.6.1.4.1.641.1.3.12.1.2',
  lexipxTrapNetworkAddress => '1.3.6.1.4.1.641.1.3.12.1.3',
  lexipxTrapNodeAddress => '1.3.6.1.4.1.641.1.3.12.1.4',
  lexipxTrapType => '1.3.6.1.4.1.641.1.3.13',
  lexipxTrapTypeDefinition => 'LEXMARK-PVT-MIB::lexipxTrapType',
  lexipxGSQ => '1.3.6.1.4.1.641.1.3.14',
  lextalk => '1.3.6.1.4.1.641.1.4',
  lextalkActivated => '1.3.6.1.4.1.641.1.4.1',
  lextalkActivatedDefinition => 'LEXMARK-PVT-MIB::lextalkActivated',
  lextalkAddress => '1.3.6.1.4.1.641.1.4.2',
  lextalkName => '1.3.6.1.4.1.641.1.4.3',
  lextalkZone => '1.3.6.1.4.1.641.1.4.4',
  lextalkType => '1.3.6.1.4.1.641.1.4.5',
  lextcp => '1.3.6.1.4.1.641.1.5',
  lextcpActivated => '1.3.6.1.4.1.641.1.5.1',
  lextcpActivatedDefinition => 'LEXMARK-PVT-MIB::lextcpActivated',
  lextcpBootpEnable => '1.3.6.1.4.1.641.1.5.2',
  lextcpBootpEnableDefinition => 'LEXMARK-PVT-MIB::lextcpBootpEnable',
  lextcpAddressServ => '1.3.6.1.4.1.641.1.5.3',
  lextcpNumNPAPservers => '1.3.6.1.4.1.641.1.5.4',
  lextcpNPAPserversTable => '1.3.6.1.4.1.641.1.5.5',
  lextcpNPAPserversEntry => '1.3.6.1.4.1.641.1.5.5.1',
  lextcpNPAPserverIndex => '1.3.6.1.4.1.641.1.5.5.1.1',
  lextcpNPAPserverAddress => '1.3.6.1.4.1.641.1.5.5.1.2',
  lexhttp => '1.3.6.1.4.1.641.1.5.6',
  lexhttpEnable => '1.3.6.1.4.1.641.1.5.6.1',
  lexhttpEnableDefinition => 'LEXMARK-PVT-MIB::lexhttpEnable',
  lexhttpNumLinks => '1.3.6.1.4.1.641.1.5.6.2',
  lexhttpBytesRemaining => '1.3.6.1.4.1.641.1.5.6.3',
  lexhttpResetLinks => '1.3.6.1.4.1.641.1.5.6.4',
  lexhttpResetLinksDefinition => 'LEXMARK-PVT-MIB::lexhttpResetLinks',
  lexhttpLinkTable => '1.3.6.1.4.1.641.1.5.6.5',
  lexhttpLinkTableEntry => '1.3.6.1.4.1.641.1.5.6.5.1',
  lexhttpLinkTableIndex => '1.3.6.1.4.1.641.1.5.6.5.1.1',
  lexhttpLinkTableStatus => '1.3.6.1.4.1.641.1.5.6.5.1.2',
  lexhttpLinkTableStatusDefinition => 'LEXMARK-PVT-MIB::lexhttpLinkTableStatus',
  lexhttpLinkTableLabel => '1.3.6.1.4.1.641.1.5.6.5.1.3',
  lexhttpLinkTableURL => '1.3.6.1.4.1.641.1.5.6.5.1.4',
  lexhttpConfigEnable => '1.3.6.1.4.1.641.1.5.6.6',
  lexhttpConfigEnableDefinition => 'LEXMARK-PVT-MIB::lexhttpConfigEnable',
  lexdhcp => '1.3.6.1.4.1.641.1.5.7',
  lexdhcpDhcpEnable => '1.3.6.1.4.1.641.1.5.7.1',
  lexdhcpDhcpEnableDefinition => 'LEXMARK-PVT-MIB::lexdhcpDhcpEnable',
  lexdhcpRarpEnable => '1.3.6.1.4.1.641.1.5.7.2',
  lexdhcpRarpEnableDefinition => 'LEXMARK-PVT-MIB::lexdhcpRarpEnable',
  lexdhcpAddressSource => '1.3.6.1.4.1.641.1.5.7.3',
  lexdhcpAddressSourceDefinition => 'LEXMARK-PVT-MIB::lexdhcpAddressSource',
  lexdhcpWinsStatus => '1.3.6.1.4.1.641.1.5.7.4',
  lexdhcpWinsStatusDefinition => 'LEXMARK-PVT-MIB::lexdhcpWinsStatus',
  lexdhcpWinsServer => '1.3.6.1.4.1.641.1.5.7.5',
  lexdhcpHostname => '1.3.6.1.4.1.641.1.5.7.6',
  lexdhcpLeaseLength => '1.3.6.1.4.1.641.1.5.7.7',
  lexdhcpTimetoExpire => '1.3.6.1.4.1.641.1.5.7.8',
  lexdhcpDNSServer => '1.3.6.1.4.1.641.1.5.7.9',
  lexhdwr => '1.3.6.1.4.1.641.1.6',
  lexhdwrNumPorts => '1.3.6.1.4.1.641.1.6.1',
  lexhdwrPortTable => '1.3.6.1.4.1.641.1.6.2',
  lexhdwrPortTableEntry => '1.3.6.1.4.1.641.1.6.2.1',
  lexhdwrPortTableIndex => '1.3.6.1.4.1.641.1.6.2.1.1',
  lexhdwrPortTableType => '1.3.6.1.4.1.641.1.6.2.1.2',
  lexhdwrPortTableTypeDefinition => 'LEXMARK-PVT-MIB::lexhdwrPortTableType',
  lexhdwrPortTableParm1 => '1.3.6.1.4.1.641.1.6.2.1.3',
  lexhdwrPortTableParm2 => '1.3.6.1.4.1.641.1.6.2.1.4',
  lexhdwrPortTableParm3 => '1.3.6.1.4.1.641.1.6.2.1.5',
  lexhdwrPortTableParm4 => '1.3.6.1.4.1.641.1.6.2.1.6',
  lexhdwrPortTableParm5 => '1.3.6.1.4.1.641.1.6.2.1.7',
  lexhdwrPortTableParm6 => '1.3.6.1.4.1.641.1.6.2.1.8',
  lexhdwrPortTableParm7 => '1.3.6.1.4.1.641.1.6.2.1.9',
  lexhdwrPortTableParm7Definition => 'LEXMARK-PVT-MIB::lexhdwrPortTableParm7',
  lexhdwrPortTableParm8 => '1.3.6.1.4.1.641.1.6.2.1.10',
  lexhdwrPortTableParm8Definition => 'LEXMARK-PVT-MIB::lexhdwrPortTableParm8',
  lexhdwrPortTableParm9 => '1.3.6.1.4.1.641.1.6.2.1.11',
  lexhdwrPortTableParm9Definition => 'LEXMARK-PVT-MIB::lexhdwrPortTableParm9',
  lexmac => '1.3.6.1.4.1.641.1.7',
  lexmacType => '1.3.6.1.4.1.641.1.7.1',
  lexmacSpeed => '1.3.6.1.4.1.641.1.7.2',
  lexmacConnType => '1.3.6.1.4.1.641.1.7.3',
  lexmacConnTypeDefinition => 'LEXMARK-PVT-MIB::lexmacConnType',
  lexmacUAA => '1.3.6.1.4.1.641.1.7.4',
  lexmacLAA => '1.3.6.1.4.1.641.1.7.5',
  lextrap => '1.3.6.1.4.1.641.1.8',
  lextrapDestNum => '1.3.6.1.4.1.641.1.8.1',
  lextrapDestTable => '1.3.6.1.4.1.641.1.8.2',
  lextrapDestEntry => '1.3.6.1.4.1.641.1.8.2.1',
  lextrapDestIndex => '1.3.6.1.4.1.641.1.8.2.1.1',
  lextrapDestIPAddr => '1.3.6.1.4.1.641.1.8.2.1.2',
  lextrapDestMask => '1.3.6.1.4.1.641.1.8.2.1.3',
  lextrapIPTrapType => '1.3.6.1.4.1.641.1.8.3',
  lextrapIPTrapTypeDefinition => 'LEXMARK-PVT-MIB::lextrapIPTrapType',
  time => '1.3.6.1.4.1.641.1.9',
  timeReset => '1.3.6.1.4.1.641.1.9.1',
  timeResetDefinition => 'LEXMARK-PVT-MIB::timeReset',
  timeSource => '1.3.6.1.4.1.641.1.9.2',
  timeSourceDefinition => 'LEXMARK-PVT-MIB::timeSource',
  timeUTCOffset => '1.3.6.1.4.1.641.1.9.3',
  timeDSTEnable => '1.3.6.1.4.1.641.1.9.4',
  timeDSTEnableDefinition => 'LEXMARK-PVT-MIB::timeDSTEnable',
  timeDSTStartDate => '1.3.6.1.4.1.641.1.9.5',
  timeDSTEndDate => '1.3.6.1.4.1.641.1.9.6',
  timeDSTOffset => '1.3.6.1.4.1.641.1.9.7',
  timeServerAddress => '1.3.6.1.4.1.641.1.9.8',
  timeServerName => '1.3.6.1.4.1.641.1.9.9',
  printer => '1.3.6.1.4.1.641.2',
  prtgen => '1.3.6.1.4.1.641.2.1',
  prtgenNumber => '1.3.6.1.4.1.641.2.1.1',
  prtgenInfoTable => '1.3.6.1.4.1.641.2.1.2',
  prtgenInfoEntry => '1.3.6.1.4.1.641.2.1.2.1',
  prtgenPrinterIndex => '1.3.6.1.4.1.641.2.1.2.1.1',
  prtgenPrinterName => '1.3.6.1.4.1.641.2.1.2.1.2',
  prtgenPeripheralID => '1.3.6.1.4.1.641.2.1.2.1.3',
  prtgenCodeRevision => '1.3.6.1.4.1.641.2.1.2.1.4',
  prtgenResValue => '1.3.6.1.4.1.641.2.1.2.1.5',
  prtgenSerialNo => '1.3.6.1.4.1.641.2.1.2.1.6',
  prtgenAssetTag => '1.3.6.1.4.1.641.2.1.2.1.7',
  prtgenStatusTable => '1.3.6.1.4.1.641.2.1.3',
  prtgenStatusEntry => '1.3.6.1.4.1.641.2.1.3.1',
  prtgenStatPrinterIndex => '1.3.6.1.4.1.641.2.1.3.1.1',
  prtgenStatusIRC => '1.3.6.1.4.1.641.2.1.3.1.2',
  prtgenStatusOutHopFull => '1.3.6.1.4.1.641.2.1.3.1.3',
  prtgenStatusOutHopFullDefinition => 'LEXMARK-PVT-MIB::prtgenStatusOutHopFull',
  prtgenStatusInputEmpty => '1.3.6.1.4.1.641.2.1.3.1.4',
  prtgenStatusInputEmptyDefinition => 'LEXMARK-PVT-MIB::prtgenStatusInputEmpty',
  prtgenStatusPaperJam => '1.3.6.1.4.1.641.2.1.3.1.5',
  prtgenStatusPaperJamDefinition => 'LEXMARK-PVT-MIB::prtgenStatusPaperJam',
  prtgenStatusTonerError => '1.3.6.1.4.1.641.2.1.3.1.6',
  prtgenStatusTonerErrorDefinition => 'LEXMARK-PVT-MIB::prtgenStatusTonerError',
  prtgenStatusSrvcReqd => '1.3.6.1.4.1.641.2.1.3.1.7',
  prtgenStatusSrvcReqdDefinition => 'LEXMARK-PVT-MIB::prtgenStatusSrvcReqd',
  prtgenStatusDiskError => '1.3.6.1.4.1.641.2.1.3.1.8',
  prtgenStatusDiskErrorDefinition => 'LEXMARK-PVT-MIB::prtgenStatusDiskError',
  prtgenStatusCoverOpen => '1.3.6.1.4.1.641.2.1.3.1.9',
  prtgenStatusCoverOpenDefinition => 'LEXMARK-PVT-MIB::prtgenStatusCoverOpen',
  prtgenStatusPageComplex => '1.3.6.1.4.1.641.2.1.3.1.10',
  prtgenStatusPageComplexDefinition => 'LEXMARK-PVT-MIB::prtgenStatusPageComplex',
  prtgenStatusLineStatus => '1.3.6.1.4.1.641.2.1.3.1.11',
  prtgenStatusLineStatusDefinition => 'LEXMARK-PVT-MIB::prtgenStatusLineStatus',
  prtgenStatusBusy => '1.3.6.1.4.1.641.2.1.3.1.12',
  prtgenStatusBusyDefinition => 'LEXMARK-PVT-MIB::prtgenStatusBusy',
  prtgenStatusWaiting => '1.3.6.1.4.1.641.2.1.3.1.13',
  prtgenStatusWaitingDefinition => 'LEXMARK-PVT-MIB::prtgenStatusWaiting',
  prtgenStatusWarming => '1.3.6.1.4.1.641.2.1.3.1.14',
  prtgenStatusWarmingDefinition => 'LEXMARK-PVT-MIB::prtgenStatusWarming',
  prtgenStatusPrinting => '1.3.6.1.4.1.641.2.1.3.1.15',
  prtgenStatusPrintingDefinition => 'LEXMARK-PVT-MIB::prtgenStatusPrinting',
  prtgenFamilyID => '1.3.6.1.4.1.641.2.1.4',
  pgcount => '1.3.6.1.4.1.641.2.1.5',
  pgTotal => '1.3.6.1.4.1.641.2.1.5.1',
  pgMono => '1.3.6.1.4.1.641.2.1.5.2',
  pgColor => '1.3.6.1.4.1.641.2.1.5.3',
  attachment => '1.3.6.1.4.1.641.3',
  fax => '1.3.6.1.4.1.641.3.1',
  faxNumber => '1.3.6.1.4.1.641.3.1.1',
  faxTable => '1.3.6.1.4.1.641.3.1.2',
  faxEntry => '1.3.6.1.4.1.641.3.1.2.1',
  faxIndex => '1.3.6.1.4.1.641.3.1.2.1.1',
  faxPort => '1.3.6.1.4.1.641.3.1.2.1.2',
  faxPortDefinition => 'LEXMARK-PVT-MIB::faxPort',
  faxAdapterCapabilities => '1.3.6.1.4.1.641.3.1.2.1.3',
  faxModemCapabilities => '1.3.6.1.4.1.641.3.1.2.1.4',
  faxSelectedCapabilities => '1.3.6.1.4.1.641.3.1.2.1.5',
  faxActiveCapabilities => '1.3.6.1.4.1.641.3.1.2.1.6',
  faxIDString => '1.3.6.1.4.1.641.3.1.2.1.7',
  faxInitString => '1.3.6.1.4.1.641.3.1.2.1.8',
  faxNumberRings => '1.3.6.1.4.1.641.3.1.2.1.9',
  faxScaling => '1.3.6.1.4.1.641.3.1.2.1.10',
  faxScalingDefinition => 'LEXMARK-PVT-MIB::faxScaling',
  faxBinaryEncoding => '1.3.6.1.4.1.641.3.1.2.1.11',
  faxBinaryEncodingDefinition => 'LEXMARK-PVT-MIB::faxBinaryEncoding',
  faxPrinterPort => '1.3.6.1.4.1.641.3.1.2.1.13',
  faxPrinterPortDefinition => 'LEXMARK-PVT-MIB::faxPrinterPort',
  faxInputTray => '1.3.6.1.4.1.641.3.1.2.1.14',
  faxOutputBin => '1.3.6.1.4.1.641.3.1.2.1.15',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-PVT-MIB'} = {
  prtgenStatusCoverOpen => {
    '1' => 'noCoverOpen',
    '2' => 'coverOpen',
    '3' => 'unknown',
  },
  prtgenStatusWarming => {
    '1' => 'notWarming',
    '2' => 'warming',
    '3' => 'unknown',
  },
  prtgenStatusSrvcReqd => {
    '1' => 'noServiceRequired',
    '2' => 'serviceRequired',
    '3' => 'unknown',
  },
  lexdhcpRarpEnable => {
    '1' => 'disabled',
    '2' => 'enabled',
  },
  lexhdwrPortTableParm9 => {
    '1' => 'printer',
    '2' => 'fax',
  },
  lextalkActivated => {
    '1' => 'off',
    '2' => 'on',
  },
  lexipxServerMode => {
    '1' => 'pserver',
    '2' => 'rprinter',
  },
  lexdhcpDhcpEnable => {
    '1' => 'disabled',
    '2' => 'enabled',
  },
  lexdhcpWinsStatus => {
    '1' => 'unregistered',
    '2' => 'registered',
    '3' => 'pending',
    '4' => 'rejected',
  },
  lexipxActivated => {
    '1' => 'off',
    '2' => 'on',
  },
  prtgenStatusLineStatus => {
    '1' => 'online',
    '2' => 'offline',
    '3' => 'unknown',
  },
  lexmacConnType => {
    '1' => 'aui',
    '2' => 'bnc',
    '3' => 'stp',
    '4' => 'utp',
  },
  lexipxPortInfoBannerPage => {
    '1' => 'off',
    '2' => 'postscript',
    '3' => 'ascii',
  },
  prtgenStatusDiskError => {
    '1' => 'noDiskError',
    '2' => 'diskError',
    '3' => 'unknown',
  },
  lexhdwrPortTableParm7 => {
    '1' => 'off',
    '2' => 'on',
    '3' => 'auto',
  },
  faxBinaryEncoding => {
    '1' => 'taggedBinary',
    '2' => 'ascii85',
  },
  faxScaling => {
    '1' => 'scaleToFit',
    '2' => 'cropToFit',
  },
  timeSource => {
    '1' => 'none',
    '2' => 'ntp',
    '3' => 'netware',
  },
  lexhttpLinkTableStatus => {
    '1' => 'linkOff',
    '2' => 'customOn',
    '3' => 'useDefault',
    '4' => 'defaultOff',
    '5' => 'defaultOn',
    '6' => 'eraseCustom',
  },
  timeDSTEnable => {
    '1' => 'disabled',
    '2' => 'enabled',
  },
  lexipxTrapType => {
    '1' => 'multiplexed',
    '2' => 'individual',
  },
  prtgenStatusTonerError => {
    '1' => 'noTonerError',
    '2' => 'tonerError',
    '3' => 'unknown',
  },
  lexhttpEnable => {
    '1' => 'disabled',
    '2' => 'enabled',
  },
  prtgenStatusBusy => {
    '1' => 'notBusy',
    '2' => 'busy',
    '3' => 'unknown',
  },
  lextcpActivated => {
    '1' => 'off',
    '2' => 'on',
  },
  prtgenStatusPageComplex => {
    '1' => 'noComplexPage',
    '2' => 'complexPage',
    '3' => 'unknown',
  },
  lexhttpResetLinks => {
    '1' => 'noReset',
    '2' => 'reset',
  },
  lexlinkActivated => {
    '1' => 'off',
    '2' => 'on',
  },
  faxPort => {
    '145' => 'serial1',
    '146' => 'serial2',
    '147' => 'serial3',
    '148' => 'serial4',
    '149' => 'serial5',
  },
  faxPrinterPort => {
    '129' => 'parallel1',
    '130' => 'parallel2',
    '255' => 'firstAvail',
  },
  prtgenStatusPrinting => {
    '1' => 'notPrinting',
    '2' => 'printing',
    '3' => 'unknown',
  },
  lexipxPortInfoEnable => {
    '1' => 'disabled',
    '2' => 'enabled',
  },
  lextcpBootpEnable => {
    '1' => 'disabled',
    '2' => 'enabled',
  },
  lexipxSAPMode => {
    '1' => 'off',
    '2' => 'on',
  },
  timeReset => {
    '1' => 'noReset',
    '2' => 'reset',
  },
  prtgenStatusOutHopFull => {
    '1' => 'notFull',
    '2' => 'full',
    '3' => 'unknown',
  },
  prtgenStatusWaiting => {
    '1' => 'notWaiting',
    '2' => 'waiting',
    '3' => 'unknown',
  },
  prtgenStatusInputEmpty => {
    '1' => 'notEmpty',
    '2' => 'empty',
    '3' => 'unknown',
  },
  lexhttpConfigEnable => {
    '1' => 'disabled',
    '2' => 'enabled',
  },
  prtgenStatusPaperJam => {
    '1' => 'notJammed',
    '2' => 'jamed',
    '3' => 'unknown',
  },
  lextrapIPTrapType => {
    '1' => 'multiplexed',
    '2' => 'individual',
  },
  lexdhcpAddressSource => {
    '1' => 'manual',
    '2' => 'dhcp',
    '3' => 'bootp',
    '4' => 'rarp',
  },
  lexhdwrPortTableParm8 => {
    '1' => 'npapInactive',
    '2' => 'npapActive',
  },
  lexhdwrPortTableType => {
    '1' => 'internal',
    '2' => 'parallel',
    '3' => 'serial',
  },
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKTCMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-TC-MIB'} = {
  url => '',
  name => 'LEXMARK-TC-MIB',
};

#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-TC-MIB'} =

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-TC-MIB'} = {
  lexmarkTCMIB => '1.3.6.1.4.1.641.4.2',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-TC-MIB'} = {
  UnitsTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'items',
    '4' => 'sides',
    '5' => 'sheets',
    '16' => 'millimeters',
    '17' => 'centimeters',
    '18' => 'meters',
    '19' => 'inches',
    '20' => 'feet',
    '21' => 'grams',
    '22' => 'ounces',
    '32' => 'nanoseconds',
    '33' => 'microseconds',
    '34' => 'milliseconds',
    '35' => 'seconds',
    '36' => 'minutes',
    '37' => 'hours',
    '38' => 'days',
    '39' => 'weeks',
    '40' => 'months',
    '41' => 'years',
  },
  AdminStatusTC => {
    '1' => 'unknown',
    '3' => 'other',
    '4' => 'up',
    '5' => 'disabled',
  },
  PaperTypeTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'plain',
    '4' => 'cardstock',
    '5' => 'transparancy',
    '6' => 'recycled',
    '7' => 'labels',
    '8' => 'vinylLabels',
    '9' => 'bond',
    '10' => 'letterhead',
    '11' => 'preprinted',
    '12' => 'colored',
    '13' => 'light',
    '14' => 'heavy',
    '15' => 'roughOrCotton',
    '16' => 'envelope',
    '17' => 'premimuPlain',
    '18' => 'colorLokCertifiedPlain',
    '19' => 'lexmarkPerfectFinishPhoto',
    '20' => 'lexmarkPhoto',
    '21' => 'glossyPhoto',
    '22' => 'mattePhoto',
    '23' => 'inkjetMatteBrochure',
    '24' => 'inkjetGlossyBrochure',
    '25' => 'ironOnTransfer',
    '32' => 'customtype1',
    '33' => 'customtype2',
    '34' => 'customtype3',
    '35' => 'customtype4',
    '36' => 'customtype5',
    '37' => 'customtype6',
    '38' => 'coatedPaper',
    '39' => 'glossy',
    '40' => 'photPaper',
    '41' => 'greetingCard',
    '42' => 'heavyCard',
    '43' => 'roughEnvelop',
    '44' => 'heavyCottonPaper',
    '45' => 'veryHeavyPaper',
    '46' => 'heavyGloss',
    '47' => 'rfidLabels',
    '48' => 'businessCard',
  },
  PaperSizeTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'universal',
    '4' => 'custom',
    '8' => 'letter',
    '9' => 'legal',
    '10' => 'executive',
    '11' => 'folio',
    '12' => 'statement',
    '13' => 'oficio',
    '14' => 'tabloid',
    '15' => 'businessCard',
    '16' => 'idCard',
    '17' => 'card3x5',
    '18' => 'card4x6',
    '19' => 'bookOriginal',
    '20' => 'hagaki',
    '21' => 'card3onehalfx5',
    '22' => 'card4x8',
    '23' => 'card5x7',
    '24' => 'card10x15',
    '25' => 'card10x20',
    '26' => 'card13x18',
    '27' => 'paper12x18',
    '28' => 'sra3',
    '32' => 'envelope7threequarters',
    '33' => 'envelope9',
    '34' => 'envelope10',
    '35' => 'envelopeDL',
    '36' => 'envelopeOther',
    '64' => 'isoA0',
    '65' => 'isoA1',
    '66' => 'isoA2',
    '67' => 'isoA3',
    '68' => 'isoA4',
    '69' => 'isoA5',
    '70' => 'isoA6',
    '72' => 'isoB0',
    '73' => 'isoB1',
    '74' => 'isoB2',
    '75' => 'isoB3',
    '76' => 'isoB4',
    '77' => 'isoB5',
    '78' => 'isoB6',
    '80' => 'isoC0',
    '81' => 'isoC1',
    '82' => 'isoC2',
    '83' => 'isoC3',
    '84' => 'isoC4',
    '85' => 'isoC5',
    '86' => 'isoC6',
    '96' => 'isoEnvelopeA0',
    '97' => 'isoEnvelopeA1',
    '98' => 'isoEnvelopeA2',
    '99' => 'isoEnvelopeA3',
    '100' => 'isoEnvelopeA4',
    '101' => 'isoEnvelopeA5',
    '102' => 'isoEnvelopeA6',
    '104' => 'isoEnvelopeB0',
    '105' => 'isoEnvelopeB1',
    '106' => 'isoEnvelopeB2',
    '107' => 'isoEnvelopeB3',
    '108' => 'isoEnvelopeB4',
    '109' => 'isoEnvelopeB5',
    '110' => 'isoEnvelopeB6',
    '112' => 'isoEnvelopeC0',
    '113' => 'isoEnvelopeC1',
    '114' => 'isoEnvelopeC2',
    '115' => 'isoEnvelopeC3',
    '116' => 'isoEnvelopeC4',
    '117' => 'isoEnvelopeC5',
    '118' => 'isoEnvelopeC6',
    '136' => 'jisB0',
    '137' => 'jisB1',
    '138' => 'jisB2',
    '139' => 'jisB3',
    '140' => 'jisB4',
    '141' => 'jisB5',
    '142' => 'jisB6',
  },
  KeyValueTC => {
  },
  StatusTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'ok',
    '4' => 'offline',
    '5' => 'warning',
    '6' => 'broken',
    '17' => 'disabledUnknown',
    '18' => 'disabledOther',
    '19' => 'disabledOk',
    '20' => 'disabledOffline',
    '21' => 'disabledWarning',
    '22' => 'disabledBroken',
    '33' => 'unlicensedUnknown',
    '34' => 'unlicensedOther',
    '35' => 'unlicensedOk',
    '36' => 'unlicensedOffline',
    '37' => 'unlicensedWarning',
    '38' => 'unlicensedBroken',
    '97' => 'licensedUnknown',
    '98' => 'licensedOther',
    '99' => 'licensedOk',
    '100' => 'licensedOffline',
    '101' => 'licensedWarning',
    '102' => 'licensedBroken',
  },
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::MIB2MIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'MIB-2-MIB'} = {
  url => "",
  name => "MIB-2-MIB",
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'MIB-2-MIB'} = {
  sysDescr => '1.3.6.1.2.1.1.1',
  sysObjectID => '1.3.6.1.2.1.1.2',
  sysUpTime => '1.3.6.1.2.1.1.3',
  sysName => '1.3.6.1.2.1.1.5',
  sysORTable => '1.3.6.1.2.1.1.9',
  sysOREntry => '1.3.6.1.2.1.1.9.1',
  sysORIndex => '1.3.6.1.2.1.1.9.1.1',
  sysORID => '1.3.6.1.2.1.1.9.1.2',
  sysORDescr => '1.3.6.1.2.1.1.9.1.3',
  sysORUpTime => '1.3.6.1.2.1.1.9.1.4',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'MIB-2-MIB'} = {
  'DateAndTime' => sub {
    my $value = shift;
    use Time::Local;
    my ($month, $day, $hour, $minute, $second, $dseconds, $dirutc, $hoursutc, $minutesutc,
        $wday, $yday, $isdst, $year) =
        (0, 0, 0, 0, 0, 0, "+", 0, 0, 0, 0, 0, 0);
#      DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
#      STATUS       current
#      DESCRIPTION
#              "A date-time specification.
#  
#              field  octets  contents                  range
#              -----  ------  --------                  -----
#                1      1-2   year*                     0..65536
#                2       3    month                     1..12
#                3       4    day                       1..31
#                4       5    hour                      0..23
#                5       6    minutes                   0..59
#                6       7    seconds                   0..60
#                             (use 60 for leap-second)
#                7       8    deci-seconds              0..9
#                8       9    direction from UTC        '+' / '-'
#                9      10    hours from UTC*           0..13
#               10      11    minutes from UTC          0..59
#  
#              * Notes:
#              - the value of year is in network-byte order
#              - daylight saving time in New Zealand is +13
#  
#              For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be
#              displayed as:
#  
#                               1992-5-26,13:30:15.0,-4:0
#  
#              Note that if only local time is known, then timezone
#              information (fields 8-10) is not present."
#      SYNTAX       OCTET STRING (SIZE (8 | 11))

    if ($value && $value !~ /^[ \w,\:\-\+\.]+$/) {
      $value = unpack("H*", $value);
    }
    if ($value && (
        $value =~ /^0x((\w{2} ){8,})/ ||
        $value =~ /^0x((\w{2} ){7,}(\w{2}){1,})/ ||
        $value =~ /^((\w{2}){8,})/ ||
        $value =~ /^((\w{2} ){8,})/ ||
        $value =~ /^((\w{2} ){7,}(\w{2}){1,})/ ||
        $value =~ /^(([0-9a-fA-F][0-9a-fA-F]){6,})$/
    )) {
      $value = $1;
      $value =~ s/ //g;
      $year = hex substr($value, 0, 4);
      $value = substr($value, 4);
      if (length($value) > 12) {
        ($month, $day, $hour, $minute, $second, $dseconds,
            $dirutc, $hoursutc, $minutesutc) = unpack "C*", pack "H*", $value;
        $minutesutc ||= 0;
        $dirutc = ($dirutc == 43) ? "+" : ($dirutc == 45) ? "-" : "+";
        if ($value eq "000000000000000000") {
          $day = 1;
          $month = 1;
          $year = 1970;
        }
      } else {
        ($month, $day, $hour, $minute, $second, $dseconds) = unpack "C*", pack "H*", $value;
        $second ||= 0;
        $dseconds ||= 0;
        my @t = localtime(time);
        my $gmt_offset_in_hours = (timegm(@t) - timelocal(@t)) / 3600;
        ($dirutc, $hoursutc, $minutesutc) = ("+", $gmt_offset_in_hours, 0);
      }
    } elsif ($value && $value =~ /(\d+)-(\d+)-(\d+),(\d+):(\d+):(\d+)\.(\d+),([\+\-]*)(\d+):(\d+)/) {
      ($year, $month, $day, $hour, $minute, $second, $dseconds,
          $dirutc, $hoursutc, $minutesutc) = ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10);
    } elsif ($value && $value =~ /(\d+)-(\d+)-(\d+),(\d+):(\d+):(\d+)/) {
      ($year, $month, $day, $hour, $minute, $second, $dseconds) =
          ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10);
    } else {
      ($second, $minute, $hour, $day, $month, $year, $wday, $yday, $isdst) =
          gmtime(time);
      $year -= 1900;
      $month += 1;
    }
    my $epoch = timegm($second, $minute, $hour, $day, $month-1, $year-1900);
    # 1992-5-26,13:30:15.0,-4:0 = Tuesday May 26, 1992 at 1:30:15 PM EDT
    # Eastern Daylight Time (EDT) is 4 hours behind Coordinated Universal Time (UTC)
    # 13:30:15 EDT = 17:30:15 UTC
    # wir haben gesetzt timegm(13:30:15), d.h. man muss von epoch noch 4 stunden abziehen
    #
    if ($hoursutc || $minutesutc) {
      if ($dirutc && $dirutc eq "+") {
        $epoch -= ($hoursutc * 3600 + $minutesutc);
      } elsif ($dirutc && $dirutc eq "-") {
        $epoch += ($hoursutc * 3600 + $minutesutc);
      }
    }
    return $epoch;
  },
};



package Monitoring::GLPlugin::SNMP::MibsAndOids::PRINTERMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'PRINTER-MIB'} = {
  url => '',
  name => 'PRINTER-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'PRINTER-MIB'} =
    '1.3.6.1.2.1.43';

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'PRINTER-MIB'} = {
  printmib => '1.3.6.1.2.1.43',
  prtMIBConformance => '1.3.6.1.2.1.43.2',
  prtMIBGroups => '1.3.6.1.2.1.43.2.2',
  prtGeneral => '1.3.6.1.2.1.43.5',
  prtGeneralTable => '1.3.6.1.2.1.43.5.1',
  prtGeneralEntry => '1.3.6.1.2.1.43.5.1.1',
  prtGeneralConfigChanges => '1.3.6.1.2.1.43.5.1.1.1',
  prtGeneralCurrentLocalization => '1.3.6.1.2.1.43.5.1.1.2',
  prtGeneralReset => '1.3.6.1.2.1.43.5.1.1.3',
  prtGeneralResetDefinition => 'PRINTER-MIB::PrtGeneralResetTC',
  prtGeneralCurrentOperator => '1.3.6.1.2.1.43.5.1.1.4',
  prtGeneralServicePerson => '1.3.6.1.2.1.43.5.1.1.5',
  prtInputDefaultIndex => '1.3.6.1.2.1.43.5.1.1.6',
  prtOutputDefaultIndex => '1.3.6.1.2.1.43.5.1.1.7',
  prtMarkerDefaultIndex => '1.3.6.1.2.1.43.5.1.1.8',
  prtMediaPathDefaultIndex => '1.3.6.1.2.1.43.5.1.1.9',
  prtConsoleLocalization => '1.3.6.1.2.1.43.5.1.1.10',
  prtConsoleNumberOfDisplayLines => '1.3.6.1.2.1.43.5.1.1.11',
  prtConsoleNumberOfDisplayChars => '1.3.6.1.2.1.43.5.1.1.12',
  prtConsoleDisable => '1.3.6.1.2.1.43.5.1.1.13',
  prtConsoleDisableDefinition => 'PRINTER-MIB::prtConsoleDisable',
  prtAuxiliarySheetStartupPage => '1.3.6.1.2.1.43.5.1.1.14',
  prtAuxiliarySheetStartupPageDefinition => 'PRINTER-MIB::PresentOnOff',
  prtAuxiliarySheetBannerPage => '1.3.6.1.2.1.43.5.1.1.15',
  prtAuxiliarySheetBannerPageDefinition => 'PRINTER-MIB::PresentOnOff',
  prtGeneralPrinterName => '1.3.6.1.2.1.43.5.1.1.16',
  prtGeneralSerialNumber => '1.3.6.1.2.1.43.5.1.1.17',
  prtAlertCriticalEvents => '1.3.6.1.2.1.43.5.1.1.18',
  prtAlertAllEvents => '1.3.6.1.2.1.43.5.1.1.19',
  prtStorageRefTable => '1.3.6.1.2.1.43.5.2',
  prtStorageRefEntry => '1.3.6.1.2.1.43.5.2.1',
  prtStorageRefSeqNumber => '1.3.6.1.2.1.43.5.2.1.1',
  prtStorageRefIndex => '1.3.6.1.2.1.43.5.2.1.2',
  prtDeviceRefTable => '1.3.6.1.2.1.43.5.3',
  prtDeviceRefEntry => '1.3.6.1.2.1.43.5.3.1',
  prtDeviceRefSeqNumber => '1.3.6.1.2.1.43.5.3.1.1',
  prtDeviceRefIndex => '1.3.6.1.2.1.43.5.3.1.2',
  prtCover => '1.3.6.1.2.1.43.6',
  prtCoverTable => '1.3.6.1.2.1.43.6.1',
  prtCoverEntry => '1.3.6.1.2.1.43.6.1.1',
  prtCoverIndex => '1.3.6.1.2.1.43.6.1.1.1',
  prtCoverDescription => '1.3.6.1.2.1.43.6.1.1.2',
  prtCoverStatus => '1.3.6.1.2.1.43.6.1.1.3',
  prtCoverStatusDefinition => 'PRINTER-MIB::PrtCoverStatusTC',
  prtLocalization => '1.3.6.1.2.1.43.7',
  prtLocalizationTable => '1.3.6.1.2.1.43.7.1',
  prtLocalizationEntry => '1.3.6.1.2.1.43.7.1.1',
  prtLocalizationIndex => '1.3.6.1.2.1.43.7.1.1.1',
  prtLocalizationLanguage => '1.3.6.1.2.1.43.7.1.1.2',
  prtLocalizationCountry => '1.3.6.1.2.1.43.7.1.1.3',
  prtLocalizationCharacterSet => '1.3.6.1.2.1.43.7.1.1.4',
  prtLocalizationCharacterSetDefinition => 'PRINTER-MIB::CodedCharSet',
  prtInput => '1.3.6.1.2.1.43.8',
  prtInputTable => '1.3.6.1.2.1.43.8.2',
  prtInputEntry => '1.3.6.1.2.1.43.8.2.1',
  prtInputIndex => '1.3.6.1.2.1.43.8.2.1.1',
  prtInputType => '1.3.6.1.2.1.43.8.2.1.2',
  prtInputTypeDefinition => 'PRINTER-MIB::PrtInputTypeTC',
  prtInputDimUnit => '1.3.6.1.2.1.43.8.2.1.3',
  prtInputDimUnitDefinition => 'PRINTER-MIB::PrtMediaUnitTC',
  prtInputMediaDimFeedDirDeclared => '1.3.6.1.2.1.43.8.2.1.4',
  prtInputMediaDimXFeedDirDeclared => '1.3.6.1.2.1.43.8.2.1.5',
  prtInputMediaDimFeedDirChosen => '1.3.6.1.2.1.43.8.2.1.6',
  prtInputMediaDimXFeedDirChosen => '1.3.6.1.2.1.43.8.2.1.7',
  prtInputCapacityUnit => '1.3.6.1.2.1.43.8.2.1.8',
  prtInputCapacityUnitDefinition => 'PRINTER-MIB::PrtCapacityUnitTC',
  prtInputMaxCapacity => '1.3.6.1.2.1.43.8.2.1.9',
  prtInputCurrentLevel => '1.3.6.1.2.1.43.8.2.1.10',
  prtInputStatus => '1.3.6.1.2.1.43.8.2.1.11',
  prtInputStatusDefinition => 'PRINTER-MIB::PrtSubUnitStatusTC',
  prtInputMediaName => '1.3.6.1.2.1.43.8.2.1.12',
  prtInputName => '1.3.6.1.2.1.43.8.2.1.13',
  prtInputVendorName => '1.3.6.1.2.1.43.8.2.1.14',
  prtInputModel => '1.3.6.1.2.1.43.8.2.1.15',
  prtInputVersion => '1.3.6.1.2.1.43.8.2.1.16',
  prtInputSerialNumber => '1.3.6.1.2.1.43.8.2.1.17',
  prtInputDescription => '1.3.6.1.2.1.43.8.2.1.18',
  prtInputSecurity => '1.3.6.1.2.1.43.8.2.1.19',
  prtInputSecurityDefinition => 'PRINTER-MIB::PresentOnOff',
  prtInputMediaWeight => '1.3.6.1.2.1.43.8.2.1.20',
  prtInputMediaType => '1.3.6.1.2.1.43.8.2.1.21',
  prtInputMediaColor => '1.3.6.1.2.1.43.8.2.1.22',
  prtInputMediaFormParts => '1.3.6.1.2.1.43.8.2.1.23',
  prtInputMediaLoadTimeout => '1.3.6.1.2.1.43.8.2.1.24',
  prtInputNextIndex => '1.3.6.1.2.1.43.8.2.1.25',
  prtOutput => '1.3.6.1.2.1.43.9',
  prtOutputTable => '1.3.6.1.2.1.43.9.2',
  prtOutputEntry => '1.3.6.1.2.1.43.9.2.1',
  prtOutputIndex => '1.3.6.1.2.1.43.9.2.1.1',
  prtOutputType => '1.3.6.1.2.1.43.9.2.1.2',
  prtOutputTypeDefinition => 'PRINTER-MIB::PrtOutputTypeTC',
  prtOutputCapacityUnit => '1.3.6.1.2.1.43.9.2.1.3',
  prtOutputCapacityUnitDefinition => 'PRINTER-MIB::PrtCapacityUnitTC',
  prtOutputMaxCapacity => '1.3.6.1.2.1.43.9.2.1.4',
  prtOutputRemainingCapacity => '1.3.6.1.2.1.43.9.2.1.5',
  prtOutputStatus => '1.3.6.1.2.1.43.9.2.1.6',
  prtOutputStatusDefinition => 'PRINTER-MIB::PrtSubUnitStatusTC',
  prtOutputName => '1.3.6.1.2.1.43.9.2.1.7',
  prtOutputVendorName => '1.3.6.1.2.1.43.9.2.1.8',
  prtOutputModel => '1.3.6.1.2.1.43.9.2.1.9',
  prtOutputVersion => '1.3.6.1.2.1.43.9.2.1.10',
  prtOutputSerialNumber => '1.3.6.1.2.1.43.9.2.1.11',
  prtOutputDescription => '1.3.6.1.2.1.43.9.2.1.12',
  prtOutputSecurity => '1.3.6.1.2.1.43.9.2.1.13',
  prtOutputSecurityDefinition => 'PRINTER-MIB::PresentOnOff',
  prtOutputDimUnit => '1.3.6.1.2.1.43.9.2.1.14',
  prtOutputDimUnitDefinition => 'PRINTER-MIB::PrtMediaUnitTC',
  prtOutputMaxDimFeedDir => '1.3.6.1.2.1.43.9.2.1.15',
  prtOutputMaxDimXFeedDir => '1.3.6.1.2.1.43.9.2.1.16',
  prtOutputMinDimFeedDir => '1.3.6.1.2.1.43.9.2.1.17',
  prtOutputMinDimXFeedDir => '1.3.6.1.2.1.43.9.2.1.18',
  prtOutputStackingOrder => '1.3.6.1.2.1.43.9.2.1.19',
  prtOutputStackingOrderDefinition => 'PRINTER-MIB::PrtOutputStackingOrderTC',
  prtOutputPageDeliveryOrientation => '1.3.6.1.2.1.43.9.2.1.20',
  prtOutputPageDeliveryOrientationDefinition => 'PRINTER-MIB::PrtOutputPageDeliveryOrientationTC',
  prtOutputBursting => '1.3.6.1.2.1.43.9.2.1.21',
  prtOutputBurstingDefinition => 'PRINTER-MIB::PresentOnOff',
  prtOutputDecollating => '1.3.6.1.2.1.43.9.2.1.22',
  prtOutputDecollatingDefinition => 'PRINTER-MIB::PresentOnOff',
  prtOutputPageCollated => '1.3.6.1.2.1.43.9.2.1.23',
  prtOutputPageCollatedDefinition => 'PRINTER-MIB::PresentOnOff',
  prtOutputOffsetStacking => '1.3.6.1.2.1.43.9.2.1.24',
  prtOutputOffsetStackingDefinition => 'PRINTER-MIB::PresentOnOff',
  prtMarker => '1.3.6.1.2.1.43.10',
  prtMarkerTable => '1.3.6.1.2.1.43.10.2',
  prtMarkerEntry => '1.3.6.1.2.1.43.10.2.1',
  prtMarkerIndex => '1.3.6.1.2.1.43.10.2.1.1',
  prtMarkerMarkTech => '1.3.6.1.2.1.43.10.2.1.2',
  prtMarkerMarkTechDefinition => 'PRINTER-MIB::PrtMarkerMarkTechTC',
  prtMarkerCounterUnit => '1.3.6.1.2.1.43.10.2.1.3',
  prtMarkerCounterUnitDefinition => 'PRINTER-MIB::PrtMarkerCounterUnitTC',
  prtMarkerLifeCount => '1.3.6.1.2.1.43.10.2.1.4',
  prtMarkerPowerOnCount => '1.3.6.1.2.1.43.10.2.1.5',
  prtMarkerProcessColorants => '1.3.6.1.2.1.43.10.2.1.6',
  prtMarkerSpotColorants => '1.3.6.1.2.1.43.10.2.1.7',
  prtMarkerAddressabilityUnit => '1.3.6.1.2.1.43.10.2.1.8',
  prtMarkerAddressabilityUnitDefinition => 'PRINTER-MIB::prtMarkerAddressabilityUnit',
  prtMarkerAddressabilityFeedDir => '1.3.6.1.2.1.43.10.2.1.9',
  prtMarkerAddressabilityXFeedDir => '1.3.6.1.2.1.43.10.2.1.10',
  prtMarkerNorthMargin => '1.3.6.1.2.1.43.10.2.1.11',
  prtMarkerSouthMargin => '1.3.6.1.2.1.43.10.2.1.12',
  prtMarkerWestMargin => '1.3.6.1.2.1.43.10.2.1.13',
  prtMarkerEastMargin => '1.3.6.1.2.1.43.10.2.1.14',
  prtMarkerStatus => '1.3.6.1.2.1.43.10.2.1.15',
  prtMarkerStatusDefinition => 'PRINTER-MIB::PrtSubUnitStatusTC',
  prtMarkerSupplies => '1.3.6.1.2.1.43.11',
  prtMarkerSuppliesTable => '1.3.6.1.2.1.43.11.1',
  prtMarkerSuppliesEntry => '1.3.6.1.2.1.43.11.1.1',
  prtMarkerSuppliesIndex => '1.3.6.1.2.1.43.11.1.1.1',
  prtMarkerSuppliesMarkerIndex => '1.3.6.1.2.1.43.11.1.1.2',
  prtMarkerSuppliesColorantIndex => '1.3.6.1.2.1.43.11.1.1.3',
  prtMarkerSuppliesClass => '1.3.6.1.2.1.43.11.1.1.4',
  prtMarkerSuppliesClassDefinition => 'PRINTER-MIB::PrtMarkerSuppliesClassTC',
  prtMarkerSuppliesType => '1.3.6.1.2.1.43.11.1.1.5',
  prtMarkerSuppliesTypeDefinition => 'PRINTER-MIB::PrtMarkerSuppliesTypeTC',
  prtMarkerSuppliesDescription => '1.3.6.1.2.1.43.11.1.1.6',
  prtMarkerSuppliesSupplyUnit => '1.3.6.1.2.1.43.11.1.1.7',
  prtMarkerSuppliesSupplyUnitDefinition => 'PRINTER-MIB::PrtMarkerSuppliesSupplyUnitTC',
  prtMarkerSuppliesMaxCapacity => '1.3.6.1.2.1.43.11.1.1.8',
  prtMarkerSuppliesLevel => '1.3.6.1.2.1.43.11.1.1.9',
  prtMarkerColorant => '1.3.6.1.2.1.43.12',
  prtMarkerColorantTable => '1.3.6.1.2.1.43.12.1',
  prtMarkerColorantEntry => '1.3.6.1.2.1.43.12.1.1',
  prtMarkerColorantIndex => '1.3.6.1.2.1.43.12.1.1.1',
  prtMarkerColorantMarkerIndex => '1.3.6.1.2.1.43.12.1.1.2',
  prtMarkerColorantRole => '1.3.6.1.2.1.43.12.1.1.3',
  prtMarkerColorantRoleDefinition => 'PRINTER-MIB::PrtMarkerColorantRoleTC',
  prtMarkerColorantValue => '1.3.6.1.2.1.43.12.1.1.4',
  prtMarkerColorantTonality => '1.3.6.1.2.1.43.12.1.1.5',
  prtMediaPath => '1.3.6.1.2.1.43.13',
  prtMediaPathTable => '1.3.6.1.2.1.43.13.4',
  prtMediaPathEntry => '1.3.6.1.2.1.43.13.4.1',
  prtMediaPathIndex => '1.3.6.1.2.1.43.13.4.1.1',
  prtMediaPathMaxSpeedPrintUnit => '1.3.6.1.2.1.43.13.4.1.2',
  prtMediaPathMaxSpeedPrintUnitDefinition => 'PRINTER-MIB::PrtMediaPathMaxSpeedPrintUnitTC',
  prtMediaPathMediaSizeUnit => '1.3.6.1.2.1.43.13.4.1.3',
  prtMediaPathMediaSizeUnitDefinition => 'PRINTER-MIB::PrtMediaUnitTC',
  prtMediaPathMaxSpeed => '1.3.6.1.2.1.43.13.4.1.4',
  prtMediaPathMaxMediaFeedDir => '1.3.6.1.2.1.43.13.4.1.5',
  prtMediaPathMaxMediaXFeedDir => '1.3.6.1.2.1.43.13.4.1.6',
  prtMediaPathMinMediaFeedDir => '1.3.6.1.2.1.43.13.4.1.7',
  prtMediaPathMinMediaXFeedDir => '1.3.6.1.2.1.43.13.4.1.8',
  prtMediaPathType => '1.3.6.1.2.1.43.13.4.1.9',
  prtMediaPathTypeDefinition => 'PRINTER-MIB::PrtMediaPathTypeTC',
  prtMediaPathDescription => '1.3.6.1.2.1.43.13.4.1.10',
  prtMediaPathStatus => '1.3.6.1.2.1.43.13.4.1.11',
  prtMediaPathStatusDefinition => 'PRINTER-MIB::PrtSubUnitStatusTC',
  prtChannel => '1.3.6.1.2.1.43.14',
  prtChannelTable => '1.3.6.1.2.1.43.14.1',
  prtChannelEntry => '1.3.6.1.2.1.43.14.1.1',
  prtChannelIndex => '1.3.6.1.2.1.43.14.1.1.1',
  prtChannelType => '1.3.6.1.2.1.43.14.1.1.2',
  prtChannelTypeDefinition => 'PRINTER-MIB::PrtChannelTypeTC',
  prtChannelProtocolVersion => '1.3.6.1.2.1.43.14.1.1.3',
  prtChannelCurrentJobCntlLangIndex => '1.3.6.1.2.1.43.14.1.1.4',
  prtChannelDefaultPageDescLangIndex => '1.3.6.1.2.1.43.14.1.1.5',
  prtChannelState => '1.3.6.1.2.1.43.14.1.1.6',
  prtChannelStateDefinition => 'PRINTER-MIB::PrtChannelStateTC',
  prtChannelIfIndex => '1.3.6.1.2.1.43.14.1.1.7',
  prtChannelStatus => '1.3.6.1.2.1.43.14.1.1.8',
  prtChannelStatusDefinition => 'PRINTER-MIB::PrtSubUnitStatusTC',
  prtChannelInformation => '1.3.6.1.2.1.43.14.1.1.9',
  prtInterpreter => '1.3.6.1.2.1.43.15',
  prtInterpreterTable => '1.3.6.1.2.1.43.15.1',
  prtInterpreterEntry => '1.3.6.1.2.1.43.15.1.1',
  prtInterpreterIndex => '1.3.6.1.2.1.43.15.1.1.1',
  prtInterpreterLangFamily => '1.3.6.1.2.1.43.15.1.1.2',
  prtInterpreterLangFamilyDefinition => 'PRINTER-MIB::PrtInterpreterLangFamilyTC',
  prtInterpreterLangLevel => '1.3.6.1.2.1.43.15.1.1.3',
  prtInterpreterLangVersion => '1.3.6.1.2.1.43.15.1.1.4',
  prtInterpreterDescription => '1.3.6.1.2.1.43.15.1.1.5',
  prtInterpreterVersion => '1.3.6.1.2.1.43.15.1.1.6',
  prtInterpreterDefaultOrientation => '1.3.6.1.2.1.43.15.1.1.7',
  prtInterpreterDefaultOrientationDefinition => 'PRINTER-MIB::PrtPrintOrientationTC',
  prtInterpreterFeedAddressability => '1.3.6.1.2.1.43.15.1.1.8',
  prtInterpreterXFeedAddressability => '1.3.6.1.2.1.43.15.1.1.9',
  prtInterpreterDefaultCharSetIn => '1.3.6.1.2.1.43.15.1.1.10',
  prtInterpreterDefaultCharSetInDefinition => 'PRINTER-MIB::CodedCharSet',
  prtInterpreterDefaultCharSetOut => '1.3.6.1.2.1.43.15.1.1.11',
  prtInterpreterDefaultCharSetOutDefinition => 'PRINTER-MIB::CodedCharSet',
  prtInterpreterTwoWay => '1.3.6.1.2.1.43.15.1.1.12',
  prtInterpreterTwoWayDefinition => 'PRINTER-MIB::PrtInterpreterTwoWayTC',
  prtConsoleDisplayBuffer => '1.3.6.1.2.1.43.16',
  prtConsoleDisplayBufferTable => '1.3.6.1.2.1.43.16.5',
  prtConsoleDisplayBufferEntry => '1.3.6.1.2.1.43.16.5.1',
  prtConsoleDisplayBufferIndex => '1.3.6.1.2.1.43.16.5.1.1',
  prtConsoleDisplayBufferText => '1.3.6.1.2.1.43.16.5.1.2',
  prtConsoleLights => '1.3.6.1.2.1.43.17',
  prtConsoleLightTable => '1.3.6.1.2.1.43.17.6',
  prtConsoleLightEntry => '1.3.6.1.2.1.43.17.6.1',
  prtConsoleLightIndex => '1.3.6.1.2.1.43.17.6.1.1',
  prtConsoleOnTime => '1.3.6.1.2.1.43.17.6.1.2',
  prtConsoleOffTime => '1.3.6.1.2.1.43.17.6.1.3',
  prtConsoleColor => '1.3.6.1.2.1.43.17.6.1.4',
  prtConsoleColorDefinition => 'PRINTER-MIB::PrtConsoleColorTC',
  prtConsoleDescription => '1.3.6.1.2.1.43.17.6.1.5',
  prtAlert => '1.3.6.1.2.1.43.18',
  prtAlertTable => '1.3.6.1.2.1.43.18.1',
  prtAlertEntry => '1.3.6.1.2.1.43.18.1.1',
  prtAlertIndex => '1.3.6.1.2.1.43.18.1.1.1',
  prtAlertSeverityLevel => '1.3.6.1.2.1.43.18.1.1.2',
  prtAlertSeverityLevelDefinition => 'PRINTER-MIB::PrtAlertSeverityLevelTC',
  prtAlertTrainingLevel => '1.3.6.1.2.1.43.18.1.1.3',
  prtAlertTrainingLevelDefinition => 'PRINTER-MIB::PrtAlertTrainingLevelTC',
  prtAlertGroup => '1.3.6.1.2.1.43.18.1.1.4',
  prtAlertGroupDefinition => 'PRINTER-MIB::PrtAlertGroupTC',
  prtAlertGroupIndex => '1.3.6.1.2.1.43.18.1.1.5',
  prtAlertLocation => '1.3.6.1.2.1.43.18.1.1.6',
  prtAlertCode => '1.3.6.1.2.1.43.18.1.1.7',
  prtAlertCodeDefinition => 'PRINTER-MIB::PrtAlertCodeTC',
  prtAlertDescription => '1.3.6.1.2.1.43.18.1.1.8',
  prtAlertTime => '1.3.6.1.2.1.43.18.1.1.9',
  printerV1Alert => '1.3.6.1.2.1.43.18.2',
  printerV2AlertPrefix => '1.3.6.1.2.1.43.18.2.0',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'PRINTER-MIB'} = {
  CodedCharSet => {
    '1' => 'other',
  },
  PrtInputTypeTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'sheetFeedAutoRemovableTray',
    '4' => 'sheetFeedAutoNonRemovableTray',
    '5' => 'sheetFeedManual',
    '6' => 'continuousRoll',
    '7' => 'continuousFanFold',
  },
  PrtChannelStateTC => {
    '1' => 'other',
    '3' => 'printDataAccepted',
    '4' => 'noDataAccepted',
  },
  PrtMediaPathTypeTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'longEdgeBindingDuplex',
    '4' => 'shortEdgeBindingDuplex',
    '5' => 'simplex',
  },
  PrtConsoleColorTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'white',
    '4' => 'red',
    '5' => 'green',
    '6' => 'blue',
    '7' => 'cyan',
    '8' => 'magenta',
    '9' => 'yellow',
    '10' => 'orange',
  },
  PrtMarkerSuppliesClassTC => {
    '1' => 'other',
    '3' => 'supplyThatIsConsumed',
    '4' => 'receptacleThatIsFilled',
  },
  PrtChannelTypeTC => {
    '1' => 'other',
    '3' => 'chSerialPort',
    '4' => 'chParallelPort',
    '5' => 'chIEEE1284Port',
    '6' => 'chSCSIPort',
    '7' => 'chAppleTalkPAP',
    '8' => 'chLPDServer',
    '9' => 'chNetwareRPrinter',
    '10' => 'chNetwarePServer',
    '11' => 'chPort9100',
    '12' => 'chAppSocket',
    '13' => 'chFTP',
    '14' => 'chTFTP',
    '15' => 'chDLCLLCPort',
    '16' => 'chIBM3270',
    '17' => 'chIBM5250',
    '18' => 'chFax',
    '19' => 'chIEEE1394',
    '20' => 'chTransport1',
    '21' => 'chCPAP',
    '26' => 'chPCPrint',
    '27' => 'chServerMessageBlock',
    '28' => 'chPSM',
    '31' => 'chSystemObjectManager',
    '32' => 'chDECLAT',
    '33' => 'chNPAP',
    '34' => 'chUSB',
    '35' => 'chIRDA',
    '36' => 'chPrintXChange',
    '37' => 'chPortTCP',
    '38' => 'chBidirPortTCP',
    '39' => 'chUNPP',
    '40' => 'chAppleTalkADSP',
    '41' => 'chPortSPX',
    '42' => 'chPortHTTP',
    '43' => 'chNDPS',
  },
  PrtOutputStackingOrderTC => {
    '2' => 'unknown',
    '3' => 'firstToLast',
    '4' => 'lastToFirst',
  },
  PrtInterpreterLangFamilyTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'langPCL',
    '4' => 'langHPGL',
    '5' => 'langPJL',
    '6' => 'langPS',
    '7' => 'langIPDS',
    '8' => 'langPPDS',
    '9' => 'langEscapeP',
    '10' => 'langEpson',
    '11' => 'langDDIF',
    '12' => 'langInterpress',
    '13' => 'langISO6429',
    '14' => 'langLineData',
    '15' => 'langMODCA',
    '16' => 'langREGIS',
    '17' => 'langSCS',
    '18' => 'langSPDL',
    '19' => 'langTEK4014',
    '20' => 'langPDS',
    '21' => 'langIGP',
    '22' => 'langCodeV',
    '23' => 'langDSCDSE',
    '24' => 'langWPS',
    '25' => 'langLN03',
    '26' => 'langCCITT',
    '27' => 'langQUIC',
    '28' => 'langCPAP',
    '29' => 'langDecPPL',
    '30' => 'langSimpleText',
    '31' => 'langNPAP',
    '32' => 'langDOC',
    '33' => 'langimPress',
    '34' => 'langPinwriter',
    '35' => 'langNPDL',
    '36' => 'langNEC201PL',
    '37' => 'langAutomatic',
    '38' => 'langPages',
    '39' => 'langLIPS',
    '40' => 'langTIFF',
    '41' => 'langDiagnostic',
    '42' => 'langPSPrinter',
    '43' => 'langCaPSL',
    '44' => 'langEXCL',
    '45' => 'langLCDS',
    '46' => 'langXES',
    '47' => 'langPCLXL',
    '48' => 'langART',
    '49' => 'langTIPSI',
    '50' => 'langPrescribe',
    '51' => 'langLinePrinter',
    '52' => 'langIDP',
    '53' => 'langXJCL',
    '54' => 'langPDF',
    '55' => 'langRPDL',
    '56' => 'langIntermecIPL',
    '57' => 'langUBIFingerprint',
    '58' => 'langUBIDirectProtocol',
    '59' => 'langFujitsu',
  },
  prtConsoleDisable => {
    '3' => 'operatorConsoleEnabled',
    '4' => 'operatorConsoleDisabled',
    '5' => 'operatorConsoleEnabledLevel1',
    '6' => 'operatorConsoleEnabledLevel2',
    '7' => 'operatorConsoleEnabledLevel3',
  },
  PrtMarkerSuppliesTypeTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'toner',
    '4' => 'wasteToner',
    '5' => 'ink',
    '6' => 'inkCartridge',
    '7' => 'inkRibbon',
    '8' => 'wasteInk',
    '9' => 'opc',
    '10' => 'developer',
    '11' => 'fuserOil',
    '12' => 'solidWax',
    '13' => 'ribbonWax',
    '14' => 'wasteWax',
    '15' => 'fuser',
    '16' => 'coronaWire',
    '17' => 'fuserOilWick',
    '18' => 'cleanerUnit',
    '19' => 'fuserCleaningPad',
    '20' => 'transferUnit',
    '21' => 'tonerCartridge',
    '22' => 'fuserOiler',
    '23' => 'water',
    '24' => 'wasteWater',
    '25' => 'glueWaterAdditive',
    '26' => 'wastePaper',
    '27' => 'bindingSupply',
    '28' => 'bandingSupply',
    '29' => 'stitchingWire',
    '30' => 'shrinkWrap',
    '31' => 'paperWrap',
    '32' => 'staples',
    '33' => 'inserts',
    '34' => 'covers',
  },
  prtMarkerAddressabilityUnit => {
    '3' => 'tenThousandthsOfInches',
    '4' => 'micrometers',
  },
  PrtMediaPathMaxSpeedPrintUnitTC => {
    '3' => 'tenThousandthsOfInchesPerHour',
    '4' => 'micrometersPerHour',
    '5' => 'charactersPerHour',
    '6' => 'linesPerHour',
    '7' => 'impressionsPerHour',
    '8' => 'sheetsPerHour',
    '9' => 'dotRowPerHour',
    '16' => 'feetPerHour',
    '17' => 'metersPerHour',
  },
  PrtMarkerColorantRoleTC => {
    '1' => 'other',
    '3' => 'process',
    '4' => 'spot',
  },
  PrtMarkerMarkTechTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'electrophotographicLED',
    '4' => 'electrophotographicLaser',
    '5' => 'electrophotographicOther',
    '6' => 'impactMovingHeadDotMatrix9pin',
    '7' => 'impactMovingHeadDotMatrix24pin',
    '8' => 'impactMovingHeadDotMatrixOther',
    '9' => 'impactMovingHeadFullyFormed',
    '10' => 'impactBand',
    '11' => 'impactOther',
    '12' => 'inkjetAqueous',
    '13' => 'inkjetSolid',
    '14' => 'inkjetOther',
    '15' => 'pen',
    '16' => 'thermalTransfer',
    '17' => 'thermalSensitive',
    '18' => 'thermalDiffusion',
    '19' => 'thermalOther',
    '20' => 'electroerosion',
    '21' => 'electrostatic',
    '22' => 'photographicMicrofiche',
    '23' => 'photographicImagesetter',
    '24' => 'photographicOther',
    '25' => 'ionDeposition',
    '26' => 'eBeam',
    '27' => 'typesetter',
  },
  PrtPrintOrientationTC => {
    '1' => 'other',
    '3' => 'portrait',
    '4' => 'landscape',
  },
  PrtAlertTrainingLevelTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'untrained',
    '4' => 'trained',
    '5' => 'fieldService',
    '6' => 'management',
    '7' => 'noInterventionRequired',
  },
  PrtMediaUnitTC => {
    '3' => 'tenThousandthsOfInches',
    '4' => 'micrometers',
  },
  PrtCapacityUnitTC => {
    '3' => 'tenThousandthsOfInches',
    '4' => 'micrometers',
    '8' => 'sheets',
    '16' => 'feet',
    '17' => 'meters',
  },
  PrtInterpreterTwoWayTC => {
    '3' => 'yes',
    '4' => 'no',
  },
  PrtCoverStatusTC => {
    '1' => 'other',
    '3' => 'coverOpen',
    '4' => 'coverClosed',
    '5' => 'interlockOpen',
    '6' => 'interlockClosed',
  },
  PresentOnOff => {
    '1' => 'other',
    '3' => 'on',
    '4' => 'off',
    '5' => 'notPresent',
  },
  PrtMarkerCounterUnitTC => {
    '3' => 'tenThousandthsOfInches',
    '4' => 'micrometers',
    '5' => 'characters',
    '6' => 'lines',
    '7' => 'impressions',
    '8' => 'sheets',
    '9' => 'dotRow',
    '11' => 'hours',
    '16' => 'feet',
    '17' => 'meters',
  },
  PrtAlertCodeTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'coverOpened',
    '4' => 'coverClosed',
    '5' => 'interlockOpened',
    '6' => 'interlockClosed',
    '7' => 'configurationChanged',
    '8' => 'jammed',
    '9' => 'subunitMissing',
    '10' => 'subunitLifeAlmostOver',
    '11' => 'subunitLifeOver',
    '12' => 'subunitAlmostEmpty',
    '13' => 'subunitEmpty',
    '14' => 'subunitAlmostFull',
    '15' => 'subunitFull',
    '16' => 'subunitNearLimit',
    '17' => 'subunitAtLimit',
    '18' => 'subunitOpened',
    '19' => 'subunitClosed',
    '20' => 'subunitTurnedOn',
    '21' => 'subunitTurnedOff',
    '22' => 'subunitOffline',
    '23' => 'subunitPowerSaver',
    '24' => 'subunitWarmingUp',
    '25' => 'subunitAdded',
    '26' => 'subunitRemoved',
    '27' => 'subunitResourceAdded',
    '28' => 'subunitResourceRemoved',
    '29' => 'subunitRecoverableFailure',
    '30' => 'subunitUnrecoverableFailure',
    '31' => 'subunitRecoverableStorageError',
    '32' => 'subunitUnrecoverableStorageError',
    '33' => 'subunitMotorFailure',
    '34' => 'subunitMemoryExhausted',
    '35' => 'subunitUnderTemperature',
    '36' => 'subunitOverTemperature',
    '37' => 'subunitTimingFailure',
    '38' => 'subunitThermistorFailure',
    '501' => 'doorOpen',
    '502' => 'doorClosed',
    '503' => 'poweredUp',
    '504' => 'poweredDown',
    '505' => 'printerNMSReset',
    '506' => 'printerManualReset',
    '507' => 'printerReadyToPrint',
    '801' => 'inputMediaTrayMissing',
    '802' => 'inputMediaSizeChanged',
    '803' => 'inputMediaWeightChanged',
    '804' => 'inputMediaTypeChanged',
    '805' => 'inputMediaColorChanged',
    '806' => 'inputMediaFormPartsChange',
    '807' => 'inputMediaSupplyLow',
    '808' => 'inputMediaSupplyEmpty',
    '809' => 'inputMediaChangeRequest',
    '810' => 'inputManualInputRequest',
    '811' => 'inputTrayPositionFailure',
    '812' => 'inputTrayElevationFailure',
    '813' => 'inputCannotFeedSizeSelected',
    '901' => 'outputMediaTrayMissing',
    '902' => 'outputMediaTrayAlmostFull',
    '903' => 'outputMediaTrayFull',
    '904' => 'outputMailboxSelectFailure',
    '1001' => 'markerFuserUnderTemperature',
    '1002' => 'markerFuserOverTemperature',
    '1003' => 'markerFuserTimingFailure',
    '1004' => 'markerFuserThermistorFailure',
    '1005' => 'markerAdjustingPrintQuality',
    '1101' => 'markerTonerEmpty',
    '1102' => 'markerInkEmpty',
    '1103' => 'markerPrintRibbonEmpty',
    '1104' => 'markerTonerAlmostEmpty',
    '1105' => 'markerInkAlmostEmpty',
    '1106' => 'markerPrintRibbonAlmostEmpty',
    '1107' => 'markerWasteTonerReceptacleAlmostFull',
    '1108' => 'markerWasteInkReceptacleAlmostFull',
    '1109' => 'markerWasteTonerReceptacleFull',
    '1110' => 'markerWasteInkReceptacleFull',
    '1111' => 'markerOpcLifeAlmostOver',
    '1112' => 'markerOpcLifeOver',
    '1113' => 'markerDeveloperAlmostEmpty',
    '1114' => 'markerDeveloperEmpty',
    '1115' => 'markerTonerCartridgeMissing',
    '1301' => 'mediaPathMediaTrayMissing',
    '1302' => 'mediaPathMediaTrayAlmostFull',
    '1303' => 'mediaPathMediaTrayFull',
    '1501' => 'interpreterMemoryIncreased',
    '1502' => 'interpreterMemoryDecreased',
    '1503' => 'interpreterCartridgeAdded',
    '1504' => 'interpreterCartridgeDeleted',
    '1505' => 'interpreterResourceAdded',
    '1506' => 'interpreterResourceDeleted',
    '1507' => 'interpreterResourceUnavailable',
    '1509' => 'interpreterComplexPageEncountered',
    '1801' => 'alertRemovalOfBinaryChangeEntry',
  },
  PrtMarkerSuppliesSupplyUnitTC => {
    '3' => 'tenThousandthsOfInches',
    '4' => 'micrometers',
    '7' => 'impressions',
    '8' => 'sheets',
    '11' => 'hours',
    '12' => 'thousandthsOfOunces',
    '13' => 'tenthsOfGrams',
    '14' => 'hundrethsOfFluidOunces',
    '15' => 'tenthsOfMilliliters',
    '16' => 'feet',
    '17' => 'meters',
    '18' => 'items',
  },
  PrtGeneralResetTC => {
    '3' => 'notResetting',
    '4' => 'powerCycleReset',
    '5' => 'resetToNVRAM',
    '6' => 'resetToFactoryDefaults',
  },
  PrtOutputPageDeliveryOrientationTC => {
    '3' => 'faceUp',
    '4' => 'faceDown',
  },
  PrtAlertGroupTC => {
    '1' => 'other',
    '3' => 'hostResourcesMIBStorageTable',
    '4' => 'hostResourcesMIBDeviceTable',
    '5' => 'generalPrinter',
    '6' => 'cover',
    '7' => 'localization',
    '8' => 'input',
    '9' => 'output',
    '10' => 'marker',
    '11' => 'markerSupplies',
    '12' => 'markerColorant',
    '13' => 'mediaPath',
    '14' => 'channel',
    '15' => 'interpreter',
    '16' => 'consoleDisplayBuffer',
    '17' => 'consoleLights',
    '18' => 'alert',
    '30' => 'finDevice',
    '31' => 'finSupply',
    '32' => 'finSupplyMediaInput',
    '33' => 'finAttributeTable',
  },
  PrtAlertSeverityLevelTC => {
    '1' => 'other',
    '3' => 'criticalBinaryChangeEvent',
    '4' => 'warningUnaryChangeEvent',
    '5' => 'warningBinaryChangeEvent',
  },
  PrtOutputTypeTC => {
    '1' => 'other',
    '2' => 'unknown',
    '3' => 'removableBin',
    '4' => 'unRemovableBin',
    '5' => 'continuousRollDevice',
    '6' => 'mailBox',
    '7' => 'continuousFanFold',
  },
  PrtSubUnitStatusTC => sub {
    my $status = shift;
    my @status = ();
    if ($status - 64 >= 0) {
      push(@status, 'Currently at intended state');
      $status -= 64;
    } else {
      push(@status, 'Transitioning to intended state');
    }
    if ($status - 32 >= 0) {
      push(@status, 'State is Off-Line');
      $status -= 32;
    } else {
      push(@status, 'State is On-Line');
    }
    if ($status - 16 >= 0) {
      push(@status, 'Critical Alerts');
      $status -= 16;
    } else {
      push(@status, 'No Critical Alerts');
    }
    if ($status - 8 >= 0) {
      push(@status, 'Non-Critical Alerts');
      $status -= 8;
    } else {
      push(@status, 'No Non-Critical Alerts');
    }
    if ($status == 0) {
      push(@status, 'Available and Idle')
    } elsif ($status == 2) {
      push(@status, 'Available and Standby');
    } elsif ($status == 4) {
      push(@status, 'Available and Active');
    } elsif ($status == 6) {
      push(@status, 'Available and Busy');
    } elsif ($status == 1) {
      push(@status, 'Unavailable and OnRequest');
    } elsif ($status == 3) {
      push(@status, 'Unavailable because Broken');
    } elsif ($status == 5) {
      push(@status, 'Unknown');
    }
    return join('|', @status);
  },
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::PRINTERPORTMONITORMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'PRINTER-PORT-MONITOR-MIB'} = {
  url => '',
  name => 'PRINTER-PORT-MONITOR-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'PRINTER-PORT-MONITOR-MIB'} =
    '1.3.6.1.4.1.2699.1.2';

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'PRINTER-PORT-MONITOR-MIB'} = {
  ppmMIB => '1.3.6.1.4.1.2699.1.2',
  ppmMIBObjects => '1.3.6.1.4.1.2699.1.2.1',
  ppmGeneral => '1.3.6.1.4.1.2699.1.2.1.1',
  ppmGeneralNaturalLanguage => '1.3.6.1.4.1.2699.1.2.1.1.1',
  ppmGeneralNumberOfPrinters => '1.3.6.1.4.1.2699.1.2.1.1.2',
  ppmGeneralNumberOfPorts => '1.3.6.1.4.1.2699.1.2.1.1.3',
  ppmPrinter => '1.3.6.1.4.1.2699.1.2.1.2',
  ppmPrinterTable => '1.3.6.1.4.1.2699.1.2.1.2.1',
  ppmPrinterEntry => '1.3.6.1.4.1.2699.1.2.1.2.1.1',
  ppmPrinterIndex => '1.3.6.1.4.1.2699.1.2.1.2.1.1.1',
  ppmPrinterName => '1.3.6.1.4.1.2699.1.2.1.2.1.1.2',
  ppmPrinterIEEE1284DeviceId => '1.3.6.1.4.1.2699.1.2.1.2.1.1.3',
  ppmPrinterNumberOfPorts => '1.3.6.1.4.1.2699.1.2.1.2.1.1.4',
  ppmPrinterPreferredPortIndex => '1.3.6.1.4.1.2699.1.2.1.2.1.1.5',
  ppmPrinterHrDeviceIndex => '1.3.6.1.4.1.2699.1.2.1.2.1.1.6',
  ppmPrinterSnmpCommunityName => '1.3.6.1.4.1.2699.1.2.1.2.1.1.7',
  ppmPrinterSnmpQueryEnabled => '1.3.6.1.4.1.2699.1.2.1.2.1.1.8',
  ppmPrinterSnmpQueryEnabledDefinition => 'SNMPv2-TC-v1-MIB::TruthValue',
  ppmPort => '1.3.6.1.4.1.2699.1.2.1.3',
  ppmPortTable => '1.3.6.1.4.1.2699.1.2.1.3.1',
  ppmPortEntry => '1.3.6.1.4.1.2699.1.2.1.3.1.1',
  ppmPortIndex => '1.3.6.1.4.1.2699.1.2.1.3.1.1.1',
  ppmPortEnabled => '1.3.6.1.4.1.2699.1.2.1.3.1.1.2',
  ppmPortName => '1.3.6.1.4.1.2699.1.2.1.3.1.1.3',
  ppmPortServiceNameOrURI => '1.3.6.1.4.1.2699.1.2.1.3.1.1.4',
  ppmPortProtocolType => '1.3.6.1.4.1.2699.1.2.1.3.1.1.5',
  ppmPortProtocolTargetPort => '1.3.6.1.4.1.2699.1.2.1.3.1.1.6',
  ppmPortProtocolAltSourceEnabled => '1.3.6.1.4.1.2699.1.2.1.3.1.1.7',
  ppmPortPrtChannelIndex => '1.3.6.1.4.1.2699.1.2.1.3.1.1.8',
  ppmPortLprByteCountEnabled => '1.3.6.1.4.1.2699.1.2.1.3.1.1.9',
  ppmMIBConformance => '1.3.6.1.4.1.2699.1.2.2',
  ppmMIBObjectGroups => '1.3.6.1.4.1.2699.1.2.2.2',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'PRINTER-PORT-MONITOR-MIB'} = {
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::SNMPFRAMEWORKMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'SNMP-FRAMEWORK-MIB'} = {
  url => "",
  name => "MIB-II",
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'SNMP-FRAMEWORK-MIB'} = {
  snmpEngineID => '1.3.6.1.6.3.10.2.1.1.0',
  snmpEngineBoots => '1.3.6.1.6.3.10.2.1.2.0',
  snmpEngineTime => '1.3.6.1.6.3.10.2.1.3.0',
  snmpEngineMaxMessageSize => '1.3.6.1.6.3.10.2.1.4.0',
};



package Monitoring::GLPlugin::SNMP::MibsAndOids::SNMPV2TCV1MIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'SNMPv2-TC-v1-MIB'} = {
  url => '',
  name => 'SNMPv2-TC-v1-MIB',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'SNMPv2-TC-v1-MIB'} = {
  'TruthValue' => {
    1 => 'true',
    2 => 'false',
  },
  'RowStatus' => {
    1 => 'active',
    2 => 'notInService',
    3 => 'notReady',
    4 => 'createAndGo',
    5 => 'createAndWait',
    6 => 'destroy',
  },
};



package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKROOTMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-ROOT-MIB'} = {
  url => '',
  name => 'LEXMARK-ROOT-MIB',
};

#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-ROOT-MIB'} =

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-ROOT-MIB'} = {
  lexmark => '1.3.6.1.4.1.641',
  lexmarkModules => '1.3.6.1.4.1.641.4',
  lexmarkMIB => '1.3.6.1.4.1.641.4.1',
  lexmarkMibObjects => '1.3.6.1.4.1.641.5',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-ROOT-MIB'} = {
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKSETTINGSMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-SETTINGS-MIB'} = {
  url => '',
  name => 'LEXMARK-SETTINGS-MIB',
};

#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-SETTINGS-MIB'} =

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-SETTINGS-MIB'} = {
  settings => '1.3.6.1.4.1.641.7',
  settingsMIBAdminInfo => '1.3.6.1.4.1.641.7.1',
  settingsMIBCompliances => '1.3.6.1.4.1.641.7.1.1',
  settingsMIBGroups => '1.3.6.1.4.1.641.7.1.2',
  settingsControl => '1.3.6.1.4.1.641.7.2',
  settingsDefinition => '1.3.6.1.4.1.641.7.3',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-SETTINGS-MIB'} = {
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKSETTINGSCONTROLMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-SETTINGS-CONTROL-MIB'} = {
  url => '',
  name => 'LEXMARK-SETTINGS-CONTROL-MIB',
};

#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-SETTINGS-CONTROL-MIB'} =

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-SETTINGS-CONTROL-MIB'} = {
  settingsControlMibModule => '1.3.6.1.4.1.641.4.3',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-SETTINGS-CONTROL-MIB'} = {
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKSETTINGSDEFINITION;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-SETTINGS-DEFINITION'} = {
  url => '',
  name => 'LEXMARK-SETTINGS-DEFINITION',
};

#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-SETTINGS-DEFINITION'} =

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-SETTINGS-DEFINITION'} = {
  settingsDefinitionMibModule => '1.3.6.1.4.1.641.4.3',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-SETTINGS-DEFINITION'} = {
};
package Monitoring::GLPlugin::SNMP::MibsAndOids::LEXMARKTCMIB;

$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'LEXMARK-TC-MIB'} = {
  url => '',
  name => 'LEXMARK-TC-MIB',
};

#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'LEXMARK-TC-MIB'} =

$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'LEXMARK-TC-MIB'} = {
  lexmarkTCMIB => '1.3.6.1.4.1.641.4.2',
};

$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'LEXMARK-TC-MIB'} = {
  UnitsTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'items',
    '4' => 'sides',
    '5' => 'sheets',
    '16' => 'millimeters',
    '17' => 'centimeters',
    '18' => 'meters',
    '19' => 'inches',
    '20' => 'feet',
    '21' => 'grams',
    '22' => 'ounces',
    '32' => 'nanoseconds',
    '33' => 'microseconds',
    '34' => 'milliseconds',
    '35' => 'seconds',
    '36' => 'minutes',
    '37' => 'hours',
    '38' => 'days',
    '39' => 'weeks',
    '40' => 'months',
    '41' => 'years',
  },
  AdminStatusTC => {
    '1' => 'unknown',
    '3' => 'other',
    '4' => 'up',
    '5' => 'disabled',
  },
  PaperTypeTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'plain',
    '4' => 'cardstock',
    '5' => 'transparancy',
    '6' => 'recycled',
    '7' => 'labels',
    '8' => 'vinylLabels',
    '9' => 'bond',
    '10' => 'letterhead',
    '11' => 'preprinted',
    '12' => 'colored',
    '13' => 'light',
    '14' => 'heavy',
    '15' => 'roughOrCotton',
    '16' => 'envelope',
    '17' => 'premimuPlain',
    '18' => 'colorLokCertifiedPlain',
    '19' => 'lexmarkPerfectFinishPhoto',
    '20' => 'lexmarkPhoto',
    '21' => 'glossyPhoto',
    '22' => 'mattePhoto',
    '23' => 'inkjetMatteBrochure',
    '24' => 'inkjetGlossyBrochure',
    '25' => 'ironOnTransfer',
    '32' => 'customtype1',
    '33' => 'customtype2',
    '34' => 'customtype3',
    '35' => 'customtype4',
    '36' => 'customtype5',
    '37' => 'customtype6',
    '38' => 'coatedPaper',
    '39' => 'glossy',
    '40' => 'photPaper',
    '41' => 'greetingCard',
    '42' => 'heavyCard',
    '43' => 'roughEnvelop',
    '44' => 'heavyCottonPaper',
    '45' => 'veryHeavyPaper',
    '46' => 'heavyGloss',
    '47' => 'rfidLabels',
    '48' => 'businessCard',
  },
  PaperSizeTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'universal',
    '4' => 'custom',
    '8' => 'letter',
    '9' => 'legal',
    '10' => 'executive',
    '11' => 'folio',
    '12' => 'statement',
    '13' => 'oficio',
    '14' => 'tabloid',
    '15' => 'businessCard',
    '16' => 'idCard',
    '17' => 'card3x5',
    '18' => 'card4x6',
    '19' => 'bookOriginal',
    '20' => 'hagaki',
    '21' => 'card3onehalfx5',
    '22' => 'card4x8',
    '23' => 'card5x7',
    '24' => 'card10x15',
    '25' => 'card10x20',
    '26' => 'card13x18',
    '27' => 'paper12x18',
    '28' => 'sra3',
    '32' => 'envelope7threequarters',
    '33' => 'envelope9',
    '34' => 'envelope10',
    '35' => 'envelopeDL',
    '36' => 'envelopeOther',
    '64' => 'isoA0',
    '65' => 'isoA1',
    '66' => 'isoA2',
    '67' => 'isoA3',
    '68' => 'isoA4',
    '69' => 'isoA5',
    '70' => 'isoA6',
    '72' => 'isoB0',
    '73' => 'isoB1',
    '74' => 'isoB2',
    '75' => 'isoB3',
    '76' => 'isoB4',
    '77' => 'isoB5',
    '78' => 'isoB6',
    '80' => 'isoC0',
    '81' => 'isoC1',
    '82' => 'isoC2',
    '83' => 'isoC3',
    '84' => 'isoC4',
    '85' => 'isoC5',
    '86' => 'isoC6',
    '96' => 'isoEnvelopeA0',
    '97' => 'isoEnvelopeA1',
    '98' => 'isoEnvelopeA2',
    '99' => 'isoEnvelopeA3',
    '100' => 'isoEnvelopeA4',
    '101' => 'isoEnvelopeA5',
    '102' => 'isoEnvelopeA6',
    '104' => 'isoEnvelopeB0',
    '105' => 'isoEnvelopeB1',
    '106' => 'isoEnvelopeB2',
    '107' => 'isoEnvelopeB3',
    '108' => 'isoEnvelopeB4',
    '109' => 'isoEnvelopeB5',
    '110' => 'isoEnvelopeB6',
    '112' => 'isoEnvelopeC0',
    '113' => 'isoEnvelopeC1',
    '114' => 'isoEnvelopeC2',
    '115' => 'isoEnvelopeC3',
    '116' => 'isoEnvelopeC4',
    '117' => 'isoEnvelopeC5',
    '118' => 'isoEnvelopeC6',
    '136' => 'jisB0',
    '137' => 'jisB1',
    '138' => 'jisB2',
    '139' => 'jisB3',
    '140' => 'jisB4',
    '141' => 'jisB5',
    '142' => 'jisB6',
  },
  KeyValueTC => {
  },
  StatusTC => {
    '1' => 'unknown',
    '2' => 'other',
    '3' => 'ok',
    '4' => 'offline',
    '5' => 'warning',
    '6' => 'broken',
    '17' => 'disabledUnknown',
    '18' => 'disabledOther',
    '19' => 'disabledOk',
    '20' => 'disabledOffline',
    '21' => 'disabledWarning',
    '22' => 'disabledBroken',
    '33' => 'unlicensedUnknown',
    '34' => 'unlicensedOther',
    '35' => 'unlicensedOk',
    '36' => 'unlicensedOffline',
    '37' => 'unlicensedWarning',
    '38' => 'unlicensedBroken',
    '97' => 'licensedUnknown',
    '98' => 'licensedOther',
    '99' => 'licensedOk',
    '100' => 'licensedOffline',
    '101' => 'licensedWarning',
    '102' => 'licensedBroken',
  },
};
package Monitoring::GLPlugin::SNMP::CSF;
#our @ISA = qw(Monitoring::GLPlugin::SNMP);
use Digest::MD5 qw(md5_hex);
use strict;

sub create_statefile {
  my ($self, %params) = @_;
  my $extension = "";
  $extension .= $params{name} ? '_'.$params{name} : '';
  if ($self->opts->community) {
    $extension .= md5_hex($self->opts->community);
  }
  if ($self->opts->contextname) {
    $extension .= $self->opts->contextname;
  }
  $extension =~ s/\//_/g;
  $extension =~ s/\(/_/g;
  $extension =~ s/\)/_/g;
  $extension =~ s/\*/_/g;
  $extension =~ s/\s/_/g;
  if ($self->opts->snmpwalk && ! $self->opts->hostname) {
    return sprintf "%s/%s_%s%s", $self->statefilesdir(),
        'snmpwalk.file'.md5_hex($self->opts->snmpwalk),
        $self->clean_path($self->mode), $self->clean_path(lc $extension);
  } elsif ($self->opts->snmpwalk && $self->opts->hostname eq "walkhost") {
    return sprintf "%s/%s_%s%s", $self->statefilesdir(),
        'snmpwalk.file'.md5_hex($self->opts->snmpwalk),
        $self->clean_path($self->mode), $self->clean_path(lc $extension);
  } else {
    return sprintf "%s/%s_%s%s", $self->statefilesdir(),
        $self->opts->hostname,
        $self->clean_path($self->mode), $self->clean_path(lc $extension);
  }
}



package Monitoring::GLPlugin::SNMP::Item;
our @ISA = qw(Monitoring::GLPlugin::SNMP::CSF Monitoring::GLPlugin::Item Monitoring::GLPlugin::SNMP);
use strict;



package Monitoring::GLPlugin::SNMP::TableItem;
our @ISA = qw(Monitoring::GLPlugin::SNMP::CSF Monitoring::GLPlugin::TableItem Monitoring::GLPlugin::SNMP);
use strict;

sub ensure_index {
  my ($self, $key) = @_;
  $self->{$key} ||= $self->{flat_indices};
}

sub unhex_ip {
  my ($self, $value) = @_;
  if ($value && $value =~ /^0x(\w{8})/) {
    $value = join(".", unpack "C*", pack "H*", $1);
  } elsif ($value && $value =~ /^0x(\w{2} \w{2} \w{2} \w{2})/) {
    $value = $1;
    $value =~ s/ //g;
    $value = join(".", unpack "C*", pack "H*", $value);
  } elsif ($value && $value =~ /^([A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2})/i) {
    $value = $1;
    $value =~ s/ //g;
    $value = join(".", unpack "C*", pack "H*", $value);
  } elsif ($value && unpack("H8", $value) =~ /(\w{2})(\w{2})(\w{2})(\w{2})/) {
    $value = join(".", map { hex($_) } ($1, $2, $3, $4));
  }
  return $value;
}

sub compact_v6 {
  my ($self, $addr) = @_;

  my @o = split /:/, $addr;
  return $addr unless @o and grep { $_ =~ m/^0+$/ } @o;

  my @candidates	= ();
  my $start		= undef;

  for my $i (0 .. $#o) {
    if (defined $start) {
      if ($o[$i] !~ m/^0+$/) {
        push @candidates, [ $start, $i - $start ];
        $start = undef;
      }
    } else {
      $start = $i if $o[$i] =~ m/^0+$/;
    }
  }

  push @candidates, [$start, 8 - $start] if defined $start;

  my $l = (sort { $b->[1] <=> $a->[1] } @candidates)[0];

  return $addr unless defined $l;

  $addr = $l->[0] == 0 ? '' : join ':', @o[0 .. $l->[0] - 1];
  $addr .= '::';
  $addr .= join ':', @o[$l->[0] + $l->[1] .. $#o];
  $addr =~ s/(^|:)0{1,3}/$1/g;

  return $addr;
}

sub old_unhex_ipv6 {
  my ($self, $value) = @_;
  if (! defined $value) {
    return $value; # tut mir leid
  } elsif ($value =~ /^0x(\w{32})/) {
    $value = join(":", unpack "C*", pack "H*", $1);
  } elsif ($value && $value =~ /^0x(\w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2})/) {
    $value = $1;
    $value =~ s/ //g;
    $value = join(":", unpack "C*", pack "H*", $value);
  } elsif ($value =~ /^([A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2})/i) {
    $value = $1;
    $value =~ s/ //g;
    $value = join(":", unpack "C*", pack "H*", $value);
  } elsif (unpack("H*", $value) =~ /^([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i) {
	  #$value = join(":", unpack "C*", pack "H*", $value);
    $value = join(":", ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16));
  }
  return $self->compact_v6($value);
}

sub unhex_ipv6 {
  my ($self, $value) = @_;
  my @octets = ();
  if (! defined $value) {
    return $value; # tut mir leid
  } elsif ($value =~ /^0x(\w{32})/) {
    @octets = unpack "H2" x 16, pack "H*", $1;
  } elsif ($value && $value =~ /^0x(\w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2} \w{2})/) {
    $value = $1;
    @octets = split(" ", $value);
  } elsif ($value =~ /^([A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2} [A-Z0-9]{2})/i) {
    $value = $1;
    $value =~ s/ //g;
    @octets = unpack "H2" x 16, pack "H*", $value;
  } elsif (unpack("H*", $value) =~ /^([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i) {
    @octets = ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16);
  }
  $value = join(":",
      map { my $idx = 2*$_; $octets[$idx].$octets[$idx+1] } (0..7)
  );
  return $value;
  return $self->compact_v6($value);
}

sub unhex_mac {
  my ($self, $value) = @_;
  if ($value && $value =~ /^0x(\w{12})/) {
    $value = join(".", unpack "C*", pack "H*", $1);
  } elsif ($value && $value =~ /^0x(\w{2}\s*\w{2}\s*\w{2}\s*\w{2}\s*\w{2}\s*\w{2})/) {
    $value = $1;
    $value =~ s/ //g;
    $value = join(":", unpack "C*", pack "H*", $value);
  } elsif ($value && unpack("H12", $value) =~ /(\w{2})(\w{2})(\w{2})(\w{2})(\w{2})(\w{2})/) {
    $value = join(":", ($1, $2, $3, $4, $5, $6));
  }
  return $value;
}

sub unhex_octet_string {
  my ($self, $value) = @_;
  my $original = $value;
  $value =~ s/ //g;
  if ($value && $value =~ /^0x([0-9a-zA-Z]+)$/) {
    $value = join("", unpack "A*", pack "H*", $1);
  } elsif ($value && $value =~ /^([0-9a-zA-Z]+)$/) {
    $value = join("", unpack "A*", pack "H*", $1);
  } else {
    $value = $original;
  }
  return $value;
}



package Monitoring::GLPlugin::UPNP;
our @ISA = qw(Monitoring::GLPlugin);
# ABSTRACT: helper functions to build a upnp-based monitoring plugin

use strict;
use File::Basename;
use Digest::MD5 qw(md5_hex);
use AutoLoader;
our $AUTOLOAD;

use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };

{
  our $mode = undef;
  our $plugin = undef;
  our $blacklist = undef;
  our $session = undef;
  our $rawdata = {};
  our $info = [];
  our $extendedinfo = [];
  our $summary = [];
  our $oidtrace = [];
  our $uptime = 0;
}

sub init {
  my ($self) = @_;
  if ($self->mode =~ /device::walk/) {
  } elsif ($self->mode =~ /device::uptime/) {
    my $info = sprintf 'device is up since %s',
        $self->human_timeticks($self->{uptime});
    $self->add_info($info);
    $self->set_thresholds(warning => '15:', critical => '5:');
    $self->add_message($self->check_thresholds($self->{uptime}), $info);
    $self->add_perfdata(
        label => 'uptime',
        value => $self->{uptime} / 60,
        warning => $self->{warning},
        critical => $self->{critical},
    );
    my ($code, $message) = $self->check_messages(join => ', ', join_all => ', ');
    $Monitoring::GLPlugin::plugin->nagios_exit($code, $message);
  }
}

sub check_upnp_and_model {
  my ($self) = @_;
  if (eval "require SOAP::Lite") {
    require XML::LibXML;
  } else {
    $self->add_critical('could not find SOAP::Lite module');
  }
  $self->{services} = {};
  if (! $self->check_messages()) {
    eval {
      my $igddesc = sprintf "http://%s:%s/igddesc.xml",
          $self->opts->hostname, $self->opts->port;
      my $parser = XML::LibXML->new();
      my $doc = $parser->parse_file($igddesc);
      my $root = $doc->documentElement();
      my $xpc = XML::LibXML::XPathContext->new( $root );
      $xpc->registerNs('n', 'urn:schemas-upnp-org:device-1-0');
      $self->{productname} = $xpc->findvalue('(//n:device)[position()=1]/n:modelName' );
      $self->debug(sprintf "igddesc productname is %s", $self->{productname});
      my @services = ();
      my @servicedescs = $xpc->find('(//n:service)')->get_nodelist;
      foreach my $service (@servicedescs) {
        my $servicetype = undef;
        my $serviceid = undef;
        my $controlurl = undef;
        foreach my $node ($service->nonBlankChildNodes("./*")) {
          $serviceid = $node->textContent if ($node->nodeName eq "serviceId");
          $servicetype = $node->textContent if ($node->nodeName eq "serviceType");
          $controlurl = $node->textContent if ($node->nodeName eq "controlURL");
        }
        if ($serviceid && $controlurl) {
          push(@services, {
              serviceType => $servicetype,
              serviceId => $serviceid,
              controlURL => sprintf('http://%s:%s%s',
                  $self->opts->hostname, $self->opts->port, $controlurl),
          });
          $self->debug(sprintf "found %s service %s",
              $servicetype, $serviceid);
        }
      }
      $self->set_variable('services', \@services);
    };
    if ($@) {
      $self->add_critical($@);
    }
  }
  if (! $self->check_messages()) {
    eval {
      my $service = (grep { $_->{serviceId} =~ /WANIPConn1/ } @{$self->get_variable('services')})[0];
      my $som = SOAP::Lite
          -> proxy($service->{controlURL})
          -> uri($service->{serviceType})
          -> GetStatusInfo();
      $self->{uptime} = $som->valueof("//GetStatusInfoResponse/NewUptime");
      $self->{uptime} /= 1.0;
      $self->debug("WANIPConn1->GetStatusInfo returned uptime");
    };
    if ($@) {
      $self->add_critical("could not get uptime: ".$@);
    }
  }
}

sub create_statefile {
  my ($self, %params) = @_;
  my $extension = "";
  $extension .= $params{name} ? '_'.$params{name} : '';
  if ($self->opts->community) {
    $extension .= md5_hex($self->opts->community);
  }
  $extension =~ s/\//_/g;
  $extension =~ s/\(/_/g;
  $extension =~ s/\)/_/g;
  $extension =~ s/\*/_/g;
  $extension =~ s/\s/_/g;
  if ($^O =~ /MSWin/) {
    $extension =~ s/:/_/g;
  }
  return sprintf "%s/%s_%s%s", $self->statefilesdir(),
      $self->opts->hostname, $self->opts->mode, lc $extension;
}



package Classes::HOSTRESOURCESMIB::Component::PrinterSubsystem;
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item);
use strict;

sub init {
  my $self = shift;
  $self->get_snmp_tables('HOST-RESOURCES-MIB', [
      ['printers', 'hrPrinterTable', 'Classes::HOSTRESOURCESMIB::Component::PrinterSubsystem::Printer'],
      ['devices', 'hrDeviceTable', 'Classes::HOSTRESOURCESMIB::Component::DeviceSubsystem::Device'],
  ]);
  foreach my $printer (@{$self->{printers}}) {
    foreach my $device (@{$self->{devices}}) {
      if ($device->{flat_indices} eq $printer->{flat_indices}) {
        map {
          $printer->{$_} = $device->{$_};
        } grep { $_ =~ /^hrDevice/; } keys %{$device};
      }
    }
  }
  delete $self->{devices};
}

package Classes::HOSTRESOURCESMIB::Component::PrinterSubsystem::Printer;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub finish {
  my $self = shift;
  my @errors = split('|', $self->{hrPrinterDetectedErrorState});
  @errors = grep ! /^(no|low)/, @errors;
  if (! @errors && $self->{hrDeviceStatus} =~ /(warning|down)/) {
    $self->{hrDeviceStatus} = 'running';
  }
  $self->{hrPrinterDetectedErrorState} = join("|", @errors);
}

sub check {
  my $self = shift;
  $self->add_info(sprintf '%s has status %s',
      $self->{hrDeviceDescr},
      $self->{hrPrinterDetectedErrorState},
  );
  if ($self->{hrDeviceStatus} eq 'warning') {
    $self->add_warning();
  } elsif ($self->{hrDeviceStatus} eq 'down') {
    $self->add_critical();
  } else {
    $self->add_ok();
  }
}

package Classes::HOSTRESOURCESMIB::Component::ConsumablesSubsystem;
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item);
use strict;

sub init {
  my $self = shift;
  $self->get_snmp_tables('HOST-RESOURCES-MIB', [
      ['printers', 'hrPrinterTable', 'Classes::HOSTRESOURCESMIB::Component::PrinterSubsystem::Printer'],
      ['devices', 'hrDeviceTable', 'Classes::HOSTRESOURCESMIB::Component::DeviceSubsystem::Device'],
  ]);
  foreach my $printer (@{$self->{printers}}) {
    foreach my $device (@{$self->{devices}}) {
      if ($device->{flat_indices} eq $printer->{flat_indices}) {
        map {
          $printer->{$_} = $device->{$_};
        } grep { $_ =~ /^hrDevice/; } keys %{$device};
      }
    }
  }
  delete $self->{devices};
}

package Classes::HOSTRESOURCESMIB::Component::ConsumablesSubsystem::Printer;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub finish {
  my $self = shift;
  my @errors = split('|', $self->{hrPrinterDetectedErrorState});
  @errors = grep /^(no|low|good)/, @errors;
  if (! @errors && $self->{hrDeviceStatus} =~ /(warning|down)/) {
    $self->{hrDeviceStatus} = 'running';
  }
  $self->{hrPrinterDetectedErrorState} = join("|", @errors);
}

sub check {
  my $self = shift;
  $self->add_info(sprintf '%s has status %s',
      $self->{hrDeviceDescr},
      $self->{hrPrinterDetectedErrorState},
  );
  if ($self->{hrDeviceStatus} eq 'warning') {
    $self->add_warning();
  } elsif ($self->{hrDeviceStatus} eq 'down') {
    $self->add_critical();
  } else {
    $self->add_ok();
  }
}

package Classes::HOSTRESOURCESMIB::Component::UptimeSubsystem;
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item);
use strict;

sub init {
  my $self = shift;
  my $hrSystemUptime = $self->get_snmp_object('HOST-RESOURCES-MIB', 'hrSystemUptime');
  $self->{uptime} = $self->timeticks($hrSystemUptime);
  $self->debug(sprintf 'uptime: %s', $self->{uptime});
  $self->debug(sprintf 'up since: %s',
      scalar localtime (time - $self->{uptime}));
}

sub check {
  my $self = shift;
  $self->add_info(sprintf 'device is up since %s',
      $self->human_timeticks($self->{uptime}));
  $self->set_thresholds(warning => '15:', critical => '5:');
  $self->add_message($self->check_thresholds($self->{uptime} / 60));
  $self->add_perfdata(
      label => 'uptime',
      value => $self->{uptime} / 60,
      places => 0,
  );
}

package Classes::HOSTRESOURCESMIB;
our @ISA = qw(Classes::Device);
use strict;

package Classes::PRINTERMIB::Component::PrinterSubsystem;
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item);
use strict;

sub init {
  my ($self) = @_;
  if ($self->mode =~ /device::hardware::health/) {
    $self->get_snmp_tables('PRINTER-MIB', [
        ['displays', 'prtConsoleDisplayBufferTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::Display'],
        ['covers', 'prtCoverTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::Cover'],
        ['channels', 'prtChannelTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::Channel'],
    ]);
  } elsif ($self->mode =~ /device::printer::consumables/) {
    $self->get_snmp_tables('PRINTER-MIB', [
        ['inputs', 'prtInputTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::Input'],
        ['outputs', 'prtOutputTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::Output'],
        ['supplies', 'prtMarkerSuppliesTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::MarkerSupply'],
        ['markers', 'prtMarkerTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::Marker'],
        ['media', 'prtMediaPathTable', 'Classes::PRINTERMIB::Component::PrinterSubsystem::MediaPath'],
    ]);
  }
}

sub check {
  my ($self) = @_;
  $self->SUPER::check();
  if ($self->mode =~ /device::hardware::health/) {
    $self->reduce_messages("hardware working fine");
  } elsif ($self->mode =~ /device::printer::consumables/) {
    $self->reduce_messages("supplies status is fine");
  } else {
    $self->reduce_messages("wos is?");
  }
}

package Classes::PRINTERMIB::Component::PrinterSubsystem::Cover;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub check {
  my ($self) = @_;
  $self->add_info(sprintf '%s is %s',
      $self->accentfree($self->{prtCoverDescription}),
      $self->{prtCoverStatus}
  );
  if ($self->{prtCoverStatus} =~ /Open/) {
    $self->add_warning();
  }
}

package Classes::PRINTERMIB::Component::PrinterSubsystem::Display;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub check {
  my ($self) = @_;
  if ($self->{prtConsoleDisplayBufferText}) {
    $self->add_ok($self->accentfree($self->{prtConsoleDisplayBufferText}));
  }
}

package Classes::PRINTERMIB::Component::PrinterSubsystem::Input;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

package Classes::PRINTERMIB::Component::PrinterSubsystem::Output;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

package Classes::PRINTERMIB::Component::PrinterSubsystem::Marker;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

package Classes::PRINTERMIB::Component::PrinterSubsystem::MarkerSupply;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub finish {
  my ($self) = @_;
  if ($self->{prtMarkerSuppliesDescription} =~ /^[^ ]{2} [^ ]{2} [^ ]{2}/) {
    # wird ueblicherweise gehext, wenn da umlautschlonz drin ist
    $self->{prtMarkerSuppliesDescription} =
        $self->unhex_octet_string($self->{prtMarkerSuppliesDescription});
  } elsif (! $self->{prtMarkerSuppliesDescription}) {
    # Kyocera ECOSYS P2135dn, prtMarkerSuppliesDescription is empty
    $self->{prtMarkerSuppliesDescription} = $self->{prtMarkerSuppliesType};
  }
  $self->{prtMarkerSuppliesDescription} = $self->accentfree($self->{prtMarkerSuppliesDescription});
  # Found a JetDirect which added nul here and gearman cut off the perfdata
  $self->{prtMarkerSuppliesDescription} = unpack("Z*", $self->{prtMarkerSuppliesDescription});
}

sub check {
  my ($self) = @_;
  if ($self->{prtMarkerSuppliesMaxCapacity} == 0) {
    # prtMarkerSuppliesClass: supplyThatIsConsumed
    # prtMarkerSuppliesDescription: Black Toner
    # prtMarkerSuppliesLevel: 0
    # prtMarkerSuppliesMarkerIndex: 1
    # prtMarkerSuppliesMaxCapacity: 0
    $self->{usage} = $self->{prtMarkerSuppliesClass} eq 'supplyThatIsConsumed' ?
        100 : 0;
  } else {
    $self->{usage} = 100 * $self->{prtMarkerSuppliesLevel} /
        $self->{prtMarkerSuppliesMaxCapacity};
  }
  $self->add_info(sprintf '%s is at %.2f%%',
      $self->{prtMarkerSuppliesDescription}, $self->{usage}
  );
  my $label = $self->accentfree($self->{prtMarkerSuppliesDescription});
  $label =~ s/\s+/_/g;
  $label =~ s/://g;
  if ($self->{prtMarkerSuppliesClass} eq 'supplyThatIsConsumed') {
    $label .= '_remaining';
    $self->set_thresholds(
        metric => $label, warning => '20:', critical => '5:',
    );
  } elsif ($self->{prtMarkerSuppliesClass} eq 'receptacleThatIsFilled') {
    $label .= '_used';
    $self->set_thresholds(
        metric => $label, warning => '90', critical => '95',
    );
  }
  if ($self->{prtMarkerSuppliesLevel} == -1) {
    # indicates that the sub-unit places no restrictions on this parameter
    $self->add_ok();
  } elsif ($self->{prtMarkerSuppliesLevel} == -2) {
    # The value (-2) means unknown
    $self->add_unknown(sprintf 'status of %s is unknown',
        $self->{prtMarkerSuppliesDescription});
  } elsif ($self->{prtMarkerSuppliesLevel} == -3) {
    # A value of (-3) means that the
    # printer knows that there is some supply/remaining space
    $self->add_info(sprintf '%s is sufficiently large',
        $self->{prtMarkerSuppliesDescription}
    );
    $self->add_ok();
  } else {
    if ($self->opts->can("morphmessage") && $self->opts->morphmessage) {
      foreach my $key (keys %{$self->opts->morphmessage}) {
        next if $key ne "empty_full" && $key ne "leer_voll";
        my $empty = (split("_", $key))[0];
        my $full = (split("_", $key))[1];
        if ($self->{prtMarkerSuppliesDescription} =~
            $self->opts->morphmessage->{$key}) {
          $self->get_last_info();
          if ($self->check_thresholds(
              metric => $label, value => $self->{usage})) {
            if ($self->{prtMarkerSuppliesClass} eq 'supplyThatIsConsumed') {
              $self->add_info(sprintf '%s %s',
                  $self->{prtMarkerSuppliesDescription}, $empty);
            } else {
              $self->add_info(sprintf '%s %s',
                  $self->{prtMarkerSuppliesDescription}, $full);
            }
          } else {
            if ($self->{prtMarkerSuppliesClass} eq 'supplyThatIsConsumed') {
              $self->add_info(sprintf '%s %s',
                  $self->{prtMarkerSuppliesDescription}, $full);
            } else {
              $self->add_info(sprintf '%s %s',
                  $self->{prtMarkerSuppliesDescription}, $empty);
            }
          }
        }
      }
    }
    $self->add_message($self->check_thresholds(
        metric => $label, value => $self->{usage},
    ));
    $self->add_perfdata(
        label => $label, value => $self->{usage}, uom => '%',
    );
  }
}

package Classes::PRINTERMIB::Component::PrinterSubsystem::MediaPath;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

package Classes::PRINTERMIB::Component::PrinterSubsystem::Channel;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

package Classes::PRINTERMIB;
our @ISA = qw(Classes::Device);
use strict;

sub init {
  my $self = shift;
  if ($self->mode =~ /device::hardware::health/) {
    $self->analyze_and_check_environmental_subsystem('Classes::PRINTERMIB::Component::PrinterSubsystem');
  } elsif ($self->mode =~ /device::printer::consumables/) {
    $self->analyze_and_check_environmental_subsystem('Classes::PRINTERMIB::Component::PrinterSubsystem');
    $self->reduce_messages_short('supplies status is fine');
  } else {
    $self->no_such_mode();
  }
}

package Classes::Kyocera;
our @ISA = qw(Classes::Device);
use strict;

sub init {
  my $self = shift;
  $self->get_snmp_tables('KYOCERA-Private-MIB', [
    ['xxx', 'kcprtMemoryDeviceTable', 'Monitoring::GLPlugin::SNMP::TableItem'],
#https://pastebin.com/ZvuFXPcU
  ]);

  if ($self->mode =~ /device::hardware::health/) {
    $self->analyze_and_check_environmental_subsystem('Classes::HOSTRESOURCESMIB::Component::EnvironmentalSubsystem');
  } elsif ($self->mode =~ /device::consumables/) {
    $self->analyze_and_check_environmental_subsystem('Classes::HOSTRESOURCESMIB::Component::EnvironmentalSubsystem');
    $self->analyze_and_check_battery_subsystem('Classes::Kyocera::Components::BatterySubsystem');
  } else {
    $self->no_such_mode();
  }
}

package Classes::Lexmark::Component::PrinterSubsystem;;
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item);
use strict;

sub init {
  my $self = shift;
  $self->get_snmp_tables('LEXMARK-MPS-MIB', [
      ['alerts', 'deviceAlertTable', 'Classes::Lexmark::Component::PrinterSubsystem::Alert'],
  ]);
  $self->get_snmp_tables('LEXMARK-PVT-MIB', [
      ['prtgens', 'prtgenStatusTable', 'Classes::Lexmark::Component::PrinterSubsystem::Printer'],
  ]);
}

package Classes::Lexmark::Component::PrinterSubsystem::Alert;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub finish {
  my ($self) = @_;
  $self->{deviceAlertTimeHuman} = scalar localtime $self->{deviceAlertTime};
  $self->{deviceAlertAgeMinutes} = (time - $self->{deviceAlertTime}) / 60;
}

sub check {
  my ($self) = @_;
  $self->add_info(sprintf '%s since %dmin',
      $self->{deviceAlertDescription},
      $self->{deviceAlertAgeMinutes}
  );
  if ($self->{deviceAlertSeverity} =~ /serviceRequired|warning/) {
    $self->add_warning_mitigation();
  } elsif ($self->{deviceAlertSeverity} eq "critical") {
    $self->add_critical();
  } elsif ($self->{deviceAlertSeverity} eq "unknown") {
    $self->add_unknown();
  } else {
    $self->add_ok();
  }
}


package Classes::Lexmark::Component::PrinterSubsystem::Printer;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub check {
  my ($self) = @_;
  if ($self->{prtgenStatusIRC} ne "0") {
    $self->add_warning(sprintf "intervention required code %s is shown",
        $self->{prtgenStatusIRC});
  }
  if ($self->{prtgenStatusOutHopFull} eq "full") {
    $self->add_warning_mitigation("the current output hopper is full");
  }
  if ($self->{prtgenStatusInputEmpty} eq "empty") {
    $self->add_warning_mitigation("the active input paper tray is empty");
  }
  if ($self->{prtgenStatusPaperJam} eq "jamed") {
    $self->add_warning("the paper path is jammed");
  }
  if ($self->{prtgenStatusTonerError} eq "tonerError") {
    $self->add_warning_mitigation("the toner supply status shows an error");
  }
  if ($self->{prtgenStatusSrvcReqd} eq "serviceRequired") {
    $self->add_warning_mitigation("service required");
  }
  if ($self->{prtgenStatusDiskError} eq "diskError") {
    $self->add_critical("the disk has an error");
  }
  if ($self->{prtgenStatusCoverOpen} eq "coverOpen") {
    $self->add_warning("the cover is open");
  }
  if ($self->{prtgenStatusPageComplex} eq "complexPage") {
    #$self->add_warning("something is too complex????");
  }
  if ($self->{prtgenStatusLineStatus} eq "offline") {
    #$self->add_warning("the printer is offline");
  }
}



package Classes::Lexmark::Component::ConsumablesSubsystem;
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item);
use strict;

sub init {
  my ($self) = @_;
  $self->get_snmp_tables('LEXMARK-MPS-MIB', [
      ['supplies', 'currentSuppliesTable', 'Classes::Lexmark::Component::ConsumablesSubsystem::Supply'],
  ]);
}

package Classes::Lexmark::Component::ConsumablesSubsystem::Supply;
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
use strict;

sub check {
  my ($self) = @_;
  if ($self->{currentSupplyCurrentStatus} eq "low") {
    $self->add_warning_mitigation(sprintf "%s is %s",
        $self->{currentSupplyDescription},
        $self->{currentSupplyCurrentStatus});
  } elsif ($self->{currentSupplyCurrentStatus} eq "empty") {
    $self->add_critical(sprintf "%s is %s",
        $self->{currentSupplyDescription},
        $self->{currentSupplyCurrentStatus});
  } elsif ($self->{currentSupplyCurrentStatus} eq "invalid") {
    $self->add_critical(sprintf "%s is %s",
        $self->{currentSupplyDescription},
        $self->{currentSupplyCurrentStatus});
  }
}
package Classes::Lexmark;
our @ISA = qw(Classes::Device);
use strict;

sub init {
  my $self = shift;
  if ($self->mode =~ /device::hardware::health/) {
    $self->analyze_and_check_lxprinter_subsystem('Classes::Lexmark::Component::PrinterSubsystem');
    if (! $self->check_errors()) {
      # ...kontrolle ist besser.
      $self->analyze_and_check_printer_subsystem('Classes::PRINTERMIB::Component::PrinterSubsystem');
    }
    $self->reduce_messages_short('hardware working fine');
  } elsif ($self->mode =~ /device::printer::consumables/) {
    $self->analyze_and_check_consumables_subsystem('Classes::Lexmark::Component::ConsumablesSubsystem');
    $self->analyze_and_check_consumables_subsystem('Classes::PRINTERMIB::Component::PrinterSubsystem');
    $self->reduce_messages_short('supplies status is fine');
  } else {
    $self->no_such_mode();
  }
}

package Classes::Brother;
our @ISA = qw(Classes::Device);
use strict;

sub init {
  my $self = shift;
  if ($self->mode =~ /device::hardware::health/) {
    $self->analyze_and_check_environmental_subsystem('Classes::HOSTRESOURCESMIB::Component::EnvironmentalSubsystem');
  } elsif ($self->mode =~ /device::battery/) {
    $self->analyze_and_check_battery_subsystem('Classes::Kyocera::Components::BatterySubsystem');
  } else {
    $self->no_such_mode();
  }
}

package Classes::Device;
our @ISA = qw(Monitoring::GLPlugin::SNMP);
use strict;

sub classify {
  my $self = shift;
  if (! ($self->opts->hostname || $self->opts->snmpwalk)) {
    $self->add_unknown('either specify a hostname or a snmpwalk file');
  } else {
    $self->check_snmp_and_model();
    if (! $self->check_messages()) {
      if ($self->opts->verbose && $self->opts->verbose) {
        printf "I am a %s\n", $self->{productname};
      }
      if ($self->opts->mode =~ /^my-/) {
        $self->load_my_extension();
      } elsif ($self->implements_mib('LEXMARK-PVT-MIB')) {
        bless $self, 'Classes::Lexmark';
        $self->debug('using Classes::Lexmark');
      } elsif ($self->implements_mib('PRINTER-MIB')) {
        bless $self, 'Classes::PRINTERMIB';
        $self->debug('using Classes::PRINTERMIB');
      } elsif ($self->implements_mib('HOST-RESOURCES-MIB')) {
        bless $self, 'Classes::HOSTRESOURCESMIB';
        $self->debug('using Classes::HOSTRESOURCESMIB');
      } elsif ($self->implements_mib('KYOCERA-Private-MIB')) {
        bless $self, 'Classes::Kyocera';
        $self->debug('using Classes::Kyocera');
      } elsif ($self->implements_mib('BROTHER-MIB')) {
        bless $self, 'Classes::Brother';
        $self->debug('using Classes::Brother');
      } else {
        if (my $class = $self->discover_suitable_class()) {
          bless $self, $class;
          $self->debug('using '.$class);
        } else {
          bless $self, 'Classes::Generic';
          $self->debug('using Classes::Generic');
        }
      }
    }
  }
  return $self;
}


package Classes::Generic;
our @ISA = qw(Classes::Device);
use strict;

sub init {
  my $self = shift;
  if ($self->mode =~ /something specific/) {
  } else {
    bless $self, 'Monitoring::GLPlugin::SNMP';
    $self->no_such_mode();
  }
}
package main;
# /usr/bin/perl -w

use strict;
no warnings qw(once);

if ( ! grep /BEGIN/, keys %Monitoring::GLPlugin::) {
  eval {
    require Monitoring::GLPlugin;
    require Monitoring::GLPlugin::SNMP;
    require Monitoring::GLPlugin::UPNP;
  };
  if ($@) {
    printf "UNKNOWN - module Monitoring::GLPlugin was not found. Either build a standalone version of this plugin or set PERL5LIB\n";
    printf "%s\n", $@;
    exit 3;
  }
}

my $plugin = Classes::Device->new(
    shortname => '',
    usage => 'Usage: %s [ -v|--verbose ] [ -t <timeout> ] '.
        '--mode <what-to-do> '.
        '--hostname <network-component> --community <snmp-community>'.
        '  ...]',
    version => '$Revision: 1.1.0.2 $',
    blurb => 'This plugin checks various parameters of network printers ',
    url => 'http://labs.consol.de/nagios/check_printer_health',
    timeout => 60,
    plugin => $Monitoring::GLPlugin::pluginname,
);
$plugin->add_mode(
    internal => 'device::hardware::health',
    spec => 'hardware-health',
    alias => undef,
    help => 'Check the status of hardware, if printing is possible',
);
$plugin->add_mode(
    internal => 'device::printer::consumables',
    spec => 'supplies-status',
    help => 'Check the availability of consumables (toner, ink, ...)',
);
$plugin->add_snmp_modes();
$plugin->add_snmp_args();
$plugin->add_default_args();
$plugin->mod_arg("name",
    help => "--name
   The name of an interface (ifDescr) or pool or ...",
);

$plugin->getopts();
$plugin->classify();
$plugin->validate_args();

if (! $plugin->check_messages()) {
  $plugin->init();
  if (! $plugin->check_messages()) {
    $plugin->add_ok($plugin->get_summary())
        if $plugin->get_summary();
    $plugin->add_ok($plugin->get_extendedinfo(" "))
        if $plugin->get_extendedinfo();
  }
} elsif ($plugin->opts->snmpwalk && $plugin->opts->offline) {
  ;
} else {
  ;
}
my ($code, $message) = $plugin->opts->multiline ?
    $plugin->check_messages(join => "\n", join_all => ', ') :
    $plugin->check_messages(join => ', ', join_all => ', ');
$message .= sprintf "\n%s\n", $plugin->get_info("\n")
    if $plugin->opts->verbose >= 1;

$plugin->nagios_exit($code, $message);
