Basic SNMP questions from a NOOB

2007-05-15 Thread Need Help
I am completely new to the concept of SNMP and I do not have a strong Linux 
background either, however, I have been given the task to integrate SNMP into 
my work environment so we can gather information from our hardware boxes we 
manufacturer.

** If this is the wrong group/forum to post general noob questions, then please 
let me know where I should be posting my questions.


Here we go 

Someone here tells me we are running in a Linux (Fedora) environment if that 
matters.  I believe SNMP packages already exist on our Linux systems although 
no one currently uses it.  Also, please keep in mind I am not trying to do 
anything remarkable here to start off.  I simply want to get a real "basic" 
NetSNMP configured so I can test it out and play around with what it can do.


CONFIGURATION
---
Anyway, here is a summary of what I have done along with some questions:


1) I downloaded NetSNMP v5.4 and extracted the contents onto my Linux machine 
into the following directory:

   /export/home/myname/snmp/net-snmp-5.4/


2) I downloaded the OC-STB-HOST-MIB which I need to use and placed that into 
the following directory as:

   /export/home/myname/snmp/net-snmp-5.4/mibs/OC-STB-HOST-MIB.txt

   Note: MIB is on page 98 in 
"http://www.opencable.com/downloads/specs/OC-SP-HOST2.0-CFR-I13-070323.pdf";

3) I did not want to install NetSnmp in the default location of "/usr/local" 
since I wanted to play around with it first.  As a result I decided to try to 
install it into "/export/home/myname/snmp/usr/local" location instead.  I 
issued the following "configure" command (and kept all the defaults when 
prompted to enter selections):

  ./configure --prefix=/export/home/myname/snmp/usr/local 
--with-mibs=+OC-STB-HOST-MIB 
--with-mibdirs="/export/home/myname/snmp/net-snmp-5.4/mibs"


4) After running the configure command, I performed a "make" and then performed 
a "make install"

   Note: After the "make install" was performed, I noticed that the 
"/export/home/myname/snmp/usr/local" directory tree was populated with files 
now.

5) Finally, I issued the "snmpconf" command to configure a "snmpd.conf" file 
for my agent.  I really did not understand what values I should be using here, 
so I pretty much did not add anything.  now, I do not think this matters since 
I have general non-agent questions.


After performing the above steps, I went to the NetSNMP "tutorials" section and 
clicked on "snmptranslate".  I tried to issue some "snmptranslate" commands on 
my OC-STB-HOST-MIB file but nothing worked.  It could not find my 
OC-STB-HOST-MIB file.  

After trying many combinations of options for the "configure" command, I could 
only get the "snmptranslate" commands working for my MIB after I placed my 
"OC-STB-HOST-MIB.txt" file into the "/usr/local/share/snmp/mibs" directory and 
after issuing the following basic "configure" command only:

   "./configure"

Basically, if I included any sort of options for the "configure" command, then 
NetSnmp would produce the following error:

   "Cannot find module (+OC-STB-HOST-MIB): At line 1 in none)"


What I discovered is that NetSNMP expected my MIB file to be placed in the 
default "/usr/local/share/snmp/mibs" directory even though I explicitly stated 
in my "configure" command (see above) that the MIB directory should be 
"/export/home/myname/snmp/net-snmp-5.4/mibs".   

I also discovered that it did not like the "--with-mibs=+OC-STB-HOST-MIB" 
option for the "configure" command as well.  If I use this option, then it 
would produce the error (see above). 


** QUESTION 1):
Why does NetSNMP not find my MIB file if I place it in the 
"/export/home/myname/snmp/net-snmp-5.4/mibs" only?

** QUESTION 2):
Why does "configure" not like my "--with-mibs" and "--with-mibdirs" 
command-line options?



CODE GENERATION:
-
I now wanted to generate some code modules (.c/h) for the 
ocStbHostAVInterfaceTable listed in the OC-STB-HOST-MIB.
I picked this table for testing only since there is no need to generate code 
for all tables and scalars yet.  

I created the following directory to store the code files:

   
/export/home/myname/snmp/net-snmp-5.4/agent/mibgroup/ocStbHost-mib/ocStbhostAVInterfaceTable/


Before executing the "mib2c" command, I set the "MIBS" environment variable to 
"MIBS=+OC-STB-HOST-MIB" then ran the following command:

  mib2c ocStbHostAVInterfaceTable

The error below was produced once again:

  "Cannot find module (+OC-STB-HOST-MIB): At line 1 in none)"


** QUESTION 3)
Am I using the MIBS environment varible incorrectly?  What am I doing wrong?



Now after playing around a bit, I found that if I set the "MIBS" environment 
variable to "ALL" then the error went away and I was prompted for information.  
The choices I entered are listed below:

   2) Net-SNMP style code
   
   1) tables where the list of rows is external to the agent.
  This is suited to MIBs which monitor

HELP: libnetsnmpmibs.so.15: cannot open shared object file: No such file or directory

2007-05-16 Thread Need Help
I have been reading the NetSNMP tutorials which indicate how to change the 
code using the mibs-for-dummies (MFD) configuration file as it relates to
the ifTable MIB.  Now, I have generated MFD code (using mib2c) for the
"ocStbHostAVInterfaceTable" table which is defined in my MIB file, but I
used the ifTable tutorial as a guideline.

In the last section of the tutorial (link provided below), it indicates I
should perform a "make" command to generate an executable file, start the
agent and then be able to perform a snmpwalk command for testing of the
code I entered.


http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/ifTable/testing.html


The "make -f ocStbHostAVInterfaceTable_Makefile" command I entered seemed to 
generate the appropriate ".o" files along with a file called 
"ocStbHostAVInterfaceTable" which I guess is the executable file (not sure??)

I now try to execute the following command to start the agent:

  ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161


 but the following error is being produced:


./ocStbHostAVInterfaceTable: error while loading shared libraries: 
libnetsnmpmibs.so.15: cannot open shared object file: No such file or directory



I guess it is complaining that is can not find the correct library files it 
needs.
Now the "libnetsnmpmibs.so.15" file does exist in the following directories:

   /usr/local/lib/libnetsnmpmibs.so.15 
   /export/home/myname/snmp/usr/local/lib/libnetsnmpmibs.so.15


Does anyone know what I need to do to get NetSnmp to find the library file?  I 
would guess
I need to link in the library files at some time, but not sure what that means 
or how
to go about doing this.


Here is my configure line I am using:

./configure \
   --prefix=/export/home/myname/snmp/usr/local \
   --libdir=/export/home/myname/snmp/usr/local/lib \
   --srcdir=/export/home/myname/snmp/net-snmp-5.4 \
   --enable-embedded-perl \
   --enable-shared \
   --with-mib-modules="OC-STB-HOST-MIB"


   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: HELP: libnetsnmpmibs.so.15: cannot open shared object file: No such file or directory

2007-05-17 Thread Need Help

Currently my LD_LIBRARY_PATH is not set to anything, but I will try it out and 
let you know if I still have problems.

Just curious  could I simply set my "PATH" environment variable to include 
the 
"/export/home/myname/snmp/usr/local/lib" directory instead of introducing a new 
environment variable called LD_LIBRARY_PATH?I am just curious  I really 
do not mind having another environment variable . I am just trying to learn 
different aspects of the setup which can be performed..

Also, I thought the "libdir" option offered by the "configure" command is where 
I should state the library path . I guess I was wrong.What does 
"libdir" do for me then?

Thanks for the help 


Magnus Fromreide <[EMAIL PROTECTED]> wrote: On ons, 2007-05-16 at 13:07 -0700, 
Need Help wrote:
> I have been reading the NetSNMP tutorials which indicate how to change
> the 
> code using the mibs-for-dummies (MFD) configuration file as it relates
> to
> the ifTable MIB.  Now, I have generated MFD code (using mib2c) for the
> "ocStbHostAVInterfaceTable" table which is defined in my MIB file, but
> I
> used the ifTable tutorial as a guideline.
> 
> In the last section of the tutorial (link provided below), it
> indicates I
> should perform a "make" command to generate an executable file, start
> the
> agent and then be able to perform a snmpwalk command for testing of
> the
> code I entered.
> 
> 
> http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/ifTable/testing.html
> 
> 
> The "make -f ocStbHostAVInterfaceTable_Makefile" command I entered
> seemed to generate the appropriate ".o" files along with a file called
> "ocStbHostAVInterfaceTable" which I guess is the executable file (not
> sure??)
> 
> I now try to execute the following command to start the agent:
> 
>   ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M
> localhost:1161
> 
> 
>  but the following error is being produced:
> 
> 
> ./ocStbHostAVInterfaceTable: error while loading shared libraries:
> libnetsnmpmibs.so.15: cannot open shared object file: No such file or
> directory
> 
> 
> 
> I guess it is complaining that is can not find the correct library
> files it needs.
> Now the "libnetsnmpmibs.so.15" file does exist in the following
> directories:
> 
>/usr/local/lib/libnetsnmpmibs.so.15 
>/export/home/myname/snmp/usr/local/lib/libnetsnmpmibs.so.15
> 
> 
> Does anyone know what I need to do to get NetSnmp to find the library
> file?  I would guess
> I need to link in the library files at some time, but not sure what
> that means or how
> to go about doing this.

You must tell the dynamic linker where it can find the library.

One thing you could do is to set the environment variable
LD_LIBRARY_PATH to /export/home/myname/snmp/usr/local/lib
and then run your program again.ormally you would have installed it to
some place where it would be found by the normal dynamic linker but now
you are running in a sandbox.

/MF

> Here is my configure line I am using:
> 
> ./configure \
>--prefix=/export/home/myname/snmp/usr/local \
>--libdir=/export/home/myname/snmp/usr/local/lib \
>--srcdir=/export/home/myname/snmp/net-snmp-5.4 \
>--enable-embedded-perl \
>--enable-shared \
>--with-mib-modules="OC-STB-HOST-MIB"
> 
> 
> 
> 
> __
> Get the Yahoo! toolbar and be alerted to new email wherever you're
> surfing. 
> -
> 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/
> ___ Net-snmp-coders mailing list 
> Net-snmp-coders@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders



   
-
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Help me understand this code snipet please

2007-05-17 Thread Need Help
In order to learn how to use NetSNMP I was reading through the MFD ifTable 
tutorial.   Part of the code generated for the "ifTable" table (when using the 
"mib2c" command with the MFD configuration file) is the following:

if ((rowreq_ctx->data.ifDescr == NULL) ||
(rowreq_ctx->data.ifDescr_len < (ifDescr_len * sizeof(ifDescr[0] {
snmp_log(LOG_ERR, "not enough space for value\n");
return MFD_ERROR;
}
rowreq_ctx->data.ifDescr_len = ifDescr_len * sizeof(ifDescr[0]);
memcpy(rowreq_ctx->data.ifDescr, ifDescr, ifDescr_len * sizeof(ifDescr[0]));


When runnnig this code I get the "not enough space for value" error being 
produced.   The reason why it fails is due to the length check which is being 
performed (shown below):

  (rowreq_ctx->data.ifDescr_len < (ifDescr_len * sizeof(ifDescr[0])))

It seems to me that this will always fail since the 
"rowreq_ctx->data.ifDescr_len" variable does not get populated until "after" 
the "If" check is performed (see code snipet above).

Question:
What am I missing?  How can this check (which is generated for me automatically 
using mib2c) actually ever work?

PS:  Keep in mind that before the code supplied above, I am populating the 
"ifDescr_len" variable with a valid length value. 



   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


snmpd.conf: (Warning: no access control information configured)

2007-05-17 Thread Need Help

I generated code using mib2c for a table (ocStbHostAVInterfaceTable) within my 
MIB file.  I then performed a "make" on the code using the "make -f 
ocStbHostAVInterfaceTable_Makefile" command successfully.  Finally I tried to 
execute the ocStbHostAVInterfaceTable agent with the following:


 ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M localhost:1161

... and here is the output which is produced .


No log handling enabled - turning on stderr logging
registered debug token ocStbHostAVInterfaceTable, 1
ocStbHostAVInterfaceTable:init_ocStbHostAVInterfaceTable: Registering 
ocStbHostAVInterfaceTable as a mibs-for- dummies table.

Warning: no access control information configured.
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the 
ocStbHostAVInterfaceTable.conf file for this agent.


 

Here is my configure command:

./configure \
   --prefix=/export/home/rosent1/snmp/usr/local \
   --srcdir=/export/home/rosent1/snmp/net-snmp-5.4 \
   --enable-embedded-perl \
   --enable-shared \
   --with-mib-modules="OC-STB-HOST-MIB"




Here is my "/export/home/myname/snmp/usr/local/share/snmp/snmpd.conf" file
contents which I just setup for SNMPV1/2 for read-only access (nothing fancy 
... just trying to test basic stuff):


  ##
  #
  # snmpd.conf
  #
  #   - created by the snmpconf configuration program
  #   
 


  #
  # SECTION: Access Control Setup
  #
  #   This section defines who is allowed to talk to your running
  #   snmp agent.
 
  # rocommunity: a SNMPv1/SNMPv2c read-only access community name
  #   arguments:  community [default|hostname|network/bits] [oid]

  rocommunity  mycommunity_ro  




QUESTION:

The error states it does not like my agent configuration file since it does not 
have any "access control information configured".  I executed the "snmpconf -i 
-g basic_setup" command to generate this snmpd.conf file for me, so I am not 
sure what needs to be added to allow me to execute the 
ocStbHostAVInterfaceTable agent.

I read somewhere that if the "snmpd.conf" file does not have any access 
controls then it will not process any requests.  I guess this is what is 
happening to here?   
Anyway, what must I add to get thsi to work?



   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-17 Thread Need Help

I guess I am confused about why it is complaining about a 
"ocStbHostAVInterfaceTable.conf" configuration file as well.   I thought I was 
only dealing with a "snmpd.conf" configuration file only. 

Perhaps I need to create a "ocStbHostAVInterfaceTable.conf" file somewhere ... 
somehow?



Need Help <[EMAIL PROTECTED]> wrote: 
I generated code using mib2c for a table (ocStbHostAVInterfaceTable) within my 
MIB file.  I then performed a "make" on the code using the "make -f 
ocStbHostAVInterfaceTable_Makefile" command successfully.  Finally I tried to 
execute the ocStbHostAVInterfaceTable agent with the following:


 ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M localhost:1161

... and here is the output which is produced .


No log handling enabled - turning on stderr logging
registered debug token ocStbHostAVInterfaceTable, 1
ocStbHostAVInterfaceTable:init_ocStbHostAVInterfaceTable: Registering 
ocStbHostAVInterfaceTable as a mibs-for- dummies table.

Warning: no access control information configured.
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the 
ocStbHostAVInterfaceTable.conf file for this  agent.


 

Here is my configure command:

./configure \
   --prefix=/export/home/rosent1/snmp/usr/local \
   --srcdir=/export/home/rosent1/snmp/net-snmp-5.4 \
   --enable-embedded-perl \
   --enable-shared \
   --with-mib-modules="OC-STB-HOST-MIB"




Here is my "/export/home/myname/snmp/usr/local/share/snmp/snmpd.conf" file
contents which I just setup for SNMPV1/2 for read-only access (nothing fancy 
... just trying to test basic stuff):


  ##
  #
  # snmpd.conf
  #
  #   - created by the snmpconf configuration program
  #   
 


  #
  # SECTION: Access Control Setup
  #
  #   This section defines who is allowed to  talk to your running
  #   snmp agent.
 
  # rocommunity: a SNMPv1/SNMPv2c read-only access community name
  #   arguments:  community [default|hostname|network/bits] [oid]

  rocommunity  mycommunity_ro  




QUESTION:

The error states it does not like my agent configuration file since it does not 
have any "access control information configured".  I executed the "snmpconf -i 
-g basic_setup" command to generate this snmpd.conf file for me, so I am not 
sure what needs to be added to allow me to execute the 
ocStbHostAVInterfaceTable agent.

I read somewhere that if the "snmpd.conf" file does not have any access 
controls then it will not process any requests.  I guess this is what is 
happening to here?   
Anyway, what must I add to get thsi to work?




-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.  
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


   
-
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-17 Thread Need Help
I am trying to learn this stuff from scratch by reading through the tutorial 
provided for the "ifTable" MIB table.No where does it mention I need to 
create a specific "ifTable.conf" file in order to run this.

Ok, I will give it a go .

I am assuming I place it in the same place as the "snmpd.conf" file is located?



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 17 May 2007 12:34:20 -0700 
(PDT) Need wrote:
NH> I guess I am confused about why it is complaining about a 
"ocStbHostAVInterfaceTable.conf" configuration file as well.   I thought I was 
only dealing with a "snmpd.conf" configuration file only. 

But you aren't running snmpd... you are running a specialized application now..

NH> Perhaps I need to create a "ocStbHostAVInterfaceTable.conf" file somewhere 
... somehow?

Exactly. And it will have the same syntax as snmpd.conf. You can copy or link
your snmpd.conf file...


   
-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-17 Thread Need Help
Also, when I change a ".conf" file must I rnu "make install" again?   

I can not remember if I needed to rerun something once the snmpd.conf file (or 
any .conf file) changes so perhaps you can let me know?

BTW: Thanks for the help 

Need Help <[EMAIL PROTECTED]> wrote: I am trying to learn this stuff from 
scratch by reading through the tutorial provided for the "ifTable" MIB table.   
 No where does it mention I need to create a specific "ifTable.conf" file in 
order to run this.

Ok, I will give it a go .

I am assuming I place it in the same place as the "snmpd.conf" file is located?



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 17 May 2007 12:34:20 -0700 
(PDT) Need wrote:
NH> I guess I am confused about why it is complaining about a 
"ocStbHostAVInterfaceTable.conf" configuration file as well.   I thought I was 
only dealing with a "snmpd.conf" configuration file only. 

But you aren't running snmpd... you are running a specialized application now..

NH> Perhaps I need to create a "ocStbHostAVInterfaceTable.conf" file somewhere 
...  somehow?

Exactly. And it will have the same syntax as snmpd.conf. You can copy or link
your snmpd.conf file...



-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-17 Thread Need Help

Ok, I got the ocStbHostAVInterfaceTable agent running now.  The last step 
(based on the tutorial) is to run the following command to walk through each 
row in the table:

snmpwalk -v1 localhost:1161 ocStbHostAVInterfaceTable

.however, it does not like my syntax  for this command once entered.

The "snmpwalk" help screen is displayed which shows me all the options.   
Anyway. I still can not figure out why the syntax is wrong.   Now, I believe 
the tutorial is based on 5.0 (or 5.2) and I am using NetSnmp5.4 now, so perhaps 
something has changed?

Do you know what is wrong with my snmpwalk request?



For summary, here are the commands I performed:

1) Create the following file:

/export/home/myname/snmp/usr/local/share/snmp/ocStbHostAVInterfaceTable.conf

2) make -f ocStbHostAVInterfaceTable_Makefile

3) ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161

4) snmpwalk -v1 localhost:1161 ocStbHostAVInterfaceTable  (THIS FAILS)





Need Help <[EMAIL PROTECTED]> wrote: Also, when I change a ".conf" file must I 
rnu "make install" again?   

I can not remember if I needed to rerun something once the snmpd.conf file (or 
any .conf file) changes so perhaps you can let me know?

BTW: Thanks for the help 

Need Help <[EMAIL PROTECTED]> wrote: I am trying to learn this stuff from 
scratch by reading through the tutorial provided for the "ifTable" MIB table.   
 No where does it mention I need to create a specific "ifTable.conf" file in 
order to run this.

Ok, I will give it a go .

I am assuming I place it in the same place as the "snmpd.conf" file is located?



Robert Story <[EMAIL PROTECTED]> wrote: On  Thu, 17 May 2007 12:34:20 -0700 
(PDT) Need wrote:
NH> I guess I am confused about why it is complaining about a 
"ocStbHostAVInterfaceTable.conf" configuration file as well.   I thought I was 
only dealing with a "snmpd.conf" configuration file only. 

But you aren't running snmpd... you are running a specialized application now..

NH> Perhaps I need to create a "ocStbHostAVInterfaceTable.conf" file somewhere 
...  somehow?

Exactly. And it will have the same syntax as snmpd.conf. You can copy or link
your snmpd.conf file...



-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders



-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.  
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


 
-
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Help me understand this code snipet please

2007-05-17 Thread Need Help
Yes, this code is in my container_load procedure and I do understand that I 
need to define those fields myself.   Now, the same problem occurs in the 
ocStbHostAVInterfaceTable container_load procedure since it mirrors the ifTable 
implementation in the tutorial.

Now, I attached the "data_access.c" module which has the container_load 
procedure in it for you to see.  I included a description of the problem for 
you to read at the location in which in occurs.   Search for the text "PROBLEM" 
in the code and you will find it.It is very easy to find.   

Now, keep in mind I am simply trying to learn SNMP, so the code you are about 
to see is simply a hardcoded values used to populate this MIB table.  My goal 
is to finally be able to perform a "snmpwalk" through this table and smiply see 
my hardcoded values.

Anyway, let me know what you think. it is not that hard to figure out at 
all.





Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 17 May 2007 08:26:18 -0700 
(PDT) Need wrote:
NH> In order to learn how to use NetSNMP I was reading through the MFD ifTable 
tutorial.   Part of the code generated for the "ifTable" table (when using the 
"mib2c" command with the MFD configuration file) is the following:
NH> 
NH> if ((rowreq_ctx->data.ifDescr == NULL) ||
NH> (rowreq_ctx->data.ifDescr_len < (ifDescr_len * sizeof(ifDescr[0] {
NH> snmp_log(LOG_ERR, "not enough space for value\n");
NH> return MFD_ERROR;
NH> }
NH> rowreq_ctx->data.ifDescr_len = ifDescr_len * sizeof(ifDescr[0]);
NH> memcpy(rowreq_ctx->data.ifDescr, ifDescr, ifDescr_len * sizeof(ifDescr[0]));

Unfortunately, because of the multitude of options available with the mfd
config, simply presenting this code snippet doesn't help. I either need the
source files, or the mfd configuration files ('default' directory). Without
those, I'm going to guess that this code is in your 'container_load' function.

NH> When runnnig this code I get the "not enough space for value" error being 
produced.   The reason why it fails is due to the length check which is being 
performed (shown below):
NH> 
NH>   (rowreq_ctx->data.ifDescr_len < (ifDescr_len * sizeof(ifDescr[0])))
NH> 
NH> It seems to me that this will always fail since the 
"rowreq_ctx->data.ifDescr_len" variable does not get populated until "after" 
the "If" check is performed (see code snipet above).
NH> 
NH> Question:
NH> What am I missing?  How can this check (which is generated for me 
automatically using mib2c) actually ever work?

Remember, this code is a template, not a finished product. Note that the
initial code generated for container_load doesn't even define the variables
used in this snipped (ifDescr, ifDescr_len).

Anyways, in other places where this code is used, it is prefixed with

  rowreq_ctx->data.ifDescr_len = sizeof(rowreq_ctx->data.ifDescr);


   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 

ocStbHostAVInterfaceTable_data_access.c
Description: 1367737609-ocStbHostAVInterfaceTable_data_access.c
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Help me understand this code snipet please

2007-05-18 Thread Need Help
Thing is, the code I gave you was only my "test" code.   My real implementation 
(once I am convinced I know what I am doing) is going to require me to populate 
the row context data (all the rows in the table) in the "row_prep" procedure 
and "not" in the "container_load" procedure anymore.  This is because the data 
can change so I can not simply load it one time when the "container_load" 
procedure is called at the start.  

**  I guess I am assuming that the "container_load" procedure only gets called 
one time at the start, this is why the "row_prep" is provided . so values 
can be  set into the table before the SNMP Get requests are processed.  Is this 
correct?

Anyway, I guess I was more interested in knowing why "mib2c" generates that 
type of code in which a variable (ie: 
"rowreq_ctx->data.ocStbHostAVInterfaceType_len") is used in a defensive check 
"before" the variable is actually set with the valid value.   Just trying to 
make sense of the automatically generated code and I am trying to figure out 
why this would ever be used like this since this automatically generated code 
does not make sense to me as is ...



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 17 May 2007 13:44:41 -0700 
(PDT) Need wrote:
NH> Now, I attached the "data_access.c" module which has the container_load 
procedure in it for you to see.  I included a description of the problem for 
you to read at the location in which in occurs.   Search for the text "PROBLEM" 
in the code and you will find it.It is very easy to find.   

The solution you mention in the comments, removing the check, is fine in this
case because you are initializing a new object with its value.


 
-
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Help me understand this code snipet please

2007-05-18 Thread Need Help
Then what is the purpose of the "row_prep" procedure ?  Basically, when would i 
place code in the "row_prep" procedure?


Dave Shield <[EMAIL PROTECTED]> wrote: On 18/05/07, Need Help  wrote:
> This is because the data can change so I can not simply load it
> one time when the "container_load" procedure is called at the start.

> **  I guess I am assuming that the "container_load" procedure only gets
> called one time at the start Is this correct?

No.
The idea here is that the agent will hold a local cached copy of
the table data, which it can use to handle incoming requests
(rather than reloading the data afresh every time).
  This cache has a "timeout" associated with it.  If a request
arrives and the cache is too old (i.e. the age is greater than
the timeout), then the 'container_load' routine will be called
again to re-read an up-to-date version of the table data.

That's certainly how the cache helper works in general.
I'd be surprised if the MfD framework did something different.


Dave


   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-18 Thread Need Help
I am performing the following three steps below (as recommended by the NetSnmp 
tutorial) to be able to test whether the changes I made to the 
"xxx_data_access.c" table file can be accessed via an "snmpwalk" request:

1) make -f ocStbHostAVInterfaceTable_Makefile
2) ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161
3) snmpwalk -v1 -c public localhost:1161 ocStbHostAVInterfaceTable

When I execute the "snmpwalk" command, it no longer has a problem with the 
syntax used (as was my original problem), but instead it now produces the 
following response after waiting two second or so:

"Timeout: No Response from localhost:1161"


Any idea why this timeout might be occurring?  I am using "1161" because that 
is what was in the tutorial.   Am I making a dumb mistake by simply using this 
"1161" value or should it work for me on my system?  

PS:   I did verified that my specialized agent is running (see below)

[EMAIL PROTECTED] ps -ef | grep localhost
root 26895  7369  0 10:34 pts/13   00:00:00 ./ocStbHostAVInterfaceTable -f 
-L -DocStbHostAVInterfaceTable -M localhost:1161
root  9186  7369  0 11:08 pts/13   00:00:00 grep localhost





Dave Shield <[EMAIL PROTECTED]> wrote: On 17/05/07, Need Help  wrote:
> 4) snmpwalk -v1 localhost:1161 ocStbHostAVInterfaceTable  (THIS FAILS)


Try specifying a community string.
Something like

snmpwalk -v1 -c public localhost:1161  ocStbHostAVInterfaceTable

Dave


   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-18 Thread Need Help
I am performing the following three steps below (as recommended by the NetSnmp 
tutorial) to be able to test whether the changes I made to the 
"xxx_data_access.c" table file can be accessed via an "snmpwalk" request:

1) make -f ocStbHostAVInterfaceTable_Makefile
2) ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161
3) snmpwalk -v1 -c public localhost:1161 ocStbHostAVInterfaceTable

When I execute the "snmpwalk" command, it no longer has a problem with the 
syntax used (as was my original problem), but instead it now produces the 
following response after waiting two second or so:

"Timeout: No Response from localhost:1161"


Any idea why this timeout might be occurring?  I am using "1161" because that 
is what was in the tutorial.   Am I making a dumb mistake by simply using this 
"1161" value or should it work for me on my system?  

PS:   I did verified that my specialized agent is running (see below)

[EMAIL PROTECTED] ps -ef | grep localhost
root 26895  7369  0 10:34 pts/13   00:00:00 ./ocStbHostAVInterfaceTable -f 
-L -DocStbHostAVInterfaceTable -M localhost:1161
root  9186  7369  0 11:08 pts/13   00:00:00 grep localhost





Dave Shield <[EMAIL PROTECTED]> wrote: On 17/05/07, Need Help  wrote:
> 4) snmpwalk -v1 localhost:1161 ocStbHostAVInterfaceTable  (THIS FAILS)


Try specifying a community string.
Something like

snmpwalk -v1 -c public localhost:1161  ocStbHostAVInterfaceTable

Dave


   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-18 Thread Need Help
ent1/snmp/usr/local/etc/snmp:/export/home/rosent1/snmp/usr/local/share/snmp:/export/home/rosent1/snmp/usr/local/lib/snmp:/root/.snmp
 (persistent path:/var/net-snmp)
read_config: 
/export/home/rosent1/snmp/usr/local/etc/snmp/ocStbHostAVInterfaceTable.conf: No 
such file or directory
read_config: 
/export/home/rosent1/snmp/usr/local/etc/snmp/ocStbHostAVInterfaceTable.local.conf:
 No such file or directory
read_config: Reading configuration 
/export/home/rosent1/snmp/usr/local/share/snmp/ocStbHostAVInterfaceTable.conf
read_config: 
/export/home/rosent1/snmp/usr/local/share/snmp/ocStbHostAVInterfaceTable.conf:31
 examining: rocommunity  mycommunity_ro
read_config: Found a parser.  Calling it: rocommunity / mycommunity_ro
read_config: 
/export/home/rosent1/snmp/usr/local/share/snmp/ocStbHostAVInterfaceTable.local.conf:
 No such file or directory
read_config: 
/export/home/rosent1/snmp/usr/local/lib/snmp/ocStbHostAVInterfaceTable.conf: No 
such file or directory
read_config: 
/export/home/rosent1/snmp/usr/local/lib/snmp/ocStbHostAVInterfaceTable.local.conf:
 No such file or directory
read_config: /root/.snmp/ocStbHostAVInterfaceTable.conf: No such file or 
directory
read_config: /root/.snmp/ocStbHostAVInterfaceTable.local.conf: No such file or 
directory
read_config:  config path used for ocStbHostAVInterfaceTable:/var/net-snmp 
(persistent path:/var/net-snmp)
read_config: /var/net-snmp/ocStbHostAVInterfaceTable.conf: No such file or 
directory
read_config: /var/net-snmp/ocStbHostAVInterfaceTable.local.conf: No such file 
or directory
read_config:  config path used for 
agentx:/export/home/rosent1/snmp/usr/local/etc/snmp:/export/home/rosent1/snmp/usr/local/share/snmp:/export/home/rosent1/snmp/usr/local/lib/snmp:/root/.snmp
 (persistent path:/var/net-snmp)
read_config: /export/home/rosent1/snmp/usr/local/etc/snmp/agentx.conf: No such 
file or directory
read_config: /export/home/rosent1/snmp/usr/local/etc/snmp/agentx.local.conf: No 
such file or directory
read_config: /export/home/rosent1/snmp/usr/local/share/snmp/agentx.conf: No 
such file or directory
read_config: /export/home/rosent1/snmp/usr/local/share/snmp/agentx.local.conf: 
No such file or directory
read_config: /export/home/rosent1/snmp/usr/local/lib/snmp/agentx.conf: No such 
file or directory
read_config: /export/home/rosent1/snmp/usr/local/lib/snmp/agentx.local.conf: No 
such file or directory
read_config: /root/.snmp/agentx.conf: No such file or directory
read_config: /root/.snmp/agentx.local.conf: No such file or directory
read_config:  config path used for agentx:/var/net-snmp (persistent 
path:/var/net-snmp)
read_config: /var/net-snmp/agentx.conf: No such file or directory
read_config: /var/net-snmp/agentx.local.conf: No such file or directory
read_config:  config path used for 
snmp:/export/home/rosent1/snmp/usr/local/etc/snmp:/export/home/rosent1/snmp/usr/local/share/snmp:/export/home/rosent1/snmp/usr/local/lib/snmp:/root/.snmp
 (persistent path:/var/net-snmp)
read_config: /export/home/rosent1/snmp/usr/local/etc/snmp/snmp.conf: No such 
file or directory
read_config: /export/home/rosent1/snmp/usr/local/etc/snmp/snmp.local.conf: No 
such file or directory
read_config: /export/home/rosent1/snmp/usr/local/share/snmp/snmp.conf: No such 
file or directory
read_config: /export/home/rosent1/snmp/usr/local/share/snmp/snmp.local.conf: No 
such file or directory
read_config: /export/home/rosent1/snmp/usr/local/lib/snmp/snmp.conf: No such 
file or directory
read_config: /export/home/rosent1/snmp/usr/local/lib/snmp/snmp.local.conf: No 
such file or directory
read_config: /root/.snmp/snmp.conf: No such file or directory
read_config: /root/.snmp/snmp.local.conf: No such file or directory
read_config:  config path used for snmp:/var/net-snmp (persistent 
path:/var/net-snmp)
read_config: /var/net-snmp/snmp.conf: No such file or directory
read_config: /var/net-snmp/snmp.local.conf: No such file or directory








Dave Shield <[EMAIL PROTECTED]> wrote: On 18/05/07, Need Help  wrote:
> When I execute the "snmpwalk" command, it no longer has a problem with the
> syntax used (as was my original problem), but instead it now produces the
> following response after waiting two second or so:
>
> "Timeout: No Response from localhost:1161"
>
>
> Any idea why this timeout might be occurring?

What is in the config file?
If you're not sure which config file(s) are being read in,
try adding "-Dread_config" when starting the agent.


> I am using "1161" because
> that is what was in the tutorial.   Am I making a dumb mistake by simply
> using this "1161" value or should it work for me on my system?

That ought to work - as long as whatever you specify when starting
the agent matches the destination in the snmpwalk command.

Dave


 
-
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Be

Is "make install" required after updating "snmpd.conf" or "snmp.conf" files?

2007-05-18 Thread Need Help
If I update the "snmpd.conf" file (or "snmp.conf" file) then must I perform a 
"make install" (or perhaps any other command) before the changes take affect?

   
-
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-18 Thread Need Help
I have no idea what the -M option does  I was just following the tutorial.  
 However, I tried your recommendation and got the following warning produced:

  Warning: Failed to connect to the agentx master agent ([NIL])

It seems it is trying to do something with an AgentX agent now.  I do not think 
I want to involve an AgentX for my testing of the snmpwalk command.



Magnus Fromreide <[EMAIL PROTECTED]> wrote: On fre, 2007-05-18 at 10:16 -0700, 
Need Help wrote:
> The configuration file I created is located at the following location:
> 
> /export/home/myname/snmp/usr/local/share/snmp/ocStbHostAVInterfaceTable.conf
> 
>  and has only one line in it as follows:
> 
> rocommunity  mycommunity_ro
> 
> 
> I started the agent using the following:
> 
> ./ocStbHostAVInterfaceTable -f -L -Dread_config -M localhost:1161 &

Doesn't the -M argument tell your agent to use localhost and 1161 as
directories to read mib files from?

Does it work better if you try with

./ocStbHostAVInterfaceTable -f -Lf my.logfile -Dread_config localhost:1161 

?

/MF




   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-18 Thread Need Help
Yes, of course . 

Trying to learn NetSnmp, I was reading through the following tutorial:

http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/index.html

This tutorial relates to the ifTable MIB and explains how to update the code 
accordingly with the goal of being able to perform an "snmpwalk" request at the 
end to verify all rows contain the data which has been inserted.  There are 
about 5 or 6 sections to this tutorial,  At the end of each section is a link 
to the next section.   The last section, entitled "MFD: ifTable testing" 
explains how to do the following:

1) make the code 
2) start the specialized agent for testing purposes
3) issue a snmpwalk command to verify populated table values.

Anyway, I took this exact approach when writing my own code for my own 
"ocStbHostAVInterfaceTable" MIB table for the sole reason of trying to see if I 
could populate the table and perform a "snmpwalk" request.

I have been reading nonstop for about 2 weeks about anything relating to 
NetSnmp.  It is very hard to understand at first, but I believe I can now talk 
about NetSnmp enough to ask more specific questions when needed.  

I would love to perform a "snmpwalk", but can not since the snmpwalk command I 
entered always times out.

Here are the commands I am entering as it relates to three tutorial steps 
stated above:

1) make -f ocStbHostAVInterfaceTable_Makefile

2) ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161

3)  snmpwalk -v1 -c public localhost:1161 ocStbHostAVInterfaceTable

Note: Without the "-c public" option the snmpwalk command was not allowed to be 
entered.  It resulted in the general "usage" error being displayed.  Adding the 
"-c public" option results in the command being accepted, it just times out 
now, with the following error:

   Timeout: No Response from localhost:1161

Thanks for you time in helping me out.



Dave Shield <[EMAIL PROTECTED]> wrote: On 18/05/07, Need Help  wrote:
> I have no idea what the -M option does  I was just following the
> tutorial.

You keep talking about "the tutorial".
It might be useful if you could be a bit more explicit about exactly
which tutorial you are following.  There are several different approaches
documented in the project web pages - which specific page are you
working with?

Dave


 
-
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-18 Thread Need Help
This is the command I am executing to start my specialize agent (based on what 
the tutorial recommends):

./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M localhost:1161

The command line options for this agent are listed below.   It seems the "-M" 
option is to indicate to use a standard agent instead of an AgentX agent ... 
which is what I want.


usage: ocStbHostAVInterfaceTable [-D] [-f] [-L] [-M] [-H] [LISTENING 
ADDRESSES]
-f  Do not fork() from the calling shell.
-DTOKEN[,TOKEN,...]
Turn on debugging output for the given TOKEN(s).
Without any tokens specified, it defaults to printing
all the tokens (which is equivalent to the keyword 'ALL').
You might want to try ALL for extremely verbose output.
Note: You can't put a space between the -D and the TOKENs.
-H  Display a list of configuration file directives
understood by the agent and then exit.
-M  Run as a normal SNMP Agent instead of an AgentX sub-agent.
-x ADDRESS  connect to master agent at ADDRESS (default 
/var/agentx/master).
-L  Do not open a log file; print all messages to stderr.




Need Help <[EMAIL PROTECTED]> wrote: I have no idea what the -M option does 
 I was just following the tutorial.   However, I tried your recommendation 
and got the following warning produced:

  Warning: Failed to connect to the agentx master agent ([NIL])

It seems it is trying to do something with an AgentX agent now.  I do not think 
I want to involve an AgentX for my testing of the snmpwalk command.



Magnus Fromreide <[EMAIL PROTECTED]> wrote: On fre, 2007-05-18 at 10:16 -0700, 
Need Help wrote:
> The configuration file I created is located at the following location:
> 
> /export/home/myname/snmp/usr/local/share/snmp/ocStbHostAVInterfaceTable.conf
> 
>  and has only one line in it as follows:
> 
> rocommunity  mycommunity_ro
>  
> 
> I started the agent using the following:
> 
> ./ocStbHostAVInterfaceTable -f -L -Dread_config -M localhost:1161 &

Doesn't the -M argument tell your agent to use localhost and 1161 as
directories to read mib files from?

Does it work better if you try with

./ocStbHostAVInterfaceTable -f -Lf my.logfile -Dread_config localhost:1161 

?

/MF





-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


   
-
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-21 Thread Need Help
I am not married to the idea of using the MFD approach.   It was the one 
tutorial which tried to give a detailed explanation of how to insert the code 
required to make it happen.   

I have no idea what you mean by recommending I use a "standard Net-SNMP agent". 
  What does this mean?  Are there any other tutorials which will explain the 
other approaches which you refer to?  If so, please provide some useful links.  
 

Thanks!


Dave Shield <[EMAIL PROTECTED]> wrote: On 18/05/07, Need Help  wrote:
> Trying to learn NetSnmp, I was reading through the following tutorial:
>
> http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/index.html
>
> This tutorial relates to the ifTable MIB

Actually, this tutorial really relates to the MfD framework, using the
ifTable as an example.   This framework is only one of a number of
possible mechanisms for implementing MIB modules.
   The style of code is very different to most of the other approaches
(which I'm personally both more familiar and confortable with), so I
think I'll leave Robert to assist you with this one.

The one thing that I do wonder about is whether this tutorial includes
the VACM modules which are normally responsible for access control.
With a standard agent setup, if the VACM modules aren't present,
then the agent wouldn't respond to any requests.

I'm not knowledgeable enough about the MfD way of working to
comment as to whether this is still the case here.  But that would
be my immediate suspicion.   I'll now hand over to Robert to provide
facts rather than speculation



Alternatively, you might wish to consider using the standard Net-SNMP
agent, rather than this stripped-down MIB-specific setup.

Dave


   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: snmpd.conf: (Warning: no access control information configured)

2007-05-21 Thread Need Help
Do you consider a "standard NetSNMP agent" to be the agent which is started 
when issuing the "snmpd" command and that you consider me to be using a 
"MIB-specific agent" because I am starting an agent by issuing the specific 
"ocStbHostAVInterfaceTable" command?  If so, then I think me issuing the  
"ocStbHostAVInterfaceTable" command was simply a "tutorial-specific" 
recommendation to allow me to test that a snmpwalk request actually works on 
the data I populated.  I always thought I would eventually be starting only one 
main "snmpd" agent and simply linking all the MIB I required into this agent.   

I am trying to figure out whether I am learning/implementnig NetSNMP in the 
correct manner or not or whether I must restart from scratch.



Need Help <[EMAIL PROTECTED]> wrote: I am not married to the idea of using the 
MFD approach.   It was the one tutorial which tried to give a detailed 
explanation of how to insert the code required to make it happen.   

I have no idea what you mean by recommending I use a "standard Net-SNMP agent". 
  What does this mean?  Are there any other tutorials which will explain the 
other approaches which you refer to?  If so, please provide some useful links.  
 

Thanks!


Dave Shield <[EMAIL PROTECTED]> wrote: On 18/05/07, Need Help  wrote:
> Trying to learn NetSnmp, I was reading through the following tutorial:
>
> http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/index.html
>
> This tutorial relates to the ifTable MIB

Actually, this  tutorial really relates to the MfD framework, using the
ifTable as an example.   This framework is only one of a number of
possible mechanisms for implementing MIB modules.
   The style of code is very different to most of the other approaches
(which I'm personally both more familiar and confortable with), so I
think I'll leave Robert to assist you with this one.

The one thing that I do wonder about is whether this tutorial includes
the VACM modules which are normally responsible for access control.
With a standard agent setup, if the VACM modules aren't present,
then the agent wouldn't respond to any requests.

I'm not knowledgeable enough about the MfD way of working to
comment as to whether this is still the case here.  But that would
be my immediate suspicion.   I'll now hand over to Robert to provide
facts rather than speculation



Alternatively, you might wish to consider using the standard  Net-SNMP
agent, rather than this stripped-down MIB-specific setup.

Dave



-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! 
Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


   Shape Yahoo! in your own image.  Join our Network Research Panel 
today!http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
 hot CTA = Join our Network Research Panel-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


YEAH ! (Re: snmpd.conf: (Warning: no access control information configured))

2007-05-21 Thread Need Help

Ok, I am a bit excited since I figured out why the agent was timing out on me.

Instead of using the "-c public" option as below:

snmpwalk -v1 -c public localhost:1161 ocStbHostAVInterfaceTable


 I needed to use the correct community name I entered when configuring the 
agent:

  snmpwalk -v1 -c mycommunity_ro localhost:1161 ocStbHostAVInterfaceTable


I am very excited to have reached this point.



Need Help <[EMAIL PROTECTED]> wrote: Yes, of course . 

Trying to learn NetSnmp, I was reading through the following tutorial:

http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/index.html

This tutorial relates to the ifTable MIB and explains how to update the code 
accordingly with the goal of being able to perform an "snmpwalk" request at the 
end to verify all rows contain the data which has been inserted.  There are 
about 5 or 6 sections to this tutorial,  At the end of each section is a link 
to the next section.   The last section, entitled "MFD: ifTable testing" 
explains how to do the following:

1) make the code 
2) start the specialized agent for testing purposes
3) issue a snmpwalk command to verify populated table values.

Anyway, I took this exact approach when writing my own code for my own 
"ocStbHostAVInterfaceTable" MIB table for the sole reason of trying to see if I 
could populate the table and perform a "snmpwalk"  request.

I have been reading nonstop for about 2 weeks about anything relating to 
NetSnmp.  It is very hard to understand at first, but I believe I can now talk 
about NetSnmp enough to ask more specific questions when needed.  

I would love to perform a "snmpwalk", but can not since the snmpwalk command I 
entered always times out.

Here are the commands I am entering as it relates to three tutorial steps 
stated above:

1) make -f ocStbHostAVInterfaceTable_Makefile

2) ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161

3)  snmpwalk -v1 -c public localhost:1161 ocStbHostAVInterfaceTable

Note: Without the "-c public" option the snmpwalk command was not allowed to be 
entered.  It resulted in the general "usage" error being displayed.  Adding the 
"-c public" option results in the command being accepted, it just times out 
now, with the  following error:

   Timeout: No Response from localhost:1161

Thanks for you time in helping me out.



Dave Shield <[EMAIL PROTECTED]> wrote: On 18/05/07, Need Help  wrote:
> I have no idea what the -M option does  I was just following the
> tutorial.

You keep talking about "the tutorial".
It might be useful if you could be a bit more explicit about exactly
which tutorial you are following.  There are several different approaches
documented in the project web pages - which specific page are you
working with?

Dave

   

-
  Get your own web address.
 Have a HUGE year through Yahoo! Small 
Business.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


   Shape Yahoo! in your own image.  Join our Network Research Panel 
today!http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
 hot CTA = Join our Network Research Panel-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Can I use "snmpd" for code generated with "mib2c.mfd.conf"

2007-05-22 Thread Need Help
I am very new to SNMP.  I used "mib2c.mfd.conf" to generate the code for a table
(ocStbHostAVInterfaceTable) which is defined within my MIB text file.  I 
followed
the NetSNMP "MFD:ifTable" tutorial (link below) to learn how to update the MFD 
code for my specific MIB table.

http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/ifTable/index.html

 
I was able to complete the tutorial by successfully executing a "snmpwalk" 
through the rows of my table.  It seemed this tutorial had me create a 
specialized agent (called ocStbHostAVInterfaceTable) which I could call 
directly (for testing purposes) to prove whether my table updates worked 
properly or not.  Basically, I never had to start the "snmpd" agent at all 
during this tutorial.

I would now like to generate code for the remaining tables/scalars located 
within
my MIB text file and be able to run only "one" main agent to perform GET 
requests on the data within all these tables.  I am assuming running the main 
NetSnmp agent should occur by executing the "snmpd" command only instead of 
having to create individual specialized agents for each of the tables/scalars 
defined in my MIB file (like the tutorial had me do).


Questions:

1) Is it possible to have "one" agent running which can control all the tables 
definedin my MIB text file whose NetSNMP code was generated using "mib2c" 
with the "mib2c.mfd.conf" configuration file?  If so, how do I execute the 
agent and get it to understand all of my defined MIBs?  Do I add stuff to the 
"snmpd.conf" file perhaps?

   To test my current "ocStbHostAVInterfaceTable" I performed the following 
steps 
   (as outlined in the tutorial stated above):

   a) make -f ocStbHostAVInterfaceTable_Makefile

   b) ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161 &

   c) snmpwalk -v1 -c mycommunity_ro localhost:1161 ocStbHostAVInterfaceTable

   When I define other tables, I am assuming I would still need to execute the 
"make"  command (a) for all tables I generate, but I am not sure I really want 
to execut (b) or (c) steps since I want to use "one" agent only.   

2) What is the difference between a master agent and AgentX subagent and why do 
you need AgentX subagents?  Maybe provide an example as why subAgents are used?

3) Is the "master agent" considered to be the agent which is started via the 
"snmpd" command? 

4) I used the "mib2c.mfd.conf" configuration file to generate the code, I was 
wondering whether this code supports SNMPv3.  I believe I will eventually need 
to learn how to incorporate some security settings and wanted to make sure this 
would be possible before continuing.

5) I am also wondering whether using the "mib2c.mfd.conf" configuration file 
was the correct choice for me as I move forward in implementing other tables 
defined in my MIB text file.  I originally chose to use this configuration file 
because I was learning SNMP for the first time and the tutorial required it for 
me to learn how to insert code.   Are there better choices of configuration 
files which I should be looking into or should I stick with the 
"mib2c.mfd.conf" configuration file for now.  I still consider myself a "dummy" 
when it comes to SNMP and I am also new to Linux as well, but I wanted to make 
sure that all the functionailty of SNMP is possible if I use the 
"mib2c.mfd.conf" configuration file for generating my code.  I do nto want to 
spend all my time learning the code generated by the "mib2c.mfd.conf" 
configuration file just to learn I should have used another configuration file 
months in the future.
   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


What is the difference between "snmp.conf" and "snmpd.conf"?

2007-05-22 Thread Need Help
I believe the "snmpd.conf" file is used to read in settings when the agent is 
started ...correct?

I have no idea what "snmp.conf" is used for .



   
-
Pinpoint customers who are looking for what you sell. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: What is the difference between "snmp.conf" and "snmpd.conf"?

2007-05-22 Thread Need Help
I think I found the difference stated in the FAQ . thanks


Need Help <[EMAIL PROTECTED]> wrote: I believe the "snmpd.conf" file is used to 
read in settings when the agent is started ...correct?

I have no idea what "snmp.conf" is used for .




-
Pinpoint customers who are looking for what you sell.   
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


  
-
Looking for earth-friendly autos? 
 Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.  -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


MIBS environment variable, --with-mibs and snmp.conf 'mibs' tag dont work

2007-05-22 Thread Need Help
** using NetSnmp 5.4

I am trying to learn how to use the snmp.conf file to store some settings for 
my agent.

Here is the "configure" command I am using for install:

./configure \
   --prefix=/export/home/rosent1/snmp/usr/local \
   --srcdir=/export/home/rosent1/snmp/net-snmp-5.4 \
   --enable-embedded-perl \
   --enable-shared \
   --with-mib-modules="OC-STB-HOST-MIB"



If I set the MIBS environment variable, then I can start the agent and execute 
a 
"snmpwalk" command and all the row information displays fine.

I am trying to get the "snmpwalk" command to work without setting the MIBS 
environment variable to "ALL".   I thought I could simply do any of the 
following three things to get my MIB loaded, but none of these things work:

1) Try setting the MIBS environment variable to append the specific MIB to load:

  export MIBS=+OC-STB-HOST-MIB

2) Try using the "--with-mibs=+OC-STB-HOST-MIB" option in the configure command

3) Add the following line into the 
"/export/home/rosent1/snmp/usr/local/share/snmp/snmp.conf"   file:

  mibs  +OC-STB-HOST-MIB

  
Questions: 

1) Why do none of these three alternative methods of loading a MIB file work?

2) If I set the MIBS environment variable to be "ALL" again, then everything 
works fine.What is going on?



   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


How to change default MIB directory location?

2007-05-22 Thread Need Help
I understand the default directory to look for MIB files is the following:

  /usr/local/share/snmp/mibs


However, I would like to change this to another location.   If I set the 
MIBDIRS environment variable as follows, then I can get it to find the MIB file 
in a new provided location:


export MIBDIRS= +"/export/home/myname/snmp/usr/local/share/snmp/mibs"


However, I do not want to use the environment variable to make this setting, so 
I tried the following two setups but nothing worked:


a) I tried including the following option in the "configure" command:

  --with-mibdirs="/export/home/myname/snmp/usr/local/share/snmp/mibs"
 

b) I tried setting the following in the "snmp.conf" file:

  mibdirs  /export/home/myname/snmp/usr/local/share/snmp/mibs


Question:

Why does (a) and (b) not work for me?

**NOTE:  I am not using "snmpd" to start the agent, but rather I am starting a 
specialized agent called "ocStbHostAVInterfaceTable".  Is this a problem ... or 
should two options above still work regardless?
   Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user 
panel and lay it on 
us.http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
 hot CTA = Join Yahoo!'s user panel-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: How to change default MIB directory location?

2007-05-23 Thread Need Help

I am currently using the mibs-for-dummies configuration to generate my NetSnmp 
code since I was told this configuration hides most of the NetSnmp internal 
processing from the user.  As a result, I have not updated the code to call the 
"init_mib()" routine so I am not sure what that is.   

I would be more interested in knowing why the "--with-mibdirs" configure option 
does nto work and why adding the "mibdirs" line to the snmp.conf does not work 
either.
 
 
Erik Earle <[EMAIL PROTECTED]> wrote: don't use init_mib()

call add_mibdir() and then init_mib_internals()
instead.

This is what init_mib() actually does using the
environment vars as args to add_mibdir().

look at the man page for mib_api for more info.


 

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html


Need Help <[EMAIL PROTECTED]> wrote: I understand the default directory to look 
for MIB files is the following:

  /usr/local/share/snmp/mibs


However, I would like to change this to another location.   If I set the 
MIBDIRS environment variable as follows, then I can get it to find the MIB file 
in a new provided location:


export MIBDIRS= +"/export/home/myname/snmp/usr/local/share/snmp/mibs"


However, I do not want to use the environment variable to make this setting, so 
I tried the following two setups but nothing worked:


a) I tried including the following option in the "configure" command:

  --with-mibdirs="/export/home/myname/snmp/usr/local/share/snmp/mibs"
 

b) I tried setting the following in the "snmp.conf" file:

  mibdirs  /export/home/myname/snmp/usr/local/share/snmp/mibs


Question:

Why does (a) and (b) not work for  me?

**NOTE:  I am not using "snmpd" to start the agent, but rather I am starting a 
specialized agent called "ocStbHostAVInterfaceTable".  Is this a problem ... or 
should two options above still work regardless?Fussy? Opinionated? 
Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us.  
http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
   hot CTA = Join Yahoo!'s user panel 
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders



   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


MFD: Can "snmpd" control multiple MFD tables and scalars?

2007-05-23 Thread Need Help
I need help in findnig out whether the "snmpd" command can control multiple 
tables and scalars which were generated with the MFD configuration file.

Here is a summary of what I did:

1) I unpacked the NetSNMPv5.4 into the following directory:

.../net-snmp-5.4/
 
2) I created an "OC-STB-HOST-MIB" directory as follows (since this is MIB I am 
working with):

.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/

3) I created subdirectories for each table and scalar located with the 
OC-STB-HOST-MIB file as follows:

.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable-mib2c-orig/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostComponentVideoTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostDeviceSoftwareBase/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostDVIHDMITable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostEasObjects/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostHWIdentifiers/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostIEEE1394ConnectedDevicesTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostIEEE1394Table/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostInBandTunerTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostMpeg2ContentTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostPower/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostProgramStatusTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostRFChannelOutTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostSecuritySubSystem/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostSoftwareDownloadStatus/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostSPDIfTable/
.../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostUserSettings/


4) I went into each table and scalar subdirectory and generated code using the 
"mib2c" command with the "mib2c.mfd.conf" configuration file (because I am a 
MIB dummy) .

5) I updated the code to populate the rows and table/scalar values.


Questions:

a) How do I compile the code located in the subdirectories for each table and 
scalar?   Do I simply go into each table and scalar subdirectory and execute 
the "make -f _Makefile" command individually or is there a way 
to compile all tables and scalar code together for the "OC-STB-HOST-MIB" MIB at 
one time?

b) I am assuming I should use the "/usr/local/sbin/snmpd" command to start the 
agent so I can then perform some GET requests to test the code I inserted, but 
I am not sure if this is correct.   Perhaps I run "individual" agents for each 
table/scalar or is there only "one" agent I need to start which will somehow 
control all GET requests for all my tables/scalars?  What do I need to do?  If 
I should only start one agent (ie: snmpd), then how do I go about doing this?



Extra (unrelated) question:

c) I am using "mib2c.mfd.conf" configuration files to generate code.   Does the 
code generated have the VACM packages incldued with it?  I mean am I able to 
use the security settings provided by SNMPv3 even though I decided to use the 
MFD configuration file?  I was told the VACM but not be incorporated into the 
MFD package.









   
-
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: MFD: Can "snmpd" control multiple MFD tables and scalars?

2007-05-23 Thread Need Help
Is there an advantage between generating the code (using mib2c) for "all" 
Tables at once and generating code for each Table individually?  I mean if I 
spent the extra time and generated the code for each Table (and scalars) 
individually (one at a time), then should I reach the same results?  I mean 
will the code eb generated the exact same way or would I be missing some 
functionality which would be required which relates all the Tables/Scalars 
together as one unit?

Now, I originally generated the code for each Table one at a time, but I found 
it did not generate the required .h files for each new Table. 

For example:

I went into the 
".../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/" 
directory and issued the mib2c command for the particular 
"ocStbHostAVInterfaceTable" node and the code was generated into this directory 
for me.   I tried testing with only this newly generated code and eventually 
was successful in getting the "ocStbHostAVInterfaceTable" data to be displayed 
by performing an "snmpwalk" command.

** However, during my testing I noticed the following files were "not" 
generated for me automatically and I had to create them:

1) .../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB.h
 2) .../net-snmp-5.4/agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable.h
 
Here are the file contents in case you are wondering what I did:

OC-STB-HOST-MIB.h
/*
 * module to include the modules
 */

config_require(OC-STB-HOST-MIB/ocStbHostAVInterfaceTable);
config_add_mib(OC-STB-HOST-MIB)


ocStbHostAVInterfaceTable.h
/*
 * module to include the modules
 */

config_require(OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable)



*** Keep in mind I only generated code using mib2c for the 
"ocStbHostAVInterfaceTable" only for my testing.  I would think I would need to 
update these files when I include more tables.

I also thought these were the ".h" files which might have been created for me 
automatically.  Seems weird I would have to create these two ".h" files myself. 
   These files seem to link all the new directories together, so they seemed to 
be required to allow my testing to proceeed.

Anyway, this is what got me wondering whether there was a way to generate all 
tables together in which these ".h" files might be created for me and so all 
Tables would be related together automatically.  


PS:  Now, I did try to generate all tables automatically, based on your 
recommendation, but it did not work.  It only generated code for one Table 
only.   Not sure if I am doing something wrong, but I did try a few different 
high-level nodes to use in the mib2c command.   Anyway, this failure led me to 
send this email asking whether there was a difference between generating table 
code individual or all at once . does it real matter which way the code is 
generated?





Dave Shield <[EMAIL PROTECTED]> wrote: On 23/05/07, Need Help  wrote:
> 3) I created subdirectories for each table and scalar located with the
> OC-STB-HOST-MIB file as follows:
   [snip]
> 4) I went into each table and scalar subdirectory and generated code using
> the "mib2c" command with the "mib2c.mfd.conf" configuration file

Robert's the expert on this framework, but I believe you should be
able to generate code for all the tables in one go.

Try running "mib2c -c mib2c.mfd.conf ocStbHostRoot"
(where 'ocStbHostRoot' is the parent node of all the tables).

That ought to generate code for each of the tables,
plus a header file "ocStbHostRoot.h" to link them all together.

Compiling this into the main agent is then just a matter of
copying this tree into the 'agent/mibgroup' subdirectory of
the source tree, and running

configure --with-mib-modules=ocStbHostRoot

Robert - feel free to correct any inaccuracies in the above.


Dave


   Choose the right car based on your needs.  Check out Yahoo! Autos new 
Car Finder 
tool.http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg--
 hot CTA = Yahoo! Autos new Car Finder tool-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Should the "make" command compile my new MIB Table code for me?

2007-05-24 Thread Need Help
I created the following new MIB directory:

 .../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/

and generated the required code using the mib2c command.  All of the generated 
code is inside this new directory.   I updated the code and confirmed it 
compiles using the local "ocStbHostAVInterface_Makefile" (which was generated 
by the mib2c command).   After doing this, I deleted all the ".o" files since I 
wanted to compile everything using the main "configure" command now just for 
fun (ie: learning experience).

After I ran the "configure" command and then performed the "make" command, I 
would have assumed this "make" command would have generated all of the ".o" 
files again and would have placed them in the above mentioned directory.  
However, the "make" command returned the following error:

mibgroup/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.o: No such file

Any idea why this is being produced?  

I know I can generate the ".o" files by running the 
"ocStbHostAVInterface_Makefile" supplied by the mib2c command but it does not 
make sense that I would need to generate all the ".o" files for each table 
individually using each individual Makefile command . right?

Let me know what I am doing wrong, or at least what I am not understanding ... 
thanks.


 

   
-
Pinpoint customers who are looking for what you sell. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Should the "make" command compile my new MIB Table code for me?

2007-05-24 Thread Need Help
Worked like a charm . thanks

Wes Hardaker <[EMAIL PROTECTED]> wrote: >>>>> "NH" == Need Help  writes:

NH> After doing this, I deleted all the ".o" files since I wanted to
NH> compile everything using the main "configure" command now just for
NH> fun (ie: learning experience).

Did you delete the *.lo files too?  If they exist, you need to remove
them too...

-- 
Wes Hardaker
Sparta, Inc.


 
-
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Can the SNMPv3 security protocol be used if I am using the MFD configuration files?

2007-05-24 Thread Need Help
I am using "mib2c.mfd.conf" configuration files to generate code.   Will I be 
able to incorporate SNMPv3 functionality in the code if I want to?  I was told 
that the VACM might not be incorporated into the MFD packages so it might not 
be able to be used easily.

There is a good chance I am going to require SNMPv3 settings in the future so I 
would like to confirm I am not going to run into any problems in the future as 
a result of me using the mibs-for-dummies (MfD) configruation files now.  I 
guess I am wondering whether I should be using any other configuration file 
type to generate my code (using mib2c) to allow me to use SNMPv3 functionality.

Please let me know if using the MfD configuration files are fine or not.

Thanks

   
-
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: How to change default MIB directory location?

2007-05-24 Thread Need Help
ig: Reading configuration 
/export/home/myname/snmp/usr/local/share/snmp/snmp.conf
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.conf:30 
examining: mibdirs  +/export/home/myname/snmp/usr/local/share/snmp/mibs
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.conf:37 
examining: mibs  +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.local.conf: No 
such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmp.conf: No such 
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmp.local.conf: No 
such file or directory
read_config: /root/.snmp/snmp.conf: No such file or directory
read_config: /root/.snmp/snmp.local.conf: No such file or directory

read_config:  config path used for snmp:/var/net-snmp (persistent 
path:/var/net-snmp)
read_config: /var/net-snmp/snmp.conf: No such file or directory
read_config: /var/net-snmp/snmp.local.conf: No such file or directory

read_config: storing: #
# net-snmp (or ucd-snmp) persistent data file.
#

# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
#   DO NOT EDIT THIS FILE 
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP

#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
# (Did I mention: do not edit this file?)
#






read_config: storing: setserialno 316065958
read_config: storing: 
##
read_config: storing: #
# snmpNotifyFilterTable persistent data
#
read_config: storing: 
##
read_config: storing:

read_config: storing: 
##
read_config: storing: #
# ifXTable persistent data
#
read_config: storing: ifXTable .1 14:0 18:0x $
read_config: storing: ifXTable .2 14:0 18:0x $
read_config: storing: ifXTable .3 14:0 18:0x $
read_config: storing: ifXTable .4 14:0 18:0x $
read_config: storing: 
##
read_config: storing:

read_config: storing: engineBoots 1
read_config: storing: oldEngineID 0x80001f88807036f77a67cf5546
NET-SNMP version 5.4





Wes Hardaker <[EMAIL PROTECTED]> wrote: >>>>> "NH" == Need Help  writes:

NH> I would be more interested in knowing why the "--with-mibdirs"
NH> configure option does nto work and why adding the "mibdirs" line
NH> to the snmp.conf does not work either.

Both should work.  I'm not sure what the problem with the
--with-mibdirs flag, as it should work (but to be honest, I'm not sure
the last time it was tested).

For the snmp.conf file, make sure that it's being read.  Run the agent
or app with -Dread_config to make sure it's being read.
-- 
Wes Hardaker
Sparta, Inc.


   
-
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


RE: Should the "make" command compile my new MIB Table code for me?

2007-05-24 Thread Need Help
Do these commands automatically go through all subdirectories located within 
the "/agent/mibgroup/" directory and remove all the ".o" files and ".lo" files 
for me?

I know I heard of these commands before, but I can not remember where I read 
about them, so I am not sure what they really mean.   It is hard trying to 
learn SNMP and remember where I saw everything .. so would it be possible 
to explain to me the difference between these two commands please?

BTW: Thanks for the help everyone


Bruce Shaw <[EMAIL PROTECTED]> wrote: "make clean" or "make distclean" is your 
friend.

 >>>>> "NH" == Need Help writes:
 
 NH> After doing this, I deleted all the ".o" files since I
wanted to
 NH> compile everything using the main "configure" command now
just for
 NH> fun (ie: learning experience).
 
 
 


This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager. This 
message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.



   Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user 
panel and lay it on 
us.http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
 hot CTA = Join Yahoo!'s user panel-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can the SNMPv3 security protocol be used if I am using the MFD configuration files?

2007-05-25 Thread Need Help
Ahh  I understand now . 

I was only using the standalone specialized agent which comes with the MfD 
stuff for testing purposes only.   I always intended to use the main "snmpd" 
master agent for my true execution of NetSNMP, so I guess I have no worries 
then.   Thanks for clarifying this for me.


Dave Shield <[EMAIL PROTECTED]> wrote: On 24/05/07, Need Help  wrote:
> I am using "mib2c.mfd.conf" configuration files to generate code.   Will I
> be able to incorporate SNMPv3 functionality in the code if I want to?

Yes.
The  "mib2c"  tool is primarily used to generate the code for a particular
MIB module.  This is completely independent of the access control
mechanisms used by the agent.
   You should be able to use MIB modules generated by mib2c
(using *any* of the mib2c frameworks), together with *any* version
of SNMP.


> I was told that the VACM might not be incorporated into the MFD
> packages so it might not be able to be used easily.

MIB modules and the overall agent framework are two completely
separate things.
   A MIB module (MfD or otherwise) can be compiled into the main
Net-SNMP agent code, with no problems whatsoever.
   A MIB module (MfD or otherwise) can be compiled as an AgentX
subagent, and used with the main Net-SNMP master agent, with
no problems whatsoever.


The MfD framework (and this framework *only*) also has the concept
of running the MIB module as a standalone agent, wrapped within a
minimal SNMP agent driver.   It is unclear to me how much this
particular mode of operation reflects the "normal" agent behaviour,
and I'd rather not comment on this.  I don't always trust myself to give
an objective view of the MfD framework - and it's probably safer to let
Robert offer his thoughts on that.
  (He's no more objective than I am, but his bias is rather more positive
than mine!)



> There is a good chance I am going to require SNMPv3 settings in the future
> so I would like to confirm I am not going to run into any problems in the
> future as a result of me using the mibs-for-dummies (MfD) configruation
> files now.

No - you should not have any probloems whatsoever - certainly if you
include your MIB module within the main Net-SNMP agent, or run it
as an AgentX subagent.
   I make no guarantees about running this using the MfD-specific
standalone agent approach.



>  I guess I am wondering whether I should be using any other
> configuration file type to generate my code (using mib2c) to allow me to use
> SNMPv3 functionality.
>
> Please let me know if using the MfD configuration files are fine or not.

They're fine.
I don't like them, but they're fine.

Dave


   
-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


AgentX subagents (why are they needed)?

2007-05-25 Thread Need Help
I believe it is possible to have multiple agents running at one time, where one 
is the "master" and the others are AgentX subagents.   I am not quite sure why 
people use multiple agents, so perhaps someone can give me an example as to 
when multiple agents would be nice to use.

Now, if I wanted to use multiple agents, then I understand I would need to 
place the "master agentx" line into the "snmpd.conf" file to indicate the 
"snmpd" agent is the "master" agent when it starts, however, I am not too sure 
how one would define and start AgentX subagents.

If I wanted to define an AgentX subagent as well as a master agent, what would 
i need to do and how would I start both of them at the same time?

I understand the AgentX subagents need to be defined with the master agent's 
address so the AgentX subagent can register with the master when it is started. 
 I also understand that the master agent handles all the routing of the SNMP 
requests to the appropriate subagents automatically (which is nice).  I just do 
not understand why subagents are required and how to start/configure them up if 
I wanted to use one. 

Again, I am trying to learn as much as I can so I can configure NetSNMP for my 
company, so I want to make sure I am going about this in the best way possible 
 knwoing that I am new to all of the NetSNMP stuff.

PS:  Are "AgentX subagents" and "subagents" the same thing or are there 
different kinds of "subagents" allowed?


 
 
-
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: How to change default MIB directory location?

2007-05-25 Thread Need Help
Yes, I was using the wrong "snmpwalk" command.  Your recommendation worked like 
a charm ... thanks. 


Dave Shield <[EMAIL PROTECTED]> wrote: On 24/05/07, Need Help  wrote:
> /export/home/myname/snmp/usr/local/sbin/snmpd -f -L
>  -Dread_config -M localhost &
>
> Based on the "-Dread_config" data displayed when the agent started
> up, it looks like the "snmp.conf" file (as well as the other snmpd.conf
> file) is being found and read correctly.

   by the agent

>  However, when I try to perform the
> "snmpwalk", it produces the following error:
>
> ocStbHostAVInterfaceTable: Unknown Object Identifier

Have you checked whether the *snmpwalk* command is reading
your snmp.conf file?  Try giving "snmpwalk" the same -D flag.

If that does indicate that your snmp.conf file is being processed,
then try running it with "-Dparse-mibs", to check which MIB files
are being read in (and from where).

But I suspect that you may well be using a vendor-supplied version
of snmpwalk, which won't be looking in your private locations.
I strongly suspect that running
/export/home/myname/snmp/usr/local/bin/snmpwalk
(instead of just "snmpwalk") might well work as expected.

Dave


   
-
Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Should these ".h" files be generated for me?

2007-05-25 Thread Need Help
I created the ".../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/" 
directory, issued the "mib2c" command in this directory for the 
"ocStbHostAVInterfaceTable" OID node and the code was generated for me and 
placed into this directory.   I discovered the reason why my original testing 
via "snmpwalk" did not work was because the following files did not exist:

1) .../agent/mibgroup/OC-STB-HOST-MIB.h
 2) .../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable.h
 
These files seem to link the new directory structures together and seem to be 
required for testing to proceeed.  After I created these files manually, then 
the "snmpwalk" command worked fine.

Here are the file contents:

OC-STB-HOST-MIB.h
/*
 * module to include the modules
 */

config_require(OC-STB-HOST-MIB/ocStbHostAVInterfaceTable);
config_add_mib(OC-STB-HOST-MIB)


ocStbHostAVInterfaceTable.h
/*
 * module to include the  modules
 */

config_require(OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable)



Question:

1) It seems odd I would have to create these two ".h" files myself manually to 
begin testing since these files seem to link all the new directories together 
to allow testing to proceeed.  Is it a requirement the user create these files 
manually or should these files actually be generated automatically for me 
somehow, thus I am doing something wrong during the "mib2c" execution?

 


   
-
Got a little couch potato? 
Check out fun summer activities for kids.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: AgentX subagents (why are they needed)?

2007-05-25 Thread Need Help

I would assume I would need to start both agents now by first starting the 
master agent via the "snmpd" command and then by starting the subagent via the 
"mysubagent" command . correct?

I will read the link you provided  thanks


Dave Shield <[EMAIL PROTECTED]> wrote: AgentX subgents are not "needed", but 
they can be "useful"

On 25/05/07, Need Help  wrote:
> I believe it is possible to have multiple agents running at one time, where
> one is the "master" and the others are AgentX subagents.   I am not quite
> sure why people use multiple agents, so perhaps someone can give me an
> example as to when multiple agents would be nice to use.

Two scenarios:

  a)  You have a vendor-supplied master SNMP agent (but no source)
   and want to add a new MIB module.   AgentX allows you to implement
   this module in a separate AgentX subagent, and register with the
   master agent, without having to change the master agent at all.

 b)  You have a MIB module that is specific to a particular piece of software
  (e.g. a web server MIB).  AgentX allows you to implement this module
  within the software itself (where you might have easy access to
  internal data), and register with the master agent, without needing
  to include all of the other SNMP-related stuff within the application.



> Now, if I wanted to use multiple agents, then I understand I would need to
> place the "master agentx" line into the "snmpd.conf" file to indicate the
> "snmpd" agent is the "master" agent when it starts

The "snmpd" agent is the master agent automatically.
The purpose of the "master agentx" directive is really to activate
the AgentX functionality, and start listening for subagent connections.


>, however, I am not too sure how one would define and start AgentX subagents.

  a)   Compile your MIB module into the main agent framework,
 and then start "snmpd" using the command-line option '-X'

  b)   Compile your MIB module using
  net-snmp-config --compile-subagent mysubagent myModule.c
   (See http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent)

  c)   Compile your MfD MIB module using the MfD makefile



Dave


   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Can I put LD_LIBRARY_PATH into a "conf" file?

2007-05-25 Thread Need Help
I needed to set the LD_LIBRARY_PATH to the following so the ".so" library files 
could be found:

 /export/home/myname/snmp/usr/local/lib

I am wondering whether it is possibel to indicate this path inside of a 
"snmpd.conf" or "snmp.conf" file somehow?

   
-
Pinpoint customers who are looking for what you sell. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can I put LD_LIBRARY_PATH into a "conf" file?

2007-05-30 Thread Need Help
I already include the following --prefix when performing the "configure" 
command:

  --prefix=/export/home/myname/snmp/usr/local

 however, this does not allow for the ".so" library files to be found in 
the following directory:

   /export/home/myname/snmp/usr/local/lib/




Magnus Fromreide <[EMAIL PROTECTED]> wrote: On fre, 2007-05-25 at 22:25 +0200, 
Thomas Anders wrote:
> Need Help wrote:
> > I needed to set the LD_LIBRARY_PATH to the following so the ".so" library 
> > files could be found:
> > 
> >  /export/home/myname/snmp/usr/local/lib
> > 
> > I am wondering whether it is possibel to indicate this path inside of a 
> > "snmpd.conf" or "snmp.conf" file somehow?
> 
> Impossible. snmp[d].conf are read by the agent and you need
> LD_LIBRARY_PATH to even run it! Rather, put it in a shell script that
> starts your agent. Consult your favorite system administrator for
> further advice.

Another thing Need Help could try is to give a correct --prefix argument
when he builds net-snmp. That should add the necessary magic to the
binaries to make them look in the right place at runtime.

% readelf -d /tmp/net-snmp-install/bin/snmpwalk   

Dynamic section at offset 0x1d78 contains 23 entries:
  TagType Name/Value
 0x0001 (NEEDED) Shared library: [libnetsnmp.so.20]
 0x0001 (NEEDED) Shared library: [libcrypto.so.0.9.8]
 0x0001 (NEEDED) Shared library: [libc.so.6]
 0x000f (RPATH)  Library rpath: 
[/tmp/net-snmp-install/lib]


This isn't what he asked for but I think it is what he wish to do.

/MF



   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-05-30 Thread Need Help
Thanks for the explanation . although I have some more questions.

Table1 is the "main table" while Table2 is a "sparse" table.  Table2 can be 
thought of as providing additional column information to extend Table1 and 
Table2 is indexed by the same table index defined by Table1.  

What would be the best way to store this information within NetSNMP? 

Currently, I am using the "mib2c.mfd.conf" configuration file to generate code 
using mib2c.  For each row defined in "Table1", I allocate a new row_context in 
NetSNMP and store the data (ie: column data) in that row index.  Since "Table2" 
is an extension of Table1, then it does not seem like I should be allocating 
new row_contexts for all the rows Table2 fields.  It seems like I should be 
store Table2 field data into the "existing" row contexts defined by Table1 
. is this correct?

If this is correct, then how is this possible within NetSNMP?  How can I obtain 
an existing row_context allocated when processing Table1 and expand it to store 
the additional data defined in Table2?  Perhaps I need to use a different 
configuration file to generate code via mib2c?

Also, knowing that Table1 and Table2 are defined separately, but are related, 
then should the "snmpwalk" command display all data defined in Table1 and 
Table2 at the same time by issuing only one "snmpwalk" command .. or should 
an "snmpwalk" command be issued for Table1 and then again for Table2 separately?





Dave Shield <[EMAIL PROTECTED]> wrote: On 25/05/07, Need Help  wrote:
> 1) I noticed Table2 does "not" have an "ocStbHost1394Index" field defined.
> I was wondering why Table2 did not have an "Index" field like Table1 had
> defined?  I assumed all Tables would have an "Index" field which would
> represent the row index used for storage by NetSNMP.  What am I not
> understanding here?
>
> 2) To make me more confused, I looked into the "OC-STB-HOST-MIB" MIB file at
> the definition of Table2 and saw that the definition of Table2 includes the
> "ocStbHostAVInterfaceIndex" field (which is a field defined by Table1).  How
> can Table2 reference a Table1 field?

These are basically both the same question.

Table1 is a "normal" table - consisting of assorted column objects, and
indexed by a single integer value, which is one of these column objects.
This is the normal approach to defining a self-contained table.
It exists on its own, with no dependency on any other part of the MIB.

Table is not a "normal", self-contained table.
In fact, it's perhaps best thought of as not being a separate table at all.
Instead, think of these two as forming a single (combined) table, that
just happens to be defined in two chunks:

 |   Row 1   |   |  Row 1 (ctd)   |
 |   Row 2   |   |  Row 2 (ctd)   |
 |   Row 3   |   |  Row 3 (ctd)   |
   (Table 1)  (Table 2)


The same index value is used for both tables, becase this identifies
a single (combined) row.


There are two main reasons for adopting this style of indexing.

The first is when one table monitors the "core" behaviour, and the
second monitors some (optional) extension.  For example, the
Host Resources MIB includes a pair of tables to monitor the processes
running on a given system.
   One table (hrSWRunTable) contains the basic information about the
process (name, arguments, PID, etc).  This is typically fixed for a given
process, and tends not to change during the lifetime of that process.
   The other (hrSWRunPerfTable) contains performance information
(memory and CPU usage).   This refers to exactly the same processes,
so uses the same index values.  But this is harder to implement
(because it is much more likely to change), and may not be needed.
So it's defined as a separate (optional) table, extending the first.


The second reason for such an approach is where the first table is
fairly general, and the second more specific, monitoring a subset of
the first.
   Again, there's an example of this in the Host Resources MIB.
This includes one table (hrDeviceTable), containing information
about all the hardware contained in that system (CPUs, network
cards, disks, printers, etc).   This is indexed by a single integer
index  (hrDeviceIndex).
   But the MIB also includes a series of hardware-specific tables,
concerned with particular types of device.   Now the table for
monitoring CPUs doesn't make sense when applied to a network
interface device (or vice versa).   So the hrProcTable will only
contain rows for CPU devices, and the hrNetworkTable will only
contain rows for network interfaces.   But the same index is used
for all of them.   This is known as a "sparse" table:


 |   Device 1  (cpu)  |   |  CPU 1|   .
 |   Device 2  (cpu) 

Re: Can I put LD_LIBRARY_PATH into a "conf" file?

2007-05-30 Thread Need Help
No I have not.  

Is "ldconfig" a NetSnmp command?   I will look into this and see what it is.  I 
do not have a Linux background, so thanks for any help you provide.



Dave Shield <[EMAIL PROTECTED]> wrote: On 30/05/07, Need Help  wrote:
> I already include the following --prefix when performing the "configure"
> command:
>
>   --prefix=/export/home/myname/snmp/usr/local
>
> ... however, this does not allow for the ".so" library files to be found in
> the following directory:
>
>/export/home/myname/snmp/usr/local/lib/


Have you tried running
 "ldconfig   /export/home/myname/snmp/usr/local/lib/"
   to update the linker cache information?

Dave


   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can I put LD_LIBRARY_PATH into a "conf" file?

2007-05-30 Thread Need Help
Ok, it is a Unix command . I will give it a try  thanks


Need Help <[EMAIL PROTECTED]> wrote: No I have not.  

Is "ldconfig" a NetSnmp command?   I will look into this and see what it is.  I 
do not have a Linux background, so thanks for any help you provide.



Dave Shield <[EMAIL PROTECTED]> wrote: On 30/05/07, Need Help  wrote:
> I already include the following --prefix when performing the "configure"
> command:
>
>   --prefix=/export/home/myname/snmp/usr/local
>
> ... however, this does not allow for the ".so" library files to be found in
> the following directory:
>
>/export/home/myname/snmp/usr/local/lib/


Have you tried running
 "ldconfig   /export/home/myname/snmp/usr/local/lib/"
   to update the linker cache  information?

Dave



-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.  
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-05-30 Thread Need Help
Well, it seems there are actually about six "sparse" tables in my MIB which are 
extensions of Table1, so I will need to look into this a bit more to figure out 
how to approach this correctly.

Now, it would be great to hear from Robert on this issue since he is familiar 
with the MfD configuration, but in the meantime, perhaps you could recommend 
another configuration file in which you are familiar which would provide me the 
base to make the changes you are recommending.

The only reason why I chose the MfD configuration is because this was the only 
one which came with a complete tutorial explaining how the code functioned as 
well as which area of the code was required to be updated.  If there is another 
widely used configuration file then I would like to play around with that one 
as well to get a better feeling of different kinds of approaches which can be 
used in NetSNMP.

If you do recommend another configuration file, perhaps you could give a one 
paragraph description indicating which procedures need to be updated to perform 
certain functions.




Dave Shield <[EMAIL PROTECTED]> wrote: On 30/05/07, Need Help  wrote:
> Table1 is the "main table" while Table2 is a "sparse" table.  Table2 can be
> thought of as providing additional column information to extend Table1 and
> Table2 is indexed by the same table index defined by Table1.
>
> What would be the best way to store this information within NetSNMP?

I wouldn't want to claim that this necessarily the "best" way, but there
two approaches spring to mind.  Which one I'd choose would depend
on how sparse the second table was (and the size/overheads of the
two tables).

The first approach would be to have a single data structure to represent
the combined row - containing fields for the column objects from both tables,
and a flag or similar mechanism to indicate whether this particular row
was valid in the second table.

The same internal representation could then be used for both tables,
with the table-specific code selecting the appropriate fields from the
common row structure.   This involves some overheads - both unused
fields in the data structure for the sparse rows, and additional processing
to skip these "gaps" in the second table.   But it's probably the simpler
concept.


The other approach is to have two separate representations for the two
tables, with distinct per-row data strucutes.   So as far as the agent is
concerned, they are effectively two completely independent tables.
But the two tables would share a common "load" routine, which would
populate both tables at the same time (from the same underlying data).
That's actually sufficient to report a consistent view of the two tables.



> Currently, I am using the "mib2c.mfd.conf" configuration file to generate
> code using mib2c.

I have no idea how this would be implemented in the MfD framework.
I'll leave it to Robert to provide specific advice on that mechanism.



> Also, knowing that Table1 and Table2 are defined separately, but are
> related, then should the "snmpwalk" command display all data defined in
> Table1 and Table2 at the same time by issuing only one "snmpwalk" command
> .. or should an "snmpwalk" command be issued for Table1 and then again
> for Table2 separately?

That up to the person issuing the command.
The snmpwalk command doesn't actually know anything about the
structure of the individual tables - let alone that they are linked.
Snmpwalk simply does a repeated GETNEXT until it runs off the
end of the requested subtree.

If you issue "snmpwalk Table1;   snmpwalk Table2", then this
will walk the two table individually.

If you issue "snmpwalk  myGroup', then this will walk the subtree
rooted at "myGroup", including both tables (plus anything else in
that subtree).

But snmpwalk doesn't care either way.

Dave


   
-
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-05-30 Thread Need Help
My plan is to integrate NetSNMP into my company's main build load.  I will 
implement procedures to gather the correct MIB information within my company's 
software, then the NetSNMP code (generated by mib2c) will be updated to call 
these new procedures to get the data information which will then be used 
populate the Table structures within NetSNMP.

I am assuming this is what you meant by "data taken from an underlying 
subsystem" . correct?

I will generate code using the "mib2c.table_data.conf" file and have a look at 
it.   Does this configuration allow for caching?  Does the -Scache option turn 
on caching?  I will look.



Dave Shield <[EMAIL PROTECTED]> wrote: On 30/05/07, Need Help  wrote:
> If there is another widely used configuration file then I would like to play
> around with that one as well to get a better feeling of different kinds of
> approaches which can be used in NetSNMP.

I'd tend to prefer the 'mib2c.table_data.conf' framework.
If the MIB is monitoring data taken from an underlying subsystem,
then you'd probably want to invoke this as

mib2c -c mib2c.table_data.conf -Scache=1  myTable

to include the 'load()' routine.   This is where you'd read in the
current contents of the table from this underlying system.


> If you do recommend another configuration file, perhaps you could give a one
> paragraph description indicating which procedures need to be updated to
> perform certain functions.

The main code to look at would be the load() routine.
That's the main interface between the MIB module and the
underlying system, so is the one place where we can't really
provide automatically generated code.   The initial contents
are simply a basic example, to give you the general idea.

You'd also need to check that the per-row data structure is
suitable for your needs, and that the GET handling is correct
(especially for string-based variables).

It's difficult to be more specific, without knowing more details about your
tables and the information that they are monitoring.

Dave


   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-05-30 Thread Need Help
I tried your recommendation, but got the following error message:

# mib2c -c mib2c.table_data.conf -Scache=1  ocStbHostAVInterfaceTable
no variable specified for -S flag. at /usr/local/bin/mib2c line 96.


Is there something I am missing?  I am using NetSnmp-v5.4



Dave Shield <[EMAIL PROTECTED]> wrote: On 30/05/07, Need Help  wrote:
> If there is another widely used configuration file then I would like to play
> around with that one as well to get a better feeling of different kinds of
> approaches which can be used in NetSNMP.

I'd tend to prefer the 'mib2c.table_data.conf' framework.
If the MIB is monitoring data taken from an underlying subsystem,
then you'd probably want to invoke this as

mib2c -c mib2c.table_data.conf -Scache=1  myTable

to include the 'load()' routine.   This is where you'd read in the
current contents of the table from this underlying system.


> If you do recommend another configuration file, perhaps you could give a one
> paragraph description indicating which procedures need to be updated to
> perform certain functions.

The main code to look at would be the load() routine.
That's the main interface between the MIB module and the
underlying system, so is the one place where we can't really
provide automatically generated code.   The initial contents
are simply a basic example, to give you the general idea.

You'd also need to check that the per-row data structure is
suitable for your needs, and that the GET handling is correct
(especially for string-based variables).

It's difficult to be more specific, without knowing more details about your
tables and the information that they are monitoring.

Dave


   
-
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-05-30 Thread Need Help
Yes, that worked by adding a space character, thanks.

However, I do not want to give up on the MfD configuration just yet.   I was 
reading about it and it says that it is the most complete configuration file 
offered and that existing MIBs are being transferred over to this new format.   
Based on this I would assume the MfD code should be able to do what I want.  
Perhaps I simply do not understand what SNMP should do regarding my two Tables.

I will post another question and hopefully Robert can assist me a bit regarding 
the MfD, before I decide to move onto another conf file type.



Dave Shield <[EMAIL PROTECTED]> wrote: On 30/05/07, Need Help  wrote:
> I tried your recommendation, but got the following error message:
>
> # mib2c -c mib2c.table_data.conf -Scache=1  ocStbHostAVInterfaceTable
> no variable specified for -S flag. at /usr/local/bin/mib2c line 96.


Umm...
   Try -S cache=1 

(with a space after the 'S').

I can never get the hang of mib2c invocations!

Dave


   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


MfD specific questions for someone who is familiar with this code (Robert perhaps)

2007-05-30 Thread Need Help
** I am using the MfD configuration file to generate code and I am very 
confused.

I have the following two tables defined in my MIB file.

TABLE 1 (osStbHostAVInterfaceTable):

ocStbHostAVInterfaceIndex
ocStbHostAVInterfaceType
ocStbHostAVInterfaceDesc
ocStbHostAVInterfaceStatus


TABLE 2 (osStbHostIEEE1394Table):

ocStbHost1394ActiveNodes
ocStbHost1394DataXMission
ocStbHost1394DTCPStatus
ocStbHost1394LoopStatus
ocStbHost1394RootStatus
ocStbHost1394CycleIsMaster
ocStbHost1394IRMStatus
ocStbHost1394AudioMuteStatus
ocStbHost1394VideoMuteStatus



1) Table1 has the "ocStbHostAVInterfaceIndex" field which I believe represents 
the row index in the table.  Actually. I believe this index field is used as 
the row index value generated within NetSNMP by doing the following:

   a) calling the "se_find_value_in_slist()" routine (from within the 
"container_load" procedure) to obtain a unique index

   b) calling the "ocStbHostAVInterfaceTable_allocate_rowreq_ctx" routine to 
allocate new storage row space

   c) storing the "ocStbHostAVInterfaceIndex" value into the row by calling the 
following:

ocStbHostAVInterfaceTable_indexes_set(rowreq_ctx, 
ocStbHostAVInterfaceIndex)

Is my interpretation correct?  Am I using the "ocStbHostAVInterfaceIndex" index 
field as the row number correctly?


2) You will notice Table2 does not have a specific "index" field defined, 
however the MIB file indicates Table2 is related to the 
"ocStbHostAVInterfaceIndex" field (which is defined from Table1).  I have 
recently learned from this forum (thanks David) this means Table2 is simply an 
extension of Table1 and that Table1 is considered to be a sparse table.  The 
MIB file states that when Table1's "ocStbHostAVInterfaceType" value indicates 
"1394", then Table2 data will exist, otherwise Table2 data will not exist.

Lets say Table1 is populated and stored as the following:  


Example: Table1 

Index  Type  Desc   Status
-
1  DVI   DVI-Desc   Enabled
2  1394  IEEE1394   Enabled
3  AnalogAnalog-DescEnabled
4  1394  IEEE1394   Enabled
5  HDMI  HDMI-Desc  Enabled



I am not sure how to populate Table2 data within the MfD framework.  Since 
Table2 does not have a specific "index" field defined, then I am not sure how 
to generate rows for Table2 to store the data correctly. 

1) Should Table2 have the same internal NetSNMP row index used in Table1 (ie: 2 
and 4) even though this index is not stored within Table2's data?  

2) Do I need to call the "se_find_value_in_slist()" routine at all for Table2?

3) Do I need to still make the following procedure call for Table2 at all?

 ocStbHostAVInterfaceTable_indexes_set(rowreq_ctx, )

   If so, then does the  need to be a specific 
"ocStbHostAVInterfaceIndex" value which was used for Table1?


I am obviously confused on how Table2 should have rows defined but does not 
have it's own unique index.  I do not understand whether I have to use a 
previously obtained index value used in Table1 ni order to help me store Table2 
data.

I am also pretty sure I can not expand the data_context structure definition of 
Table1 to include the data fields defined in Table2, since this is not how the 
MIB file defined the Tables ..  they are defined to be separate tables.

Hopefully someone can help me out here with a good explanation.
   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Why must I set the MIBS environment varibable when I set "snmp.conf"?

2007-05-31 Thread Need Help

My snmp.conf file has the following two lines:

  mibdirs  +/export/home/myname/snmp/usr/local/share/snmp/mibs

  mibs  +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB


My snmpd.conf file has the following one basic line:

  rocommunity  mycommunity_ro  


I opened a brand new Root shellw window and performed the following commands:

1) I ran the following configuration commands:

  a)./configure \
 --prefix=/export/home/myname/snmp/usr/local \
 --srcdir=/export/home/myname/snmp/net-snmp-5.4 \
 --enable-embedded-perl \
 --enable-shared \
 --with-mib-modules="OC-STB-HOST-MIB"

  b) make

  c) make install


2) I started the master agent by executing the following:

  /export/home/myname/snmp/usr/local/sbin/snmpd -f -L -Dread_config -M 
localhost &


The following output (note the BOLD text) were produced indicating it could not 
find any of the MIB files, although it did seem it read my ".conf" files 
correctly:

registered debug token read_config, 1

read_config: reading premib configuration tokens
read_config:  config path used for 
snmpd:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
 (persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmpd.conf: No such 
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmpd.local.conf: No 
such file or directory

read_config: Reading configuration 
/export/home/myname/snmp/usr/local/share/snmp/snmpd.conf
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmpd.conf:31 
examining: rocommunity  mycommunity_ro 
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmpd.local.conf: No 
such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmpd.conf: No such 
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmpd.local.conf: No 
such file or directory
read_config: /root/.snmp/snmpd.conf: No such file or directory
read_config: /root/.snmp/snmpd.local.conf: No such file or directory
read_config:  config path used for snmpd:/var/net-snmp (persistent 
path:/var/net-snmp)

read_config: Reading configuration /var/net-snmp/snmpd.conf
read_config: /var/net-snmp/snmpd.conf:32 examining: setserialno 316065965
read_config: /var/net-snmp/snmpd.conf:44 examining: ifXTable .1 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:45 examining: ifXTable .2 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:46 examining: ifXTable .3 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:47 examining: ifXTable .4 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:51 examining: engineBoots 8
read_config: /var/net-snmp/snmpd.conf:52 examining: oldEngineID 
0x80001f88807036f77a67cf5546
read_config: Found a parser.  Calling it: oldEngineID / 
0x80001f88807036f77a67cf5546
read_config: /var/net-snmp/snmpd.local.conf: No such file or directory
read_config:  config path used for 
agentx:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
 (persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/agentx.conf: No such 
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/agentx.local.conf: No 
such file or directory
read_config: /export/home/myname/snmp/usr/local/share/snmp/agentx.conf: No such 
file or directory
read_config: /export/home/myname/snmp/usr/local/share/snmp/agentx.local.conf: 
No such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/agentx.conf: No such 
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/agentx.local.conf: No 
such file or directory
read_config: /root/.snmp/agentx.conf: No such file or directory
read_config: /root/.snmp/agentx.local.conf: No such file or directory
read_config:  config path used for agentx:/var/net-snmp (persistent 
path:/var/net-snmp)
read_config: /var/net-snmp/agentx.conf: No such file or directory
read_config: /var/net-snmp/agentx.local.conf: No such file or directory
read_config:  config path used for 
snmp:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
 (persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmp.conf: No such 
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmp.local.conf: No 
such file or directory

read_config: Reading configuration 
/export/home/myname/snmp/usr/local/share/snmp/snmp.conf
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.conf:30 
examining: mibdirs  +/export/home/myname/snmp/usr/local/share/snmp/mibs
read_config: Found a parser.  Calling it: mibdirs / 
+/export/home/myname/snmp/usr/local/share/snmp/mibs
read_config:initmib: using mibdirs: 
+/export/home/myname/snmp/usr/local/share/snmp/mibs
read_c

Re: Can I put LD_LIBRARY_PATH into a "conf" file?

2007-05-31 Thread Need Help

Ok, it seems this error is only produced when I try to start my specialized MFD 
(mibs for dummies) agent directly with the following:

  ./ocStbHostAVInterfaceTable -f -L -DocStbHostAVInterfaceTable -M 
localhost:1161 &

I followed the MFD coding tutorial and it recommended starting the specific 
agent related to the specific MIB table I implemented (ie: 
ocStbHostAVInterfaceTable) for testing purposes.   When I do this, then the 
library files can not be found.

However,  this problem does not occur when I start the standard master agent 
via the "snmpd" command and test my MIB table code.  I guess I do not have a ny 
worries anymore.




Magnus Fromreide <[EMAIL PROTECTED]> wrote: On ons, 2007-05-30 at 06:09 -0700, 
Need Help wrote:
> I already include the following --prefix when performing the
> "configure" command:
> 
>   --prefix=/export/home/myname/snmp/usr/local
> 
> ... however, this does not allow for the ".so" library files to be
> found in the following directory:
> 
>/export/home/myname/snmp/usr/local/lib/

And you have executed make install?

What is the output of
objdump -p /export/home/myname/snmp/usr/local/bin/snmpwalk

/MF




   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-05-31 Thread Need Help
My biggest concern is whether I need to use an internal SNMP row index from 
Table1 to somehow populate stuff in Table2 within NetSNMP or whether I can 
simply start populating rows for Table2 with new row index values which have no 
relationship to Table1 at all.

Somehow I keep thinking there is this relationship between Table1 and Table2 
which needs to be maintained, although I can not figure out if this is true or 
not.  If it turns out to be true and I "do" need to maintain the relationship 
when populating Table2 data then I have no idea how this needs to be done and 
this is bothering me.

If there is no need to maintain a relationship between Table1 and Table2 since 
the relationship is maintained automatically due to how the MIB file is 
defined, then maybe I do not have any worries.  I can simply populate Table2 
without caring how Table1 has been populated .. can you confirm this for me?

I am brand new to SNMP and thus have no idea how SNMP data is interpreted once 
it has been received in the "real world".  In my case, I would assume an SNMP 
operator would request all AVInterfaces (Table1 data) to be displayed.  Now the 
SNMP operator can look through the list of interfaces to find the "1394" 
interfaces which exist.  Finally, the SNMP operator would request "1394" 
specific information from Table2 (ie: the 1394 data table) to be displayed.  
Does this seem correct?

Now, lets say there are five "AVInterfaces" which are displayed from making the 
first SNMP request on Table1:

IndexAVInterface
1 DVI
2 1394
3 HDMI
4 1394
5 DVI   

Based on the aboev display of data, the SNMP operator would know that two 1394 
interfaces exist which means that the 1394 Table (ie: Table2) will have two 
entries.   

 If the SNMP operator wanted to request specific data relating to the 1394 
AVInterface from "row 4" above, then how would the SNMP operator request the 
data from Table2?  

Can the SNMP operator request "Table2" 1394 data by somehow indicating "4" as 
an index?  

You mentioned I should not consider Table2 to be a separate table, but instead 
consider Table2 to be an extension of Table1 only.   This is confusing me as to 
how an SNMP operator can request a certain row from within Table2.   Basically, 
the operator knows there are going to be two row entries in Table2, but I have 
no idea how the SNMP operator would be smart enough to figure out which of 
these two entries in Table2 is the one related to "Table 1, row 4".   





Dave Shield <[EMAIL PROTECTED]> wrote: On 30/05/07, Need Help  wrote:

> Perhaps I simply do not understand what SNMP should do
> regarding my two Tables.

It's quite reasonable to treat these tables as completely independent.
As long as you populate them with the correct information, the link
between the tables will be made automatically (since the underlying
data is linked).



Dave


   
-
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Why must I set the MIBS environment varibable when I set "snmp.conf"?

2007-05-31 Thread Need Help
Yep stupid mistake . the options I was using were specific to the 
"specialized MfD agent" which I tested a long time ago.I should not have 
used the same options when moving towards executing the "snmpd" master agent.   
My "snmpd" command really did not make that much sense.

Think I will simply start the agent as follows instead:

   /export/home/rosent1/snmp/usr/local/sbin/snmpd &



Dave Shield <[EMAIL PROTECTED]> wrote: On 31/05/07, Need Help  wrote:
> 2) I started the master agent by executing the following:
>
>   /export/home/myname/snmp/usr/local/sbin/snmpd -f -L
> -Dread_config -M localhost &

   "-M localhost"  means  "look in the directory 'localhost' for MIB files"



> Question:
> 1) Why are the MIB errors produced when starting the master agent?

Because you've told it to look in the directory 'localhost'
This command-line option overrides any config file settings.


> 2) Why must I set the MIBS environment variable at all if the "snmp.conf"
> file indicates which MIBS should be included?
>
> PS:  Just to be complete I wanted to indicate that I am using the "snmpwalk"
> command which comes with NetSNMP to execute the walk request:
>
> /export/home/myname/snmp/usr/local/bin/snmpwalk -v1 -c
> mycommunity_ro localhost ocStbHostAVInterfaceTable


Try adding '-Dread_config' to this snmpwalk command.
Is it reading the expected snmp.conf file?



Dave


   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-05-31 Thread Need Help
Ok, so I need to use the same index for Table2 as I used in Table1, but I do 
not know how to actually do this?

Here is what I am doing to create Table1 currently. 

In the "container_load()" routine I perform the following steps to populate all 
requried indices in the ocStbHostAVInterfaceTable:


1) Obtain a unique NetSNMP index:

   ocStbHostAVInterfaceIndex = 
se_find_free_value_in_slist("ocStbHostAVInterface")

   Note: The "ocStbHostAVInterface" input parameter is a unique text string 
which I made up.


2) Indicate the index has been reserved for the ocStbHostAVInterface table: 

   se_add_pair_to_slist("ocStbHostAVInterface", strdup(), 
ocStbHostAVInterfaceIndex)

   Note: The index (ocStbHostAVInterfaceIndex) is associated with a 
 and then stored against the "ocStbHostAVInterface" table


3) Allocate new a row for the table:

   rowreq_ctx = ocStbHostAVInterfaceTable_allocate_rowreq_ctx(NULL);


4) Store the index into the row:

   ocStbHostAVInterfaceTable_indexes_set(rowreq_ctx, ocStbHostAVInterfaceIndex)


5) Populate the rest of the data table fields now for Table1:

   ocStbHostAVInterfaceIndex  = 
   ocStbHostAVInterfaceType   = 
   ocStbHostAVInterfaceDesc   = 
   ocStbHostAVInterfaceStatus = 


The four steps above are used to define each required row in the table with a 
unique index.  For example, if there are 20 "AVInterfaces" required, then there 
will be 20 rows in the table.


Now, it is time to create Table2.   

Inside the "container_load()" routine of Table2, I do not believe I want to 
perform any of the 4 steps above, since I do not want to generate a new index 
or new row for Table2 entries  correct?   

If no new index and no new row should be created for Table2, then I am not sure 
how to obtain the internal NetSNMP index (ie: ocStbHostAVInterfaceIndex) 
previously generated and stored for Table1.  

Is there a way in which I could loop through all rows of Table1?  If so, then I 
could loop through each row of Table1 to find which "ocStbHostAVInterfaceType" 
fields are set to the "1394" interface enum (since Table2 is only related to 
"1394" interface data).  

Now, lets pretend I find that "row2" and "row4" of Table1 have an interface 
type of "1394" somehow.  I would not be sure what I need to do with index 2 and 
4 in order to populate Table2.  Basically, if I find the index from Table1 
which is related to my Table2 row data, I still have no idea how to populate 
the Table2 data.  I can not store Table2 data fields into the rows defined for 
Table1 since the row defined for Table1 does not include the Table2 fields.  
The row definition for Table1 only has four fields in it:

   ocStbHostAVInterfaceIndex 
   ocStbHostAVInterfaceType  
   ocStbHostAVInterfaceDesc  
   ocStbHostAVInterfaceStatus



So, if I can somehow determine which row index from Table1 is the index I need 
to use Table2, then I still have no idea how to actually use the index for 
popultaing Table2 once I have it?  Is there some special routine I need to call 
from within the "container_load()" procedure which will link that particular 
index to Table2 and Table1 somehow?

I am afraid you are going to say I need to wait for Robert to response, 
although I have never seen a Robert on the forum respond to any of my postings 
yet, so I might be stuck here and not understand how to proceed.

I never thought an SNMP table could be an extension of another table, so this 
is obviously causing me grief.

Thanks for all your help though  much appreciated.



Dave Shield <[EMAIL PROTECTED]> wrote: On 31/05/07, Need Help  wrote:
> My biggest concern is whether I need to use an internal SNMP row index from
> Table1 to somehow populate stuff in Table2 within NetSNMP or whether I can
> simply start populating rows for Table2 with new row index values which have
> no relationship to Table1 at all.

If Table2 is meant to augment Table1 (either directly, or as a
table-in-a-table),
then the index values you use for Table2 must match those used for Table1.
The responsibility for doing this lies with the 'data_access' or
'load' routines.
As long as this is done, then the rest of the agent processing will work
correctly.



> Somehow I keep thinking there is this relationship between Table1 and Table2
> which needs to be maintained

Yes - this is done via the (shared) index values.

Imagine you have two children - in separate rooms, so that they can't
see or hear each other.  You stand in the corridoor between them, and
give each of them four cards.
The cards you give to the first child contain the numbers  7, 3, 5, and 6.
The cards you give to the second child contain the numbers  49, 9, 25 and 36.

If you ask the two children to both hold up the second card, then you'll
see that the square of 3 is 9,  and similarly fo

Re: Help me understand this code snipet please

2007-06-01 Thread Need Help
Thanks for the information .

Hey, I believe you might be the "Robert" who "David" was referring to who might 
be able to help answer some questions regarding the "mfd" configuration.  David 
has helped me out quite a bit, but perhaps you might have a look at my post to 
see if you can answer some specific "mfd" questions?

My post is entitled:

"Can two MIB Tables be related and be required to share the same row index?"


Here is a quick summary to catch you:

I am new to SNMP and went through the ifTable mfd tutorial which is provided to 
learn about the "mfd" approach and how to use this configuration for my MIB 
module.   I populated one of the tables (ocStbHostAVInterfaceTable) in my MIB 
(which I refer to as "Table1" in my posts) with values in the 
"container_load()" procedure and can now "snmpwalk" through the contents nicely.

I wanted to now populate the next table (ocStbHostIEEE1394Table) in my MIB 
(which I refer to as "Table2" in my posts) but this is not as easy as I thought 
it would be.  After showing David my MIB file, he informed me that my Table2 is 
an a real standalone table but is defined to be an extension to Table1.  It 
seems that "Table1" is created to have all the AVInterface values which can 
possible exist.  For each row in Table1 which is of type "1394 AV Interface", 
then a row in "Table2" will exist since Table2 only holds more specific 
information relating to "1394" interfaces only.

My problem is, I am not sure how to populate Table2.  David mentioned I need to 
obtain the associated AVInterface index value stored for "Table1" to be used 
for Table2.

Anyway, perhaps you could read a few of my more recents postings on this topic 
to catch up, and then perhaps can give me some of your opinions as well.  I am 
interested in hearing what you and David have to say about this .

Thanks for any help you can provide.


Robert Story <[EMAIL PROTECTED]> wrote: On Fri, 18 May 2007 06:20:43 -0700 
(PDT) Need wrote:
NH> Then what is the purpose of the "row_prep" procedure ?  Basically, when 
would i place code in the "row_prep" procedure?

The only thing the container really needs is the index values, so it can find
the right instances when a request comes in. The row_prep functions is called
for the selected instance, at which time the module can fetch the actual data
associated with the row.


   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-06-01 Thread Need Help
Most likely I simply interpreted some description incorrectly along the way 
.


Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 31 May 2007 09:39:55 +0100 Dave 
wrote:
DS> On 30/05/07, Need Help  wrote:
DS> > However, I do not want to give up on the MfD configuration just yet.   I 
was
DS> > reading about it and it says that it is the most complete configuration 
file
DS> > offered and that existing MIBs are being transferred over to this new
DS> > format.
DS> 
DS> *Robert* wants to see everything moved over to MfD, yes.
DS> That should not be taken as a policy statement for the project as a whole.

No, I don't actually want everything moved over to MfD. MfD is intended to
help novices implement simple mibs quickly. There are several examples in the
agent, as proof-of-concepts.

Please let us know where you got the impression that everything was being
converted, so that page can be corrected.


 
-
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-06-01 Thread Need Help
Do you recommend I generate my code using some other type of configuration file 
or is it possible to implement your suggestion using the "mfd" code layout 
approach?

In addition I have no idea what you mean by subcontainers and filters.  If you 
can elaborate a bit that would be helpful.   Perhaps give me some examples as 
to what types of procedures I need to call or how one would set up a 
subcontainer with filters  

Anything would be helpful  



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 31 May 2007 11:17:22 -0700 
(PDT) Need wrote:
NH> OK, so I need to use the same index for Table2 as I used in Table1, but I 
do not know how to actually do this?

Well, you've stepped out of the bounds of a 'simple' table, so Mad won't
auto-generate nice neat ready to use code. However, there is an example of MfD
+ shared indexes - ifTable and ifXTable.  Basically, they share a single
container. Since you have sparse secondary tables, that won't quite work for
you.

NH> Here is what I am doing to create Table1 currently. 
NH> 
NH> In the "container_load()" routine I perform the following steps to populate 
all requried indices in the ocStbHostAVInterfaceTable:
NH> 
NH> 1) Obtain a unique NetSNMP index:
NH> 2) Indicate the index has been reserved for the ocStbHostAVInterface table: 
NH> 3) Allocate new a row for the table:
NH> 4) Store the index into the row:
NH> 5) Populate the rest of the data table fields now for Table1:
NH> 
NH> Now, it is time to create Table2.   
NH> 
NH> Inside the "container_load()" routine of Table2, I do not believe I want to 
perform any of the 4 steps above, since I do not want to generate a new index 
or new row for Table2 entries  correct?   
NH> 
NH> If no new index and no new row should be created for Table2, then I am not 
sure how to obtain the internal NetSNMP index (ie: ocStbHostAVInterfaceIndex) 
previously generated and stored for Table1.  
NH> 
NH> Is there a way in which I could loop through all rows of Table1?  If so, 
then I could loop through each row of Table1 to find which 
"ocStbHostAVInterfaceType" fields are set to the "1394" interface enum (since 
Table2 is only related to "1394" interface data).  

Yes, a container iterator (or the FOR_EACH macro) can be used to loop through
a container.

However, I suggest a different approach. A container can have a linked list of
sub-container, and those subcontainers can have an associated insert_filter.
So, the first/primary table would create not just 1 container, but 1 + N for
each of the secondary/sparse related tables. Each of the secondary containers
would define a filter such that only the appropriate row indexes would end up
in that container.  Then each of the secondary tables would use the associated
sub-container from the primary table, instead of creating their own.

Now having said that, there aren't any examples of using subcontainers with
filters, and I can't even recall using one myself, but this is exactly the
scenario that insert_filters were written for.


   
-
Shape Yahoo! in your own image.  Join our Network Research Panel today!-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: MfD specific questions for someone who is familiar with this code (Robert perhaps)

2007-06-01 Thread Need Help
Ok, I know I can change any code I want to fit my needs, however, my concern 
with expanding the data_context structure of Table1 with fields from Table2 was 
that I thought performing a "snmpwalk" through Table1 would then display Table2 
fields now  and that would be bad since Table2 fields really do not belong 
in the Table1 "snmpwalk" output.

Are you saying if I add additional fields to the "Table1" data_context 
structure, then the "snmpwalk" will somehow only display the Table1 originally 
defined fields only and "not" display these new fields?




Robert Story <[EMAIL PROTECTED]> wrote:NH> I am also pretty sure I can not 
expand the data_context structure definition of Table1 to include the data 
fields defined in Table2, since this is not how the MIB file defined the Tables 
..  they are defined to be separate tables.

It's just code, you can do whatever you want! In fact, this is what the
ifTable/ifXTable code does... the ifTable structures have been expanded to
include the data for ifXTable entries. however, those tables have a 1-1
relationship, not a sparse relationship. But if you don't mind wasting the
space in each row with all the fields for each table that augments table 1, you
can simply put all the field definitions in table 1's data structure. If the
fields are mutually exclusive, you could probably even use a union to reduce
wasted space in the data context. Alternatively, you could just have the row
indexes populated during the load, and use the row_prep function to fetch the
row data as needed.


   
-
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: 5.4.1.pre1 now available

2007-06-01 Thread Need Help
Being new to the whole NetSNMP structure and everything, I kind of like seeing 
the "-mib" included in the directory name for the MIB.It reminds me the 
directory is for MIB specific stuff rather than some generic directory.

My 2-cents of course 



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 24 May 2007 09:41:33 -0700 Wes 
wrote:



I like the idea of having directories named after the mibs, but I guess we
could strip off the '-mib'. grumble.


-
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/
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


 
-
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Should these ".h" files be generated for me?

2007-06-01 Thread Need Help
Here is the configure command I am currently using:

../configure \
--prefix=/export/home/rosent1/snmp/usr/local \
--srcdir=/export/home/rosent1/snmp/net-snmp-5.4 \
--enable-embedded-perl \
--enable-shared \
--with-mib-modules="OC-STB-HOST-MIB"


The "--with-mib-modules" option seems to tell NetSNMP to "look for" the 
"agent/mibgroup/OC-STB-HOST-MIB.h" file only rather than create it.

You stated that the "--with-mib-modules" option should mention each "table".   
Does this mean each table defined in the MIB should be listed in this option?  
I thought I should only list the name of the MIB file only, not list all my 
table names.



Robert Story <[EMAIL PROTECTED]> wrote: On Fri, 25 May 2007 07:34:05 -0700 
(PDT) Need wrote:
NH> I created the 
".../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/" directory, 
issued the "mib2c" command in this directory for the 
"ocStbHostAVInterfaceTable" OID node and the code was generated for me and 
placed into this directory.   I discovered the reason why my original testing 
via "snmpwalk" did not work was because the following files did not exist:
NH> 
NH> 1) .../agent/mibgroup/OC-STB-HOST-MIB.h
NH>  2) .../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable.h
NH>  
NH> These files seem to link the new directory structures together and seem to 
be required for testing to proceeed.  After I created these files manually, 
then the "snmpwalk" command worked fine.

You generated each table with mib2c, and mib2c (I think) should tell you that
you need to configure --with-mib-modules=mysbudir. So, you wouldn't need those
header files if you specified each table in --with-mib-modules.

When someone gets around to fixing the mfd template to generate code for each
table in a mib, they should also generate these files...


   
-
You snooze, you lose. Get messages ASAP with AutoCheck
 in the all-new Yahoo! Mail Beta. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Can two MIB Tables be related and be required to share the same row index?

2007-06-01 Thread Need Help
Well, I went to the link you suggested and read about the Containers, however, 
nothing is really making any sense to me.  I am not real sure how to create a 
sub-Container from an existing container.

Perhaps you could provide a simple code example of what you are talking about?


Robert Story <[EMAIL PROTECTED]> wrote: On Fri, 1 Jun 2007 07:05:59 -0700 (PDT) 
Need wrote:
NH> Do you recommend I generate my code using some other type of configuration 
file or is it possible to implement your suggestion using the "mfd" code layout 
approach?
NH> 
NH> In addition I have no idea what you mean by subcontainers and filters.  If 
you can elaborate a bit that would be helpful.   Perhaps give me some examples 
as to what types of procedures I need to call or how one would set up a 
subcontainer with filters  
NH> 
NH> Anything would be helpful  

Well, I've used up my time for the day trying to catch up on the backlog of
messages, so I'll have to be brief... MfD uses a netsnmp_container to store
the rowreq_ctx structure for a table... the container_load routine does the
inserting.

If you create additional containers, the CONTAINER_INSERT will insert a
pointer to the row in the additional containers. More information can be found
at "http://www.net-snmp.org/wiki/index.php/Containers";, esp the part on
secondary indexes/containers. At least there is an example of how to create
additional subcontainers. I'll have to leave filters for another day... but
poke around in snmplib/container.c, searching on filter, and see if that
helps...


   
-
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Expanding the "data_context" structure to include other Table fields

2007-06-01 Thread Need Help
My MIB file has one main table defined (Table1) and has multiple other 
tables (Table2,3,4,5,6) defined which are extensions to Table1.  

So Robert . instead of me implementing sub-containers, lets say I implement 
your other suggestion of adding all the fields defined in Table2,3,4,5,6 into 
the "data_context" structure for Table1.  I believe I will be able to use a 
"union" to define these new fields within the structure to conserve space since 
each table is mutually exclusive to each other.

Now, I would like to make sure I understand how to populate the data_context 
correctly.

I assume the "container_load()" procedure of Table1 (main table) will be called 
first (somehow) and will be responsible for allocating new rows and generating 
new index values for each row and the "container_load()" procedures in 
Table2,3,4,5,6 will not be performing any of these functions . correct?

When the "container_load()" procedure for Table1 is called, I would like to 
populate all of Table1 fields at this time, however, must I populate all fields 
defined in Table2,3,4,5,6 at this time as well?

If I do not populate the fields from Table2,3,4,5,6 at this time, then how will 
I be
able to populate the fields later?   Will the "container_load()" procedure for 
Table2,3,4,5,6 be called eventually and should I populate those fields at this 
time instead?   If so, how will I know what correct table index (ie: row index) 
from Table1 the data should be inserted into at this time?

Perhaps you can recommend where certain functionality should be implemented 
within the "mfd" code so I can get a better picture of how this should be done?



Also, just curious  when the cache expires, then I assume the 
"container_load()" procedure is called again to regenerate the complete table 
over again as it originally did ... is this correct?  I assume new rows will be 
allocated again.
   
-
Pinpoint customers who are looking for what you sell. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-04 Thread Need Help
1) Lets say the first request made is to "snmpwalk" through Table2.   Are you 
saying that Table1's container_load() procedure has never been called yet so 
none of the index values have been loaded and none of the rows have been 
allocated and placed into the Table1 container yet?  If this is true, then how 
does an "snmpwalk" through Table2 work since no rows have been allocated to 
store the data yet?

I am getting way confused.   What actually happens when an "snmpwalk" of Table2 
occurs first?  Does the container_load() procedure of Table2 get called first?  
If so, then I am confused since I thought Table2's container_load() would not 
be reserving index values and not be performing any row allocation (basically 
not doing much of anything really) since I thought all of this would be handled 
in Table1 container_load() procedure only.

What exactly should be placed into the container_load() procedure of Table2?  
If you indicate I should be reserving index values and/or allocating rows for 
the container then I am confused since I thought all of this would be done in 
in Table1 functionality.

Actually, by now you understand I have a main Table1 (with 4 fields) and a 
Table2 (with 8 fields) which is an extension to Table1.   Perhaps you can 
describe to me what functionality should be placed into the 
Table1_container_load(), Table1_row_prep(), Table2_container_load() and 
Table2_row_prep() routines?  I think my problem is that I understand what the 
container_load and row_prep routines should do, but have no idea how to use 
them correctly when one of my tables is an extension of another table.

2) You state "Luckily, there is a failry easy way around that, which is sharing 
a single cache as well. See the function _ifXTable_container_init to see how it 
looks up the ifTable cache to share a container".  

I looked at this code and can see how another table's cache can be connected to 
the container of another table.  Perhaps you can explain to me "why" I should 
be doing this as am I not clear as to why you are recommending this code to me 
in the first place.

3) You stated "Now, the problem is that when you are loading the container, you 
will have no idea which of the 6 tables triggered the load."   

Well this seems bad since I will not know what I am really loading?   Are you 
indicating I should not be implementing it this way by adding all fields into 
the data_context of Table1?  Is this your way of indicating to me that I will 
run into too many problems with combining all fields into the data_context of 
Table1 and that I should use sub-containers after all?

4) I wish you were local so I could stop by and have you simply draw some ideas 
on some paper as to what you are recommending.   It is challenging for me to 
grasp how to do all of this as well as having no one here locally to bounce 
ideas around with.  Again, thank you for your time and patience.




Robert Story <[EMAIL PROTECTED]> wrote: On Fri, 1 Jun 2007 12:54:20 -0700 (PDT) 
Need wrote:
NH> So Robert . instead of me implementing sub-containers, lets say I 
implement your other suggestion of adding all the fields defined in 
Table2,3,4,5,6 into the "data_context" structure for Table1.  I believe I will 
be able to use a "union" to define these new fields within the structure to 
conserve space since each table is mutually exclusive to each other.

Ok.. there is one issue with sharing a single container, but you may not
care. The problem is that when walking the secondary tables, you will have to 
add code to each to make sure the current row index applies to the table in 
question, and then tell the agent to skip the row if it does not. So, if you 
have 1000 rows in Table1, and only 10 of which are in Table 2, there will be 
990 wasted calls to Table2.

Also note that there currently is not any generated code to handle skipping an 
inappropriate row, as currently the assumption is that the container only has 
appropriate rows. But it should be fairly trivial to fix that.

NH> I assume the "container_load()" procedure of Table1 (main table) will be 
called first

That is an invalid assumption. By default, the container_load function is
called when a request comes in for a table. So it is possible that the first
query the agent gets will be for table2, and not table1. Luckily, there is a
failry easy way around that, which is sharing a single cache as well. See the 
function _ifXTable_container_init to see how it looks up the ifTable cache to 
share a container.

Now, the problem is that when you are loading the container, you will have no 
idea which of the 6 tables triggered the load.


NH> When the "container_load()" procedure for Table1 is called, I would like to 
populate all of Table1 fields at this time, however, must I populate all fields 
defined in Table2,3,4,5,6 at this time as well?
NH> 
NH> If I do not populate the fields from Table2,3,4,5,6 at this time, then how 
will I be
NH> able to populate the fields later?

Re: Hopefully, this explains my confusion a bit more

2007-06-05 Thread Need Help
Sorry about the word document.   Just thought it would be easier to ask some 
questions with some pictorial table data being shown insetadof me trying to do 
this in an email format.  

Anyway, let me as you this follow up question:

You stated "you don't have to use the se list method, but you must ensure that 
the same row has the same index each time the container is loaded"

I thought the "container_load" routine reloads the container from "scratch" 
when it is called, so why must and index (which was generated previously and 
stored in a particular row of the container) be reused and placed in the same 
exact row of the container when the container is being rebuilt from scratch.   
Am I not understand something?


Robert Story <[EMAIL PROTECTED]> wrote: On Mon, 4 Jun 2007 12:22:53 -0700 (PDT) 
Need wrote:
NH> see attached Microsoft Word document for description ..

Arggh... you aren't going to win any friends by posting word docs. You've just
upped the threshold for the amount of work I have to do to reply, switching
between apps and copying and pasting. So you'll be getting less verbose
answers.

yes, loading with just types is ok. yes, you need to re-use the same index.
you don't have to use the se list method, but you must ensure that the same
row has the same index each time the container is loaded. If using row_prep,
you won't be populating the whole container for a type - you will get a
pointer to a specific row, and only need to load the data for that row.


   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Hopefully, this explains my confusion a bit more

2007-06-05 Thread Need Help
I am not familiar how SNMP is used in the real world so explanations like these 
help me out a lot.   Good job and thanks.


Dave Shield <[EMAIL PROTECTED]> wrote: On 05/06/07, Need Help  wrote:
> You stated "you don't have to use the se list method, but you must ensure
> that the same row has the same index each time the container is loaded"
>
> I thought the "container_load" routine reloads the container from "scratch"
> when it is called, so why must and index (which was generated previously and
> stored in a particular row of the container) be reused and placed in the
> same exact row of the container when the container is being rebuilt from
> scratch.   Am I not understand something?


Think about how this looks to the admin who's trying to monitor his/her systems.

I'm particularly interested in one specific tuner that's been playing
up recently,
so I walk the AVInterfaceTable and the TunerTable, and find that it is
the device
with index 582
   So I set up a script to regularly monitor the settings of the row
with index 582.

A few minutes later, your "container_load" routine kicks in to re-load
the latest
information, and chooses a completely new set of index values.   Suddenly
row 582 refers to a completely different bit of kit (or nothing at
all), and the tuner
that I'm actually trying to monitor now has index 319.

That's clearly not very helpful for a sys admin.

It's standard practise in SNMP for index values to remain stable - once you've
assigned a particular index to a given row (and hence to a particular piece of
hardware, or software, or whatever the MIB is monitoring), then that index
should remain the same.
   It's usually acceptable to re-assign indexes if the whole system reboots
(or the SNMP agent is killed and restarted).  But not in normal operation.

Does that make sense?

Dave


   
-
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-05 Thread Need Help
OK, good stuff here . very helpful ... thanks.

Here are a few more questions ... 

I have Table1 (main table) and Table2 ("1394 table" which is an extension of 
Table1).   Lets say I have updated the Table2_container_init() routine to 
indicate that Table2 should use the same cache that Table1 uses.   Now, when 
the first SNMP request is made  and it is for Table2 (ex: "snmpwalk" request 
perhaps) then the Table1_container_load() routine will be called.  Is this all 
correct so far?

Inside the Table1_container_load() routine I will newly allocate all the 
required rows as well as assigning an index to each of these rows.  If this is 
a subsequent call to Table1_container_load() then I will make sure to rebuild 
the Table1 from scratch by allocating all new rows, but making sure to use the 
same index values for each row as used before.  Is this correct so far?

Lets say that Table1 has the following 4 rows (and 2 columns) populated so far:

index=1   type=1394
 index=2   type=DVI
 index=3   type=1394
 index=4   type=Tuner 

Now, since this SNMP request was for Table2, then the Table2_row_prep() routine 
will eventually be called.  This procedure's interface provides a "row_context" 
data structure in which I can obtain the specific row index in which this 
request is related.  I can then simply populate this specific row (from Table1) 
with the appropriate Table2 data  is this correct?

For a "snmpwalk" request will the Table2_row_prep() routine be called only 
twice and will the procedure interface supply row_conitext data for row 1 and 3 
(since these are the indexes which relate to the 1394 Table2)?   I am not sure 
how the agent would know which rows of Table1 are being used as extensions for 
Table2 data, so maybe you can clarify whether this works or not.  If is does 
not work like this then perhaps you can tell me how I can determine which row 
from Table1 I need to populate with my Table2 data when the Table2_row_prep() 
routine is called.




Robert Story <[EMAIL PROTECTED]> wrote: On Mon, 4 Jun 2007 10:30:25 -0700 (PDT) 
Need wrote:
NH> 1) Lets say the first request made is to "snmpwalk" through Table2.   Are 
you saying that Table1's container_load() procedure has never been called yet 
so none of the index values have been loaded and none of the rows have been 
allocated and placed into the Table1 container yet?  If this is true, then how 
does an "snmpwalk" through Table2 work since no rows have been allocated to 
store the data yet?

By default, yes. Remember, mib2c does not know about the relationship between
the 2 tables, so the generated code treats each independently, with their own
container and data.

NH> I am getting way confused.   What actually happens when an "snmpwalk" of 
Table2 occurs first?  Does the container_load() procedure of Table2 get called 
first?

Yes, by default it would. That is why I told you to use a shared cache in my
last message. If each table uses the same cache, they when _any_ of them are
accessed, the will call the table1 container_load function.

NH> What exactly should be placed into the container_load() procedure of 
Table2? 

Nothing. You could actually delete it, if you also deleted the code that
referenced it in the interface code. With a little work, the mib2c code could
be updated to handle this automatically. Let me know if you want to sponsor a
little work in this area. ;-)

NH> Actually, by now you understand I have a main Table1 (with 4 fields) and a 
Table2 (with 8 fields) which is an extension to Table1.   Perhaps you can 
describe to me what functionality should be placed into the 
Table1_container_load(), Table1_row_prep(), Table2_container_load() and 
Table2_row_prep() routines?  I think my problem is that I understand what the 
container_load and row_prep routines should do, but have no idea how to use 
them correctly when one of my tables is an extension of another table.

Table1_container_load(): load all the indexes. Optionally, load data context
for tabels 1-N.

Table1_row_prep(): load data context for table 1, if not done in container_load

Table2_container_load(): nothing

Table2_row_prep(): load data context for table 2,  if not done in
container_load

NH> 2) You state "Luckily, there is a failry easy way around that, which is 
sharing a single cache as well. See the function _ifXTable_container_init to 
see how it looks up the ifTable cache to share a container".  
NH> 
NH> I looked at this code and can see how another table's cache can be 
connected to the container of another table.  Perhaps you can explain to me 
"why" I should be doing this as am I not clear as to why you are recommending 
this code to me in the first place.

The cache handler is the one that takes care of loading the container when a
request comes in.

NH> 3) You stated "Now, the problem is that when you are loading the container, 
you will have no idea which of the 6 tables triggered the load."   
NH> 
NH> Well this seems bad since I will not know wha

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

2007-06-07 Thread Need Help
1) I updated my code a bit but for some reason the Table2_row_prep() routine is 
never called when I perform a "snmpwalk" of Table2.  Any ideas why 
"Table2_row_prep()" is not being called at all (see the steps a-e below)?


Here are the two tables I am dealing with for testing:

Table1(ocStbHostAVInterfaceTable)
Table2(ocStbHostAnalogVideoTable)


a) I updated the Table1(ocStbHostAVInterfaceTable) data_context structure to 
include the fields from Table2(ocStbHostAnalogVideoTable).

b) I updated Table2 "_ocStbHostAnalogVideoTable_container_init()" routine with 
the following code only, which I believe should tell Table2 to use the same 
cache as Table1(ocStbHostAVInterfaceTable):

if_ctx->cache =
netsnmp_cache_find_by_oid(ocStbHostAVInterfaceTable_oid, 
ocStbHostAVInterfaceTable_oid_size);

if (NULL != if_ctx->cache) {
if_ctx->container = (netsnmp_container *) if_ctx->cache->magic;
return;
} else {
snmp_log(LOG_ERR, "error finding ocStbHostAVInterfaceTable cache\n");
}


c) I added printf statements to the "init_data", "container_init", 
"container_load" and "row_prep" routines of Table1 and Table2 to verify the 
flow through the code was correct when an SNMP request was performed.


d) When I start the SNMP agent the following flow is displayed.   Does this 
seem correct so far?


   ENTER ocStbHostAnalogVideoTable_init_data()
   EXIT  ocStbHostAnalogVideoTable_init_data()
   ENTER _ocStbHostAnalogVideoTable_container_init()
   EXIT  _ocStbHostAnalogVideoTable_container_init()
   ENTER ocStbHostAVInterfaceTable_init_data()
   EXIT  ocStbHostAVInterfaceTable_init_data()
   ENTER ocStbHostAVInterfaceTable_container_init()
   EXIT  ocStbHostAVInterfaceTable_container_init()
   ENTER ocStbHostAVInterfaceTable_container_load()
   EXIT  ocStbHostAVInterfaceTable_container_load()



e) When I request a "snmpwalk" through Table1(ocStbHostAVInterfaceTable) then 
all of the fields of Table1 seem to displayed appropriately, however, doing a 
"snmpwalk" through Table2(ocStbHostAnalogVideoTable), returns nothing.  I 
simply get the Linux cursor back, without any error or anything.  Actually, 
none of my printf statements are displayed either, which means that the 
Table2_row_prep() routine is not being called at all.   Note: I realize the 
"Table2_container_load()" routine is not being called (which is normal) since 
Table2 is using the same cache as Table1.  I actually commented out all of the 
internal code in the "Table2_container_load()" routine, but I left the actual 
routine visible.  Basically, the routine simply does nothing now, it is just 
empty.



2) In regards to "me" stating I will rebuild Table1 when the container_load() 
routine is called, "you" stated "You don't 'have' to start from scratch, but 
it's probably the easiest way".

If I wanted to start from scratch and repopulate Table1, then I need to make 
sure to use the same index values for each row as I used before.  In order to 
do this, I would assume I would need to store each index value by calling the 
"se_add_pair_to_slist" routine.  Basically, I would need to link a unique text 
string to each of the index values being stored so when it comes time to 
repopulate the container (allocate new rows from scratch) then I can search for 
the unique text string (using the "se_find_value_in_slist" call) to find which 
index value was related previously then I can simply use that same index value 
for the regeneration of the container Table  correct?

Now, it would be nice if I did not have to regenerate the container used for 
Table1 everytime the container_load() routine was called, however, I am not 
sure how to do this?  I thought Table1's container was freed(released) once the 
cache has expired and a new snmp request is received, so regenerating the 
container was necessary, but I guess I am wrong.  How can a Table container be 
maintained and not be required to rebuild itself when the container_load() 
routine is called?  If this will take a lot of effort to explain, then perhaps 
we should wait to have this discussion in the future, after my basic stuff is 
working.  Although if this is an easy concept, then please explain.


3) You indicate that the "Table2_row_prep()" routine will be called for each 
row in Table1.  This is fine, since I can check whether the current row 
actually relates to Table2 easily by checking the "type" value defined in 
"Table1".  If the row is not related to Table2, then you indicate I should 
return MFD_SKIP.  Yes, this seems straightforward, however (and you probably 
know I would be asking this), what changes must I make to the table interface 
code of each of the secondary tables in order for them to handle the new 
MFD_SKIP return value?   Actually by "interface code" do you mean the 
"x_interface.c" files need to be updated, or 
are you referring to some other code file which would need to be updated?

Based on the "ifTable" tutorial, I assumed MFD_SKIP

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

2007-06-07 Thread Need Help
Referring to my (3) question (shown below in attached email).

I see the Table2 "_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine  
calls the Table2 "ocStbHostAnalogVideoTable_row_prep()" routine.  I attached 
this code below for reference:


static int
_mfd_ocStbHostAnalogVideoTable_object_lookup(netsnmp_mib_handler *handler,
 netsnmp_handler_registration
 *reginfo,
 netsnmp_agent_request_info
 *agtreq_info,
 netsnmp_request_info
 *requests)
{
int rc = SNMP_ERR_NOERROR;
ocStbHostAnalogVideoTable_rowreq_ctx *rowreq_ctx =
netsnmp_container_table_row_extract(requests);


DEBUGMSGTL(("internal:ocStbHostAnalogVideoTable:_mfd_ocStbHostAnalogVideoTable_object_lookup",
 "called\n"));

/*
 * get our context from mfd
 * ocStbHostAnalogVideoTable_interface_ctx *if_ctx =
 * (ocStbHostAnalogVideoTable_interface_ctx 
*)reginfo->my_reg_void;
 */

if (NULL == rowreq_ctx) {
rc = SNMP_ERR_NOCREATION;
}

if (MFD_SUCCESS != rc)
netsnmp_request_set_error_all(requests, rc);
else
ocStbHostAnalogVideoTable_row_prep(rowreq_ctx);

return SNMP_VALIDATE_ERR(rc);
}   /* _mfd_ocStbHostAnalogVideoTable_object_lookup 
*/


I am assuming I should update the Table2 "ocStbHostAnalogVideoTable_row_prep()" 
routine to have an "int" return value and then update the Table2 
"_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine (shown above) to add 
the following "rc=" text to the "ocStbHostAnalogVideoTable_row_prep()" routine 
call (shown below):

rc = ocStbHostAnalogVideoTable_row_prep(rowreq_ctx);
 
Is this all which is required to process a MFD_SKIP value returned from the 
row_prep routine?



Need Help <[EMAIL PROTECTED]> wrote:
3) You indicate that the "Table2_row_prep()" routine will be called for each 
row in Table1.  This is fine, since I can check whether the  current row 
actually relates to Table2 easily by checking the "type" value defined in 
"Table1".  If the row is not related to Table2, then you indicate I should 
return MFD_SKIP.  Yes, this seems straightforward, however (and you probably 
know I would be asking this), what changes must I make to the table interface 
code of each of the secondary tables in order for them to handle the new 
MFD_SKIP return value?   Actually by "interface code" do you mean the 
"x_interface.c" files need to be updated, or are you referring to some 
other code file which would need to be updated?



   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-07 Thread Need Help
Referring to my oroblem outlined in (1) below ..

It seems the problem might be due to the fact that 
Table2(ocStbHostAnalogVideoTable) seems to be initialized before 
Table1(ocStbHostAVInterfaceTable), thus the cache from Table1 does not exist 
yet and can not be used for Table2.

Is there a way to indicate which table should init first?  I will keep looking 
around.



Need Help <[EMAIL PROTECTED]> wrote: 1) I updated my code a bit but for some 
reason the Table2_row_prep() routine is never called when I perform a 
"snmpwalk" of Table2.  Any ideas why "Table2_row_prep()" is not being called at 
all (see the steps a-e below)?


Here are the two tables I am dealing with for testing:

Table1(ocStbHostAVInterfaceTable)
Table2(ocStbHostAnalogVideoTable)


a) I updated the Table1(ocStbHostAVInterfaceTable) data_context structure to 
include the fields from Table2(ocStbHostAnalogVideoTable).

b) I updated Table2 "_ocStbHostAnalogVideoTable_container_init()" routine with 
the following code only, which I believe should tell Table2 to use the same 
cache as Table1(ocStbHostAVInterfaceTable):

if_ctx->cache =
netsnmp_cache_find_by_oid(ocStbHostAVInterfaceTable_oid, 
ocStbHostAVInterfaceTable_oid_size);

if (NULL != if_ctx->cache)  {
if_ctx->container = (netsnmp_container *) if_ctx->cache->magic;
return;
} else {
snmp_log(LOG_ERR, "error finding ocStbHostAVInterfaceTable cache\n");
}


c) I added printf statements to the "init_data", "container_init", 
"container_load" and "row_prep" routines of Table1 and Table2 to verify the 
flow through the code was correct when an SNMP request was performed.


d) When I start the SNMP agent the following flow is displayed.   Does this 
seem correct so far?


   ENTER ocStbHostAnalogVideoTable_init_data()
   EXIT  ocStbHostAnalogVideoTable_init_data()
   ENTER _ocStbHostAnalogVideoTable_container_init()
   EXIT  _ocStbHostAnalogVideoTable_container_init()
   ENTER  ocStbHostAVInterfaceTable_init_data()
   EXIT  ocStbHostAVInterfaceTable_init_data()
   ENTER ocStbHostAVInterfaceTable_container_init()
   EXIT  ocStbHostAVInterfaceTable_container_init()
   ENTER ocStbHostAVInterfaceTable_container_load()
   EXIT  ocStbHostAVInterfaceTable_container_load()



e) When I request a "snmpwalk" through Table1(ocStbHostAVInterfaceTable) then 
all of the fields of Table1 seem to displayed appropriately, however, doing a 
"snmpwalk" through Table2(ocStbHostAnalogVideoTable), returns nothing.  I 
simply get the Linux cursor back, without any error or anything.  Actually, 
none of my printf statements are displayed either, which means that the 
Table2_row_prep() routine is not being called at all.   Note: I realize the 
"Table2_container_load()" routine is not being called (which is normal) since 
Table2 is using the same cache as Table1.   I actually commented out all of the 
internal code in the "Table2_container_load()" routine, but I left the actual 
routine visible.  Basically, the routine simply does nothing now, it is just 
empty.



   
-
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, 
when. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-07 Thread Need Help
Ok, I sent this email to you before I got your other reply.  :>P

Anyway, I did find a way to reverse the order of the init routines being 
called, but it just may be lucky I guess   please confirm 

The file "agent/mibgroup/OC-STB-HOST-MIB.h" exists (which I needed to create 
manually based on our past discussions) so NetSNMP can determine which Tables 
to include during configure time.   The file contents are as follows:

   config_require(OC-STB-HOST-MIB/ocStbHostAnalogVideoTable);
   config_require(OC-STB-HOST-MIB/ocStbHostAVInterfaceTable);

Using the file described above resulted in Table2(ocStbHostAnalogVideoTable) 
being initialized before Table1(ocStbHostAVInterfaceTable).

When I reversed the order of these tables (see below), then Table1 was 
initialized before Table2 (as desired) and I am now able to perform a 
"snmpwalk" through Table2  (oh yeah!).  I see how the row_prep() routine is now 
being called for each row from Table1.  I feel good right now  .

   config_require(OC-STB-HOST-MIB/ocStbHostAVInterfaceTable);
   config_require(OC-STB-HOST-MIB/ocStbHostAnalogVideoTable);


Anyway, does switching these two lines around truely control the order in which 
the tables are initialized?   If not, then I guess I will need to do what you 
are recommending in your response email instead.
 


Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 7 Jun 2007 09:50:24 -0700 (PDT) 
Need wrote:
NH> Referring to my oroblem outlined in (1) below ..
NH> 
NH> It seems the problem might be due to the fact that 
Table2(ocStbHostAnalogVideoTable) seems to be initialized before 
Table1(ocStbHostAVInterfaceTable), thus the cache from Table1 does not exist 
yet and can not be used for Table2.

That's exactly what I just got through telling you. ;-)

NH> Is there a way to indicate which table should init first?  I will keep 
looking around.

Nope. Check out the ifTable code. I think I just used a static var in table1
to indicate if it had initialized, and called table1 init from table2.


   
-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-07 Thread Need Help
A) You stated there are other methods (instead of using "se_add_pair_to_slist" 
and "se_find_value_in_slist" routines) which can be used to remember index 
values.  I assume "other methods" mean that I am free to implement any other 
way to remember index values if I want :>) ... or perhaps other methods already 
exist within NetSNMP?   I asked this question, since it does seem silly to 
assign a "text string" to each index value like the "se_" routines 
mentioned above require in order to remember the index mappings. I might see if 
I can find another way without using text strings.  Any advice?

B) You state "Check out the container load function(s) for ifTable." .   Well, 
this seems to complicated for me to understand just yet.   I think I will 
simply regenerate Table1 during it's container_load() routine everytime since 
this would be easier for me right now.   Perhaps in the future, updating this 
to not regenerate the full table everytime would be possible.

C) Just wanted to confirm with you the following is true  please confirm:

The "_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine calls the 
"ocStbHostAnalogVideoTable_row_prep()" routine and now it is possible for the 
"ocStbHostAnalogVideoTable_row_prep()" routine to return a MFD_SKIP value.  
This means the "_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine can now 
return a MFD_SKIP value.   

I just wanted to confirm that this is ok and no additional code is required 
(somewhere else) to handle a MFD_SKIP value from being returned by the 
"_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine.   

D) "the more questions you ask in a single message, to more likely I am to take 
longer to respond. I only have so many hours in the day!"

I completely understand and immensely appreciate all the time and guidance you 
have provided me so far.  Without this sort of assistance, I would not even 
come close to using SNMP for my company, especially after finding out I am 
dealing with tables which are related to other tables.

I do apperciate your help immensely ..  thanks to you (as well as David of 
course) !




   
-
Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-07 Thread Need Help
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.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


How to integrate NetSNMP into a working Linux environment?

2007-06-07 Thread Need Help
Ok, my company would like me to start discussing how to incorporate NetSNMP 
into the company's build environment.   I explained the following stuff:

- Indicated "./configure", "make" and "make install" were required for NetSNMP
- Indicated "snmp.conf" and "snmpd.conf" files exist to define stuff
- Indicated certain environment variables could be used if desired
- Indicated other stuff as well as much as I came across so far  :>P

During this discussion, the "build-production" people at my company informed me 
we can not perform the "configure" command as part of our "build process".   
Instead it would be necessary to understand exactly what the "configure" 
command (and I guess the "make" and "make install" commands as well) do "behind 
the scenes" so our build process and perform these exact steps ourselves.  I 
was told we do not want to execute a script file with all of the required 
commands and options in it as well.   

Anyway, is this a common approach to integrating NetSNMP into a business 
application (ie: not using the standard setup commands/options as part of the 
command line or in a script file)?  It scares me not to use the standard steps 
to get NetSNMP configured/running.  Perhaps someone can explain to me whether 
this is weird or not.  If so, then perhaps you can give me a quick overview as 
to how NetSNMP should "normally" be integrated in a build system.

I understand no one knows how our build system works (neither do I), but any 
input into this topic would be greatly appreciated.

Is it crazy to think we can perform everything that "./configure", "make" and 
"make install" does oursleves without using those commands?  Perhaps we do not 
need many of the things these commands do to set up NetSNMP?

I obviously had no answers for my company on this issue, so I am asking for 
help from people who have gone through this before.






 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: How to integrate NetSNMP into a working Linux environment?

2007-06-07 Thread Need Help
Are you recommending we hire a "NetSNMP consultant" to come in and explain what 
can be done to integrate NetSNMP into our environment?  If so, I can mention it 
to my management, but I would assume they would first like to know what each 
command does internally to the files and NetSNMP environment to see if they can 
simply mirror what these commands do.

Anyway, the "build" people here are experienced with integrating other 
applications into the build environment.   They typically figure out what all 
the "setup" commands do internally and then add this "underlying" functionality 
into the build process.

I would assume it might be hard to determine what each individual option does 
internally or how each option affects the system configuration for use by 
NetSNMP, but this is what I have been asked to try and figure out.Actually, 
to start, I am only interested in figuring out how hard it would be to mirror 
what "Configure", "make" and "make install" do ..

Also, it would be nice to know whether it is a common practice to integrate 
NetSNMP into a build environment without using the "configure", "make", "make 
install", etc, etc..  commands which are normally used to get NetSNMP 
functioning properly.



Steve Friedl <[EMAIL PROTECTED]> wrote: On Thu, Jun 07, 2007 at 12:32:00PM 
-0700, Need Help wrote:
> Ok, my company would like me to start discussing how to incorporate NetSNMP 
> into the company's build environment.   I explained the following stuff:

Your company should probably retain a consultant experienced in these
matters, because it's likely to rapidly wander outside the bounds of
of the library itself, and what help you're likely to get here.

Steve


> - Indicated "./configure", "make" and "make install" were required for NetSNMP
> - Indicated "snmp.conf" and "snmpd.conf" files exist to define stuff
> - Indicated certain environment variables could be used if desired
> - Indicated other stuff as well as much as I came across so far  :>P
> 
> During this discussion, the "build-production" people at my company informed 
> me we can not perform the "configure" command as part of our "build process". 
>   Instead it would be necessary to understand exactly what the "configure" 
> command (and I guess the "make" and "make install" commands as well) do 
> "behind the scenes" so our build process and perform these exact steps 
> ourselves.  I was told we do not want to execute a script file with all of 
> the required commands and options in it as well.   
> 
> Anyway, is this a common approach to integrating NetSNMP into a business 
> application (ie: not using the standard setup commands/options as part of the 
> command line or in a script file)?  It scares me not to use the standard 
> steps to get NetSNMP configured/running.  Perhaps someone can explain to me 
> whether this is weird or not.  If so, then perhaps you can give me a quick 
> overview as to how NetSNMP should "normally" be integrated in a build system.
> 
> I understand no one knows how our build system works (neither do I), but any 
> input into this topic would be greatly appreciated.
> 
> Is it crazy to think we can perform everything that "./configure", "make" and 
> "make install" does oursleves without using those commands?  Perhaps we do 
> not need many of the things these commands do to set up NetSNMP?
> 
> I obviously had no answers for my company on this issue, so I am asking for 
> help from people who have gone through this before.
> 
> 
> 
> 
> 
> 
>  
> -
> Don't be flakey. Get Yahoo! Mail for Mobile and 
> always stay connected to friends.
> -
> 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/
> ___
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


-- 
Stephen J Friedl | Security Consultant |  UNIX Wizard  |   +1 714 544-6561
www.unixwiz.net  | Tustin, Calif. USA  | Microsoft MVP | [EMAIL PROTECTED]


 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-07 Thread Need Help
Returning MFD_SKIP from the Table2_row_prep() routine results in the following 
error:

  Error in packet.
  Reason: (genError) A general failure occured


I generated the first two rows using snmpwalk and then decided to return 
MFD_SKIP for the third row request, thinking that the row data would be skipped 
and that Table2_row_prep() for the 4th row would occur, but I got the above 
error instead and the snmpwalk stopped.

Any ideas?



Need Help <[EMAIL PROTECTED]> wrote:C) Just wanted to confirm with you the 
following is true  please confirm:

The "_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine calls the 
"ocStbHostAnalogVideoTable_row_prep()" routine and now it is possible for the 
"ocStbHostAnalogVideoTable_row_prep()" routine to return a MFD_SKIP value.  
This means the "_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine can now 
return a MFD_SKIP value.   

I just wanted to confirm that this is ok and no additional code is required 
(somewhere else) to handle a MFD_SKIP value from being returned by the 
"_mfd_ocStbHostAnalogVideoTable_object_lookup()" routine.   



 
-
Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: How to integrate NetSNMP into a working Linux environment?

2007-06-07 Thread Need Help
I am not knowledgeable in this area at all.   I really can not comment on this. 
  Based on the meeting we had, I was under the impression they would prefer not 
to use "configure" as part of the build sequence.   Perhaps using "configure" 
outside of the build sequence to simply obtain changed files which could then 
be incorporated into the build sequence would be possible, if this is what you 
are recommending.

I do not think it has anything to do with not trusted the build procedure, but 
has more to do with building our environment might not allow for a "configure" 
script to run and completely execute perhaps?  I do not know.   I am sure it 
has nothing to do with not trusting the build of "configure" though.



Dave Shield <[EMAIL PROTECTED]> wrote: On 07/06/07, Need Help  wrote:
> Is it crazy to think we can perform everything that "./configure", "make"
> and "make install" does oursleves without using those commands?

Yes!

You could perhaps set up the 'Makefile' and net-snmp-config.h files
manually, but you'd need to run configure once first, to find out the
appropriate settings.

I suppose you could run "make" (and "make install") manually once,
and capture the output. That output could then be used as a script
to compile and install the software  (having first been validated by
your build production people).

That might be acceptable to your company, but it feels like a lot
of unnecessary work.  If you don't trust the build procedure, why
would you trust the code itself?


How do they usually deal with installing open-source software?

Dave


   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


RE: How to integrate NetSNMP into a working Linux environment?

2007-06-08 Thread Need Help
Yes, and eventually it might come to that, but in the meantime, I am the only 
person which is assigned to handle the SNMP integration work.No oen is 
given time to do this task yet.   We just want to start looking into what it 
would take, and I am the person who is trying to gather some data/ideas on how 
to make this happen.   Eventually, the build people will be getting involved if 
required in the future.

I still have to get NetSNMP functioning for our MIB first, before we try to 
integrate it into our environment.  :>P

Thanks for the information on this issue.



Bruce Shaw <[EMAIL PROTECTED]> wrote: >I am not knowledgeable in this area at 
all.
 
Then maybe we should be talking to someone who is. 

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager. This 
message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.



   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-08 Thread Need Help
Here are the two tables I am dealing with again:

  Table1(ocStbHostAVInterfaceTable)
  Table2(ocStbHostAnalogVideoTable)

I looked into the "ifXTable.h" file and saw how the "ifTable" data structures 
are being used.  

As a result I removed the following structure/definitions from Table2 

  ocStbHostAnalogVideoTable_registration
  ocStbHostAnalogVideoTable_data
  ocStbHostAnalogVideoTable_mib_index
  ocStbHostAnalogVideoTable_rowreq_ctx
  ocStbHostAnalogVideoTable_ref_rowreq_ctx

  
. and added the following code to indicate to use Table1 structures:
  
  typedef ocStbHostAVInterfaceTable_registration
ocStbHostAnalogVideoTable_registration;
  typedef ocStbHostAVInterfaceTable_data
ocStbHostAnalogVideoTable_data;
  typedef ocStbHostAVInterfaceTable_mib_index   
ocStbHostAnalogVideoTable_mib_index;
  typedef ocStbHostAVInterfaceTable_rowreq_ctx  
ocStbHostAnalogVideoTable_rowreq_ctx;
  typedef ocStbHostAVInterfaceTable_ref_rowreq_ctx  
ocStbHostAnalogVideoTable_ref_rowreq_ctx;


My problem now is that the code does not compile.   I confirmed the compile 
errors are due to not being able to find the Table1 structure definitions 
(shown below).  

  ocStbHostAVInterfaceTable_registration  
  ocStbHostAVInterfaceTable_data  
  ocStbHostAVInterfaceTable_mib_index 
  ocStbHostAVInterfaceTable_rowreq_ctx
  ocStbHostAVInterfaceTable_ref_rowreq_ctx


Of course, I made sure the Table1 header file (where these structures are 
defined) was included:

  #include 
"OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h"


Anyway, I know this might be a long shot, but do you think I am missing some 
other thing?  I have been looking at the "ifTable.h" and "ifXTable.h" code as a 
guide to see if I am missing anything, but I can determine what it could be 
causing my compile errors.



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 7 Jun 2007 12:05:15 -0700 (PDT) 
Need wrote:
NH> Ugh ... I just noticed something I think I am doing wrong:   
NH> 

Yep. Check out the ifXTable headers.. you'll see that it is using ifTable
structures.



   
-
Got a little couch potato? 
Check out fun summer activities for kids.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-08 Thread Need Help
Here is the compile errors:

In file included from 
mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h:44,
 from 
mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_access.c:17:
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:72:
 error: syntax error before "ocStbHostAnalogVideoTable_registration"
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:72:
 warning: data definition has no type or storage class
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:73:
 error: syntax error before "ocStbHostAnalogVideoTable_data"
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:73:
 warning: data definition has no type or storage class
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:74:
 error: syntax error before "ocStbHostAnalogVideoTable_mib_index"
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:74:
 warning: data definition has no type or storage class
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:75:
 error: syntax error before "ocStbHostAnalogVideoTable_rowreq_ctx"
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:75:
 warning: data definition has no type or storage class
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:76:
 error: syntax error before "ocStbHostAnalogVideoTable_ref_rowreq_ctx"
.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:76:
 warning: data definition has no type or storage class



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 7 Jun 2007 13:33:51 -0700 (PDT) 
Need wrote:
NH> Returning MFD_SKIP from the Table2_row_prep() routine results in the 
following error:
NH> 
NH>   Error in packet.
NH>   Reason: (genError) A general failure occured
NH> 
NH> 
NH> I generated the first two rows using snmpwalk and then decided to return 
MFD_SKIP for the third row request, thinking that the row data would be skipped 
and that Table2_row_prep() for the 4th row would occur, but I got the above 
error instead and the snmpwalk stopped.
NH> 
NH> Any ideas?

Yeah, you need some code for the interface file.. I'll try to take a look
soon, but in the meantime you can poke around in the interface.c, look how
skip is handled elsewhere, and try that. It might be that easy, but there
might be some side effects to deal with as well.


 
-
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-08 Thread Need Help
I meant to attach the header files for Table1 and Table2. here they are

** If you search for "TODD TEST" you will see all the changes I have made.
 


Need Help <[EMAIL PROTECTED]> wrote: Here are the two tables I am dealing with 
again:

  Table1(ocStbHostAVInterfaceTable)
  Table2(ocStbHostAnalogVideoTable)

I looked into the "ifXTable.h" file and saw how the "ifTable" data structures 
are being used.  

As a result I removed the following structure/definitions from Table2 

  ocStbHostAnalogVideoTable_registration
  ocStbHostAnalogVideoTable_data
  ocStbHostAnalogVideoTable_mib_index
  ocStbHostAnalogVideoTable_rowreq_ctx
  ocStbHostAnalogVideoTable_ref_rowreq_ctx

  
. and added the following code to indicate to use Table1 structures:
  
  typedef ocStbHostAVInterfaceTable_registration
ocStbHostAnalogVideoTable_registration;
  typedef ocStbHostAVInterfaceTable_data
ocStbHostAnalogVideoTable_data;
  typedef  ocStbHostAVInterfaceTable_mib_index   
ocStbHostAnalogVideoTable_mib_index;
  typedef ocStbHostAVInterfaceTable_rowreq_ctx  
ocStbHostAnalogVideoTable_rowreq_ctx;
  typedef ocStbHostAVInterfaceTable_ref_rowreq_ctx  
ocStbHostAnalogVideoTable_ref_rowreq_ctx;


My problem now is that the code does not compile.   I confirmed the compile 
errors are due to not being able to find the Table1 structure definitions 
(shown below).  

  ocStbHostAVInterfaceTable_registration  
  ocStbHostAVInterfaceTable_data  
  ocStbHostAVInterfaceTable_mib_index 
  ocStbHostAVInterfaceTable_rowreq_ctx
  ocStbHostAVInterfaceTable_ref_rowreq_ctx


Of course, I made sure the Table1 header file (where these structures are 
defined) was  included:

  #include 
"OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h"


Anyway, I know this might be a long shot, but do you think I am missing some 
other thing?  I have been looking at the "ifTable.h" and "ifXTable.h" code as a 
guide to see if I am missing anything, but I can determine what it could be 
causing my compile errors.



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 7 Jun 2007 12:05:15 -0700 (PDT) 
Need wrote:
NH> Ugh ... I just noticed something I think I am doing wrong:   
NH> 

Yep. Check out the ifXTable headers.. you'll see that it is using ifTable
structures.




-
Got a little couch potato? 
 Check out fun summer activities for 
kids.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. 

ocStbHostAVInterfaceTable.h
Description: 2068711153-ocStbHostAVInterfaceTable.h


ocStbHostAnalogVideoTable.h
Description: 1363604423-ocStbHostAnalogVideoTable.h
-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-08 Thread Need Help
I might have figured this out .. do not spend your time on this yet  
thanks


Need Help <[EMAIL PROTECTED]> wrote: Here are the two tables I am dealing with 
again:

  Table1(ocStbHostAVInterfaceTable)
  Table2(ocStbHostAnalogVideoTable)

I looked into the "ifXTable.h" file and saw how the "ifTable" data structures 
are being used.  

As a result I removed the following structure/definitions from Table2 

  ocStbHostAnalogVideoTable_registration
  ocStbHostAnalogVideoTable_data
  ocStbHostAnalogVideoTable_mib_index
  ocStbHostAnalogVideoTable_rowreq_ctx
  ocStbHostAnalogVideoTable_ref_rowreq_ctx

  
. and added the following code to indicate to use Table1 structures:
  
  typedef ocStbHostAVInterfaceTable_registration
ocStbHostAnalogVideoTable_registration;
  typedef ocStbHostAVInterfaceTable_data
ocStbHostAnalogVideoTable_data;
  typedef  ocStbHostAVInterfaceTable_mib_index   
ocStbHostAnalogVideoTable_mib_index;
  typedef ocStbHostAVInterfaceTable_rowreq_ctx  
ocStbHostAnalogVideoTable_rowreq_ctx;
  typedef ocStbHostAVInterfaceTable_ref_rowreq_ctx  
ocStbHostAnalogVideoTable_ref_rowreq_ctx;


My problem now is that the code does not compile.   I confirmed the compile 
errors are due to not being able to find the Table1 structure definitions 
(shown below).  

  ocStbHostAVInterfaceTable_registration  
  ocStbHostAVInterfaceTable_data  
  ocStbHostAVInterfaceTable_mib_index 
  ocStbHostAVInterfaceTable_rowreq_ctx
  ocStbHostAVInterfaceTable_ref_rowreq_ctx


Of course, I made sure the Table1 header file (where these structures are 
defined) was  included:

  #include 
"OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h"


Anyway, I know this might be a long shot, but do you think I am missing some 
other thing?  I have been looking at the "ifTable.h" and "ifXTable.h" code as a 
guide to see if I am missing anything, but I can determine what it could be 
causing my compile errors.



Robert Story <[EMAIL PROTECTED]> wrote: On Thu, 7 Jun 2007 12:05:15 -0700 (PDT) 
Need wrote:
NH> Ugh ... I just noticed something I think I am doing wrong:   
NH> 

Yep. Check out the ifXTable headers.. you'll see that it is using ifTable
structures.




-
Got a little couch potato? 
 Check out fun summer activities for 
kids.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


 
-
Don't get soaked.  Take a quick peak at the forecast 
 with theYahoo! Search weather shortcut.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


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

2007-06-08 Thread Need Help
FOUND IT

My problem was caused by having Table1 try to #include the header file from 
Table2 while Table2 had code to #include the header file from Table1.  Things 
were getting screwy.

I fixed this and it now compiles but I have a question.

1) Table2 included the Table1 header file so it could share the data structures 
defined in Table1.  This is required based on how the ifTable/ifXTable share 
the data structures, so this seemed fine.

Based on previous discussions, my goal was to update the data_context of Table1 
to include a "union" of all the required "extended table" data structures since 
they are mutually exclusive to each other.  Since Table2 already had all of 
it's data fields defined in one data_context structure, I thought I could 
simply have Table1 "#include" the header from Table2 and use this structure 
inside the Table1 data_context "union" definition.

I then figured out I could not compile since both tables were trying to include 
each other's header files and this caused some problems.  

Anyway, I looked how ifTable/ifXTable handled this scenario and I saw that the 
ifTable did "not" include the header file from the ifXTable, but instead all of 
the fields in the ifXTable were copied into the ifTable data_context directly.

I decided I could not simply copy all of the fields from my Table2 data_context 
into the Table1 data_context since I wanted to use a "union" of each table, so 
I needed to keep all the table data fields defined within their own structure.  
Using structures within the "union" definition allows me to keep each table 
mutually exclusive to each other easily.  Anyway, what I ended up doing was 
simply moving the Table2 data_context structure definition into the header file 
of Table1 (I also renamed this data structure so the name did not conflict).  

Everything compiles now, but I have a question.  Knowing that I have six tables 
which are extensions of Table1, then I would need to copy all of the 
data_context structures from these six extension tables into the Table1 header 
file to allow the "union" to work.  

Is there a better way to go about this?  I mean, should Table1 header file 
include all data_context structure definitions from all extension tables?


2) Looking at how the ifTable/ifXTable code is implemented, I believe I do not 
need the following routines in my Table2 "interface.c" file.  Would you please 
let me know if you agree that I can delete the following routines (also if you 
think there are more, then let me know):

   
   Table2_allocate_rowreq_ctx()
   Table2_release_rowreq_ctx()
   _cache_load()
   _cache_free()
   _container_item_free()
   _container_free()
   

3) I also decided I needed to update the _mfd_Table2_post_request() routine in 
Table2 to ...

   replace:

Table2_release_rowreq_ctx(rowreq_ctx);

   with:

Table1_release_rowreq_ctx(rowreq_ctx);


   Does this seem correct?




Need Help <[EMAIL PROTECTED]> wrote: Here are the two tables I am dealing with 
again:

  Table1(ocStbHostAVInterfaceTable)
  Table2(ocStbHostAnalogVideoTable)

I looked into the "ifXTable.h" file and saw how the "ifTable" data structures 
are being used.  

As a result I removed the following structure/definitions from Table2 

  ocStbHostAnalogVideoTable_registration
  ocStbHostAnalogVideoTable_data
  ocStbHostAnalogVideoTable_mib_index
  ocStbHostAnalogVideoTable_rowreq_ctx
  ocStbHostAnalogVideoTable_ref_rowreq_ctx

  
. and added the following code to indicate to use Table1 structures:
  
  typedef ocStbHostAVInterfaceTable_registration
ocStbHostAnalogVideoTable_registration;
  typedef ocStbHostAVInterfaceTable_data
ocStbHostAnalogVideoTable_data;
  typedef  ocStbHostAVInterfaceTable_mib_index   
ocStbHostAnalogVideoTable_mib_index;
  typedef ocStbHostAVInterfaceTable_rowreq_ctx  
ocStbHostAnalogVideoTable_rowreq_ctx;
  typedef ocStbHostAVInterfaceTable_ref_rowreq_ctx  
ocStbHostAnalogVideoTable_ref_rowreq_ctx;


My problem now is that the code does not compile.   I confirmed the compile 
errors are due to not being able to find the Table1 structure definitions 
(shown below).  

  ocStbHostAVInterfaceTable_registration  
  ocStbHostAVInterfaceTable_data  
  ocStbHostAVInterfaceTable_mib_index 
  ocStbHostAVInterfaceTable_rowreq_ctx
  ocStbHostAVInterfaceTable_ref_rowreq_ctx


Of course, I made sure the Table1 header file (where these structures are 
defined) was  included:

  #include 
"OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h"


Anyway, I know this might be a long shot, but do you think I am missing some 
other thing?  I have been looking at the "ifTable.h" and "ifXTable.h" code as a 
guide to see if I am missing anything, but I can determine what it could be 
causing my compile errors.



Rober

row_prep() returning MFD_SKIP results in error

2007-06-12 Thread Need Help
It seems I have successfully been able to have 
Table1(ocStbHostAVInterfaceTable)  and Table2(ocStbHostAnalogVideoTable) share 
the same container and can know "snmpwalk" through each table.  One remaining 
problem is not being able to return a MFD_SKIP value from the Table2_row_prep() 
routine.  When I return a MFD_SKIP from this routine, the following error is 
produced and the snmpwalk request stops completely.

  Error in packet.
  Reason: (genError) A general failure occured

I tried looking through the Table2_interface.c file but I can not figure out 
what is going on and how a MFD_SKIP return code is handled.

Will you please help me figure out how to skip certain rows in my 
Table2_row_prep() routine properly?



   
-
You snooze, you lose. Get messages ASAP with AutoCheck
 in the all-new Yahoo! Mail Beta. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Table2 can not use an Enum value defined in Table1

2007-06-12 Thread Need Help
I have am using the following tables which I generated using the MfD 
configuration file:

Table1(ocStbHostAVInterfaceTable)
Table2(ocStbHostAnalogVideoTable)

I added some #define enums to the "ocStbHostAVInterfaceTable_enums.h" Table1 
file and wanted to use these enum values in the Table2_row_prep() routine to 
help me determine if I am processing the correct row of the table or not.

Of course, I added the following #include statement into the 
ocStbHostAnalogVideoTable_data_access.c file (where the Table2_row_prep() 
routine is located) to include the new enums I defined in the Table1 enum file.

 #include 
"OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_enums.h"
 

In Table2_row_prep() routine I have the following code:

   if (rowreq_ctx->data.AVInterfaceType == AV_IFACE_TYPE_BB_VIDEO_IN)
   {
  return MFD_SKIP;
   }

. and this results in the following compile error:

mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable_data_access.c:
 In function `ocStbHostAnalogVideoTable_row_prep':
mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable_data_access.c:420:
 error: syntax error before '=' token
make[1]: *** 
[mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable_data_access.lo]
 Error 1
make[1]: Leaving directory `/export/home/rosent1/snmp/net-snmp-5.4/agent'
make: *** [subdirs] Error 1



"Line 420" is the line in which I am checking the "AV_IFACE_TYPE_BB_VIDEO_IN" 
enum value.  If I replace the "AV_IFACE_TYPE_BB_VIDEO_IN" enum value with a 
"5", then everything compiles fine.   


Any idea why Table2 can not use an enum value defined in the Table1 enum.h file?




   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


FIXED: (Re Table2 can not use an Enum value defined in Table1)

2007-06-12 Thread Need Help
Figured this one out . please disregard ...

PS:  Yes, I am stupid today 

   
-
Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


How can I perform a "complete" re-make of everything?

2007-06-12 Thread Need Help
I tried executing a "make clean" but that does not get rid of all the ".lo" and 
".o" files I have in the MIB directories.

Is there a magic command which can be entered which will re-make the entire 
NetSNMP build?

 
   
-
Pinpoint customers who are looking for what you sell. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Why does Table2_row_prep() get called when walking through Table1

2007-06-12 Thread Need Help
I have the following two tables:

Table1(ocStbHostAVInterfaceTable)
Table2(ocStbHostAnalogVideoTable) - extension of Table1

Note: Table2 is sharing the same container as Table1

I noticed when I perform a "snmpwalk" of Table1, then all the data is displayed 
correctly and then "one" call is made to Table2_row_prep() with row index = 1.

Is this normal?  I guess it does not hurt anything, however, I was just 
wondering if this should be occurring?



   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Why does Table2_row_prep() get called when walking through Table1

2007-06-13 Thread Need Help
Ok, then this means when a "snmpwalk" command for Table1 occurs then I will be 
populating "one row" of data from Table2 everytime, since I have code in the 
Table2_row_prep() routine.

I just wanted to make sure it was not a problem.  Thanks for clarifying.


Dave Shield <[EMAIL PROTECTED]> wrote: On 12/06/07, Need Help  wrote:
> I noticed when I perform a "snmpwalk" of Table1, then all the data is
> displayed correctly and then "one" call is made to Table2_row_prep() with
> row index = 1.
>
> Is this normal?

Yes.

Remember that the walk doesn't know when it's reached the end
of the table.  It simply keeps asking for the "next value".
   It's only when that next value is no longer relevant to the
requested table, that it knows it can stop.

But it needs to retrieve that final "irrelevant" value before it
can tell this, which means that the agent must supply it.
Assuming the two tables are immediately next to each other,
that means that the agent will start querying the second
table, before the snmpwalk command can stop.

Dave


   
-
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Replace SNMP commands with ones which read the ".conf" file settings

2007-06-13 Thread Need Help
When starting out learning about NetSNMP, I installed everything into the 
following private directory location for testing

  /export/home/myname/snmp/usr/local/

I updated the "snmpd.conf" and "snmp.conf" files accordingly to include MIB 
information, etc but I had trouble with the "MIB files" being located when 
performing "snmpwalk", "snmpget", etc.. commands.   

Turns out the problem was that I was using the wrong "snmpwalk", 'snmpget" 
command executable files.  I was using the "/usr/local/bin/snmp" commands 
instead of the NetSNMP "/export/home/myname/snmp/usr/local/bin/snmp" 
commands.   I was told the "/export/home/myname/snmp/usr/local/bin/snmp" 
commands were required since those commands utilized the "snmpd.conf" and 
"snmp.conf" file information, while the "/usr/local/bin/snmp" commands did 
not.

Questions:

1) When I integrate all of this NetSNMP code into my environment, I was going 
to install it into the default "/usr/local/" directory which would result in 
the existing "snmpwalk", "snmpget", etc... commands being overwritten with the 
new versions of these commands. correct?

2) Does anyone know if replacing the existing SNMP commands, etc..  with the 
new versions of the NetSNMP commands which come with NetSNMP-5.4 would cause me 
any problems?  I want to make sure the newer versions of the NetSNMP commands 
(which read "conf" files) can replace the older SNMP commands (which I do not 
think read "conf" files ...??) without causing problems.








   
-
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Does row_prep() routine utilize cache data?

2007-06-13 Thread Need Help
I have my cache is set to be 60 seconds.  When I issue a "snmpget" request 
multiple times for the same data field (just playing around with snmp) within a 
table, I notice the row_prep() routine is called for each request.  Since I 
have code in the row_prep() routine to load the row data, then this means I am 
reloading the row data everytime the "snmpget" request is issued.

I was wondering whether the row_prep() routine should be utilizing the cache 
data in that the row_prep() routine should only be called once (for the 
particular row) within the 60 seconds until the cache times out.  This means 
that subsequent "snmpget" requests (for the particular row) will not result in 
the row_prep() routine being called. 

Perhaps the cache is just used for the overall table "container" and not 
utilized for specfic rows?

I am just curious .





   
-
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Tutorial question: "Writing a SubAgent"

2007-06-13 Thread Need Help
I am interested in having a subagent handle all requests for my particular MIB. 
  As a result, I am reading the tutorial entitled "Writing a SubAgent' located 
here:

  http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent

I did not think "auto-building" the subagent using the "net-snmp-config 
--compile-subagent" option was the most common way of creating a subagent (am I 
wrong?) so I decided to read the "Instrumenting your own code with agentx 
subagent support" section of this tutorial.

I downloaded the required files (as recommended):

  Makefile
  NET-SNMP-TUTORIAL-MIB.txt
  example-demon.c
  nstAgentSubagentObject.c
  nstAgentSubagentObject.h

I was not sure where to put these files, so I created the following directory 
and placed them into this location:

 .../agent/mibgroup/nstAgentSubagentObject/


I performed the "make example-demon" command successfully and updated my 
"snmpd.conf" file to include the "master agentx" line as well.  

1) I then tried to fire up the snmpd master agent but it will not start.  I am 
trying to start it using the following command:

 /export/home/myname/snmp/usr/local/sbin/snmpd -f &

If I remove the "master agentx" line from the "snmpd.conf" file then it will 
start, but this can not be done since I need to inform master agent that 
subagents will be registering with it.  Of course, putting the "master agentx" 
line back in results in the "snmpd" master agent failing to start again.  

Any idea what I am doing wrong?  Why I can not start the master agent when the 
"master agentx" line is included?

2) I am not sure how the "example-demon" subagent is actually related to the 
"NET-SNMP-TUTORIAL-MIB.txt" MIB file at all.   I am assuming this tutorial is 
supposedly showing me how a subagent (ie: example-demon) can be created to 
handle all snmp requests for a particular MIB file (ie: the 
"NET-SNMP-TUTORIAL-MIB.txt" MIB file), but I do not see how the subagent is 
ever associated with a MIB file at all.  

If my assumptions are correct, then how does a subagent become associated with 
a MIB file?










   
-
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Tutorial question: "Writing a SubAgent"

2007-06-13 Thread Need Help
1) Here is the output I get when using the -Le option:

[EMAIL PROTECTED] net-snmp]# /export/home/myname/snmp/usr/local/sbin/snmpd -f 
-Le &
[1] 27644
[EMAIL PROTECTED] net-snmp]# Turning on AgentX master support.
Error: Couldn't open a master agentx socket to listen on ():


Obviously I am not configured correctly  what am I missing?


2) Currently, I am using the snmpd master agent to process my "OC-STB-HOST-MIB" 
MIBfile.  I am using the MfD configuration framework and have multiple 
directories where my code is located:

.../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/  
 .../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/  
 .../agent/mibgroup/OC-STB-HOST-MIB/ocStbHostComponentVideoTable/  
etc..
etc..

** Each directory represents a "Table" defined in the MIB.
 
Now, I would like to create a subagent to handle this MIB file (instead of the 
snmpd master agent) and I am not sure how to go about doing this.  I have 
multiple directories which contain code for this MIB and I am not sure how to 
create the subagent.  Must I create an "example-demon.c" similiar type file for 
each of the tables and edit it was specific MIB information somehow?

Basically, I am confused as to what the tutorial is showing me.   In the 
tutorial, I simply perform a "make" on a "example-demon.c" file and suddenly I 
have a subagent which can be executed by issuing the "example-demon" command.

I do not understand what table files I need to perform a "make" on to suddenly 
get a useable subagent for my own code.   Hopefully I do not have to create a 
subagent for each table in my MIB correct?

Any insight here would be appreciated.  I clearly do not understand how to 
relate what the tutorial is showing me to my own MIB code in order to produce a 
subagent which can handle my MIB.




Dave Shield <[EMAIL PROTECTED]> wrote: On 13/06/07, Need Help  wrote:
> I was not sure where to put these files

It doesn't matter.
The whole point of a standalone subagent is that it's standalone.
It doesn't depend on the rest of the source tree.
   As long as you've got the Net-SNMP suite installed, the
Makefile will pick up the headers and libraries from their
installed locations.





> 1) I then tried to fire up the snmpd master agent but it will not start.  I
> am trying to start it using the following command:
>
>  /export/home/myname/snmp/usr/local/sbin/snmpd -f &

Does it produce any error messages?
Try running it as

 /export/home/myname/snmp/usr/local/sbin/snmpd -f -Le

What does it display?




> 2) I am not sure how the "example-demon" subagent is actually related to the
> "NET-SNMP-TUTORIAL-MIB.txt" MIB file at all.

The file 'example-demon.c'  is the framework for an AgentX subagent.
This is basically equivalent to the framework that
net-snmp-config  --compile-subagent
will generate.

This is then linked together with the code from 'nstAgentSubagentObject.c',
which is where the NET-SNMP-TUTORIAL-MIB.txt stuff is implemented.
These two code files are compiled and linked together to produce the binary
'example-demon'



> If my assumptions are correct, then how does a subagent become associated
> with a MIB file?

Because there are two (or more) code files that are compiled into the
example-demon binary - not just example-demon.c.
   Try watching what happens when you run "make"

Dave


 
-
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Tutorial question: "Writing a SubAgent"

2007-06-13 Thread Need Help
Yes, slowing down is probably best  :>P 

I am using NetSNMP v5.4

Executing the "ls -l /var/agentx" command results in the following error:

ls: /var/agentx:  No such file or directory


My "snmpd.conf" file has the following two lines only:

master agentx
rocommunity  mycommunity_ro  


My "snmp.conf" file has the following two lines only:

mibdirs  +/export/home/myname/snmp/usr/local/share/snmp/mibs
mibs  +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB


Here is the "configure" command I am using:

./configure \
--prefix=/export/home/myname/snmp/usr/local \
--srcdir=/export/home/myname/snmp/net-snmp \
--enable-embedded-perl \
--enable-shared \
--with-mib-modules="OC-STB-HOST-MIB"




Dave Shield <[EMAIL PROTECTED]> wrote: On 13/06/07, Need Help  wrote:
> 1) Here is the output I get when using the -Le option:
>
> [EMAIL PROTECTED] net-snmp]#
> /export/home/myname/snmp/usr/local/sbin/snmpd -f -Le &
> [1] 27644
> [EMAIL PROTECTED] net-snmp]# Turning on AgentX master support.
> Error: Couldn't open a master agentx socket to listen on ():
>
>
> Obviously I am not configured correctly  what am I missing?

I don't know.   How are you configured at the moment?

What's in your snmpd.conf file?
What does 'ls -l /var/agentx'  show? (both before and after starting the agent)

Which version of the software are you working with?


> 2) Currently, I am using the snmpd master agent to process my
>"OC-STB-HOST-MIB" MIBfile.

Can I suggest that you slow down a bit!
It's probably sensible to concentrate on one problem at a time.
If you can't get a single subagent to work, then there's not much
point in racing ahead with looking at building ever more complicated
configurations.

One step at a time

Dave


 
-
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Tutorial question: "Writing a SubAgent"

2007-06-13 Thread Need Help
Once I created the /var/agentx directory manually then everything works as the 
tutorial indicates.

Unfortunately, I do not have any idea how to get my MfD code to be used by a 
subagent.  Not really sure what I need to do here.  

I did see when the "make example-demon" command executed then the it generates 
the following files:

example-demon.o
nstAgentSubagentObject.o

 however, I do not understand how the subagent informs the snmpd master 
agent that all SNMP request relating to the NET-SNMP-TUTORIAL-MIB should be 
sent to the subagent instead of being processed by the snmpd master agent.  

Perhaps you can explain when I am looking at when I look through the 
nstAgentSubagentObject.c/.h and example-demon.c files?



Dave Shield <[EMAIL PROTECTED]> wrote: On 13/06/07, Need Help  wrote:
> I am using NetSNMP v5.4
>
> Executing the "ls -l /var/agentx" command results in the following error:
>
> ls: /var/agentx:  No such file or directory

Are you running the snmpd agent as root?

Try creating the /var/agentx directory before starting the agent.
What output do you get then?

Dave


   
-
Got a little couch potato? 
Check out fun summer activities for kids.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Tutorial question: "Writing a SubAgent"

2007-06-14 Thread Need Help
1) Yes, when I perform "make example-demon" then the following is produced:

gcc -I. `net-snmp-config --cflags`   -c -o example-demon.o example-demon.c
gcc -I. `net-snmp-config --cflags`   -c -o nstAgentSubagentObject.o 
nstAgentSubagentObject.c
gcc -o example-demon example-demon.o nstAgentSubagentObject.o  `net-snmp-config 
--agent-libs`

I can then perform a "snmpget" request nd the desired data is displayed..


2) Ok, so what would my next step be to have my complete MIB tree processed by 
a subagent?   

Would I need to copy the "example-demon.c" file, rename it to something like 
"myOcStbHostMib-demon.c" and edit it with my specific information.   I am 
confused as to where the "example-demon.c" file came from.  Was this file 
created for the sole purpose of showing an example of a subagent or must I copy 
this file and tweak it for use for my specific MIB?

Also, it seems I would need to create a routine similiar to the 
"init_nstAgentSubagentObject()" routine which can be called by the 
"myOcStbHostMib-demon" subagent? DO I create a completely new ".c" file for 
this and place it somewhere, or do I simply call the 
"netsnmp_register_int_instance()" routine from within one of my existing MfD 
code routines somewhere?

I am obviously not clear how to take my existing MfD code and combine it with 
some "example.c" and "nstAgentSubagentObject.c" code and get it working.

Also will by existing container_load() and row_prep() routines be called as 
normal to handle the snmp requests from the subagent or must I have to rewrite 
the code somehow?  I am confused how this all fits together.  What MfD code 
areas need to change to do this?




Dave Shield <[EMAIL PROTECTED]> wrote: On 13/06/07, Need Help  wrote:
> I did see when the "make example-demon" command executed then the it
> generates the following files:
>
> example-demon.o
> nstAgentSubagentObject.o

You should see the following three commands:

cc   -c -o example-demon.o example-demon.c
cc   -c -o nstAgentSubagentObject.o nstAgentSubagentObject.c
cc   -o example-demon  example-demon.o nstAgentSubagentObject.o

(with the various compilation flags, etc)

Is that what you see or not?



>  however, I do not understand how the subagent informs the snmpd master
> agent that all SNMP request relating to the NET-SNMP-TUTORIAL-MIB should be
> sent to the subagent instead of being processed by the snmpd master agent.

The 'nstAgentSubagentObject' module initialisation code will register with the
local subagent framework (example-demon.o) to inform it of the MIB modules it
wishes to handle (i.e. an OID subtree).  This is a standard part of the Net-SNMP
agent processing.
   In this case, this is the netsnmp_register_int_instance() call.

   The subagent framework makes a note of this OID registration locally (so it
knows which module to use), and also sends an AgentX registration request
to the master agent.  This is part of the standard AgentX protocol.

   The AgentX processing module of the master agent receives this AgentX
registration request, and registers this OID subtree with the main master
agent framework.  Again, this is a normal part of the Net-SNMP agent processing.
The main agent doesn't actually care that this is an AgentX registration - it
simply knows to send requests to this particular handler (which happens to
be the AgentX module).

When a GET (or GETNEXT) request comes in, the master agent looks up the
OID in its local registry, and passes the request to the appropriate module.
The AgentX module then forwards this request to the subagent, which looks
up the OID in *its* local registry, and passes the request on to the
appropriate local module (nstAgentSubagentObject).
   In this particular case, there isn't actually any specific code needed to
implement the object (since it's using the 'int_instance' helper).   But in
your MfD examples, this would be the  xxx_handler() routine.



Try it - see whether it works or not.

Dave


   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Tutorial question: "Writing a SubAgent"

2007-06-14 Thread Need Help
Also, I noticed that the "snmpset" request is not working.   I previously 
performed the "snmpget" and that worked.I have the snmpd master agent 
running and I have the "example-demon" subagent running.   Here is the output 
which is displayed when performing the snmpget and snmpset requests as stated 
in the tutorial:

snmpget:
/export/home/rosent1/snmp/usr/local/bin/snmpget -v 1 -c mycommunity_ro 
localhost NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0

   NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 = INTEGER: 2

snmpset:
/export/home/rosent1/snmp/usr/local/bin/snmpset -v 1 -c mycommunity_ro 
localhost NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 = 5

Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.


Any idea why the snmpset fails?


Need Help <[EMAIL PROTECTED]> wrote: 1) Yes, when I perform "make 
example-demon" then the following is produced:

gcc -I. `net-snmp-config --cflags`   -c -o example-demon.o example-demon.c
gcc -I. `net-snmp-config --cflags`   -c -o nstAgentSubagentObject.o 
nstAgentSubagentObject.c
gcc -o example-demon example-demon.o nstAgentSubagentObject.o  `net-snmp-config 
--agent-libs`

I can then perform a "snmpget" request nd the desired data is displayed..


2) Ok, so what would my next step be to have my complete MIB tree processed by 
a subagent?   

Would I need to copy the "example-demon.c" file, rename it to something like 
"myOcStbHostMib-demon.c" and edit it with my specific information.   I am 
confused as to where the "example-demon.c" file came from.  Was this  file 
created for the sole purpose of showing an example of a subagent or must I copy 
this file and tweak it for use for my specific MIB?

Also, it seems I would need to create a routine similiar to the 
"init_nstAgentSubagentObject()" routine which can be called by the 
"myOcStbHostMib-demon" subagent? DO I create a completely new ".c" file for 
this and place it somewhere, or do I simply call the 
"netsnmp_register_int_instance()" routine from within one of my existing MfD 
code routines somewhere?

I am obviously not clear how to take my existing MfD code and combine it with 
some "example.c" and "nstAgentSubagentObject.c" code and get it working.

Also will by existing container_load() and row_prep() routines be called as 
normal to handle the snmp requests from the subagent or must I have to rewrite 
the code somehow?  I am confused how this all fits together.  What MfD code 
areas need to change to do this?




Dave Shield  <[EMAIL PROTECTED]> wrote: On 13/06/07, Need Help  wrote:
> I did see when the "make example-demon" command executed then the it
> generates the following files:
>
> example-demon.o
> nstAgentSubagentObject.o

You should see the following three commands:

cc   -c -o example-demon.o example-demon.c
cc   -c -o nstAgentSubagentObject.o nstAgentSubagentObject.c
cc   -o example-demon  example-demon.o nstAgentSubagentObject.o

(with the various compilation flags, etc)

Is that what you see or not?



>  however, I do not understand how the subagent informs the snmpd master
> agent that all SNMP request relating to the NET-SNMP-TUTORIAL-MIB should be
> sent to the subagent instead of being processed by the snmpd master  agent.

The 'nstAgentSubagentObject' module initialisation code will register with the
local subagent framework (example-demon.o) to inform it of the MIB modules it
wishes to handle (i.e. an OID subtree).  This is a standard part of the Net-SNMP
agent processing.
   In this case, this is the netsnmp_register_int_instance() call.

   The subagent framework makes a note of this OID registration locally (so it
knows which module to use), and also sends an AgentX registration request
to the master agent.  This is part of the standard AgentX protocol.

   The AgentX processing module of the master agent receives this AgentX
registration request, and registers this OID subtree with the main master
agent framework.  Again, this is a normal part of the Net-SNMP agent processing.
The main agent doesn't actually care that this is an AgentX registration - it
simply knows to send requests to this particular handler (which happens  to
be the AgentX module).

When a GET (or GETNEXT) request comes in, the master agent looks up the
OID in its local registry, and passes the request to the appropriate module.
The AgentX module then forwards this request to the subagent, which looks
up the OID in *its* local registry, and passes the request on to the
appropriate local module (nstAgentSubagentObject).
   In this particular case, there isn't actually any specific code needed to
implement the object (since it's using the 'int_instance' helper).   But in
your MfD examples, this would be the 

Fwd: Re: Tutorial question: "Writing a SubAgent"

2007-06-14 Thread Need Help

Geez, that never occurred to me .. :>P

I never really looked into the security stuff yet, just set it to something as 
a default.  Makes sense now ... thanks.



Dave Shield <[EMAIL PROTECTED]> wrote: Date: Thu, 14 Jun 2007 14:24:18 +0100
From: "Dave Shield" <[EMAIL PROTECTED]>
To: "Need Help" <[EMAIL PROTECTED]>
Subject: Re: Tutorial question: "Writing a SubAgent"
CC: net-snmp-coders@lists.sourceforge.net

 On 14/06/07, Need Help  wrote:
>    snmpset -v 1 -c mycommunity_ro .

You are using a community called "something_ro".
What do you guess that "ro" probably stands for?
"Read-Write" or "Read-Only"?



Dave


   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Tutorial question: "Writing a SubAgent"

2007-06-14 Thread Need Help
be best. 
 Does this make sense?


6) To compile and link the "example-demon.c" file with all my other MIB files, 
which file do I need to update?  Perhaps it would be the 
"/agent/mibgroup/Makefile" file . perhaps other files as well?  Also, what 
do I 
need to change in there to get it compiling and linking together? 

** Yes, I am new to the Linux environment . so I do not want to screw 
anything up.


7) Just to confirm for myself ... 

I only need ONE "example-demon.c" type file to exist and this file will call an 
"init" function for each one of my Tables and Scalars defined in my MIB?  Is 
this correct?

*  THANK YOU for all your help and patience.  I am learning tons and really 
appreciate your effort.



Dave Shield <[EMAIL PROTECTED]> wrote: On 14/06/07, Need Help  wrote:
> 2) Ok, so what would my next step be to have my complete MIB tree processed
> by a subagent?

Compile your MIB module code, together with the 'example-demon.c' file
(or equivalent), and link them all together.


> Would I need to copy the "example-demon.c" file, rename it to something like
> "myOcStbHostMib-demon.c" and edit it with my specific information.

You don't have to rename it (unless you specifically want to).
But basically, yes.

>I am
> confused as to where the "example-demon.c" file came from.  Was this file
> created for the sole purpose of showing an example of a subagent

Yes.

> or must I copy this file and tweak it for use for my specific MIB?

Yes.
Either this file, or the equivalent code file generated by the MfD framework.



> Also, it seems I would need to create a routine similiar to the
> "init_nstAgentSubagentObject()" routine which can be called by the
> "myOcStbHostMib-demon" subagent?

You'll need an init_xxx() routine for each MIB module, yes.


> DO I create a completely new ".c" file for
> this and place it somewhere, or do I simply call the
> "netsnmp_register_int_instance()" routine from within one
> of my existing MfD code routines somewhere?

This should already be generated as part of the MfD code.
Just add that call to the example-demon.c (or equivalent).



> I am obviously not clear how to take my existing MfD code and combine it
> with some "example.c" and "nstAgentSubagentObject.c" code and get it
> working.

Replace the 'init_nstAgentSubagentObject()' call in example-demon.c,
with calls to the init routine(s) from your MfD modules.
Replace references to the nstAgentSubagentObject.X files in the Makefile
with the corresponding file(s) from your MfD modules.

Or you could use the Makefile/subagent code generated by mib2c/MfD
and tweak them in the same way.

The bottom line is that you need to compile all of the MIB code files that
you're working with, and call all of the init_xxx() routines from the subagent
driver.



> Also will by existing container_load() and row_prep() routines be called as
> normal to handle the snmp requests from the subagent or must I have to
> rewrite the code somehow?  I am confused how this all fits together.  What
> MfD code areas need to change to do this?

None.
As long as the subagent driving code calls the init_xxx() routine, everything
else should work as usual.

Dave


   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.-
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Tutorial question: "Writing a SubAgent"

2007-06-14 Thread Need Help
One more thing 

My MIB text file is called "OC-STB-HOST-MIB.txt".  In order for the snmpd 
master agent to utilize this text file, I placed it into the 
"/usr/local/share/snmp/mibs" directory and added the "mibs  +OC-STB-HOST-MIB" 
line into the "/usr/local/share/snmp/snmp.conf" file.   I believe this allows 
the master agent to display "text" fields for SNMP requests instead of simply 
displaying OIDs as the results. 

Now,  I do not see this type of functionality beign performed when setting up a 
subagent.In the tutorial we have been discussing, I am not sure how the 
subagent is informed of where the "NET-SNMP-TUTORIAL-MIB.txt" file is located.  

Perhaps you can explain how a subagent finds the  "NET-SNMP-TUTORIAL-MIB.txt" 
file to use?



 
   
-
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, 
when. -
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/___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


  1   2   3   4   >