Article View: comp.protocols.snmp
Article #60Use of GetNext
From: Tim Streater 926-2743
Date: Mon, 06 Apr 1992 19:23
Date: Mon, 06 Apr 1992 19:23
24 lines
1456 bytes
1456 bytes
I want to retrieve a table which grows dynamically. Thus, the table starts empty (there are no entries). It is similar to the ipAdEntAddr table in that it is indexed by a physical address (an ethernet address) rather than by a small integer. In retrieving this table, since there is no a priori way of knowing the name of any variable in the table, it looks like I have no start and no end markers for it other than the lexically preceding and following variables. This leads to the following approach to retrieving this table. 1) Create the object-id for a a variable which must precede any which will have real addresses (e.g. use address 0-0-0-0-0-0). Save this object-id. 2) Do a get-next on this one to get the first real one. Compare enough of the returned object-id to the saved one to be sure that the got-next vble was a table member. If not, goto (4). 3) Use this variable for whatever, then go back to (2) to get the next table member. 4) Go make a cup of coffee. I wanted to enquire whether this was the standard way to do this or if there is a better way. Thanks - tim.
Technical Details
Message-ID:
<92097.112315STREATER@SLACVM.SLAC.STANFORD.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!ditka!slacvm!streaterShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!ditka!slacvm!streater Organization: Stanford Linear Accelerator Center Date: Monday, 6 Apr 1992 11:23:15 PST From: Tim Streater (415) 926-2743 <STREATER@SLACVM.SLAC.STANFORD.EDU> Message-ID: <92097.112315STREATER@SLACVM.SLAC.STANFORD.EDU> Newsgroups: comp.protocols.snmp Subject: Use of GetNext