Re: Expanding the "data_context" structure to include other Table

This is a discussion on Re: Expanding the "data_context" structure to include other Table within the SNMP Coders forums, part of the Networking and Network Related category; --===============0507701267== Content-Type: multipart/alternative; boundary="0-109585082-1181243115=:59361" Content-Transfer-Encoding: 8bit --0-109585082-1181243115=:59361 ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-07-2007
Need Help
 
Posts: n/a
Default Re: Expanding the "data_context" structure to include other Table

--===============0507701267==
Content-Type: multipart/alternative; boundary="0-109585082-1181243115=:59361"
Content-Transfer-Encoding: 8bit

--0-109585082-1181243115=:59361
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Ugh ... I just noticed something I think I am doing wrong:

The Table2 data_context structure came configured with a "ProtectionStatus" field defined in it (since this is in my MIB). Knowing that Table2 is an extension of Table1 (and based on our past discussions on how to implement this type of table), I added the "ProtectionStatus" field defintion into Table1 data_context structure as well. Also, Table2 has been enhanced to use the same cache as defined by Table1.

Now, when I "snmpwalk" through Table2, then the "Table2_row_prep()" routine is called and is providing a row_context structure as input. In this routine, I found that I am updating the "ProtectionStatus" field defined in the Table2 data_context structure instead of updating the one defined in the Table1 data_context structure. I think this is a mistake. I believe I want to update the "ProtectionStatus" field in Table1 data_context instead .... is this correct?

If so, then how do I access the Table1 table so I can update the row data appropriately? I know the "rowreq_ctx->tbl_idx" value provided in the Table2_row_prep() routine tells me the row I am dealing with, but how do I get to Table1 to change the field data there?

The other thing is that the "snmpwalk" of Table2 did display all rows showing the "ProtectionStatus" field value. Since the "ProtectionStatus" field was only populated in the Table2 data_context structure (ie: I never updated it in the Table1 data_context structure), then this means the "snmpwalk" is really walking through Table2 data and not really getting the data from Table1 like it should, so something still must be wrong with my set up.

Actually, should the Table2 data_context structure include any fields at all? I would not think so, since all these fields have been added to Table1 data_context already.





---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
--0-109585082-1181243115=:59361
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Ugh ... I just noticed something I think I am doing wrong:&nbsp; <br><br>The <span style="font-weight: bold;">Table2 </span>data_context structure came configured with a "ProtectionStatus" field defined in it (since this is in my MIB).&nbsp;&nbsp; Knowing that Table2 is an extension of Table1 (and based on our past discussions on how to implement this type of table), I added the "ProtectionStatus" field defintion into <span style="font-weight: bold;">Table1 </span>data_context structure as well.&nbsp; Also, Table2 has been enhanced to use the same cache as defined by Table1.<br><br>Now, when I "snmpwalk" through Table2, then the "Table2_row_prep()" routine is called and is providing a row_context structure as input.&nbsp; In this routine, I found that I am updating the "ProtectionStatus" field defined in the <span style="font-weight: bold;">Table2 </span>data_context structure instead of updating the one defined in the <span style="font-weight: bold;">Table1
</span>data_context structure.&nbsp; I think this is a mistake.&nbsp; I believe I want to update the "ProtectionStatus" field in <span style="font-weight: bold;">Table1 </span>data_context instead .... is this correct?<br><br>If so, then how do I access the Table1 table so I can update the row data appropriately?&nbsp; I know the "rowreq_ctx-&gt;tbl_idx" value provided in the Table2_row_prep() routine tells me the row I am dealing with, but how do I get to Table1 to change the field data there?<br><br>The other thing is that the "snmpwalk" of Table2 did display all rows showing the "ProtectionStatus" field value.&nbsp; Since the "ProtectionStatus" field was only populated in the <span style="font-weight: bold;">Table2 </span>data_context structure (<span style="font-style: italic;">ie: I never updated it in the Table1 data_context structure</span>), then this means the "snmpwalk" is really walking through <span style="font-weight: bold;">Table2 </span>data and not really
getting the data from <span style="font-weight: bold;">Table1 </span>like it should, so something still must be wrong with my set up.<br><br>Actually, should the Table2 data_context structure include any fields at all?&nbsp; I would not think so, since all these fields have been added to Table1 data_context already.<br><br><br><br><p>
<hr size=1>Be a better Globetrotter. <a href="http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2N TQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN 0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545469">Get better travel answers </a>from someone who knows.<br>Yahoo! Answers - Check it out.


--0-109585082-1181243115=:59361--



--===============0507701267==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--===============0507701267==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============0507701267==--


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:31 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0