RE: snmpd under cygwin gdb.

2004-07-30 Thread William R. Buckley
Why does the error message, announcing the segmentation fault,
look as if it comes from the DLL (kernel32.dll), and not from snmpd?

Could it be that the segmentation fault owes its observation to a
failure of MS programmers to handle a GPF?

MS code is well know to be full of bugs, so perhaps the problem is
not with gdb, or snmpd, or cygwin.

I suppose I could be wrong but, on the face of it, the reported error
suggests (to me) that the problem is with MS code.

William R. Buckley

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of kumaresh
 malli
 Sent: Thursday, July 29, 2004 4:05 PM
 To: [EMAIL PROTECTED]
 Subject: snmpd under cygwin gdb.
 
 
 Hi All,
 I am getting this segmentation fault error while trying to run
 snmpd under cygwin gdb. Any suggestions or ideas? Thanks for your help
 in advance.
 
 Kmesh
 
 bash-2.05b$ cd
 bash-2.05b$ gdb
 GNU gdb 2003-09-20-cvs (cygwin-special)
 Copyright 2003 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i686-pc-cygwin.
 (gdb) file /usr/local/sbin/snmpd
 Reading symbols from /usr/local/sbin/snmpd...done.
 (gdb) run -f -L
 Starting program: /usr/local/sbin/snmpd.exe -f -L
 
 Program received signal SIGSEGV, Segmentation fault.
 0x77e75a3d in KERNEL32!IsBadWritePtr ()
from /cygdrive/c/WINDOWS/system32/kernel32.dll
 (gdb)
 
 
 ---
 This SF.Net email is sponsored by OSTG. Have you noticed the changes on
 Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
 one more big change to announce. We are now OSTG- Open Source Technology
 Group. Come see the changes on the new OSTG site. www.ostg.com
 ___
 Net-snmp-users mailing list
 [EMAIL PROTECTED]
 Please see the following page to unsubscribe or change other options:
 https://lists.sourceforge.net/lists/listinfo/net-snmp-users
 



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp localhost problem

2004-07-30 Thread Dave Shield

Pedro After this, i tried to use the snmp applications using the localhost:
Pedro snmpget -v 2c -c public localhost system.sysLocation.0

Ted   How about starting the daemon :-)

Bruce An snmpd.conf file might be appropriate.  So would RTFM.

In particular, the FAQ entries:

Requests always seem to timeout, and don't give me anything back.  Why?
How do I configure access control?

Dave



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: how to best pass a usmUser to snmptrapd?

2004-07-30 Thread Dave Shield
 Actually, better yet we could make use of the fact that snmptrapd is a
 sub-agent already to the master agent.  We could then simply register
 another usmUser table under a different SNMPv3 context (say
 snmptrapd) and thus you could configure snmptrapd's users by talking
 directly to the master agent.  Slick!  I'd install that into 5.2 hands
 down.

Yup - that sounds good.
You might even get beaten to installing it


 But it'd require more code, since the current usmUser code is written
 in the old API and doesn't handle contexts.

Doesn't it?
Couldn't we use register_mib_context rather than the macro REGISTER_MIB ?
It probably hasn't had much practical testing, but it *ought* to work.

(I would also draw the honourable member's attention to the FAQ entry:
   How can I register a MIB module in a different (SNMPv3) context?   )


Which also raises a question about the notification log MIB.
Would that perhaps be better registered under the same context?
(thus freeing the default context version for a log of notifications
sent by the agent)

Dave



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmpd under cygwin gdb.

2004-07-30 Thread Dave Shield

 I am getting this segmentation fault error while trying to run
 snmpd under cygwin gdb. Any suggestions or ideas?

This *might* be a bug in the Windows library, as William suggests.
But it might also be a result of a failure in higher level code.

I'd suggest that before trying to point the finger as MS code,
it would be worth looking a little more closely at exactly *where*
the agent is failing, and hopefully *why*.



 (gdb) file /usr/local/sbin/snmpd
 Reading symbols from /usr/local/sbin/snmpd...done.
 (gdb) run -f -L
 Starting program: /usr/local/sbin/snmpd.exe -f -L
 
 Program received signal SIGSEGV, Segmentation fault.
 0x77e75a3d in KERNEL32!IsBadWritePtr ()
from /cygdrive/c/WINDOWS/system32/kernel32.dll
 (gdb)

Try
(gdb)  bt

to display the stack trace of the agent at this point.
Then use up to go back up the stack, until you get to
Net-SNMP code.   What was the call that triggered the crash,
and what were the parameter values?

Dave




---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Getting data from table using net-snmp

2004-07-30 Thread P M M
Hi All,

I am currently reading your tutorial on NetSNMP sub-agent development
manual. The only change I made in my conf file is:

com2sec local localhost   democommunity
master agentx

Initially I start snmpd agent: ./snmpd -f -L -D
and the the example-daemon you had provided : ./example-daemon

Now I want to fetch the information from table at
1.3.6.1.4.1.8072.2.2.1. So i did

snmpwalk -v 1 -c democommunity localhost 1.3.6.1.4.1.8072.2.2.1 to
fetch the table in tutorial, I am getting nothing...not even error

Am I missing something?. I just need to get all the information from
the running sub-agent(table net netSnmpIETFWGTable)

Thanks in Advance,

PMM


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: EngineID

2004-07-30 Thread Narinder Soni
Thanks Dave. This I will read.

The reason why I asked this was because I am using the Single API
functions equivalent to the Traditional API functions used in
ucd-snmp-0.4.2.5 's snmpget application. Till now I was using only
v2c(and everything worked fine), but now I wanted to get it running for
v3 also.

In my application the snmptrapd's code and snmpget/set's code work in
parallel. Evevrything used to work fine till v2c. But when I start my
application I get error as :
Unknown token: engineBoots
Unknown token: oldEngineId

I am not able to understand why it gives this error message in the
beginning. I am trying to dig out more. But if someone can pinpoint then
it will be fast for me.

Dave Shield wrote:
 
  How and where does snmpget application discover the engine ID of agent's
  machine?
 
 It uses the approach outlined in RFC 3414, section 4 Discovery.
 
 It actually sends the same request two or three times, in the
 sure and certain expectation that the first one(s) will fail.
 But the error reports that are returned from such failures will
 include the missing information (engineID and boot time/count)
 
 Try running
 
 snmpget -d 
 or
 snmpget -Ddump 
 
 to watch what goes on.
 
 Dave


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Fwd: Getting up to speed on traps

2004-07-30 Thread cnelson
(Sorry.  Let's try this again.  Somehow I hit Send too early.)

I'm trying to figure out traps.  I get the general principles and I've read 
http://www.net-snmp.org/tutorial-5/commands/snmptrap.html which didn't seem to be much 
of a tutorial 'cuz I don't feel like I learned much.

Let's say I've got an customized (sub)agent that I build code for with mib2c.  I want 
to send out notifications when a certain value changes (say, a port was disconnected). 
 Can somone point me to an example in the distribution or elsewhere that I can learn 
from?

TIA.

 Chris
---BeginMessage---
http://www.net-snmp.org/tutorial-5/commands/snmptrap.html

---End Message---


Re: snmpd under cygwin gdb.

2004-07-30 Thread kumaresh malli
Hi Dave, William,
Here is some more details regarding the environment and back trace
information. Still the segmentation fault points to kernel32.dll.

Environment details:
Host Platform: Microsoft Windows XP professional version 2002 Service Pack 1
Cygwin Version : 2.427
Net-Snmp Version: 5.1.1
GDB Version: GNU gdb 2003-09-20-cvs (cygwin-special)


bash-2.05b$ gdb snmpd.exe
GNU gdb 2003-09-20-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i686-pc-cygwin...
(gdb) run -f -L
Starting program: /usr/local/sbin/snmpd.exe -f -L

Program received signal SIGSEGV, Segmentation fault.
0x77e75a3d in KERNEL32!IsBadWritePtr () from
/cygdrive/c/WINDOWS/system32/kernel32.dll
(gdb) bt
#0  0x77e75a3d in KERNEL32!IsBadWritePtr () from
/cygdrive/c/WINDOWS/system32/kernel32.dll
#1  0x0013 in ?? ()
#2  0x0022eb44 in ?? ()
#3  0x0012 in ?? ()
#4  0x0022e000 in ?? ()
#5  0x0022e000 in ?? ()
#6  0x0022d4fc in ?? ()
#7  0x0008 in ?? ()
#8  0x0022f090 in ?? ()
#9  0x77e94809 in SetThreadExecutionState () from
/cygdrive/c/WINDOWS/system32/kernel32.dll
#10 0x610a92ed in cygwin1!__getreent () from /usr/bin/cygwin1.dll
#11 0x0008 in ?? ()
#12 0x0022d558 in ?? ()
#13 0x610a9387 in cygwin1!__getreent () from /usr/bin/cygwin1.dll
#14 0x0a0521b0 in ?? ()
#15 0x0022d568 in ?? ()
#16 0x0022eb44 in ?? ()
(gdb)

Thanks 
Kumaresh Malli

On Fri, 30 Jul 2004 09:37:00 +0100, Dave Shield
[EMAIL PROTECTED] wrote:
 
  I am getting this segmentation fault error while trying to run
  snmpd under cygwin gdb. Any suggestions or ideas?
 
 This *might* be a bug in the Windows library, as William suggests.
 But it might also be a result of a failure in higher level code.
 
 I'd suggest that before trying to point the finger as MS code,
 it would be worth looking a little more closely at exactly *where*
 the agent is failing, and hopefully *why*.
 
 
  (gdb) file /usr/local/sbin/snmpd
  Reading symbols from /usr/local/sbin/snmpd...done.
  (gdb) run -f -L
  Starting program: /usr/local/sbin/snmpd.exe -f -L
 
  Program received signal SIGSEGV, Segmentation fault.
  0x77e75a3d in KERNEL32!IsBadWritePtr ()
 from /cygdrive/c/WINDOWS/system32/kernel32.dll
  (gdb)
 
 Try
(gdb)  bt
 
 to display the stack trace of the agent at this point.
 Then use up to go back up the stack, until you get to
 Net-SNMP code.   What was the call that triggered the crash,
 and what were the parameter values?
 
 Dave
 



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmpd under cygwin gdb.

2004-07-30 Thread kumaresh malli
I just thought of adding this details too. I have not made any changes
to net-snmp code. Planning to extend MIB module using C code. But
right now, Just trying to set up development environment under cygwin.
Downloaded net-snmp, compiled and able to run successfully as  a stand
alone program but fails to run under cygwin gdb. Thanks

Kumaresh Malli

On Fri, 30 Jul 2004 09:13:19 -0400, kumaresh malli [EMAIL PROTECTED] wrote:
 Hi Dave, William,
Here is some more details regarding the environment and back trace
 information. Still the segmentation fault points to kernel32.dll.
 
 Environment details:
 Host Platform: Microsoft Windows XP professional version 2002 Service Pack 1
 Cygwin Version : 2.427
 Net-Snmp Version: 5.1.1
 GDB Version: GNU gdb 2003-09-20-cvs (cygwin-special)
 
 bash-2.05b$ gdb snmpd.exe
 GNU gdb 2003-09-20-cvs (cygwin-special)
 Copyright 2003 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i686-pc-cygwin...
 (gdb) run -f -L
 Starting program: /usr/local/sbin/snmpd.exe -f -L
 
 Program received signal SIGSEGV, Segmentation fault.
 0x77e75a3d in KERNEL32!IsBadWritePtr () from
 /cygdrive/c/WINDOWS/system32/kernel32.dll
 (gdb) bt
 #0  0x77e75a3d in KERNEL32!IsBadWritePtr () from
 /cygdrive/c/WINDOWS/system32/kernel32.dll
 #1  0x0013 in ?? ()
 #2  0x0022eb44 in ?? ()
 #3  0x0012 in ?? ()
 #4  0x0022e000 in ?? ()
 #5  0x0022e000 in ?? ()
 #6  0x0022d4fc in ?? ()
 #7  0x0008 in ?? ()
 #8  0x0022f090 in ?? ()
 #9  0x77e94809 in SetThreadExecutionState () from
 /cygdrive/c/WINDOWS/system32/kernel32.dll
 #10 0x610a92ed in cygwin1!__getreent () from /usr/bin/cygwin1.dll
 #11 0x0008 in ?? ()
 #12 0x0022d558 in ?? ()
 #13 0x610a9387 in cygwin1!__getreent () from /usr/bin/cygwin1.dll
 #14 0x0a0521b0 in ?? ()
 #15 0x0022d568 in ?? ()
 #16 0x0022eb44 in ?? ()
 (gdb)
 
 Thanks
 Kumaresh Malli
 
 
 
 On Fri, 30 Jul 2004 09:37:00 +0100, Dave Shield
 [EMAIL PROTECTED] wrote:
 
   I am getting this segmentation fault error while trying to run
   snmpd under cygwin gdb. Any suggestions or ideas?
 
  This *might* be a bug in the Windows library, as William suggests.
  But it might also be a result of a failure in higher level code.
 
  I'd suggest that before trying to point the finger as MS code,
  it would be worth looking a little more closely at exactly *where*
  the agent is failing, and hopefully *why*.
 
 
   (gdb) file /usr/local/sbin/snmpd
   Reading symbols from /usr/local/sbin/snmpd...done.
   (gdb) run -f -L
   Starting program: /usr/local/sbin/snmpd.exe -f -L
  
   Program received signal SIGSEGV, Segmentation fault.
   0x77e75a3d in KERNEL32!IsBadWritePtr ()
  from /cygdrive/c/WINDOWS/system32/kernel32.dll
   (gdb)
 
  Try
 (gdb)  bt
 
  to display the stack trace of the agent at this point.
  Then use up to go back up the stack, until you get to
  Net-SNMP code.   What was the call that triggered the crash,
  and what were the parameter values?
 
  Dave
 
 



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Fwd: Getting up to speed on traps

2004-07-30 Thread Wes Hardaker
 On Fri, 30 Jul 2004 08:44:06 -0400, [EMAIL PROTECTED] said:

cnelson Let's say I've got an customized (sub)agent that I build code
cnelson for with mib2c.  I want to send out notifications when a
cnelson certain value changes (say, a port was disconnected).  Can
cnelson somone point me to an example in the distribution or
cnelson elsewhere that I can learn from?

agent/mibgroup/examples/notification.c

Is probably an example file you want to read.

-- 
Wes Hardaker
Sparta


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Segmentation Fault in Subagent

2004-07-30 Thread Wes Hardaker
 On Thu, 29 Jul 2004 17:21:41 -0400, Reitberger, Susan [EMAIL PROTECTED] said:

Susan I am running the main agent and a subagent which communicate
Susan via the agentx protocol. When I try to set a read-only variable
Susan that the subagent is responsible for, the nonWritable error
Susan comes back to the command line but the subagent has a
Susan segmentation fault. The main agent keeps running smoothly. Has
Susan anyone else encountered this error, or have suggestions on how
Susan to fix it?

Why does the sub-agent segfault?  Have you tried to run it in a
debugger to figure out why its crashing?

-- 
Wes Hardaker
Sparta


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: how to best pass a usmUser to snmptrapd?

2004-07-30 Thread Wes Hardaker
 On Fri, 30 Jul 2004 09:31:07 +0100, Dave Shield [EMAIL PROTECTED] said:

Dave Couldn't we use register_mib_context rather than the macro
Dave REGISTER_MIB ?  It probably hasn't had much practical testing,
Dave but it *ought* to work.

Don't know.  I haven't looked at it enough...

Dave Which also raises a question about the notification log MIB.
Dave Would that perhaps be better registered under the same context?

Agreed.

-- 
Wes Hardaker
Sparta


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


mib2c.iterate.conf table implementation problem

2004-07-30 Thread s sayeed
Hi

I am trying to implement a table using net-snmp5.1. I
have a  simple array that I want to rertieve from this
table. When I do a walk on this table it loops forever
in my get_next entry function. I have attached
relevant part of my code. It would be of great help if
you could suggest me any thing wrong there.

--
--  Example Tables MIB defination
--

lnbCustom2Table OBJECT-TYPE
SYNTAX  SEQUENCE OF LnbCustom2Entry
MAX-ACCESS  not-accessible
STATUS  current
DESCRIPTION

::= { lnbTypeCustom2 3 }

lnbCustom2Entry OBJECT-TYPE
SYNTAX  LnbCustom2Entry
MAX-ACCESS  not-accessible
STATUS  current
DESCRIPTION
A row describing a given working group
INDEX   { lnbEntryLoBand }
::= {lnbCustom2Table 1 }

LnbCustom2Entry ::= SEQUENCE {
lnbEntryLoBand  Counter32,
lnbEntryHiBand  Counter32,
lnbEntryOscFreq Counter32,
lnbEntryPolar   INTEGER,
lnbEntryToneINTEGER,
lnbEntryVoltage  INTEGER
}

///Agent implementation 

/My structure///
typedef struct
{   
  unsigned intloBand;   
  unsigned inthiBand;   
  unsigned intlocalOscFreq;
  TUNER_polarization_t polarization; 
  TUNER_tone_t tone;
  TUNER_voltage_t  voltage; 

} __attribute__ ((packed)) TUNER_bandinfo_t;


TUNER_bandinfo_t custom2table[4];

***during initialization of the table I load this
table with appropiate value and make sure they are ok.


My  get (first/next function)

netsnmp_variable_list *
lnbCustom2Table_get_first_data_point(
void **my_loop_context,
void **my_data_context,
netsnmp_variable_list *put_index_data,
 netsnmp_iterator_info *mydata)
{

*my_loop_context = 0 ;

return lnbCustom2Table_get_next_data_point
(my_loop_context, my_data_context, put_index_data,
mydata);
}


netsnmp_variable_list *
lnbCustom2Table_get_next_data_point(
void **my_loop_context,
void **my_data_context,
netsnmp_variable_list *put_index_data,
 netsnmp_iterator_info *mydata)
{
int i = (int)*my_loop_context;
DEBUGMSGTL((lnbCustom2Table,
 lnbCustom2Table_get_next_data_point \n));


netsnmp_variable_list *vptr;
vptr = put_index_data;

snmp_set_var_value(vptr, 
 (u_char *)custom2table[i].loBand,
  sizeof(custom2table[i].loBand) );

DEBUGMSGTL((lnbCustom2Table,
 lnbCustom2Table_get_next_data_point loBand\n));


*my_data_context = (void*)custom2table[i];
*my_loop_context =  (void*)++i;

DEBUGMSGTL((lnbCustom2Table,
 lnbCustom2Table_get_next_data_point end\n));

return put_index_data;
}
Following is my Debug Output//
Turning on AgentX master support.
NET-SNMP version 5.1
lnbCustom2Table: lnbCustom2Table_get_first_data_point
lnbCustom2Table: lnbCustom2Table_get_next_data_point
lnbCustom2Table: lnbCustom2Table_get_next_data_point
loBand
lnbCustom2Table: lnbCustom2Table_get_next_data_point
end
lnbCustom2Table: lnbCustom2Table_get_next_data_point
lnbCustom2Table: lnbCustom2Table_get_next_data_point
loBand
lnbCustom2Table: lnbCustom2Table_get_next_data_point
end
lnbCustom2Table: lnbCustom2Table_get_next_data_point
lnbCustom2Table: lnbCustom2Table_get_next_data_point
loBand
lnbCustom2Table: lnbCustom2Table_get_next_data_point
end
lnbCustom2Table: lnbCustom2Table_get_next_data_point
lnbCustom2Table: lnbCustom2Table_get_next_data_point
loBand
lnbCustom2Table: lnbCustom2Table_get_next_data_point
end
lnbCustom2Table: lnbCustom2Table_get_next_data_point
lnbCustom2Table: lnbCustom2Table_get_next_data_point
loBand
lnbCustom2Table: lnbCustom2Table_get_next_data_point
end


Thanks
Sabina




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: mib2c.iterate.conf table implementation problem

2004-07-30 Thread Dave Shield

 I am trying to implement a table using net-snmp5.1. I
 have a  simple array that I want to rertieve from this
 table. When I do a walk on this table it loops forever
 in my get_next entry function.

The 'lnbCustom2Table_get_next_data_point' routine needs to return NULL
when it gets to the end of your table:

 netsnmp_variable_list *
 lnbCustom2Table_get_next_data_point(
  void **my_loop_context,
  void **my_data_context,
  netsnmp_variable_list *put_index_data,
  netsnmp_iterator_info *mydata)
 {
 int i = (int)*my_loop_context;
 DEBUGMSGTL((lnbCustom2Table,
  lnbCustom2Table_get_next_data_point \n));

I'd be tempted for this debug statement to include the current index
value.  I.e.

   DEBUGMSGTL((lnbCustom2Table,
   lnbCustom2Table_get_next_data_point %d\n, i ));

 netsnmp_variable_list *vptr;
 vptr = put_index_data;
 
 snmp_set_var_value(vptr, 
  (u_char *)custom2table[i].loBand,
  sizeof(custom2table[i].loBand) );

How big is custom2table ?
What happens when you run off the end of it?

You probably need something like:

  if ( i  MAX_custom2table_INDEX )
  return NULL;


(coming *before* the snmp_set_var_value statement above)


 DEBUGMSGTL((lnbCustom2Table,
  lnbCustom2Table_get_next_data_point loBand\n));
 
 *my_data_context = (void*)custom2table[i];
 *my_loop_context =  (void*)++i;
 
 DEBUGMSGTL((lnbCustom2Table,
  lnbCustom2Table_get_next_data_point end\n));

I probably wouldn't bother with those two debug statements either.
A single debug output, containing all of the useful information about
this particular run is likely to prove clearer.

 return put_index_data;
 }




Dave



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


walking snmpd

2004-07-30 Thread Gary Clark
hello,

I am running Linux version 9 with version 5.1.1 of net-snmp.

I have added and built the MIB and included it into the directory
/usr/local/share/snmp directory.
Generated the templates successfully and moved them into mibgroup and
created the top header with
the config_require(mibfiles.c) etc.

Performed ./configure and performed make.

Ok I am using the snmpd -d to debug whats happenning. When I perform
snmpwalk -v 1 -c erlang local host .1.3.6.1.2.1.6.15

I see the the snmp daemon Receiving a get request and sending a response to
the local machine:

TCP-MIB::tcpOutRsts.0 = counter32: 2

Marvelous. Just what I expected. Ok when I try to do the same with myMib. I
see the snmp daemon receive
and send but I dont see anything on my machine. The snmptranslate for the
given OID works fine though.

Questions do I have to perform a set on an entry within the MIB prior to
performing the snmpwalk command?
Is there a stage I have missed?

Cheers,
Garyc



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


OpenNMS causes Net-SNMP to hang.

2004-07-30 Thread Ray Van Dolson
I'm running Net-SNMP 5.1.2-rc2 on a Red Hat 8.0 system.  This server functions
as a PPP Concentrator and thus has anywhere from 400-500 PPP interfaces up
at any given time in addition to two Ethernet interfaces.

I am using OpenNMS 1.1.2 to monitor this server and others like it.

When OpenNMS runs its SNMP discovery process it appears to query for all
the interfaces on the Concentrator system.  Shortly after the query begins,
Net-SNMP hangs and is non-responsive until the daemon is killed and restarted.

From observing the output with tcpdump, I see that some responses get back
initially, but eventually cease altogether.  I started snmpd with the -D -f
-Le options to see if I could figure out what was going on.  Far too much
meaningless debug output for my eyes, but data was certainly scrolling by at
a rapid rate even while the SNMP server appeared to be hung as far as outside
programs were concerned.

What scrolls by mostly is the following:

trace: handle_getnext_loop(): snmp_agent.c, 2644:
results:trace: sprint_realloc_by_type(): mib.c, 1971:
output: sprint_by_type, type 5
. = NULL

Literally hundreds of times at a very high rate.  Occasionally a large chunk
of PPP PPP PPP and so forth scrolls by and then the previous block continues
looping in its place.

I've brought this to the attention of the OpenNMS people, but many of them
tell me they are monitoring boxes with that number of interfaces with no
problems and suggesteted I check here for any suggestions.

A normal snmpwalk doesn't appear to freeze up Net-SNMP.

I should mention that I have tried both SNMPv1 and SNMPv2c queries from
OpenNMS to see if the issue was exclusive to one version or the other.  No
difference however.

Hope someone can give me some ideas!

Ray Van Dolson


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: mib2c.iterate.conf table implementation problem

2004-07-30 Thread Sabina Sayeed
That was it. I had to return NULL once I reached the max no of entries. It is working 
now.

Thanks a lot for your prompt reply.

Sabina

-Original Message-
From: Dave Shield [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 12:00 PM
To: s sayeed
Cc: [EMAIL PROTECTED]; Sabina Sayeed
Subject: Re: mib2c.iterate.conf table implementation problem 



 I am trying to implement a table using net-snmp5.1. I
 have a  simple array that I want to rertieve from this
 table. When I do a walk on this table it loops forever
 in my get_next entry function.

The 'lnbCustom2Table_get_next_data_point' routine needs to return NULL
when it gets to the end of your table:

 netsnmp_variable_list *
 lnbCustom2Table_get_next_data_point(
  void **my_loop_context,
  void **my_data_context,
  netsnmp_variable_list *put_index_data,
  netsnmp_iterator_info *mydata)
 {
 int i = (int)*my_loop_context;
 DEBUGMSGTL((lnbCustom2Table,
  lnbCustom2Table_get_next_data_point \n));

I'd be tempted for this debug statement to include the current index
value.  I.e.

   DEBUGMSGTL((lnbCustom2Table,
   lnbCustom2Table_get_next_data_point %d\n, i ));

 netsnmp_variable_list *vptr;
 vptr = put_index_data;
 
 snmp_set_var_value(vptr, 
  (u_char *)custom2table[i].loBand,
  sizeof(custom2table[i].loBand) );

How big is custom2table ?
What happens when you run off the end of it?

You probably need something like:

  if ( i  MAX_custom2table_INDEX )
  return NULL;


(coming *before* the snmp_set_var_value statement above)


 DEBUGMSGTL((lnbCustom2Table,
  lnbCustom2Table_get_next_data_point loBand\n));
 
 *my_data_context = (void*)custom2table[i];
 *my_loop_context =  (void*)++i;
 
 DEBUGMSGTL((lnbCustom2Table,
  lnbCustom2Table_get_next_data_point end\n));

I probably wouldn't bother with those two debug statements either.
A single debug output, containing all of the useful information about
this particular run is likely to prove clearer.

 return put_index_data;
 }




Dave



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Proxy Question

2004-07-30 Thread Wes Hardaker
 On Thu, 29 Jul 2004 02:10:24 + (GMT),  [EMAIL PROTECTED] said:

hoil I wish to implement proxy supporting, using Community
hoil Field(SNMPv2).

This is not possible in the currently released Net-SNMP packages.

hoil Originally, SNMPv3 supports Proxy Agent using ContextName.
hoil Instead, I wish to using Community Name in SNMPv2.

hoil When this function will be supported?

I just implemented it for what will be Net-SNMP 5.2.  Please check out
the CVS sources if you want to play with it now.  The com2sec tokens
now support a -Cn flag which maps a community string to a SNMPv3
context, and thus you can use the same context in the proxy -Cn flag
and it should do what you want.

-- 
Wes Hardaker
Sparta


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: walking snmpd

2004-07-30 Thread Wes Hardaker
 On Fri, 30 Jul 2004 11:41:47 -0500, Gary Clark [EMAIL PROTECTED] said:

Gary Questions do I have to perform a set on an entry within the MIB prior to
Gary performing the snmpwalk command?
Gary Is there a stage I have missed?

Did you actually write code to support that table within snmpd?  If
you didn't or you just used the template code that mib2c produced, it
won't actually return any real data until you make it.

-- 
Wes Hardaker
Sparta


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: walking snmpd

2004-07-30 Thread Gary Clark
Much appreciated Wes. The light bulb has just lit-up.

Thanks for the quick response.

Cheers,
Garyc

- Original Message -
From: Wes Hardaker [EMAIL PROTECTED]
To: Gary Clark [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, July 30, 2004 3:14 PM
Subject: Re: walking snmpd


  On Fri, 30 Jul 2004 11:41:47 -0500, Gary Clark
[EMAIL PROTECTED] said:

 Gary Questions do I have to perform a set on an entry within the MIB
prior to
 Gary performing the snmpwalk command?
 Gary Is there a stage I have missed?

 Did you actually write code to support that table within snmpd?  If
 you didn't or you just used the template code that mib2c produced, it
 won't actually return any real data until you make it.

 --
 Wes Hardaker
 Sparta



---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Trap Implementation Idea????

2004-07-30 Thread s sayeed
Hi 

I have just gone through the trap tutorial and the
notification example for trap. I could get trap
successfully from snmpd.

Now I need to design some traps that would be
triggered when an event has occurred somewhere outside
the agent. To be more specific, my agent is running on
a Linux box. I have PCI card on that box that runs a
task from a processor. Within the scope of this task I
need a trap to be generated once certain event has
occurred. 

Previously we used SNMP research agent with our
windows platform. We used to directly call
DoV2cTrapToDest() or kind of trap2send from our code
with the help of an agent library.

What could be the possibility for net-snmp to
communicate with the other task and generate an event
instantly?

Thanks,

Sabina



__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: how to best pass a usmUser to snmptrapd?

2004-07-30 Thread Wes Hardaker
 On Fri, 30 Jul 2004 07:17:44 -0700, Wes Hardaker [EMAIL PROTECTED] said:

Dave Couldn't we use register_mib_context rather than the macro
Dave REGISTER_MIB ?  It probably hasn't had much practical testing,
Dave but it *ought* to work.

Wes Don't know.  I haven't looked at it enough...

Well, I looked at it.  A lot.

In short, I did it.

The notification log tables are now registered under the snmptrapd
context, as is the snmptrapd usmUser table.  Thomas, given the current
main line cvs code you should be able to manage smnpv3 users under the
snmptrapd application by default now.

I thought it was going to be a quick task, and thus explaining how to
do it would take longer than doing it so I started in on it.  However,
in the process I found that I'm not sure agentx has ever supported
contexts properly so I had to fix that first.  Additionally, I think I
solved another issue with contexts that was previously causing
incorrect errors to be returned for !default contexts.

There is one bug left to fix, which is that the first thing registered
under a new context is missing.

-- 
Wes Hardaker
Sparta


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users