Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
snmpping.pl
Package: mrtg-2.13.2.zip [view]
Upload User: shbosideng
Upload Date: 2013-05-04
Package Size: 1555k
Code Size: 1k
Category:
SNMP
Development Platform:
C/C++
- #!/usr/sepp/bin/perl
- use lib qw(../../run);
- use BER;
- require 'SNMP_Session.pm';
- my $host = @ARGV[0];
- my $community = @ARGV[1];
- my $port = 161;
- $session = SNMP_Session->open ($host, $community, $port)
- || die "couldn't open SNMP session to $host";
- $oid1 = encode_oid (1, 3, 6, 1, 2, 1, 1, 1, 0);
- if ($session->get_request_response ($oid1)) {
- ($bindings) = $session->decode_get_response($session->{pdu_buffer});
- while ($bindings ne '') {
- ($binding,$bindings) = &decode_sequence ($bindings);
- ($oid,$value) = &decode_by_template ($binding, "%O%@");
- print $pretty_oids{$oid}," => ",
- &pretty_print ($value), "n";
- }
- }