<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>sharpsnmplib Forum Rss Feed</title><link>http://www.codeplex.com/sharpsnmplib/Thread/List.aspx</link><description>sharpsnmplib Forum Rss Description</description><item><title>New Post: SNMP and VLANs</title><link>http://sharpsnmplib.codeplex.com/discussions/444161</link><description>&lt;div style="line-height: normal;"&gt;Thanks &lt;a href="mailto:@lextm.

I" rel="nofollow"&gt;@lextm.

I&lt;/a&gt; did what you recommended I found this &lt;a href="https://h10145.www1.hp.com/Downloads/DownloadSoftware.aspx?SoftwareReleaseUId=9684&amp;amp;ProductNumber=JE006A&amp;amp;lang=en&amp;amp;cc=us&amp;amp;prodSeriesId=4218346&amp;amp;SerialNumber=&amp;amp;PurchaseDate=" rel="nofollow"&gt;link&lt;/a&gt; with some mib files&lt;br /&gt;
&lt;br /&gt;
Am I on the right path?&lt;br /&gt;
&lt;br /&gt;
Now I think I should use compiler to create the modules files using the mibs and after that use the browser to navigate on it. Am I right?&lt;br /&gt;
&lt;br /&gt;
Thanks for all!&lt;br /&gt;
&lt;/div&gt;</description><author>gblmarquez</author><pubDate>Mon, 20 May 2013 20:47:20 GMT</pubDate><guid isPermaLink="false">New Post: SNMP and VLANs 20130520084720P</guid></item><item><title>New Post: SNMP and VLANs</title><link>http://sharpsnmplib.codeplex.com/discussions/444161</link><description>&lt;div style="line-height: normal;"&gt;You should read HP documentation on that model or contact its support team to understand how to achieve management via SNMP.&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Sun, 19 May 2013 00:08:07 GMT</pubDate><guid isPermaLink="false">New Post: SNMP and VLANs 20130519120807A</guid></item><item><title>New Post: SNMP and VLANs</title><link>http://sharpsnmplib.codeplex.com/discussions/444161</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I'm new to SNMP world, I'm a confused about how it works.&lt;br /&gt;
What I need is get and set VLANs for a switch from HP model v1910-24G.&lt;br /&gt;
&lt;br /&gt;
Where I can find the OID correct to get VLAN.&lt;br /&gt;
Above there is the sample code I'm using to get the data from SNMP.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var result = Messenger.Get(VersionCode.V2,
                new IPEndPoint(IPAddress.Parse(&amp;quot;192.168.0.254&amp;quot;), 161),
                new OctetString(&amp;quot;public&amp;quot;),
                new List&amp;lt;Variable&amp;gt; { new Variable(new ObjectIdentifier(&amp;quot;1.3.6.1.4.1.43.45.1.2.23.1.2.1.1.1.13&amp;quot;)) },
                60000);

foreach (var item in result)
{
    Console.WriteLine(item.Data.ToString());
}&lt;/code&gt;&lt;/pre&gt;

Thanks very much everyone that could help me.&lt;br /&gt;
&lt;/div&gt;</description><author>gblmarquez</author><pubDate>Sat, 18 May 2013 22:08:30 GMT</pubDate><guid isPermaLink="false">New Post: SNMP and VLANs 20130518100830P</guid></item><item><title>New Post: Configurable EngineId, SNMPv3 Discovery and SNMP exception.</title><link>http://sharpsnmplib.codeplex.com/discussions/372937</link><description>&lt;div style="line-height: normal;"&gt;If you review the constructor of a typical SNMP v3 message, such as &lt;code&gt;GetRequestMessage&lt;/code&gt;, you will see the &lt;code&gt;report&lt;/code&gt; parameter used.&lt;br /&gt;
&lt;br /&gt;
Using that &lt;code&gt;report&lt;/code&gt; message is too heavy, as you can see only two sections of that message are used during construction. Thus, we should not try to cache the whole message. Ideally the cache should only cache those two sections, and the related constructors should be changed to use the cached sections. (Well, caching &lt;code&gt;ISnmpMessage&lt;/code&gt; is still acceptable, as that's the simplest approach to achieve our goals. Further changes can be deferred).&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;Messenger.GetNextDiscovery&lt;/code&gt; was changed to add that new parameter, because that's how the RFC documents require for proper discovery. While practically it is OK to always use GET to discover an agent, we must support discovery via GET BULK, SET and so on.&lt;br /&gt;
&lt;br /&gt;
We should focus on caching first, and later consider exceptions and other factors.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Lex&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Tue, 14 May 2013 04:39:18 GMT</pubDate><guid isPermaLink="false">New Post: Configurable EngineId, SNMPv3 Discovery and SNMP exception. 20130514043918A</guid></item><item><title>New Post: Multi-Threading with ISnmpMessage classes</title><link>http://sharpsnmplib.codeplex.com/discussions/443402</link><description>&lt;div style="line-height: normal;"&gt;&lt;code&gt;ISnmpMessage&lt;/code&gt; derived classes can be viewed as the object representation of raw bytes in the packets,&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;They are designed to be immutable once constructed. (If it fails to meet this, please report a bug.)&lt;/li&gt;
&lt;li&gt;
Each instance should be independent of another.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
And that's why I stated they can use in multi-threaded environment. Since static methods in &lt;code&gt;Messenger&lt;/code&gt; class generate such instances under the hood, I think they are thread-safe too.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Lex&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Tue, 14 May 2013 04:21:55 GMT</pubDate><guid isPermaLink="false">New Post: Multi-Threading with ISnmpMessage classes 20130514042155A</guid></item><item><title>New Post: Configurable EngineId, SNMPv3 Discovery and SNMP exception.</title><link>http://sharpsnmplib.codeplex.com/discussions/372937</link><description>&lt;div style="line-height: normal;"&gt;&lt;pre&gt;&lt;code&gt;SNMP v3 response cache can be a nice addition to improve performance. But this cache needs to be per agent, and managed with timeout/exception in mind. I don't have any idea on how to implement it yet. BTW, it will not be only ReportMessage to be cached, but any reply from the agent should be.&lt;/code&gt;&lt;/pre&gt;

In regards of caching the discovery information. Would it be an acceptable way to cache a new instance of &lt;code&gt;ReportMessage&lt;/code&gt; for the specific agent using the information that I get in the &lt;code&gt;response&lt;/code&gt; after calling &lt;code&gt;GetResponse&lt;/code&gt; for that agent (for all requests regardless whether its a &lt;code&gt;GetRequestMessage,GetBulkRequestMessage,SetRequestMessage&lt;/code&gt;...) . This approach is working however I am a bit thrown off by the fact that &lt;code&gt;Messenger&lt;/code&gt; class requires a &lt;code&gt;SnmpType&lt;/code&gt; for the &lt;code&gt;GetNextDidscovery&lt;/code&gt; function implying that different information is needed for the discovery to take place. Isn't it the same information such as snmpEngineID, snmpEngineBoots etc. that is required for discovery to take place regardless of what type of SnmpV3 call is going to take place or am misunderstanding the process? To sum up the question is it acceptable to have a &lt;code&gt;ReportMessage&lt;/code&gt; cached for any type of request for a specific agent?&lt;br /&gt;
(not addressing exceptional conditions &amp;amp; timeout in this question)&lt;br /&gt;
&lt;/div&gt;</description><author>nickolaykon</author><pubDate>Sun, 12 May 2013 22:47:32 GMT</pubDate><guid isPermaLink="false">New Post: Configurable EngineId, SNMPv3 Discovery and SNMP exception. 20130512104732P</guid></item><item><title>New Post: Multi-Threading with ISnmpMessage classes</title><link>http://sharpsnmplib.codeplex.com/discussions/443402</link><description>&lt;div style="line-height: normal;"&gt;Hi Lex,&lt;br /&gt;
&lt;br /&gt;
You wrote in FAQs that the library is not thread safe&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Is this library thread safe? : Not yet. Please use static methods in Messenger class which should be thread safe.&lt;/code&gt;&lt;/pre&gt;

However in one of the older posts &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;https://sharpsnmplib.codeplex.com/discussions/234718&lt;/code&gt;&lt;/pre&gt;

You said that ISnmpMessage classes can be used in multi-threaded environment if they are spawned and thrown away for each request. Has this changed over the past 3 years? Meaning that is it still safe to use Level-1 ISnmpMessage derived classes in a multi-threaded fashion without locking if they get spawned and thrown away each time?&lt;br /&gt;
&lt;/div&gt;</description><author>nickolaykon</author><pubDate>Sun, 12 May 2013 22:03:27 GMT</pubDate><guid isPermaLink="false">New Post: Multi-Threading with ISnmpMessage classes 20130512100327P</guid></item><item><title>New Post: How Can I Compile again The Edited Mib file Which Has Same Name ? </title><link>http://sharpsnmplib.codeplex.com/discussions/442805</link><description>&lt;div style="line-height: normal;"&gt;If &lt;code&gt;reloadObject.Tree.PendingModules.Count&lt;/code&gt; is not 0, then the modules are pending. You will have to compile all modules and their dependencies to avoid pending modules. &lt;br /&gt;
&lt;br /&gt;
If both &lt;code&gt;reloadObject.Tree.PendingModules.Count&lt;/code&gt; and &lt;code&gt;reloadObject.Tree.LoadedModules.Count&lt;/code&gt; are 0, that means you fail to compile the MIB documents to .module files in the module folder. That must be done ahead of loading any module, by using &lt;code&gt;Assembler&lt;/code&gt; class. In the Compiler sample you can see how this class is used to compile MIB documents to .module files.&lt;br /&gt;
&lt;br /&gt;
-Lex&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Sun, 12 May 2013 12:06:59 GMT</pubDate><guid isPermaLink="false">New Post: How Can I Compile again The Edited Mib file Which Has Same Name ?  20130512120659P</guid></item><item><title>New Post: How Can I Compile again The Edited Mib file Which Has Same Name ? </title><link>http://sharpsnmplib.codeplex.com/discussions/442805</link><description>&lt;div style="line-height: normal;"&gt;I use :&lt;br /&gt;
ReloadableObjectRegistry reloadObject =new ReloadableObjectRegistry(path);&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;     reloadObject.Compile(MibFilePath);&lt;/code&gt;&lt;/pre&gt;

but reloadobject loadedMolules is null&lt;br /&gt;
&lt;/div&gt;</description><author>soheila</author><pubDate>Wed, 08 May 2013 08:44:28 GMT</pubDate><guid isPermaLink="false">New Post: How Can I Compile again The Edited Mib file Which Has Same Name ?  20130508084428A</guid></item><item><title>New Post: How Can I Compile again The Edited Mib file Which Has Same Name ? </title><link>http://sharpsnmplib.codeplex.com/discussions/442805</link><description>&lt;div style="line-height: normal;"&gt;&lt;code&gt;DefaultObjectRegistry&lt;/code&gt; is obsolete, and you should switch to &lt;code&gt;SimpleObjectRegistry&lt;/code&gt; or &lt;code&gt;ReloadableObjectRegistry&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
For the open source edition of SharpSnmpLib.Mib, you will have to use &lt;code&gt;ReloadableObjectRegistry&lt;/code&gt;, which allows you to reload the tree by calling &lt;code&gt;Reload&lt;/code&gt;. All modules will have to be reloaded even if only one module is edited.&lt;br /&gt;
&lt;br /&gt;
In the Pro edition of SharpSnmpLib.Mib (soon to release as a commercial product), when one module is edited, only affected modules will be reloaded, and it is automatically handled. So if you like, you can participate in the private beta,&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.lextm.com/2013/05/snmp-pro-private-beta-is-ready-and.html" rel="nofollow"&gt;http://www.lextm.com/2013/05/snmp-pro-private-beta-is-ready-and.html&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Wed, 08 May 2013 01:39:02 GMT</pubDate><guid isPermaLink="false">New Post: How Can I Compile again The Edited Mib file Which Has Same Name ?  20130508013902A</guid></item><item><title>New Post: How Can I Compile again The Edited Mib file Which Has Same Name ? </title><link>http://sharpsnmplib.codeplex.com/discussions/442805</link><description>&lt;div style="line-height: normal;"&gt;i am using DefaultObjectRegistry in my project  and the user can change the MIB file corresponding the device connected to Network.&lt;br /&gt;
when the user edits MIB contents and compile it again it encounters no changes in all oids .&lt;br /&gt;
 i tried to clear or refresh the DefaultObjectRegistry by member functions such as DefaultObjectRegistry.instance.tree.refresh() and DefaultObjectRegistry.Instance.Tree.LoadedModules.Remove(MibFilePath) (this line exception accure) but i was unsuccessful&lt;br /&gt;
please help me &lt;br /&gt;
best regards &lt;br /&gt;
&lt;/div&gt;</description><author>soheila</author><pubDate>Tue, 07 May 2013 13:29:38 GMT</pubDate><guid isPermaLink="false">New Post: How Can I Compile again The Edited Mib file Which Has Same Name ?  20130507012938P</guid></item><item><title>New Post: Using a Sequence datatype with SendTrapV2</title><link>http://sharpsnmplib.codeplex.com/discussions/441379</link><description>&lt;div style="line-height: normal;"&gt;Ah I see. Thank you!&lt;br /&gt;
&lt;/div&gt;</description><author>xadzax</author><pubDate>Fri, 26 Apr 2013 13:59:20 GMT</pubDate><guid isPermaLink="false">New Post: Using a Sequence datatype with SendTrapV2 20130426015920P</guid></item><item><title>New Post: Set Context Name v3</title><link>http://sharpsnmplib.codeplex.com/discussions/441296</link><description>&lt;div style="line-height: normal;"&gt;Yes, yesterday I found it.&lt;br /&gt;
&lt;br /&gt;
I downloaded the last src code and I can set the context name. But in binary release (tritonmate_8.0_rc_bin) I think that it is not possible. The context name is read only.&lt;br /&gt;
&lt;br /&gt;
Thanks for your reply!&lt;br /&gt;
&lt;br /&gt;
Cheers.&lt;br /&gt;
&lt;/div&gt;</description><author>sergiokus</author><pubDate>Thu, 25 Apr 2013 08:29:33 GMT</pubDate><guid isPermaLink="false">New Post: Set Context Name v3 20130425082933A</guid></item><item><title>New Post: Using a Sequence datatype with SendTrapV2</title><link>http://sharpsnmplib.codeplex.com/discussions/441379</link><description>&lt;div style="line-height: normal;"&gt;As your final data in the TRAP v2 message will be of OctetString type, you should do the following,&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Construct the &lt;code&gt;Sequence&lt;/code&gt; object as above.&lt;/li&gt;
&lt;li&gt;
Construct an &lt;code&gt;OctetString&lt;/code&gt; object to embed the &lt;code&gt;Sequence&lt;/code&gt; object, such as &lt;code&gt;var stringData = new OctetString(seq.ToBytes());&lt;/code&gt;.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;
Then this &lt;code&gt;OctetString&lt;/code&gt; object can be sent on the wire. The receiver just needs to decode it correctly so as to get the &lt;code&gt;Sequence&lt;/code&gt; inside, such as &lt;code&gt;var seq = (Sequence)DataFactory.CreateSnmpData(stringData.GetRaw());&lt;/code&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Thu, 25 Apr 2013 08:23:16 GMT</pubDate><guid isPermaLink="false">New Post: Using a Sequence datatype with SendTrapV2 20130425082316A</guid></item><item><title>New Post: Set Context Name v3</title><link>http://sharpsnmplib.codeplex.com/discussions/441296</link><description>&lt;div style="line-height: normal;"&gt;You will have to manually construct the SNMP v3 message via a constructor such as &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;public GetRequestMessage(VersionCode version, int messageId, int requestId, OctetString userName, IList&amp;lt;Variable&amp;gt; variables, IPrivacyProvider privacy, int maxMessageSize, ISnmpMessage report)&lt;/code&gt;&lt;/pre&gt;

The context name can be passed via the report message. Or you can make the internal constructor public so as to fully construct the message from scratch.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;internal GetRequestMessage(VersionCode version, Header header, SecurityParameters parameters, Scope scope, IPrivacyProvider privacy, byte[] length)&lt;/code&gt;&lt;/pre&gt;

As setting context engine ID or context name is not necessary in most cases (they can be received via discovery), there is no simply way to set them except the ways I described above.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Lex&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Thu, 25 Apr 2013 08:16:34 GMT</pubDate><guid isPermaLink="false">New Post: Set Context Name v3 20130425081634A</guid></item><item><title>New Post: Using a Sequence datatype with SendTrapV2</title><link>http://sharpsnmplib.codeplex.com/discussions/441379</link><description>&lt;div style="line-height: normal;"&gt;It's a 'custom' trap that we are sending which has alert information about our system. The MIB is fairly long to paste, but since we have control of how to construct it maybe I can pose the question in another way with a snippet.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;alertingVars OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.1530.1.1.1.1
        ::= { alertingMib 1 }

-- the associated data that contains the details needed to define the trap
alertPayload OBJECT-TYPE
        SYNTAX  DisplayString
        MAX-ACCESS read-only
        STATUS  current
        DESCRIPTION
                &amp;quot;An alert data value in string format.&amp;quot;
        -- 1.3.6.1.4.1.1530.1.1.1.1.6
        ::= { alertingVars 6 }&lt;/code&gt;&lt;/pre&gt;

The alertPayload currently is an OctetString containing a variable length delimited key value pair which is placed into the Variable list (and to the SendTrapV2) of which is not going to be useful to the customer. The associated portion of the trap looks like this currently from the receiver:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Ent Value 3: .1.3.6.1.4.1.1530.1.1.1.1.6=Key1^Value1,Key2^Value2 &lt;/code&gt;&lt;/pre&gt;

The solution was to somehow represent the key value pair in a SEQUENCE type in the MIB and then modify the trap sending code to include a Sequence type within the variable list of the SendTrapV2. I've seen how SEQUENCES are defined in MIB's but I'm confused on how to approach it from the code sending side.&lt;br /&gt;
&lt;br /&gt;
It sounds like I am approaching this wrong. So how would I resolve this issue?&lt;br /&gt;
&lt;/div&gt;</description><author>xadzax</author><pubDate>Wed, 24 Apr 2013 15:49:01 GMT</pubDate><guid isPermaLink="false">New Post: Using a Sequence datatype with SendTrapV2 20130424034901P</guid></item><item><title>New Post: Using a Sequence datatype with SendTrapV2</title><link>http://sharpsnmplib.codeplex.com/discussions/441379</link><description>&lt;div style="line-height: normal;"&gt;Can you tell me what kind of TRAP v2 message you are going to send? It's better if you can paste the MIB document portion.&lt;br /&gt;
&lt;br /&gt;
As far as I know, you should never send a Sequence object out, as that violates the SNMP package format.&lt;br /&gt;
&lt;br /&gt;
Lex&lt;br /&gt;
&lt;/div&gt;</description><author>lextm</author><pubDate>Wed, 24 Apr 2013 06:28:20 GMT</pubDate><guid isPermaLink="false">New Post: Using a Sequence datatype with SendTrapV2 20130424062820A</guid></item><item><title>New Post: Using a Sequence datatype with SendTrapV2</title><link>http://sharpsnmplib.codeplex.com/discussions/441379</link><description>&lt;div style="line-height: normal;"&gt;We have an application that is using your Messenger namespace and is working fine with basic data types (OctetString)  with an oid being used to construct a Variable, added to the List&amp;lt;Variable&amp;gt;and then being used with the Messenger.SendTrapV2 method. We need to include a Sequence type of OctetStrings to the Variable list, but it is not clear on how to accomplish this. I  have tinkered around with getting as far as adding a list of ISnmpData types to a Sequence, but that is as far as I can go.. What am I missing?&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  List&amp;lt;ISnmpData&amp;gt; snmpData = new List&amp;lt;ISnmpData&amp;gt;();
  snmpData.Add(new OctetString(&amp;quot;Key&amp;quot;));
  snmpData.Add(new OctetString(&amp;quot;Value&amp;quot;));
  Sequence seq = new Sequence(snmpData);
...
  Messenger.SendTrapV2(,,,,List&amp;lt;Variable&amp;gt;); ...How to include a Sequence???);&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>xadzax</author><pubDate>Wed, 24 Apr 2013 04:07:25 GMT</pubDate><guid isPermaLink="false">New Post: Using a Sequence datatype with SendTrapV2 20130424040725A</guid></item><item><title>New Post: Set Context Name v3</title><link>http://sharpsnmplib.codeplex.com/discussions/441296</link><description>&lt;div style="line-height: normal;"&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
First of all I want to thanks for the great library.&lt;br /&gt;
&lt;br /&gt;
I don't find the way how to set the context name in SNMP v3.&lt;br /&gt;
&lt;br /&gt;
Can you help me?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance!!&lt;br /&gt;
&lt;br /&gt;
Sergio&lt;br /&gt;
&lt;/div&gt;</description><author>sergiokus</author><pubDate>Tue, 23 Apr 2013 14:16:15 GMT</pubDate><guid isPermaLink="false">New Post: Set Context Name v3 20130423021615P</guid></item><item><title>New Post: i don´t understandign create a mib??</title><link>http://sharpsnmplib.codeplex.com/discussions/440676</link><description>&lt;div style="line-height: normal;"&gt;I work with .net, you have reason the file .mib not create necessary, &lt;br /&gt;
but I want manipulation the file .mib, I need the compiler.exe for communication in protocol SNMP. saw the examples.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;/div&gt;</description><author>Dommi</author><pubDate>Thu, 18 Apr 2013 15:16:54 GMT</pubDate><guid isPermaLink="false">New Post: i don´t understandign create a mib?? 20130418031654P</guid></item></channel></rss>