From 2d0bc5674a948924e9f50d00f0115a1bb0c9c33b Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 13 Jul 2011 11:41:18 +0300 Subject: [PATCH] Use PEN assigned by IANA instead of taken from Lev Valkin's sample --- .../plugins/other/snmp/asn1/STG-MIB.mib | 2 +- .../stargazer/plugins/other/snmp/snmp.cpp | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/projects/stargazer/plugins/other/snmp/asn1/STG-MIB.mib b/projects/stargazer/plugins/other/snmp/asn1/STG-MIB.mib index c1a7a8b8..8efc7e34 100644 --- a/projects/stargazer/plugins/other/snmp/asn1/STG-MIB.mib +++ b/projects/stargazer/plugins/other/snmp/asn1/STG-MIB.mib @@ -17,7 +17,7 @@ stgMIB MODULE-IDENTITY "This MIB module defines objects for Stargazer data." REVISION "201101060000Z" DESCRIPTION "Initial revision" - ::= { enterprises 9363 } + ::= { enterprises 38313 } stg-24 OBJECT IDENTIFIER ::= { stgMIB 1 } diff --git a/projects/stargazer/plugins/other/snmp/snmp.cpp b/projects/stargazer/plugins/other/snmp/snmp.cpp index 2884e6fc..9e99b8ea 100644 --- a/projects/stargazer/plugins/other/snmp/snmp.cpp +++ b/projects/stargazer/plugins/other/snmp/snmp.cpp @@ -114,7 +114,7 @@ return sac.GetPlugin(); int SendOpenPDU(int fd) { const char * description = "Stg SNMP Agent"; -//int oid[] = {1, 3, 6, 1, 4, 1, 9363, 1, 5, 2, 1, 1}; +//int oid[] = {1, 3, 6, 1, 4, 1, 38313, 1, 5, 2, 1, 1}; asn_enc_rval_t error; OpenPDU_t msg; @@ -126,7 +126,7 @@ asn_long2INTEGER(&msg.choice.simple.version, SimpleOpen__version_version_1); oid, sizeof(oid[0]), 7);*/ -if (!String2OI(".1.3.6.1.4.1.9363", &msg.choice.simple.identity)) +if (!String2OI(".1.3.6.1.4.1.38313", &msg.choice.simple.identity)) { printfd(__FILE__, "SendOpenPDU() - failed to convert string to OBJECT_IDENTIFIER\n"); return -1; @@ -181,7 +181,7 @@ return 0; int SendRReqPDU(int fd) { -int oid[] = {1, 3, 6, 1, 4, 1, 9363, 1}; +int oid[] = {1, 3, 6, 1, 4, 1, 38313, 1}; asn_enc_rval_t error; RReqPDU_t msg; @@ -390,18 +390,18 @@ if (PrepareNet()) return -1; // Users -sensors[".1.3.6.1.4.1.9363.1.1.1"] = new TotalUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.2"] = new ConnectedUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.3"] = new AuthorizedUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.4"] = new AlwaysOnlineUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.5"] = new NoCashUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.7"] = new DisabledDetailStatsUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.8"] = new DisabledUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.9"] = new PassiveUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.10"] = new CreditUsersSensor(*users); -sensors[".1.3.6.1.4.1.9363.1.1.11"] = new FreeMbUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.1"] = new TotalUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.2"] = new ConnectedUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.3"] = new AuthorizedUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.4"] = new AlwaysOnlineUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.5"] = new NoCashUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.7"] = new DisabledDetailStatsUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.8"] = new DisabledUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.9"] = new PassiveUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.10"] = new CreditUsersSensor(*users); +sensors[".1.3.6.1.4.1.38313.1.1.11"] = new FreeMbUsersSensor(*users); // Tariffs -sensors[".1.3.6.1.4.1.9363.1.2.1"] = new TotalTariffsSensor(*tariffs); +sensors[".1.3.6.1.4.1.38313.1.2.1"] = new TotalTariffsSensor(*tariffs); if (!running) { -- 2.44.2