Total Pageviews

Disclaimer

This is a personal web page. The views expressed on this blog are mine and do not necessarily reflect the views of my current employer.

I am currently employed by Morgan Stanley.

April 26, 2009

Trident Sign: Road to SNMP v3

We shall finally come to work on SNMP v3. But how to go there step by step? I have a list below and hope that following it we can reach the land.
  1. Configure Net-SNMP agent so that I can test #SNMP against it.
  2. Develop an SNMP v3 compliant manager to talk to that agent.
  3. Design necessary agent parts so that it can perform basic functions like its Net-SNMP counterpart.
Good news is that I just finished the first critical task. Well, that's a good start. Cooking Trident must be cooler :)

Updated:
You must wonder how to configure Net-SNMP agent, so here are the links you must read,

CrossRoad Billboard: If Compiler Crashes

Hi all,

If you find that #SNMP MIB Compiler always crashes at start up, I am so sorry that I messed up compiler.exe.config in that package.

Please download the latest package from here again.

More on Windows SNMP Agent

Finally I noticed that Microsoft, my current employer, has such a nice document published for Windows SNMP Services. Well, it answers a lot of my questions, and hope it helps you, too.

http://technet.microsoft.com/en-us/library/cc750391.aspx

CrossRoad Billboard: How to Support IP v6 in .NET/C#

In the past, I thought I needn't do anything to support IP v6. Well, at that moment I knew little of IP v6.

Last month I finally had a chance to study IP v6 with Windows Vista and Server 2008. From then on, I know that as a new protocol, it is not a small jump from the IP v4 boat to the IP v6 one.

Last weekend I started to implement the notification panel of browser. After finding a way to list all IP addresses that I am interested, I knew it is time to add IP v6 support as there is an IP v6 address listed. But how? Interesting that this time I was driven by exceptions and Google.
Do you know the following exception messages?
  • "The system detected an invalid pointer address in attempting to use a pointer argument in a call"
  • "An address incompatible with the requested protocol was used"
Well, Google reveals that they are the hints that you need to search for all Socket/UdpClient objects used and let them aware of IP v6 existence.

My changes are,
  1. Specify AddressFamily parameter when creating a Socket object. From then on, this Socket object will only be used for IP v4 or v6.
  2. Every time an IPAddress object is used, check its AddressFamily so that a proper Socket object can be used.
The toughest problem is how to monitor incoming packets for "All Unassigned". Ha, you must wonder why monitoring IPAddress.Any is not enough. OK, here is the answer.

IPAddress.Any is for IP v4 only. IPAddress.IPv6Any must be used besides to monitor IP v6 packets. So finally I have to use two Socket objects in this panel. One is used for IP v4, and the other for IP v6.

It is perfect that I have this notification panel completed and in the meantime IP v6 support is accomplished. .NET platform really makes the progress quite smooth.

April 25, 2009

#SNMP Design: CrossRoad Release Notes

Last release is TwinTower 1.5 on Jan 17.
This release takes more than three months and please grab a copy from here.

It contains the following changes (bug fixes are not listed, so please check our issue tracker for information):

  1. * browser and compiler are now under MIT license.
  2. * SnmpDataFactory is now DataFactory.
  3. - Silverlight port is obsolete due to too many missing things in SL2.
  4. + TraceSource is used for logging.
  5. + new constructors added in ISnmpData derived classes.
  6. * ISnmpMessage is no longer derived from ISnmpPdu.
  7. - ToBytes method in ISnmpData derived classes are now obsolete.
  8. - TypeCode is removed from ISnmpMessage.
  9. + Unity is used in browser and compiler.
  10. + Objects property is added in Manager.
  11. * table OID validation process is disabled temporarily. 
  12. + notification panel is added in browser.
  13. * sample projects are improved.
  14. + #SNMP MIB compiler is added and enhanced.
  15. + Listener component is added.
  16. - TrapListener component is obsolete.
  17. * API changes are introduced to match RFC 1448.
  18. + walk operation now makes use of GET BULK for SNMP v2 calls.
  19. + command line version of SNMP utilities are added, such as snmpget, snmpset, and snmpgetnext.
  20. * SharpSnmpLib.dll is split to three parts: SharpSnmpLib.dll, SharpSnmpLib.Mib.dll, and SharpSnmpLib.Controls.dll.
  21. + Discoverer component is added.
  22. + IP v6 support is added and tested.
  23. + MS Help 2 version of class references is shipped.
  24. * Many patches from Chris are merged so as to tune performance.
There must be a few items I missed. If you meet any incompatible issues (from 1.5 to 2.0), please feel free to let me know via our discussion board.

+ for new features
* for changed features
- for obsolete or removed features


Notice:
Obsolete items are to be removed post this release. So please follow the advice to move away from them.

#SNMP Design: Shipping the Package of CrossRoad

Well, for the first time I want to spend more time on packaging the binaries. Here are the list,

  1. This time we will ship MS Help v2 version of class references besides HTML Help version.
  2. This time we will ship command line versions of tools. Thank Mono for Mono.Options.
  3. This time we will ship an MIB compiler. Though it is simple and hard to use, I must confess that we make some progress.
At this moment, I am not quite sure if there will be other items to add. We will see. :)

#SNMP Design: Last Mile to Final Release of 2.0

I took a training on IP v6 last month, and now it is time to apply something learned to #SNMP.

Today I will try  to finish IP v6 support in Listener and hope that we can ship 2.0 final tonight or tomorrow.

Have a nice weekend :)

April 18, 2009

#SNMP Design: Annual Release

Oh, it's drawing near. As the first change set of #SNMP was alive here on April 26th 2008, I plan to release something important one year later. Well, actually when I started this small project, how could I expect it would grow to be what it looks like today?

I just submitted the latest change set which contains my final changes for 2.0. If other team members do not submit patches next week, you will see a final 2.0 CrossRoad release.
Stay tuned.

April 06, 2009

#SNMP Design: Static Methods

There are many static methods available now in Manager and Agent classes, but actually they have no relationship with either Manager or Agent. Therefore, I think it is better to move them into an isolated helper class. That's why Messenger class was added lately. It's also a good time to implement shared Socket object in this single entry for static methods.

What's your opinions about static methods? I believe a fully object oriented design should avoid them, but I couldn't help give them birth.

Next step I am going to separate default object registry from other object registries.