5

Are there any open source libraries for doing SNMP GET/SETs using the Objective C/Cocoa Touch (for IPhone)?

Seth
  • 45,033
  • 10
  • 85
  • 120
anilwanted
  • 61
  • 1
  • 4

4 Answers4

3

Although there is no SNMP implementations in Objective-C (that i an aware of). There are in C & C++.

I've had success at using snmp++v2.8a. Just drop the .h and .cpp files required for the static libsnmp++.a into your x-code iphone project. And make the necessary tweaks for it to build. I had to add: "-D_XPG4_EXTENDED -DGCC -DLINUX" to Project Settings 'Other C++ Flags', and make some changes to the files. Then any file you are using the c++ objects from, rename from .m to .mm, to tell X-Code the file contains a mixture of objective-C and c++.

Andrew
  • 317
  • 1
  • 5
  • 11
  • 2
    Andrew - Can you post a sample project somewhere? It would be of huge help to he iPhone dev community. – amok May 28 '10 at 18:59
2

In my opinion, the C/C++ package called Net-SNMP (has nothing to do with .NET) is the best implementation of an SNMP library for both the manager (client) and the agent (server) sides. I've looked at a lot of them and used a lot of them, and Net-SNMP is the best of the lot. Open source.

Pete Wilson
  • 8,610
  • 6
  • 39
  • 51
1

I've spent some time working on building one of these for a project.

there's none for obj-c, or at least there weren't when I was looking last summer. there's a bunch of open source ones in c and c# that are a good starting spot for a port (or re-implementation).

Oren Mazor
  • 4,437
  • 2
  • 29
  • 28
  • 1
    +1 I think if you were to make your library available (whether open source or not), you'd be providing a valuable contribution to the community. – Dave DeLong Jan 14 '10 at 20:47
  • I honestly didn't see anybody who is even remotely interested in it :) I'll post it whenever I get my new laptop and actually start doing useful things with myself again (buy applecare, kiddies. you never know when it'll work out in your favor) – Oren Mazor Jan 14 '10 at 21:10
0

I've never heard of one, and the only thing I'm finding on Google is "IP*Works!", but it seems to be a Mac framework (and might not work on iPhone if it's not compiled as a .a file).

Your best bet may be to roll your own. http://cocoabuilder.com has a couple emails in its archives about people asking for SNMP libraries, but no answers were ever received.

Dave DeLong
  • 242,470
  • 58
  • 448
  • 498