my ($etherport,$snmp);
my $community=$args{"community"}?$args{"community"}:"public";
(exit 0) unless ($args{switch});

unless( $snmp = $memory{"snmp_$args{switch}_$community_$args{frequency}"} ) {
    &uxmon::load_module( "snmp" );
    &uxmon::checker(
        $memory{"snmp_$args{switch}_$community_$args{frequency}"} = $snmp = Monitor::snmp->new( $args{switch}, $community )
    );
    $snmp->sched_frequency( $args{"frequency"} );
}

unless( $etherport = $memory{"etherport_$args{switch}_$community_$args{frequency}"} ) {
    &uxmon::load_module( "etherport" );
    &uxmon::checker(
	$memory{"etherport_$args{switch}_$community_$args{frequency}"} = $etherport = Monitor::etherport->new( 
		$args{switch}, $community, $args{"frequency"}, $snmp )
    );
    $etherport->sched_frequency( $args{"frequency"} );
}

$etherport->add_check( $args{"host"}, $args{"alias"}.".port", $args{"port"} );

1;
