2008/7/3 Need Help <[EMAIL PROTECTED]>: > I am wondering what happens when a SNMP query is performed on this table?
What sort of query? If it's a GET request on a given entry within the table, your code should detect that this particular row does not exist, and would return 'noSuchInstance' If it's a GETNEXT request, then the agent would search to find the next valid instance after the specified OID. Your code should detect that there wasn't anything suitable in your table, and pass control back to the main agent driving code. The agent would then move on to the next registered MIB module. > I am pretty sure Net-SNMP logic will not be able to determine whether the > data in the table is real or not, so must I add another row field to the > table indicating whether the row data is valid or not? SNMP does not have a concept of "valid" or "invalid" rows. If there's a row in the table, then it will be returned to the querying application. If the table is empty, then the agent will return 'noSuchInstance' or the next valid instance (depending on the request). > I am just wondering whether this approach is something which must be done in > order not to return junk row data when the table has not be populated at all. If the table has not been populated, then it will not hold any information, junk or otherwise. Dave ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
