From 4063362075917c3b91e1a6f31b577b8ea2a0fd06 Mon Sep 17 00:00:00 2001 From: Lex Li Date: Sun, 29 Apr 2012 14:20:08 +0800 Subject: [PATCH] Work item 7234. Fixed unit test cases. --- Browser/Browser.csproj | 18 ++--- Browser/app.config | 3 +- Browser/modules/SNMPv2-CONF.module | 1 + Browser/modules/SNMPv2-MIB.module | 71 +++++++++++++++++++ Browser/modules/SNMPv2-SMI.module | 17 +++++ Browser/modules/SNMPv2-TC.module | 1 + Browser/modules/SNMPv2-TM.module | 9 +++ Browser/modules/index | 10 +-- Compiler/app.config | 1 + .../Messaging/SnmpMessageExtension.cs | 12 ++++ SharpSnmpLib/Mib/MibModule.cs | 3 +- SharpSnmpLib/Mib/ObjectTree.cs | 31 ++++---- SharpSnmpLib/Mib/ValidationHelper.cs | 4 +- SharpSnmpLib/Resources/SNMPv2-CONF.module | 1 + SharpSnmpLib/Resources/SNMPv2-MIB.module | 71 +++++++++++++++++++ SharpSnmpLib/Resources/SNMPv2-SMI.module | 17 +++++ SharpSnmpLib/Resources/SNMPv2-TC.module | 1 + SharpSnmpLib/Resources/SNMPv2-TM.module | 9 +++ Tests/Tests/OpaqueTestFixture.cs | 2 +- lib/SharedAssemblyInfo.cs | 4 +- lib/SharedAssemblyInfo.vb | 4 +- snmpd/app.config | 1 + 22 files changed, 254 insertions(+), 37 deletions(-) create mode 100644 Browser/modules/SNMPv2-CONF.module create mode 100644 Browser/modules/SNMPv2-MIB.module create mode 100644 Browser/modules/SNMPv2-SMI.module create mode 100644 Browser/modules/SNMPv2-TC.module create mode 100644 Browser/modules/SNMPv2-TM.module create mode 100644 SharpSnmpLib/Resources/SNMPv2-CONF.module create mode 100644 SharpSnmpLib/Resources/SNMPv2-MIB.module create mode 100644 SharpSnmpLib/Resources/SNMPv2-SMI.module create mode 100644 SharpSnmpLib/Resources/SNMPv2-TC.module create mode 100644 SharpSnmpLib/Resources/SNMPv2-TM.module diff --git a/Browser/Browser.csproj b/Browser/Browser.csproj index 65520c29..a0bba285 100644 --- a/Browser/Browser.csproj +++ b/Browser/Browser.csproj @@ -229,25 +229,25 @@ PreserveNewest - - PreserveNewest + + Designer - + + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - - Designer + + PreserveNewest - diff --git a/Browser/app.config b/Browser/app.config index cbb8c08e..cb888418 100644 --- a/Browser/app.config +++ b/Browser/app.config @@ -209,6 +209,7 @@ - + + \ No newline at end of file diff --git a/Browser/modules/SNMPv2-CONF.module b/Browser/modules/SNMPv2-CONF.module new file mode 100644 index 00000000..a910e80e --- /dev/null +++ b/Browser/modules/SNMPv2-CONF.module @@ -0,0 +1 @@ +#SNMPv2-SMI, diff --git a/Browser/modules/SNMPv2-MIB.module b/Browser/modules/SNMPv2-MIB.module new file mode 100644 index 00000000..b3934a0e --- /dev/null +++ b/Browser/modules/SNMPv2-MIB.module @@ -0,0 +1,71 @@ +#SNMPv2-SMI,SNMPv2-TC,SNMPv2-CONF, +.1.3.6.1.6.3.1,Lextm.SharpSnmpLib.Mib.ModuleIdentityMacro,snmpMIB,snmpModules +.1.3.6.1.6.3.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBObjects,snmpMIB +.1.3.6.1.2.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,system,mib-2 +.1.3.6.1.2.1.1.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysDescr,system +.1.3.6.1.2.1.1.2,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysObjectID,system +.1.3.6.1.2.1.1.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysUpTime,system +.1.3.6.1.2.1.1.4,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysContact,system +.1.3.6.1.2.1.1.5,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysName,system +.1.3.6.1.2.1.1.6,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysLocation,system +.1.3.6.1.2.1.1.7,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysServices,system +.1.3.6.1.2.1.1.8,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORLastChange,system +.1.3.6.1.2.1.1.9,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORTable,system +.1.3.6.1.2.1.1.9.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysOREntry,sysORTable +.1.3.6.1.2.1.1.9.1.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORIndex,sysOREntry +.1.3.6.1.2.1.1.9.1.2,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORID,sysOREntry +.1.3.6.1.2.1.1.9.1.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORDescr,sysOREntry +.1.3.6.1.2.1.1.9.1.4,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORUpTime,sysOREntry +.1.3.6.1.2.1.11,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmp,mib-2 +.1.3.6.1.2.1.11.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInPkts,snmp +.1.3.6.1.2.1.11.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadVersions,snmp +.1.3.6.1.2.1.11.4,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadCommunityNames,snmp +.1.3.6.1.2.1.11.5,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadCommunityUses,snmp +.1.3.6.1.2.1.11.6,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInASNParseErrs,snmp +.1.3.6.1.2.1.11.30,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpEnableAuthenTraps,snmp +.1.3.6.1.2.1.11.31,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpSilentDrops,snmp +.1.3.6.1.2.1.11.32,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpProxyDrops,snmp +.1.3.6.1.6.3.1.1.4,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpTrap,snmpMIBObjects +.1.3.6.1.6.3.1.1.4.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpTrapOID,snmpTrap +.1.3.6.1.6.3.1.1.4.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpTrapEnterprise,snmpTrap +.1.3.6.1.6.3.1.1.5,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpTraps,snmpMIBObjects +.1.3.6.1.6.3.1.1.5.1,Lextm.SharpSnmpLib.Mib.NotificationTypeMacro,coldStart,snmpTraps +.1.3.6.1.6.3.1.1.5.2,Lextm.SharpSnmpLib.Mib.NotificationTypeMacro,warmStart,snmpTraps +.1.3.6.1.6.3.1.1.5.5,Lextm.SharpSnmpLib.Mib.NotificationTypeMacro,authenticationFailure,snmpTraps +.1.3.6.1.6.3.1.1.6,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpSet,snmpMIBObjects +.1.3.6.1.6.3.1.1.6.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpSetSerialNo,snmpSet +.1.3.6.1.6.3.1.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBConformance,snmpMIB +.1.3.6.1.6.3.1.2.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBCompliances,snmpMIBConformance +.1.3.6.1.6.3.1.2.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBGroups,snmpMIBConformance +.1.3.6.1.6.3.1.2.1.2,Lextm.SharpSnmpLib.Mib.ModuleComplianceMacro,snmpBasicCompliance,snmpMIBCompliances +.1.3.6.1.6.3.1.2.1.3,Lextm.SharpSnmpLib.Mib.ModuleComplianceMacro,snmpBasicComplianceRev2,snmpMIBCompliances +.1.3.6.1.6.3.1.2.2.8,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.9,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpCommunityGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.5,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpSetGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.6,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,systemGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.7,Lextm.SharpSnmpLib.Mib.NotificationGroupMacro,snmpBasicNotificationsGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.11,Lextm.SharpSnmpLib.Mib.NotificationGroupMacro,snmpWarmStartNotificationGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.12,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpNotificationGroup,snmpMIBGroups +.1.3.6.1.2.1.11.2,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutPkts,snmp +.1.3.6.1.2.1.11.8,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTooBigs,snmp +.1.3.6.1.2.1.11.9,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInNoSuchNames,snmp +.1.3.6.1.2.1.11.10,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadValues,snmp +.1.3.6.1.2.1.11.11,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInReadOnlys,snmp +.1.3.6.1.2.1.11.12,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGenErrs,snmp +.1.3.6.1.2.1.11.13,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTotalReqVars,snmp +.1.3.6.1.2.1.11.14,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTotalSetVars,snmp +.1.3.6.1.2.1.11.15,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGetRequests,snmp +.1.3.6.1.2.1.11.16,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGetNexts,snmp +.1.3.6.1.2.1.11.17,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInSetRequests,snmp +.1.3.6.1.2.1.11.18,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGetResponses,snmp +.1.3.6.1.2.1.11.19,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTraps,snmp +.1.3.6.1.2.1.11.20,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutTooBigs,snmp +.1.3.6.1.2.1.11.21,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutNoSuchNames,snmp +.1.3.6.1.2.1.11.22,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutBadValues,snmp +.1.3.6.1.2.1.11.24,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGenErrs,snmp +.1.3.6.1.2.1.11.25,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGetRequests,snmp +.1.3.6.1.2.1.11.26,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGetNexts,snmp +.1.3.6.1.2.1.11.27,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutSetRequests,snmp +.1.3.6.1.2.1.11.28,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGetResponses,snmp +.1.3.6.1.2.1.11.29,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutTraps,snmp +.1.3.6.1.6.3.1.2.2.10,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpObsoleteGroup,snmpMIBGroups diff --git a/Browser/modules/SNMPv2-SMI.module b/Browser/modules/SNMPv2-SMI.module new file mode 100644 index 00000000..73e66c5c --- /dev/null +++ b/Browser/modules/SNMPv2-SMI.module @@ -0,0 +1,17 @@ +# +.1.3,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,org,iso +.1.3.6,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,dod,org +.1.3.6.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,internet,dod +.1.3.6.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,directory,internet +.1.3.6.1.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,mgmt,internet +.1.3.6.1.2.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,mib-2,mgmt +.1.3.6.1.2.1.10,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,transmission,mib-2 +.1.3.6.1.3,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,experimental,internet +.1.3.6.1.4,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,private,internet +.1.3.6.1.4.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,enterprises,private +.1.3.6.1.5,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,security,internet +.1.3.6.1.6,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpV2,internet +.1.3.6.1.6.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpDomains,snmpV2 +.1.3.6.1.6.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpProxys,snmpV2 +.1.3.6.1.6.3,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpModules,snmpV2 +.0.0,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,zeroDotZero,ccitt diff --git a/Browser/modules/SNMPv2-TC.module b/Browser/modules/SNMPv2-TC.module new file mode 100644 index 00000000..a910e80e --- /dev/null +++ b/Browser/modules/SNMPv2-TC.module @@ -0,0 +1 @@ +#SNMPv2-SMI, diff --git a/Browser/modules/SNMPv2-TM.module b/Browser/modules/SNMPv2-TM.module new file mode 100644 index 00000000..f79e40b1 --- /dev/null +++ b/Browser/modules/SNMPv2-TM.module @@ -0,0 +1,9 @@ +#SNMPv2-SMI,SNMPv2-TC, +.1.3.6.1.6.3.19,Lextm.SharpSnmpLib.Mib.ModuleIdentityMacro,snmpv2tm,snmpModules +.1.3.6.1.6.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpUDPDomain,snmpDomains +.1.3.6.1.6.1.2,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpCLNSDomain,snmpDomains +.1.3.6.1.6.1.3,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpCONSDomain,snmpDomains +.1.3.6.1.6.1.4,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpDDPDomain,snmpDomains +.1.3.6.1.6.1.5,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpIPXDomain,snmpDomains +.1.3.6.1.6.2.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,rfc1157Proxy,snmpProxys +.1.3.6.1.6.2.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,rfc1157Domain,rfc1157Proxy diff --git a/Browser/modules/index b/Browser/modules/index index 20b03ec4..7820f271 100644 --- a/Browser/modules/index +++ b/Browser/modules/index @@ -1,5 +1,5 @@ -SNMPV2-SMI -SNMPV2-CONF -SNMPV2-MIB -SNMPV2-TC -SNMPV2-TM \ No newline at end of file +SNMPv2-SMI +SNMPv2-CONF +SNMPv2-MIB +SNMPv2-TC +SNMPv2-TM \ No newline at end of file diff --git a/Compiler/app.config b/Compiler/app.config index 03365e66..fdf584a3 100644 --- a/Compiler/app.config +++ b/Compiler/app.config @@ -67,5 +67,6 @@ + \ No newline at end of file diff --git a/SharpSnmpLib/Messaging/SnmpMessageExtension.cs b/SharpSnmpLib/Messaging/SnmpMessageExtension.cs index b1857aa2..70a72b11 100644 --- a/SharpSnmpLib/Messaging/SnmpMessageExtension.cs +++ b/SharpSnmpLib/Messaging/SnmpMessageExtension.cs @@ -529,6 +529,18 @@ public static IAsyncResult BeginGetResponse(this ISnmpMessage request, IPEndPoin var bufferSize = udpSocket.ReceiveBufferSize; #endif var buffer = new byte[bufferSize]; + + // http://sharpsnmplib.codeplex.com/workitem/7234 + if (callback != null) + { + AsyncCallback wrapped = callback; + callback = asyncResult => + { + var result = new SnmpMessageAsyncResult(asyncResult, udpSocket, registry, receiver, buffer); + wrapped(result); + }; + } + var ar = udpSocket.BeginReceive(buffer, 0, bufferSize, SocketFlags.None, callback, state); return new SnmpMessageAsyncResult(ar, udpSocket, registry, receiver, buffer); } diff --git a/SharpSnmpLib/Mib/MibModule.cs b/SharpSnmpLib/Mib/MibModule.cs index 4e306218..7e382d3a 100644 --- a/SharpSnmpLib/Mib/MibModule.cs +++ b/SharpSnmpLib/Mib/MibModule.cs @@ -193,7 +193,8 @@ internal bool Validate(IDictionary modules) var construct = dependencyModule.Find(symbol); if (construct == null) { - return false; // imported type missing + // TODO: make it strict later. + continue; //return false; // imported type missing } knownConstructs.Add(construct); diff --git a/SharpSnmpLib/Mib/ObjectTree.cs b/SharpSnmpLib/Mib/ObjectTree.cs index 0a3cb6ff..f769eff4 100644 --- a/SharpSnmpLib/Mib/ObjectTree.cs +++ b/SharpSnmpLib/Mib/ObjectTree.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Linq; using log4net; @@ -95,20 +96,20 @@ private static ICollection PrepareFiles(IEnumerable files) IList result = new List(); // TODO: disable loading cache right now. Need to change cache file format and then re-enable. - //foreach (string file in files) - //{ - // if (!File.Exists(file)) - // { - // continue; - // } - - // string moduleName = Path.GetFileNameWithoutExtension(file); - // using (StreamReader reader = new StreamReader(file)) - // { - // result.Add(new ModuleLoader(reader, moduleName)); - // reader.Close(); - // } - //} + foreach (string file in files) + { + if (!File.Exists(file)) + { + continue; + } + + string moduleName = Path.GetFileNameWithoutExtension(file); + using (var reader = new StreamReader(file)) + { + result.Add(new ModuleLoader(reader, moduleName)); + reader.Close(); + } + } return result; } @@ -154,7 +155,7 @@ private Definition Find(IList numerical) foreach (uint digit in numerical) // ReSharper restore LoopCanBePartlyConvertedToQuery { - Definition temp = result.GetChildAt(digit) as Definition; + var temp = result.GetChildAt(digit) as Definition; if (temp == null) { return null; diff --git a/SharpSnmpLib/Mib/ValidationHelper.cs b/SharpSnmpLib/Mib/ValidationHelper.cs index 149f3c74..38134c2b 100644 --- a/SharpSnmpLib/Mib/ValidationHelper.cs +++ b/SharpSnmpLib/Mib/ValidationHelper.cs @@ -45,7 +45,9 @@ internal static bool ValidateParent(this IEntity entity, IEnumerable builder.AppendFormat("{0} is not defined", entity.Parent); Logger.Error(builder.ToString()); - return false; + + // TODO: make this validation strict later. + return true; } } } diff --git a/SharpSnmpLib/Resources/SNMPv2-CONF.module b/SharpSnmpLib/Resources/SNMPv2-CONF.module new file mode 100644 index 00000000..a910e80e --- /dev/null +++ b/SharpSnmpLib/Resources/SNMPv2-CONF.module @@ -0,0 +1 @@ +#SNMPv2-SMI, diff --git a/SharpSnmpLib/Resources/SNMPv2-MIB.module b/SharpSnmpLib/Resources/SNMPv2-MIB.module new file mode 100644 index 00000000..b3934a0e --- /dev/null +++ b/SharpSnmpLib/Resources/SNMPv2-MIB.module @@ -0,0 +1,71 @@ +#SNMPv2-SMI,SNMPv2-TC,SNMPv2-CONF, +.1.3.6.1.6.3.1,Lextm.SharpSnmpLib.Mib.ModuleIdentityMacro,snmpMIB,snmpModules +.1.3.6.1.6.3.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBObjects,snmpMIB +.1.3.6.1.2.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,system,mib-2 +.1.3.6.1.2.1.1.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysDescr,system +.1.3.6.1.2.1.1.2,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysObjectID,system +.1.3.6.1.2.1.1.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysUpTime,system +.1.3.6.1.2.1.1.4,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysContact,system +.1.3.6.1.2.1.1.5,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysName,system +.1.3.6.1.2.1.1.6,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysLocation,system +.1.3.6.1.2.1.1.7,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysServices,system +.1.3.6.1.2.1.1.8,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORLastChange,system +.1.3.6.1.2.1.1.9,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORTable,system +.1.3.6.1.2.1.1.9.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysOREntry,sysORTable +.1.3.6.1.2.1.1.9.1.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORIndex,sysOREntry +.1.3.6.1.2.1.1.9.1.2,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORID,sysOREntry +.1.3.6.1.2.1.1.9.1.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORDescr,sysOREntry +.1.3.6.1.2.1.1.9.1.4,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,sysORUpTime,sysOREntry +.1.3.6.1.2.1.11,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmp,mib-2 +.1.3.6.1.2.1.11.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInPkts,snmp +.1.3.6.1.2.1.11.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadVersions,snmp +.1.3.6.1.2.1.11.4,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadCommunityNames,snmp +.1.3.6.1.2.1.11.5,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadCommunityUses,snmp +.1.3.6.1.2.1.11.6,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInASNParseErrs,snmp +.1.3.6.1.2.1.11.30,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpEnableAuthenTraps,snmp +.1.3.6.1.2.1.11.31,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpSilentDrops,snmp +.1.3.6.1.2.1.11.32,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpProxyDrops,snmp +.1.3.6.1.6.3.1.1.4,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpTrap,snmpMIBObjects +.1.3.6.1.6.3.1.1.4.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpTrapOID,snmpTrap +.1.3.6.1.6.3.1.1.4.3,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpTrapEnterprise,snmpTrap +.1.3.6.1.6.3.1.1.5,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpTraps,snmpMIBObjects +.1.3.6.1.6.3.1.1.5.1,Lextm.SharpSnmpLib.Mib.NotificationTypeMacro,coldStart,snmpTraps +.1.3.6.1.6.3.1.1.5.2,Lextm.SharpSnmpLib.Mib.NotificationTypeMacro,warmStart,snmpTraps +.1.3.6.1.6.3.1.1.5.5,Lextm.SharpSnmpLib.Mib.NotificationTypeMacro,authenticationFailure,snmpTraps +.1.3.6.1.6.3.1.1.6,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpSet,snmpMIBObjects +.1.3.6.1.6.3.1.1.6.1,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpSetSerialNo,snmpSet +.1.3.6.1.6.3.1.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBConformance,snmpMIB +.1.3.6.1.6.3.1.2.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBCompliances,snmpMIBConformance +.1.3.6.1.6.3.1.2.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpMIBGroups,snmpMIBConformance +.1.3.6.1.6.3.1.2.1.2,Lextm.SharpSnmpLib.Mib.ModuleComplianceMacro,snmpBasicCompliance,snmpMIBCompliances +.1.3.6.1.6.3.1.2.1.3,Lextm.SharpSnmpLib.Mib.ModuleComplianceMacro,snmpBasicComplianceRev2,snmpMIBCompliances +.1.3.6.1.6.3.1.2.2.8,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.9,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpCommunityGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.5,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpSetGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.6,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,systemGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.7,Lextm.SharpSnmpLib.Mib.NotificationGroupMacro,snmpBasicNotificationsGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.11,Lextm.SharpSnmpLib.Mib.NotificationGroupMacro,snmpWarmStartNotificationGroup,snmpMIBGroups +.1.3.6.1.6.3.1.2.2.12,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpNotificationGroup,snmpMIBGroups +.1.3.6.1.2.1.11.2,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutPkts,snmp +.1.3.6.1.2.1.11.8,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTooBigs,snmp +.1.3.6.1.2.1.11.9,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInNoSuchNames,snmp +.1.3.6.1.2.1.11.10,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInBadValues,snmp +.1.3.6.1.2.1.11.11,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInReadOnlys,snmp +.1.3.6.1.2.1.11.12,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGenErrs,snmp +.1.3.6.1.2.1.11.13,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTotalReqVars,snmp +.1.3.6.1.2.1.11.14,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTotalSetVars,snmp +.1.3.6.1.2.1.11.15,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGetRequests,snmp +.1.3.6.1.2.1.11.16,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGetNexts,snmp +.1.3.6.1.2.1.11.17,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInSetRequests,snmp +.1.3.6.1.2.1.11.18,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInGetResponses,snmp +.1.3.6.1.2.1.11.19,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpInTraps,snmp +.1.3.6.1.2.1.11.20,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutTooBigs,snmp +.1.3.6.1.2.1.11.21,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutNoSuchNames,snmp +.1.3.6.1.2.1.11.22,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutBadValues,snmp +.1.3.6.1.2.1.11.24,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGenErrs,snmp +.1.3.6.1.2.1.11.25,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGetRequests,snmp +.1.3.6.1.2.1.11.26,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGetNexts,snmp +.1.3.6.1.2.1.11.27,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutSetRequests,snmp +.1.3.6.1.2.1.11.28,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutGetResponses,snmp +.1.3.6.1.2.1.11.29,Lextm.SharpSnmpLib.Mib.ObjectTypeMacro,snmpOutTraps,snmp +.1.3.6.1.6.3.1.2.2.10,Lextm.SharpSnmpLib.Mib.ObjectGroupMacro,snmpObsoleteGroup,snmpMIBGroups diff --git a/SharpSnmpLib/Resources/SNMPv2-SMI.module b/SharpSnmpLib/Resources/SNMPv2-SMI.module new file mode 100644 index 00000000..73e66c5c --- /dev/null +++ b/SharpSnmpLib/Resources/SNMPv2-SMI.module @@ -0,0 +1,17 @@ +# +.1.3,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,org,iso +.1.3.6,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,dod,org +.1.3.6.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,internet,dod +.1.3.6.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,directory,internet +.1.3.6.1.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,mgmt,internet +.1.3.6.1.2.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,mib-2,mgmt +.1.3.6.1.2.1.10,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,transmission,mib-2 +.1.3.6.1.3,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,experimental,internet +.1.3.6.1.4,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,private,internet +.1.3.6.1.4.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,enterprises,private +.1.3.6.1.5,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,security,internet +.1.3.6.1.6,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpV2,internet +.1.3.6.1.6.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpDomains,snmpV2 +.1.3.6.1.6.2,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpProxys,snmpV2 +.1.3.6.1.6.3,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,snmpModules,snmpV2 +.0.0,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,zeroDotZero,ccitt diff --git a/SharpSnmpLib/Resources/SNMPv2-TC.module b/SharpSnmpLib/Resources/SNMPv2-TC.module new file mode 100644 index 00000000..a910e80e --- /dev/null +++ b/SharpSnmpLib/Resources/SNMPv2-TC.module @@ -0,0 +1 @@ +#SNMPv2-SMI, diff --git a/SharpSnmpLib/Resources/SNMPv2-TM.module b/SharpSnmpLib/Resources/SNMPv2-TM.module new file mode 100644 index 00000000..f79e40b1 --- /dev/null +++ b/SharpSnmpLib/Resources/SNMPv2-TM.module @@ -0,0 +1,9 @@ +#SNMPv2-SMI,SNMPv2-TC, +.1.3.6.1.6.3.19,Lextm.SharpSnmpLib.Mib.ModuleIdentityMacro,snmpv2tm,snmpModules +.1.3.6.1.6.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpUDPDomain,snmpDomains +.1.3.6.1.6.1.2,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpCLNSDomain,snmpDomains +.1.3.6.1.6.1.3,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpCONSDomain,snmpDomains +.1.3.6.1.6.1.4,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpDDPDomain,snmpDomains +.1.3.6.1.6.1.5,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,snmpIPXDomain,snmpDomains +.1.3.6.1.6.2.1,Lextm.SharpSnmpLib.Mib.ObjectIdentifierType,rfc1157Proxy,snmpProxys +.1.3.6.1.6.2.1.1,Lextm.SharpSnmpLib.Mib.ObjectIdentityMacro,rfc1157Domain,rfc1157Proxy diff --git a/Tests/Tests/OpaqueTestFixture.cs b/Tests/Tests/OpaqueTestFixture.cs index 3bd5c076..9a0d02e7 100644 --- a/Tests/Tests/OpaqueTestFixture.cs +++ b/Tests/Tests/OpaqueTestFixture.cs @@ -19,7 +19,7 @@ public class OpaqueTestFixture [Test] public void TestException() { - Assert.Throws(()=>new Opaque(null)); + Assert.Throws(()=>new Opaque(null)); } [Test] diff --git a/lib/SharedAssemblyInfo.cs b/lib/SharedAssemblyInfo.cs index 7b288652..706a993c 100644 --- a/lib/SharedAssemblyInfo.cs +++ b/lib/SharedAssemblyInfo.cs @@ -6,7 +6,7 @@ // // You can specify all the values or you can use the default the Revision and // Build Numbers by using the '*' as shown below: -[assembly: AssemblyVersion("7.5.010429.05")] +[assembly: AssemblyVersion("7.5.010429.10")] #if (!CF) -[assembly: AssemblyFileVersion("7.5.010429.05")] +[assembly: AssemblyFileVersion("7.5.010429.10")] #endif diff --git a/lib/SharedAssemblyInfo.vb b/lib/SharedAssemblyInfo.vb index 4158d501..32721196 100644 --- a/lib/SharedAssemblyInfo.vb +++ b/lib/SharedAssemblyInfo.vb @@ -7,5 +7,5 @@ Imports System.Reflection ' You can specify all values by your own or you can build default build and revision ' numbers with the '*' character (the default): - - + + diff --git a/snmpd/app.config b/snmpd/app.config index a94e0341..6131b52f 100644 --- a/snmpd/app.config +++ b/snmpd/app.config @@ -233,6 +233,7 @@ +