12
Vote

MF SNMP Library

description

Hi All,
 
Juliusfriedman engaged us to post for the implementation of a MF version of its SNMP class...Hoping it will give sense !!!!
 
Regards

file attachments

comments

juliusfriedman wrote Sep 16, 2011 at 12:29 PM

Hello Louis,

Thank you for making an issue!

Lorenzo has been extremely busy with the recent 4.2 release and I suspect this is where the delays are coming from. I wanted users to make a thread so that their needs could be voiced in a place where all other users of the framework had a chance to see them and give feedback. At the very least I visualize some type of SNMP Messenger which supports version 1 and 2 of the SNMP Protocol, Get, GetNext, GetBulk Walk and Set methods. If there is anything you require specifically please attempt to describe it so others may give feedback. I will post my implementation as soon as the details can be worked out.

Sincerely, Julius Friedman

lorenzte wrote Sep 16, 2011 at 5:31 PM

Hi,
it will be impossible for us to ad SNMP to this release, but we will supprot Julius for next release as soon as we RTM and we create new branches for v4.3


Cheers
Lorenzo

LouisCPro wrote Sep 16, 2011 at 7:15 PM

Hi All,

I'm pleased to read that something will be possible around v4.3 !!! Just let me know if you want me to do some tests. I have a chipworkx that is in the starting blocks !! :-)

Let me know...

Regards,

Louis

wrote Sep 16, 2011 at 10:30 PM

wrote Sep 16, 2011 at 10:32 PM

wrote Sep 22, 2011 at 9:27 AM

juliusfriedman wrote Sep 22, 2011 at 1:38 PM

To those of you who would like to give initial feedback /testing please post your email so I organize some type of test release.

-Jay

wrote Sep 29, 2011 at 7:16 PM

juliusfriedman wrote Sep 29, 2011 at 7:16 PM

Hello All,

I am just going to place the Preview Release here for download.

If anyone finds any bugs or have any feedback please post them here in this thread until a more stable repository for the code can be allocated. I had though about putting the code up on microcontrib.codeplex.com but Since it will be included in the Framework I am waiting for Lorenzo's input before proceeding futher.

Also please note you should NOT become dependent on the methods or API of this Release. I have already completed a 2nd Library which is arguably more object orientated and slightly more flexible and allows ASN.1 Encoding in a slew of formats including CER, DER, XER, (JER) etc among BER, overall it differs only in the fact that it supports a more robust serialization and deserialization without the use of BinaryFormatter or reflection which makes it targetable from both the Full and Micro FX. That library most likley be the library released with the 4.3 Framework but again I will have to wait for confirmation from Lorenzo.

It is not the intention of this release to provide a complete Agent, only to enable users to be able to communicate with other Snmp Devices on a network, it is up to the devleoper to acknowledge requests in the fashion they should be. This library only provides classes to assist in the Encoding and Decoding of the PDU's and their associated values.

And last but not least I do have a functioning Agent which is instance based and supports multiple instances however, it is currently undetermined at this time if the 4.3 Release will have a built in Agent for various reasons.

Thank you all for your input and I will be patiently waiting on your response.

LouisCPro wrote Sep 30, 2011 at 11:15 AM

Hi Julius,

Many thanks for your post. I'll test and feedback in few days, cause I'm on the 'Windows' corner of my application for a while. My first test will be to improve a getRequest from an SNMP Requester that I developped, and see how the libray can decode the SNMP packet, retrieve demanded OIDs, and build a response PDU with values of the given inputs of my CHIPWORKx.

Regards,

wrote Oct 25, 2011 at 11:58 PM

wrote Jan 24, 2012 at 9:12 PM

wrote Feb 9, 2012 at 12:21 AM

wrote Oct 1, 2012 at 12:33 PM

wrote Dec 3, 2012 at 10:17 PM

wrote Feb 22, 2013 at 1:45 AM

wrote Mar 20, 2013 at 9:29 AM

wrote Sep 23, 2013 at 9:21 PM

wrote Nov 21, 2013 at 5:31 PM

wrote Oct 29, 2015 at 10:15 PM

Mach1000 wrote Feb 1, 2016 at 12:18 PM

Hi guys,

I am trying to use the MFsnmp, but I am really confused. There are some big inconsistencies between the readme file with the example and the possible methods when the dll is build.

Does anybody have a working simple get request?

Thank you!

Best regards

Mads

juliusfriedman wrote Feb 4, 2016 at 1:45 PM

Thanks for your interest and sorry your having difficulty.

What's so different from the Readme that you can't determine how to use the library?

The packet classes themselves can be used without the Messenger are you having problems creating a get request pdu or using the Messenger to recieve the response?

Either way the API should be simple enough for just about anyone to use, let me know what your specific difficulty is and I will try to help.

t3mh4 wrote Feb 10, 2016 at 3:52 PM

Hi,


the example in the readme.txt is not clear.
I could not understand where do i write ip adress and MIB code.
And that part is wrong i think
byte[] response;

ProtocolDataUnit response = new ProtocolDataUnit(response);

//Determine if there was any noted error
int error = (int)response.ErrorStatus, errorIndex = response.ErrorIndex;

foreach(Variable variable in response.Bindings)
{
//Process values from get request
}

wrote Feb 11, 2016 at 1:21 PM

juliusfriedman wrote Feb 11, 2016 at 6:33 PM

Understood, what clarity do you want?

You use the IPAddress I'm the Messenger which sends a ProtocolDataUnit.

What part is wrong and what about Management Information Bases you refer to I'm not sure.

The way to use the Messenger is like any other, send a pdu and receive the response and process the data just like is shown.

t3mh4 wrote Feb 12, 2016 at 8:56 AM

which method do i have to use to assign ip adress and MIB code??

t3mh4 wrote Feb 12, 2016 at 8:58 AM

and when use " ProtocolDataUnit response = new ProtocolDataUnit(response); "
that part do i send empty array with ProtocolDataUnit??

juliusfriedman wrote Feb 16, 2016 at 1:29 PM

The mib code is used to determine the type and value of the object, you don't need a mib if you already have the management information you need.

The pdu requests to an agent of a mib who responds.

The response indicates success or failure of the request.

The IP of the agent is set on the socket connected to, once connected you would send a pdu which corresponds to your request and process the response.

The Messenger takes care of connection semantics such as sequence number, protocol type such as tcp or udp and retranmission of data.

If you don't use the Messenger you can still use just the ProtocolDataUnit classes and a plain socket but then your question doesn't make sense as you would have already a socket connected to an IP of the agent.

ProtocolDataUnit can create bytes or parse them for clarity or copy another instance, you can also modify a ProtocolDataUnit after reception and serialize the modified ProtocolDataUnit back to bytes with the ToBytes method.

In your question you define a variable response and then attempt to create a new ProtocolDataUnit instance by copying the same variable which is null which will result in a NullReferenceException .

clefranc wrote Jul 9, 2016 at 2:40 AM

Hi Julius,
I'm interested in SNMP for MF, mainly the agent side. Is it possible to use your library for creating an SNMP agent?

Looking at your library, it seems I can only use it as a manager.

Thank you
Christian

juliusfriedman wrote Jul 9, 2016 at 3:28 AM

And why would that be?

The example given allows interaction at the packet structure level....

You could easily create an Agent or a Manager and I shared with Lorenzo a version which I intended to release however due to various factors I was unable to due to for free.

There is an open source version of the full framework implementation I did @ Here, it contains plenty more examples, if you look hard enough you will even find some samples which generated code which was used by the Micro Framework.

Hopefully with the newly promised interest in the Micro Framework by Microsoft there will be some type of renewed interest in either the SNMP, NTCIP, or possibly something else, e.g. DSRC but who knows.

I would be more willing to help however as you probably know you can catch a rabbit with a snare but you cant catch a bear, many things are not what they seem yet somehow they are.