Thomas Andrews | 23 May 2013 17:05
Picon

Errors building net-snmp in msys: "undefined reference to init_logmatch"

Hi,

I'm trying to build net-snmp using msys (on winXP) using MinGW.

I downloaded and installed MinGW/MSYS using mingw-get-inst. I then 
downloaded net-snmp-5.7.2.tar.gz and installed that. After that I ran 
MSYS, and at the prompt typed the following commands as per README.win32:

   mount e:\\bst\\net-snmp\\net-snmp-5.7.2 /sources
   cd /sources
   BASEDIR=c:/usr ; ./configure --prefix="$BASEDIR" \
   --with-mibdirs="$BASEDIR/share/snmp/mibs" \
   --with-mib-modules="agentx disman/event-mib \
   winExtDLL examples/example" \
   --disable-embedded-perl --without-perl-modules

That seemed to complete okay, so I then executed 'make' which gave me 
the following errors:

<lots of output that looks fine...>
/bin/sh ../libtool  --mode=link gcc -fno-strict-aliasing -g -O2 
-Umingw32 -Dmingw32=mingw32  -o snmpd.exe snmpd.lo 
../snmplib/winservicerc.lo  libnetsnmpagent.la libnetsnmpmibs.la 
../snmplib/libnetsnmp.la  -lws2_32 -liphlpapi -lsnmpapi

libtool: link: gcc -fno-strict-aliasing -g -O2 -Umingw32 
-Dmingw32=mingw32 -o .libs/snmpd.exe .libs/snmpd.o 
../snmplib/.libs/winservicerc.o  ./.libs/libnetsnmpagent.a 
./.libs/libnetsnmpmibs.a /sources/agent/.libs/libnetsnmpagent.a 
/sources/snmplib/.libs/libnetsnmp.a ../snmplib/.libs/libnetsnmp.a 
(Continue reading)

hemant mehar | 20 May 2013 13:30
Picon

Regarding the net-snmp RequestId

Hi,
after snmp_read() call, how can i retrive Request-id from net-snmp pdu?
is there any net-snmp Api to support this?

what i have currently is, as soon as the select() fd pops up for snmpset request, snmp_read() gets called and the write_method () as call back is invoked, i want the net-snmp pdu's requestId to be used to identify few reqeust's during snmpset.

could you please suggest me on this.

Thanks,
Hemant
------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Nicholas Satterly | 19 May 2013 22:17
Picon

Trap description

Hi 

I'm using snmptrapd to call a trap handler and assumed that defining an execute format with "%W" in it would give me the trap description because that is how the man page describes it [1]. However, it seems this only gives me "Enterprise Specific" which is not very useful.

Can snmptrapd be configured to supply the description for a trap that is contained in the MIB to a trap handler?

If not, can anyone suggest other ways that this description could be obtained when a trap is received? One possibility would be to execute "snmptranslate -Td" for every trap received but this might not scale for systems receiving 100's or 1000's of traps a second.

Any help would be appreciated.

Thanks,
Nick


[1] /etc/snmp/snmptrapd.conf

authCommunity log,execute,net public
format execute $a %a\n$A %A\n$b %b\n$B %B\n$x %#y-%#02m-%#02l\n$X %#02.2h:%#02.2j:%#02.2k\n$N %N\n$q %q\n$P %P\n$t %t\n$T %T\n$w %w\n$W %W\n%V~\%~%v\n
traphandle default /tmp/traphandler.sh
------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Gareth Llewellyn | 17 May 2013 20:40
Picon
Gravatar

execute_format via config rather than source compile?

Hello,

I'm experimenting with classifying traps by the community string but so far I haven't been able to work out a way to use the format specifications to get the community as part of the payload passed to the script.

Looking at the source I can see on line 784 of snmptrapd_handlers.c the following format is specified;
#define EXECUTE_FORMAT  "%B\n%b\n%V\n%v\n"

I've confirmed that if I suffix %P to that I get the community string as part of the payload to the script but the comment within the function source indicates that a custom format string can be registered for this trap.

Try as I might I can't find how to pass a custom format string to an execute script in either the command line options or the snmptrapd.conf and I'd rather not have to custom compile just for one format variable.

Could someone point me in the right direction / docs please?

Gareth
------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
ramnarasimha prasad | 15 May 2013 14:20
Picon
Favicon

snmp_parse_oid gives Unknown Object Identifier when run from a webui

Hi Dave and Others,

I am working using net-snmp in our linux (TexasInstruments beaglebone distribution which is have net-snmp) based project and we have created our MIB files and stub files for supporting those OID get/set functionalities. We are able to get/set from the command prompt from both local system as well as the remote system.

We are developing a webui (web User interface) for our system. To interface this webui, I have written a cgi script file in which I am reading the commands sent from webui and processing both get/set commands with oids. When I am running the cgi script from my hyperterminal, I am getting /setting the oids properly. But when I send the command from webui, I am getting the error message "Unknown Object Identifier" in the snmp_parse_oid function. If i give the oid with full sub string (like .1.3.6.1.4.1.128.5.1.37.2.13), it works fine. Can some help me to over come this problem. 

My strong guess is, when i run the command from the webui like "<ipaddress>/cgi-bin/snmp.cgi?snmpget name.2", the system is unable to fine the MIB for parsing the oids. I have read about the snmp.conf which is specific to application configurations where we can set mibdirs, mibfile and others. Even I tried to create this config file and copied under ~/.snmp/snmp.conf and also /etc/snmp/snmp.conf. I have also copied my MIB file in all possible locations like "/usr/local/share/snmp/mibs/", "/usr/libs/cgi-bin" and some other locations.

Can you please help me for over coming with this problem.

Thanks in Advance.
 
Thanks and Regards,
BRN Prasad.
------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
ramnarasimha prasad | 15 May 2013 14:05
Picon
Favicon

(unknown)

 
Thanks and Regards,
BRN Prasad.
------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Satyam Pandita | 15 May 2013 06:14
Picon

Net-Snmp generate_Ku() Function details needed

Hi,

     I am trying to implement snmpv3 application for my network i
looked on net-snmp website for a demo C program and there is this
function generate_Ku() what i thought this fuction does is that it
makes snmp agent to know that with which encryption method and
username and password, agent needs to encrypt the data such that
manager can decrypt the data with same username and password.

Is this the generate_Ku() funtion does. If not then i wanted to know
how the agent and manager share the username and password such that
both can encrypt and decrypt data with a common. I can't understand
how to make a connection to device using snmp c api i.e. how they will
communicate securely how they both get to know of the username and
password set.

------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Jaap Winius | 14 May 2013 23:35
Picon
Favicon

No Such Instance currently exists at this OID

Hi folks,

Following an upgrade from Debian squeeze to wheezy*, the SNMP agent on  
one of my servers stopped responding to queries for data from  
lm-sensors. Before the upgrade it did this:

   ~# snmpget -v2c -c public <host> .1.3.6.1.4.1.2021.13.16.3.1.1.4
   LM-SENSORS-MIB::lmFanSensorsIndex.4 = INTEGER: 3

Now it does this:

   ~# snmpget -v2c -c public <host> .1.3.6.1.4.1.2021.13.16.3.1.1.4
   LM-SENSORS-MIB::lmFanSensorsIndex.4 = No Such Instance currently \
   exists at this OID

In this case, as for the other servers, the libsnmp-base package is  
installed that contains the LM-SENSORS-MIB file. Otherwise the  
configurations for lm-sensors and snmpd are identical and the output  
from the 'sensors' command looks fine. The misbehaving machine only  
has a slightly different sensor chip, although that never used to be a  
problem and it'a even supported by the same kernel module.

Any idea what might be preventing snmpd from relaying the sensors data?

Thanks,

Jaap

*) Both Debian squeeze and wheezy use snmpd (net-snmp) 5.4.3. However,  
squeeze has lm-sensors 3.1.2 and wheezy has 3.3.2.

------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Steve McCarthy | 14 May 2013 23:13
Picon
Favicon

hi



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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Samitha Wijedasa | 14 May 2013 20:06
Picon
Favicon

snmpget with multiple oid query fails for table structures

Hi,

I'm trying to get multiple oid query responses in a single snmpget as follows from a table structure that is designed to facilitate two wifi modules. The last digit identify the particular wifi module I'm querying at the moment. In this case the module 1.

snmpget -v 2c -t 2 -m "" -c public 192.168.0.105 .1.3.6.1.4.1.xxxxx.2.5.85.1.2.1 .1.3.6.1.4.1.xxxxx.2.5.85.1.3.1

iso.3.6.1.4.1.xxxxx.2.5.85.1.2.1 = STRING: "SSSSS"
iso.3.6.1.4.1.xxxxx.2.5.85.1.3.1 = No Such Instance currently exists at this OID

I'm getting the response as above. The response is also interchanged. I.e. 1.3.6.1.4.1.xxxxx.2.5.85.1.3.1 should be the SSID name not .1.3.6.1.4.1.xxxxx.2.5.85.1.2.1.

I generated my code using mib2c and tested with tables that is implemented based on  mib2c.container.conf and  mib2c.iterate.conf. Both show the same problem.

But for the scalar implementation it works without a problem and individual queries for the table structure also works fine.

Thanks

Samitha

------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Leonard G | 14 May 2013 17:45
Picon
Favicon

mib2c

Hi,
I am new to Net-SNMP so please excuse me is the question is somewhat simple.
I am trying to add the ENTITY MIB code to the agent. I have no problems with the scalars, but here is what happens when I add a table( below it is entAliasMappingTable but the same happens for every table in the MIB):
env MIBS=”+ENTITY-MIB” mib2c –c mib2c.mfd.conf entAliasMappingTable
A bunch of .c and .h is generated and I copy them into …/agent/mibgroup dir.
Run ./configure –with-mib-modules=entAliasMappingTable
And get an error:
Mib module “entAliasMappingTable” requires module “ENTITY-MIB/entAliasMappingTable/entAliasMappingTable_interface” but ENTITY-MIB/entAliasMappingTable/entAliasMappingTable_interface.h or ENTITY-MIB/entAliasMappingTable/entAliasMappingTable_interface.c could not be found in ./agent/mibgroup
 
But the files entAliasMappingTable_interface.c and entAliasMappingTable_interface.h were generated and are in mibgroup.
 
What am I doing wrong?
Thanks,
lg
------------------------------------------------------------------------------
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
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Gmane