[ First - *please* don't mail me privately, without copying any responses to the mailing list. I don't have the time or inclination to offer private, unpaid, SNMP consultancy. Keep discussions to the list, where others can both learn and offer advice. Thanks. ]
On 06/03/07, Andrew Walker (CV/ETL) <[EMAIL PROTECTED]> wrote: > >> The first thing to decide is what information you need to retrieve, > >> and how you are going to display it. > > I am trying to implement a client app that will reside in an automated > factory test program for a telecomms card which is managed via SNMP so > there will not be a front end as such. No - but you still need to decide what information you need to retrieve, and what this test program will do with it. s/display/use/ > In total there are 16 dedicated mibs that I will probably have to access > and I was hoping to find a tool that will automatically generate all the > C code for the MIB structures and the MIB retrieval functions to fill > the structures. It might be possible to construct a mib2c template for this, but I'm not sure whether it's worth it. If the processing for each MIB is more-or-less the same, then a single code framework might well serve for all of them. If you'll be doing MIB-specific tests, then you're going to have to code each test module separately anyway. In either case, learning how to control mib2c is probably not a sensible use of time. > I did have some success with the libsmi library over at > http://www.ibr.cs.tu-bs.de/projects/libsmi/ and the smidump application > which did generate all the management structures and the access > functions for me but it did not seem to work with more than 1 instance > of a table entry and the libsmi is not well supported anymore. I'll take your word for it. I'm on the libsmi mailing list, and Frank does seem to be fairly responsive to requests for assistance. But that list is *much* less busy than these, and it's several years since I looked at libSMI in anger. In general, it's probably fair to say that the focus of attention in the Net-SNMP development has always tended to be the agent. So we may not have the same level of tools aimed at supporting client-side applications. But it's an Open Source project, so anything you can offer would be gratefully received :-) > i.e. [snmplib] created structures that looked like this:- > > typedef struct omsEquipmentSlotEntry { [snip] > struct omsEquipmentSlotEntry *_nextPtr; > /* pointer to next table entry */ > } omsEquipmentSlotEntry_t; > > > But as the access function does not use *_nextPtr I can't see how it can > handle multiple instances within a table. That's exactly the sort of thing that you should be asking on the libsmi mailing list, not here. We are struggling to keep up with supporting our own software - it's unrealistic to cover competing products as well! But my suspicion is that the libsmi output is giving you the *framework* to support local copies of a MIB table, rather than doing this all automatically. You'd use the provided API to retrieve a single row of the table, and then use the '_nextPtr' link to construct a local cached version (perhaps just containing selected rows). That feels a more flexible approach than forcing you to retrieve the whole table every time. > Also, I am slightly confused why you suggested I look at the smnpdf app, > which google tells me will get a listing of disk space usage on a remote > server by means of snmp, how will this help me? Because that is an example of a client-side application, built using the Net-SNMP suite. Sure - the precise details of exactly which MIB objects are retrieved won't be relevant to you. But the approach that it uses - the way it constructs a request, and what it does with the results - all of that is likely to be exaclty the sort of thing you'll be doing (albeit with different OIDs). > >> You are probably better off looking at the example client tools > >> we provide (under "apps"), and generating something > >> based on those. > > Do you mean using the snmp get, set and walk apps to write a > management app? No - I mean look at the code that's used in these applications. (Or more usefully, the code that's used in the more specialised apps, such as "snmpdf"). That will show you the sort of things you'll need to do in your application. > I was hoping the auto generated code would do all this for me. Probably not - see above. Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users