1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
class essai
{
[STAThread]
static void Main(string[] args)
{
Mib myMib = new Mib();
Console.WriteLine("**************Loading MIB's files**************");
myMib.loadDirectoryMib(Environment.GetFolderPath(Environment.SpecialFolder.System));
SNMPAgent myAgent = new SNMPAgent("10.1.2.1");
SNMPObject myRequest = new SNMPObject("1.3.6.1.2.1.1.5.0");
SNMPObject desc = new SNMPObject("1.3.6.1.2.1.2.2.1.2");
myAgent.walk(new SNMPObject(".1.3.6.1.2.1.2.2.1.2"));
Console.WriteLine();
Console.WriteLine("***************Make the request***************");
Console.WriteLine("Hostname : " + myRequest.getSimpleValue(myAgent));
testWalk();
}
} |