Hi, Extracting Variable Name

2013-07-03 Thread Thomas Johnson
Hi,

I am new to net-snmp (and snmp) so struggling a bit here.

I am successfully talking to an SNMP device and getting back some variables 
which I can print out using the following code:

init_snmp etc

then

sess_handle = snmp_open(&session);

  pdu = snmp_pdu_create(SNMP_MSG_GET);

  read_objid("Device::Alarm1.0", id_oid, &id_len);
   snmp_add_null_var(pdu, id_oid, id_len);
  read_objid("Device::Alarm2.0", id_oid, &id_len);
   snmp_add_null_var(pdu, id_oid, id_len);
  read_objid("Device::Alarm3.0", id_oid, &id_len);
   snmp_add_null_var(pdu, id_oid, id_len);
  read_objid("Device::Alarm4.0", id_oid, &id_len);
   snmp_add_null_var(pdu, id_oid, id_len);

  status = snmp_synch_response(sess_handle, pdu, &response);
   if (status==0)
{
for(vars = response->variables; vars; vars = vars->next_variable)
{
print_variable(vars->name, vars->name_length, vars);
}
}

The above works fine.

What I am struggling with is getting the data out of the vars variable list. I 
can get the type and value of the data but I don't seem to be able to get the 
variable name back.

What I want to do is from the vars variable get back the objid eg Alarm1.0 for 
each item in the list . How do I do this ?.

Many thanks for any assistance.

Tom Johnson


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
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


hi

2013-06-13 Thread Pete Snmp
http://maestrocreativo.com/nhnrvm/lsgnk/udwtesx/irr/vwrqb.gdih--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
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


hi

2013-05-14 Thread Steve McCarthy


 http://www.vitalmind.net/sasnomsvkplil.php 














  









 













--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
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


Hi regarding MIB file in system.

2013-02-07 Thread Deepika Muthuramalingam04
Is it possible to locate and read MIB file on a particular system. If code is 
in java, that would help more

Thanks and Regards,
Deepika miracle
   ECSIVS
[Description: Description: visit us :  
www.forangelsonly.org]


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are 
not
to copy, disclose, or distribute this e-mail or its contents to any other 
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken
every reasonable precaution to minimize this risk, but is not liable for any 
damage
you may sustain as a result of any virus in this e-mail. You should carry out 
your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this 
e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***
<>--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
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


Hi, configuration problem on arago :s

2012-05-11 Thread Geoffrey Fournier
Hi :)

I try to install net-snmp on my target, an embedded linux with arago. My
problem is when i run the ./configure commande, after to answer to the
default questions i have this error message :

configure: error: file program not found although it is needed
by libtool.

What is the file program? How can i correct this error or find another way
to install?

Thanks for your time!
Fournier Geoffrey!
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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: Hi :) need help for configuration of snmpd.conf

2012-04-22 Thread David Sastre Medina
On Fri, Apr 20, 2012 at 02:53:20PM +0200, Geoffrey Fournier wrote:
> Hi :)
> I am a beginner in snmp management. I try to make a simple connection
> between two computer (ubuntu) thanks to an ethernet communication
> (cross-wire). I would like to know how i have to configure the superviser
> and the receiver of the command.
> 
> I try to follow all the existing link but when i try to test my connection
> i have this error message : line 50: error:Blank line following debugtokens
> token and after to try to resend command it said me Timeout; No response
> from 192.168.0.1

rouser
agentgroup
exec
exec
proc
syslocation

Have you read the manpages?
After you do that, correct your configuration and try again. If it
fails again, check:
Is the snmpd daemon running in the server?
What's the output of 'lsof -i :161' on the server?
What was the command you run on the client?
Have you tried that command on the server?

-- 
Primary key fingerprint: AD8F BDC0 5A2C FD5F A179  60E7 F79B AB04 5299 EC56


signature.asc
Description: Digital signature
--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
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


Hi :) need help for configuration of snmpd.conf

2012-04-20 Thread Geoffrey Fournier
Hi :)
I am a beginner in snmp management. I try to make a simple connection
between two computer (ubuntu) thanks to an ethernet communication
(cross-wire). I would like to know how i have to configure the superviser
and the receiver of the command.

I try to follow all the existing link but when i try to test my connection
i have this error message : line 50: error:Blank line following debugtokens
token and after to try to resend command it said me Timeout; No response
from 192.168.0.1

I attache my snmpd.conf file
###
#
# 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.

# rouser: a SNMPv3 read-only user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rouser

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rwcommunity  private localhost 
rwcommunity  test 127.0.0.1
rwcommunity  test2 192.168.0.1
rwcommunity  test3 192.168.0.2

#MIB directories. /usr/share/snmp/mibs is the default, 
#including it here avoids some strange problems
export MIBDIRS=/usr/share/snmp/mibs

#snmpd control (yes means start deamon
SNMPDRUN=yes

#snmpd options (use syslog,close stdin/out/err)
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid 
198.168.0.1'



###
# SECTION: Trap Destinations
#
#   Here we define who the agent will send traps to.

# trapsink: A SNMPv1 trap receiver
#   arguments: host [community] [portnum]

trapsink  private 

# trapcommunity: Default trap sink community to use
#   arguments: community-string

trapcommunity  private



###
# SECTION: Agent Operating Mode
#
#   This section defines how the agent will operate when it
#   is running.

# master: Should the agent operate as a master agent or not.
#   Currently, the only supported master agent type for this token
#   is "agentx".
#   
#   arguments: (on|yes|agentx|all|off|no)

master  no

# agentuser: The system user that the agent runs as.
#   arguments: name|#uid

agentuser  manager

# agentgroup: The system group that the agent runs as.
#   arguments: group|#GID

agentgroup  

# agentaddress: The IP address and port number that the agent will listen on.
#   By default the agent listens to any and all traffic from any
#   interface on the default SNMP port (161).  This allows you to
#   specify which address, interface, transport type and port(s) that you
#   want the agent to listen on.  Multiple definitions of this token
#   are concatenated together (using ':'s).
#   arguments: [transport:]port[@interface/address],...

agentaddress udp:161


###
# SECTION: Extending the Agent
#
#   You can extend the snmp agent to have it return information
#   that you yourself define.

# exec: run a simple command using exec()
#   arguments:  [oid] name /path/to/executable arguments

exec 
exec 



###
# SECTION: Monitor Various Aspects of the Running Host
#
#   The following check up on various aspects of a host.

# proc: Check for processes that should be running.
# proc NAME [MAX=0] [MIN=0]
#   
# NAME:  the name of the process to check for.  It must match
#exactly (ie, http will not find httpd processes).
# MAX:   the maximum number allowed to be running.  Defaults to 0.
# MIN:   the minimum number to be running.  Defaults to 0.
#   
#   The results are reported in the prTable section of the UCD-SNMP-MIB tree
#   Special Case:  When the min and max numbers are both 0, it assumes
#   you want a max of infinity and a min of 1.

proc



###
# SECTION: System Information Setup
#
#   This section defines some of the information reported in
#   the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
#   Note that setting this value here means that when trying to
#   perform an snmp SET operation to the sysLocation.0 variable will make
#   the agent return the "notWritable" error code.  IE, including
#   this token in the snmpd.conf file will disable write access to
#   the variable.
#   arguments:  location_string

syslocation  



--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Res

Hi, beginner

2012-04-19 Thread Geoffrey Fournier
Hi! I am news in the domain of SNMP. I have beginning to understand how
that works i want to make a simple program to read and change integer value
from a computer to a target but i am a little lost. For the moment i try to
read a value on my localhost and display it.

I think i have understand the principle of MIB but i don't know how to use
it in a simple program.

For example if i want to read an integer value of the NET-SNMP-EXAMPLES-MIB
which one is stored in mibdir. I have some trouble to find the OID.I try to
display it thanks to the snmptranslate command but  when i enter this OID
in my c program, the OID is not attributed...

If it's possible to have more information about add_mibdir(".") and
mib_tree = read_mib("NET-SNMP-EXAMPLES-MIB.txt) how i can access to it?

Thanks you for your help.

I am a looser :((( 3days without result...
--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
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


Hi, I meet some problem when using net-snmp, can you help me, thank you!

2010-09-14 Thread fu . changyou
Hi,
   I develop some componets on net-snmp, It works OK on AIX. when I test 
it on HP-Unix, a strange thing occured. no matter where I send a request 
to the snmpd, the snmpd print the sender's IP and port always 0.0.0.0:0.
   How can I solve it? thanks!

Received SNMP packet(s) from UDP: [0.0.0.0]->[0.0.0.0]:0
GETNEXT message
-- IDEPAGENT-MIB::csidep

Received 50 bytes from UDP: [0.0.0.0]->[0.0.0.0]:0
: 30 30 02 01 01 04 06 70 75 62 6C 69 63 A1 23 02 00.public?.
0016: 04 0F 9F AF 44 02 01 00 02 01 00 30 15 30 13 06 ...疍..0.0..
0032: 0F 2B 06 01 04 01 84 F8 68 02 67 02 02 01 01 01 .+.鴋.g.
0048: 05 00


Best Regards!

Fu 





ZTE Information Security Notice: The information contained in this mail is 
solely property of the sender's organization. This mail communication is 
confidential. Recipients named above are obligated to maintain secrecy and are 
not permitted to disclose the contents of this communication to others.
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 originator of the 
message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
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: hi need help

2006-07-18 Thread Dave Shield
On 18/07/06, Elias Bou Rahal <[EMAIL PROTECTED]> wrote:
>
> hi Dear,
>
>
>in the UCD-snmp extending agent , i have the function write_Name(int
> action, u_char  *var_val, u_char  var_val_type,   size_t   var_val_len,
> u_char   *statP,  oid  *name, size_t   name_len):
>the second, third and fourth parameters provide information about the new
> desired value, both the type, value and length.

Correct.

> So my question is which function should i use to get the desiring value in
> the block of this function in case the type is integer.

The same function is used for *all* values - OIDs, string-based values
and integers,  You should think of the 'u_char*' parameter as a void
pointer, and cast it to the appropriate type.

i.e.

   write_Name( int action,
u_char  *var_val, u_char  var_val_type, size_t
var_val_len,
   u_char   *statP,  oid  *name, size_t   name_len) {

   long new_val = *(long *)var_val;
   // etc, etc
   }

Dave

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
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


hi need help

2006-07-18 Thread Elias Bou Rahal
hi Dear, 
 
 
   in the UCD-snmp extending agent , i have the function write_Name(int action, u_char  *var_val, u_char  var_val_type,   size_t   var_val_len,  u_char   *statP,  oid  *name, size_t   name_len):
   the second, third and fourth parameters provide information about the new desired value, both the type, value and length.
 
So my question is which function should i use to get the desiring value in the block of this function in case the type is integer.
 
I am waiting for your reply 
 
thank you 
  
   Best Regards 
    Elias
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
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: hi. question about snmpd

2006-07-06 Thread Thomas Anders
이정훈 wrote:
> -bash-3.00# snmpd -r -f -L -C --rocommunity="private 127.0.0.1" udp:1161
> error on subcontainer '' insert (-1)
[...]
> error on subcontainer '' insert (-1)
> Segmentation fault

What net-snmp version are you running? On what platform? What's the
output of "net-snmp-config --configure-options"?

Try with 5.3.1.rc2. If it still has problems, add "-DALL" to the above
snmpd options, file a bug on www.net-snmp.org/bugs and post the output
there.


+Thomas

-- 
Thomas Anders (thomas.anders at blue-cable.de)

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
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


hi. question about snmpd

2006-07-06 Thread 이정훈



I don't know why  below error happen
help..
 
 
-bash-3.00# snmpd -r -f -L -C --rocommunity="private 
127.0.0.1" udp:1161error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert (-1)error on 
subcontainer '' insert (-1)error on subcontainer '' insert 
(-1)Segmentation fault
 
---Jung-hoon 
lee  , R&D Team manager
 
LANBIRD TECHNOLOGY
 
#506 GAYANG-TECHNO-TOWN , 1487 ,GANYANG-3dong, 
Gangseo-gu,Seoul, Korea , 157-203
 
TEL 
+82-2-3662-0528Fax 
+82-2-3662-1244Mobile    
+82-10-7378-3004Mail    
[EMAIL PROTECTED]---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
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


Hi Everyone!

2006-03-17 Thread Pedro Henrique Morsch Mazzoni
When I start snmpd it reports the following error:
: line 20: Error: unknown payload OID

And line 20 is:
defaultMonitors yes

Here is my snmpd.conf:

#System Information
syslocation lpsII
syscontact  netadmin
authtrapenable  1

#Trap Destinations
trapcommunity public
informsink localhost public

#Directives
proc cupsd 1 1

# Disman-event Mib Support(Traps on errors)
createUser    _internal MD5 "password"
iquerySecName _internal
rouser    _internal

defaultMonitors yes
linkUpDownNotifications yes

#SNMPv3 Conf
engineIDType 1

# VACM

# USM users
rouser  lps auth
rwuser  lpsrw   auth

#Acess controle
rocommunity public
rwcommunity private

# Security Name/Source/Community
com2sec local   localhost   private
com2sec lan 146.164.99.0/24 public

# Security Model/Security Name
group   local   usm local
group   lan usm lan

# Include-Exclude/Subtree/Mask
view    all
included   
.1  FF
view    system  included    system  FE

# Context/Security Model/Security level/Prefix/Read/Write/Notify
access  local   "" 
any noauth  exact  
all all all
access  lan
""  any
noauth  exact   mib2   
none    none

Any ideas?

Thanks,
Pedro Mazzoni


Re: Hi i want the documentation details for snmptrapd- version 5.1

2006-03-07 Thread Wes Hardaker
> On Sat, 04 Mar 2006 15:15:06 +0600 (IST), [EMAIL PROTECTED] said:

krishnakumar> I need the documentation details for snmptrapd section
krishnakumar> in net-snmp 5.1 . i need the usage details for snmptrapd
krishnakumar> . please send the same.

Please read the snmptrapd and snmptrapd.conf manual pages.

-- 
Wes Hardaker
Sparta, Inc.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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


Hi i want the documentation details for snmptrapd- version 5.1

2006-03-06 Thread krishnakumar_c
Hi 
  I need the documentation details for  snmptrapd section in net-snmp 5.1 . i 
need the usage details for snmptrapd . please send the same.





Regards
Krishna


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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: Hi

2005-10-25 Thread Dave Shield
On Tue, 2005-10-25 at 11:10 +0530, Sumalatha_Nadella wrote:
>  But when I configure the file with 
> ./configure –with-mib-modules=”examples/notification” ,
> I am getting errors.

Such as?


>  Can anyone please help me out in doing the needed so that I can send
> my own messages to the agent by running the notification.c file.

Actually sending a notification from the agent is fairly
straightforward - it just requires calling "send_v2trap"
(or similar) at the appropriate time.   This is what the
'notification.c' file is intended to illustrate.

The hard bit tends to be deciding *when* to send the trap.
Sending the same trap regularly (as notification.c does)
isn't typically very useful.

Dave



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
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


Hi

2005-10-25 Thread Sumalatha_Nadella








Hi,

 

    I am Sumalatha. I am trying to send my own
messages to the agent through the notification.c file present in the
agent/mibgroup/examples directory of the net-snmp-5.2 version. But when I configure
the file with 

 

./configure –with-mib-modules=”examples/notification”
, I am getting errors. Can anyone please help me out in doing the needed so
that I can send my own messages to the agent by running the notification.c file.

 

 

Thanks & Regards,

Sumalatha



DISCLAIMER:This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..




Re: Hi

2005-10-19 Thread Dave Shield
On Tue, 2005-10-18 at 15:33 +0530, Sumalatha_Nadella wrote:
>   Can anybody help me out in registering the .c file generated
>  by the mib module with the snmp agent.

Put the C file (and accompanying header file) into the source
tree somewhere under 'agent/mibgroup', and run "configure" with
the option '--with-mib-modules'

For example:

$ cd net-snmp-source
$ cp ~/myMIB/myMIB.[ch] agent/mibgroup/
$ configure --with-mib-modules=myMIB
$ make
$ sudo make install

If you copied the MIB module files into a subdirectory
of 'mibgroup':
$ cp ~/myMIB/redMIB.[ch]  agent/mibgroup/rainbow/

then this would be reflected in the "configure" line:
$ configure --with-mib-modules=rainbow/redMIB


If you've got more than one MIB to add:
$ cp ~/myMIB/yellowMIB.[ch]  agent/mibgroup/rainbow/
$ cp ~/myMIB/pinkMIB.[ch]agent/mibgroup/rainbow/

then list them all in the "configure" line:
$ configure --with-mib-modules="rainbow/redMIB
 rainbow/yellowMIB rainbow/pinkMIB"

HTH

Dave



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
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


Hi

2005-10-19 Thread Sumalatha_Nadella








Hi,

 

This is Sumalatha… I am new to this SNMP. Can anybody
help me out in registering the .c file generated by the mib module with the
snmp agent.

 

Thanks & Regards,

Sumalatha 



DISCLAIMER:This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..




Re: HI

2005-09-23 Thread Robert Story
On Tue, 20 Sep 2005 14:23:36 +0530 Sumalatha_Nadella wrote:
S> I am Swetha I am new to Net-SNMP. I am using Net-snmp v
S> 5.2.1.2 in Linux.

Did you install a package, or build from source? If package, then otehn the
perl modules are separate and must also be installed. If source, you must
specify --with-perl-modules when you configure.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
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: HI

2005-09-20 Thread Anand Thillaivillagam
I guess you have installed the NetSNMP libraries and binaries under 
/usr/local (the default case).


Set LD_LIBRARY_PATH=/usr/local/lib in your shell environment and then 
try running mib2c.


Anand

Sumalatha_Nadella wrote:


Hi,

I am Swetha…. I am new to Net-SNMP. I am using Net-snmp v 5.2.1.2 in 
Linux. When I was trying to compile the default mibs to get the 
skeleton code using the mib2c I am getting the following error…..


ERROR: You don't have the SNMP perl module installed. Please obtain 
this by getting the latest source release of the net-snmp toolkit from


http://www.net-snmp.org/download/ . Once you download the source and 
unpack it, the perl module is contained in the perl/SNMP directory.


See the README file there for instructions.

But I have successful installed the perl/SNMP. Can anybody please help 
me out in solving the problem and in getting the skeleton code for the 
mibs that come with the net-snmp source package…


Thanks & Regards

Swetha

DISCLAIMER:
This email (including any attachments) is intended for the sole use of 
the intended recipient/s and may contain material that is CONFIDENTIAL 
AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or 
copying or distribution or forwarding of any or all of the contents in 
this message is STRICTLY PROHIBITED. If you are not the intended 
recipient, please contact the sender by email and delete all copies; 
your cooperation in this regard is appreciated..







---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very

own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
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


HI

2005-09-20 Thread Sumalatha_Nadella








Hi,

    I am Swetha…. I am new to Net-SNMP. I am
using Net-snmp v 5.2.1.2 in Linux. When I was trying to compile the default
mibs to get the skeleton code using the mib2c I am getting the following error…..

 

ERROR: You don't have the SNMP perl module installed. 
Please obtain this by getting the latest source release of the net-snmp toolkit
from 

http://www.net-snmp.org/download/ .  Once you download the
source and unpack it, the perl module is contained in the perl/SNMP directory.

See the README file there for instructions.

 

But I have successful installed the perl/SNMP. Can anybody
please help me out in solving the problem and in getting the skeleton code for
the mibs that come with the net-snmp source package…

 

Thanks & Regards

Swetha



DISCLAIMER:This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..




Re: Hi plZ help in this .

2005-08-08 Thread Robert Story
On Mon, 25 Jul 2005 18:00:04 +0530 Ravikumar wrote:
R> i want some example codes  for
R>  How to get the snmp table data.

See the source for snmpget and/or snmptable.

R>  How to receive the notification from different agents.

See the source for snmptrapd.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
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


Hi plZ help in this .

2005-07-25 Thread Ravikumar

Hi,
 plZ help in this ..
   i want some example codes  for
How to get the snmp table data.
How to receive the notification from different agents.

 Thanks in advance.

  Thanks&Regards,
  Ravi

 



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
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: hi, Net-SNMP :: make problem(subdirs)

2005-07-13 Thread Robert Story
> In this time I NET-SNMP installed in solaris 5.9.

Have you read README.solaris? Particularly section 3, compiling net-snmp?

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
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


hi, Net-SNMP :: make problem(subdirs)

2005-06-30 Thread
How are you, I cannot English well. It is sorry.

In this time I NET-SNMP installed in solaris 5.9.

When it runs the "MAKE" but after the "./CONFIGURE", the error occurs.

The error message with afterwords is same.


:::
echo 's#SYSCONFDIR# / usr/local/etc#g' >>sedscript
/usr/bin/sed -f sedscript ./EXAMPLE.conf.def > EXAMPLE.conf
making all in /usr/local/src/net-snmp-5.2.1/snmplib
*** Error code 139
make : Fatal error: Command failed for target 'subdirs'

:::

The set of the CONFIGURE did with the default

Requesting it gives the solution plan of the "SURDIR"

Thank you.
<>

Re: Hi.... I need ur help..Please help me

2005-03-08 Thread Robert Story
On Thu, 24 Feb 2005 01:45:19 -0800 Chenna wrote:
C>   I could send the traps usgin "snmptrap" command. But my requirement
C> is to use the api. like snmp_easy_trap...like that.
C> 
C>I tried to use the mib2c to generate the stubs. But it asked to
C> load the PERL module. I got some info for doing it in Solaris but I
C> could not make it done properly.

Did you follow the instructions in README.solaris?

You might also try generating the source on another machine, if you have access
to one.

C>net-snmp-config --compile-subagent iAgent nstAgentSubagentObject.c
C> 
C> But I got the error like /usr/local/bin/net-snmp-config : cannot shift.

Hmmm... try running the script with debug (sh -x net-snmp-config), or modifing
the script to add unique 'echo' statements to determing which shift in the
script is failing.

-- 
Robert Story; NET-SNMP Junkie
Support:    
Archive: 

You are lost in a twisty maze of little standards, all different. 


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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


Hi.... I need ur help..Please help me

2005-02-24 Thread Chenna
Hi Robert,
   Im using Net-SNMP 5.1.2. My requirement is to write a simple piece
of code send traps from my application. For e.g. If my process is
running somewhere, I have send the traps with respect to the
performance of that process.

  So please tell me what all the steps I have to follow make it done.

  I could send the traps usgin "snmptrap" command. But my requirement
is to use the api. like snmp_easy_trap...like that.

   I tried to use the mib2c to generate the stubs. But it asked to
load the PERL module. I got some info for doing it in Solaris but I
could not make it done properly.

The Procedure was: #perl MCPAN -e shell
   -- This way I could not succeeded.

   I tried to compile some sample application (nstAgenSubagentObject)
into master agent using the command

   net-snmp-config --compile-subagent iAgent nstAgentSubagentObject.c

But I got the error like /usr/local/bin/net-snmp-config : cannot shift.

   Please give me proper direction to make done. Its very urgent for
me. I have been trying from a long back.

   I hope I will get the information soon.

   Thanks in advance.

-- 
Thanks and Regards
Chenna


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
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


hi, fail to add new mib lib in netsnmp

2004-12-01 Thread celeste
hi,all.
i want to add the new mib lib in net-snmp.
i got some file from
http://net-snmp.sourceforge.net/tutorial-5/toolkit/dlmod/
as example.
the following is my commands:

1.make nstAgentPluginObject.so
2.cp nstAgentPluginObject.so /usr/lib/
3.cp NET-SNMP-TUTORIAL-MIB.txt /usr/local/share/snmp/mibs/ (it's my mib tree 
home)
4.add the line  "dlmod nstAgentPluginObject /usr/lib/nstAgentPluginObject.so" 
into /etc/snmp/snmp.conf
5.snmptable -v 2c -c public localhost UCD-DLMOD-MIB::dlmodTable
the result is as the following:

SNMP table: UCD-DLMOD-MIB::dlmodTable
dlmodNamedlmodPath dlmodError dlmodStatus
nstAgentPluginObject /usr/lib/nstAgentPluginObject.so loaded
6.snmpget -v 2c -c public localhost  
NET-SNMP-TUTORIAL-MIB::nstAgentPluginObject.0
the result is as the following:

NET-SNMP-TUTORIAL-MIB::nstAgentPluginObject.0 = No Such Object available on 
this agent at this OID

can someguy tell me what's my mistake.
thank u a lot.
it has bothered me a long time.
thank u again.

hi

2004-10-27 Thread dzhou
Would you please put my name in the mailing list. Thanks.

Dan



-
This mail sent through IMP: http://horde.org/imp/


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
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: Hi

2004-09-09 Thread Sitaraman .V.R
Hi Dave,
 While the below works(case1), it appears even with increasing OID listing
there are cases where the agent does not start. Case4, Case5 and Case6.
Sitaraman
> Try moving the 'LABCALLSINDEX' entry to immediately after the
> 'EXAMPLETIMETICKS' entry.
> 
> (Though you shouldn't actually have a scalar object and a table with the
> same first subidentifier value either - you'll need to change one of these)
> 
> 
> Dave
> 
> 
> 
> ---
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> ___
> 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
> Case1: 

Code:
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
#if 0
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
#endif
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};

Results: Agent Starts
 Log File is snmpdLogCase1.txt



Case2:
Code: 
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};

Results: Agent Does Not Start
Log file is snmpdLogCase2.txt





Case3:
Code
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
#if 0
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
#endif
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};


Result: Agent Starts
Log file snmpdLogCase3.txt



Case4:
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {17,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {19}} 
};

Result Agent Does Not Start
   Log File snmpdLogCase4.txt



Case5:
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
{LABC

Re: Hi

2004-09-09 Thread Dave Shield

> Code: 
> struct variable3 example_variables[] = {
> {EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
> {EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
> {EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
> {EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
> {EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
> {EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
> {EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
> {LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
> {LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
> {EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
> };

No - that's not valid.

>From AGENT.txt:

  The main element of this is a variable structure specifying the details of
the objects implemented.  This takes the form of an unconstrained array of
type struct variableN . 
Each entry corresponds to one object in the MIB tree (or one column in the
case of table entries), and these should be listed in increasing OID order.
^^


Try moving the 'LABCALLSINDEX' entry to immediately after the
'EXAMPLETIMETICKS' entry.

(Though you shouldn't actually have a scalar object and a table with the
same first subidentifier value either - you'll need to change one of these)


Dave



---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
___
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: Hi

2004-09-08 Thread Sitaraman .V.R
On Wed, 8 Sep 2004, Sitaraman .V.R wrote:

 Hi,
  I apologise, that was a cut and paste mistake. When i actually ran
 it, it WAS 3.
  Therefore, it appears in certain situations when i have
 a struct Variable3 I run into a problem.
  I made a couple more observations, I am attaching them. Let me know 
 if you need me to do more looking into. I will send the Log files for
these too if you need. 
  Thanks
 Sitaraman
> 
> 
> 
> 
> 
> 
> 
> On Tue, 7 Sep 2004, Dave Shield wrote:
> 
> > > {LABCALLSINDEX,ASN_INTEGER, RONLY, var_example, 2, {18,1,1}} 
> > 
> > That line is wrong.
> > You've got 3 subidentifiers in the list,
> > so the length must be declared as 3
> > 
> > Try
> >   {LABCALLSINDEX,ASN_INTEGER, RONLY, var_example, 3, {18,1,1}} 
> > 
> > Dave
> > 
> > 
> > 
> > ---
> > This SF.Net email is sponsored by BEA Weblogic Workshop
> > FREE Java Enterprise J2EE developer tools!
> > Get your free copy of BEA WebLogic Workshop 8.1 today.
> > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> > ___
> > 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
> > Case1: 

Code:
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
#if 0
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
#endif
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};

Results: Agent Starts
 Log File is snmpdLogCase1.txt



Case2:
Code: 
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};

Results: Agent Does Not Start
Log file is snmpdLogCase2.txt




Case3:
Code
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
#if 0
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
#endif
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};


Result: Agent Starts
Log file snmpdLogCase3.txt



Re: Hi

2004-09-07 Thread Dave Shield
> {LABCALLSINDEX,ASN_INTEGER, RONLY, var_example, 2, {18,1,1}} 

That line is wrong.
You've got 3 subidentifiers in the list,
so the length must be declared as 3

Try
  {LABCALLSINDEX,ASN_INTEGER, RONLY, var_example, 3, {18,1,1}} 

Dave



---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
___
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


Hi

2004-09-07 Thread Sitaraman .V.R
Hi,
 I am using version 5.0.9. I am trying to extend the agent
in the style given in the mibgroup/examples/example.c file.
I have the following problem
Any help will be appreciated
Thanks


 I am only adding simple integer/string.

 Things work fine if i use variable2 as in 
struct variable2 example_variables[] = {
{EXAMPLESTRING, ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLEINTEGER, ASN_INTEGER, RWRITE, var_example, 2, {2, 1}},
{EXAMPLEOBJECTID, ASN_OBJECT_ID, RONLY, var_example, 2, {2, 2}},
{EXAMPLETIMETICKS, ASN_TIMETICKS, RONLY, var_example, 1, {3}},
{EXAMPLEIPADDRESS, ASN_IPADDRESS, RONLY, var_example, 1, {4}},
{EXAMPLECOUNTER, ASN_COUNTER, RONLY, var_example, 1, {5}},
{EXAMPLEGAUGE, ASN_GAUGE, RONLY, var_example, 1, {6}},
{EXAMPLETRIGGERTRAP, ASN_INTEGER, RWRITE, var_example, 1, {7}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE, var_example, 1, {8}},
{LABSTRING, ASN_OCTET_STR, RONLY, var_example, 1, {9}},
{LABCALLSINDEX,ASN_INTEGER, RONLY, var_example, 2, {18,1}} 

However, all else remaining same, if i use

struct variable3 example_variables[] = {
{EXAMPLESTRING, ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLEINTEGER, ASN_INTEGER, RWRITE, var_example, 2, {2, 1}},
{EXAMPLEOBJECTID, ASN_OBJECT_ID, RONLY, var_example, 2, {2, 2}},
{EXAMPLETIMETICKS, ASN_TIMETICKS, RONLY, var_example, 1, {3}},
{EXAMPLEIPADDRESS, ASN_IPADDRESS, RONLY, var_example, 1, {4}},
{EXAMPLECOUNTER, ASN_COUNTER, RONLY, var_example, 1, {5}},
{EXAMPLEGAUGE, ASN_GAUGE, RONLY, var_example, 1, {6}},
{EXAMPLETRIGGERTRAP, ASN_INTEGER, RWRITE, var_example, 1, {7}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE, var_example, 1, {8}},
{LABSTRING, ASN_OCTET_STR, RONLY, var_example, 1, {9}},
{LABCALLSINDEX,ASN_INTEGER, RONLY, var_example, 2, {18,1,1}} 


The agent does not even start.
 The debug message is 

trace: netsnmp_ds_set_boolean(): default_store.c, 68
netsnmp_ds_set_boolean: Setting APP:1 = 0/False
trace: netsnmp_ds_set_boolean(): default_store.c, 68
netsnmp_ds_set_boolean: Setting LIB:11 = 1/True
trace: netsnmp_ds_set_boolean(): default_store.c, 68
netsnmp_ds_set_boolean: Setting APP:1 = 0/False
trace: netsnmp_register_handler(): agent_handler.c, 129
handler::register: Registering ::null at .0
trace: netsnmp_inject_handler(): agent_handler.c, 224
handler:inject: injecting bulk_to_next before null
trace: netsnmp_register_mib(): agent_registry.c, 544
register_mib: registering "bulk_to_next" at .0
trace: netsnmp_subtree_find_first(): agent_registry.c, 143
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 152
subtree: didn't find a subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 143
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 152
subtree: didn't find a subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 143
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 152
subtree: didn't find a subtree for context: ""
trace: add_subtree(): agent_registry.c, 169
subtree: adding subtree for context: ""
trace: snmp_call_callbacks(): callback.c, 98
callback: START calling callbacks for maj=1 min=1
trace: snmp_call_callbacks(): callback.c, 117
callback: END calling callbacks for maj=1 min=1 (0 called)
trace: netsnmp_subtree_find_first(): agent_registry.c, 143
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 148
subtree: found one for: ""
trace: netsnmp_register_handler(): agent_handler.c, 129
handler::register: Registering ::null at .1
trace: netsnmp_inject_handler(): agent_handler.c, 224
handler:inject: injecting bulk_to_next before null
trace: netsnmp_register_mib(): agent_registry.c, 544
register_mib: registering "bulk_to_next" at .1
trace: netsnmp_subtree_find_first(): agent_registry.c, 143
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 148
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 143
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 148
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 143
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 148
subtree: found one for: ""
trace: snmp_call_callbacks(): callback.c, 98
callback: START calling callbacks for maj=1 min=1
trace: snmp_call_callbacks(): callback.c, 117
callback: END calling callbacks for maj=1 min=1 (0 called)
trace: netsnmp_register_handler(): agent_handler.c, 129
handler::register: Registering ::null at .2
trace: netsn