Minor typo in mib2c-update man page
Hello, I hope I am sending this to the write mailing list, but the current version of the mib2c-update man page has a typo in it, where 'mib2c-updaterc' is spelled 'mib2c-udpaterc'. Thanks, -- Sincerely, Kole Swesey *Iowa State University | *Computer Science *Information Assurance Student Group | *President ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Mib2c not generating type for RowStatus Object
I have a MIB object: alpRowStatus OBJECT-TYPE SYNTAX RowStatus MAX-ACCESS read-create STATUScurrent DESCRIPTION "Column Description" ::= { ActiveLogicalPositionEntry 2 } When running Mib2c it generates the following definition: #define ALPROWSTATUS 2 {ALPROWSTATUS, , NETSNMP_OLDAPI_RWRITE, var_activeLogicalPositionTable, 5, { 1,3,29 , 1, 2 }}, If you notice there is a missing parameter for the RowStatus Type. Is there a setting I need to adjust when running Mib2c or some info I need to correct in my mib to have it generate the definition here correctly? Thanks, Dan K. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: Installing net-snmp-5.7.3 and mib2c on CentOS
Got past that issue by updating my ldconfig and adding /usr/local/lib, however now I am to my next issue: Can't load '../blib/arch/auto/NetSNMP/agent/agent.so' for module NetSNMP::agent: ../blib/arch/auto/NetSNMP/agent/agent.so: undefined symbol: init_snmp at /usr/lib64/perl5/DynaLoader.pm line 190. This one doesn’t seem to be a missing file with the ldd and I cannot find any references to init_snmp being undefined for others online. From: Kalenscher, Dan (US Person) Sent: Wednesday, April 11, 2018 4:35 PM To: 'Bill Fenner' <fen...@gmail.com> Cc: net-snmp-users@lists.sourceforge.net Subject: RE: Installing net-snmp-5.7.3 and mib2c on CentOS Might have narrowed down the issue. Seems like my make install failed for the perl module, running the perl install manually and did a make test got the output: Can't load '../blib/arch/auto/NetSNMP/default_store/default_store.so' for module NetSNMP::default_store: libnetsnmp.so.30: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190. However when I search for that file on my system I can find: /usr/local/lib64/perl5/auto/NetSNMP/agent/default_store/default_store.so /usr/local/lib64/perl5/auto/NetSNMP/default_store/default_store.so /net-snmp-5.7.3/perl/blib/arch/auto/NetSNMP/default_store/default_store.so /net-snmp-5.7.3/perl/blib/arch/auto/NetSNMP/agent/default_store/default_store.so I see a few others have had this issue so I am trying to see if I can figure oiut how they fixed it. -Dan From: Bill Fenner [mailto:fen...@gmail.com] Sent: Wednesday, April 11, 2018 4:25 PM To: Kalenscher, Dan (US Person) <dkale...@harris.com<mailto:dkale...@harris.com>> Cc: net-snmp-users@lists.sourceforge.net<mailto:net-snmp-users@lists.sourceforge.net> Subject: Re: Installing net-snmp-5.7.3 and mib2c on CentOS On Wed, Apr 11, 2018 at 3:07 PM, Kalenscher, Dan <dkale...@harris.com<mailto:dkale...@harris.com>> wrote: I am working on a server with CentOS 7 and I am building net-snmp agents with custom MIBs and therefore need mib2c. The yum repos with my CentOS build only have: yum list net-snmp Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu<http://mirror.vtti.vt.edu> * centosplus: repos.forethought.net<http://repos.forethought.net> * extras: repos-lax.psychz.net<http://repos-lax.psychz.net> * updates: mirror.grid.uchicago.edu<http://mirror.grid.uchicago.edu> Available Packages net-snmp.x86_64 1:5.7.2-28.el7_4.1 updates Try "yum search net-snmp" and you may find: net-snmp-perl.x86_64 : The perl NET-SNMP module and the mib2c tool I installed this package in a centos7 container and can run mib2c. Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: Installing net-snmp-5.7.3 and mib2c on CentOS
Might have narrowed down the issue. Seems like my make install failed for the perl module, running the perl install manually and did a make test got the output: Can't load '../blib/arch/auto/NetSNMP/default_store/default_store.so' for module NetSNMP::default_store: libnetsnmp.so.30: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190. However when I search for that file on my system I can find: /usr/local/lib64/perl5/auto/NetSNMP/agent/default_store/default_store.so /usr/local/lib64/perl5/auto/NetSNMP/default_store/default_store.so /net-snmp-5.7.3/perl/blib/arch/auto/NetSNMP/default_store/default_store.so /net-snmp-5.7.3/perl/blib/arch/auto/NetSNMP/agent/default_store/default_store.so I see a few others have had this issue so I am trying to see if I can figure oiut how they fixed it. -Dan From: Bill Fenner [mailto:fen...@gmail.com] Sent: Wednesday, April 11, 2018 4:25 PM To: Kalenscher, Dan (US Person) <dkale...@harris.com> Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Installing net-snmp-5.7.3 and mib2c on CentOS On Wed, Apr 11, 2018 at 3:07 PM, Kalenscher, Dan <dkale...@harris.com<mailto:dkale...@harris.com>> wrote: I am working on a server with CentOS 7 and I am building net-snmp agents with custom MIBs and therefore need mib2c. The yum repos with my CentOS build only have: yum list net-snmp Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu<http://mirror.vtti.vt.edu> * centosplus: repos.forethought.net<http://repos.forethought.net> * extras: repos-lax.psychz.net<http://repos-lax.psychz.net> * updates: mirror.grid.uchicago.edu<http://mirror.grid.uchicago.edu> Available Packages net-snmp.x86_64 1:5.7.2-28.el7_4.1 updates Try "yum search net-snmp" and you may find: net-snmp-perl.x86_64 : The perl NET-SNMP module and the mib2c tool I installed this package in a centos7 container and can run mib2c. Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Installing net-snmp-5.7.3 and mib2c on CentOS
On Wed, Apr 11, 2018 at 3:07 PM, Kalenscher, Dan <dkale...@harris.com> wrote: > I am working on a server with CentOS 7 and I am building net-snmp agents > with custom MIBs and therefore need mib2c. The yum repos with my CentOS > build only have: > > > yum list net-snmp > > Loaded plugins: fastestmirror > > Loading mirror speeds from cached hostfile > > * base: mirror.vtti.vt.edu > > * centosplus: repos.forethought.net > > * extras: repos-lax.psychz.net > > * updates: mirror.grid.uchicago.edu > > Available Packages > > net-snmp.x86_64 > 1:5.7.2-28.el7_4.1 > > updates > Try "yum search net-snmp" and you may find: net-snmp-perl.x86_64 : The perl NET-SNMP module and the mib2c tool I installed this package in a centos7 container and can run mib2c. Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Installing net-snmp-5.7.3 and mib2c on CentOS
I know there are a number of threads detailing installation instructions, but I cannot seem to find a definitive answer to my issue here. I am working on a server with CentOS 7 and I am building net-snmp agents with custom MIBs and therefore need mib2c. The yum repos with my CentOS build only have: yum list net-snmp Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu * centosplus: repos.forethought.net * extras: repos-lax.psychz.net * updates: mirror.grid.uchicago.edu Available Packages net-snmp.x86_64 1:5.7.2-28.el7_4.1 updates The 5.7.2 version does not come packaged with the necessary files for configuring your own agents. For example the ./configure script is not even present. My solution was to grab the 5.7.3 .zip version from sourceforge and transfer it over. I did this, but could not run mib2c as it complains that perl modules aren't installed. I tried using yum to install net-snmp-devel (also wrong 5.7.2 version) just to get the perl Makefile.PL to run, which it did(with version complaints). However after that was done mib2c still throws: ERROR: You don't have the SNMP perl module installed. So my question is, how on earth can I get 5.7.3 with a working mib2c on CentOS? I would rather not have to mix and match versions here to hack together a single installation, is there a repo I can point to that has everything working together properly? Thanks. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
use of various SET macros in mib2c generated files
Hi There are various SET macros like MODE_SET_RESERVE1, MODE_SET_RESERVE2,MODE_SET_UNDO in my generated file . I have implemented only MODE_SET_COMMIT for setinng values . What is use of others??. Are they helpful to set values permanently.?? Thanks in advance. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
5.7.2: Problem in ifTable.h created with mib2c
Hello, I ran: mib2c -c mib2c.mfd.conf ifTable I think (not sure) that the file ifTable.h has an error: ... config_add_mib(IF-MIB) config_require(IF-MIB/ifTable/ifTable_interface) config_require(IF-MIB/ifTable/ifTable_data_access) config_require(IF-MIB/ifTable/ifTable_data_get) config_require(IF-MIB/ifTable/ifTable_data_set) IF-MIB should be replaced with "if-mib". Am I right ? Thank you, Zvika -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c databas access
Hi, I am going to create mib tables the are populated from a database. Would the iterate config style be the best fitted to use from mib2c? Thanks! Mattias -- Avis de confidentialité Les informations contenues dans le présent message et dans toute pièce qui lui est jointe sont confidentielles et peuvent être protégées par le secret professionnel. Ces informations sont à l’usage exclusif de son ou de ses destinataires. Si vous recevez ce message par erreur, veuillez s’il vous plait communiquer immédiatement avec l’expéditeur et en détruire tout exemplaire. De plus, il vous est strictement interdit de le divulguer, de le distribuer ou de le reproduire sans l’autorisation de l’expéditeur. Merci. Confidentiality notice This e-mail message and any attachment hereto contain confidential information which may be privileged and which is intended for the exclusive use of its addressee(s). If you receive this message in error, please inform sender immediately and destroy any copy thereof. Furthermore, any disclosure, distribution or copying of this message and/or any attachment hereto without the consent of the sender is strictly prohibited. Thank you. -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
query in mib2c
Hi I am working on net-snmp since past few days. I want lldpLocChassisId from Q-BRIDGE-MIB. I have added the mib and able to translate the OIDs. Now I want to do get. I did mib2c -c mib2c.scalar.conf lldpdLocalSystemData. Janki Chhatbar M.Tech (Embedded Systems) Nirma University (+91) 9409239106 -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Fwd: query in mib2c
Hi I am working on net-snmp since past few days. I want lldpLocChassisId from Q-BRIDGE-MIB. I have added the mib and able to translate the OIDs. Now I want to do get. I did mib2c -c mib2c.scalar.conf lldpdLocalSystemData. lldpLocSystemData.c and lldpLocSystemData.h files are generated in the folder /agent/mibgroup I ran ./configure --with-mib-moduleslldpLocSystemData, make and sudo make install lldpLocSystemData.o and lldpLocSystemData.lo files are generated. When I do snmpget -v 2c -c public localhost Q-BRIDGE-MIB:: lldpLocChassisId, I get unidentified object error. When I run gcc lldpLocSsytemData.c -c lldpLocSystemData.o, it gives undefined reference to functions snmp_get_do_debugging, debugmsgtoken, debugmsg, netsnmp_create_handle_registration, netsnmp_register_scalar, snmp_set_var_typed_value, snmp_log. Can anyone please help me? I am attaching .c and .h files Janki Chhatbar M.Tech (Embedded Systems) Nirma University (+91) 9409239106 /* * Note: this file originally auto-generated by mib2c using *$ */ #ifndef LLDPLOCALSYSTEMDATA_H #define LLDPLOCALSYSTEMDATA_H #ifdef __cplus extern C { #endif config_require(Q-BRIDGE-MIB/lldpLocalSystemData) config_add_mib(Q-BRIDGE-MIB) #include net-snmp/varbind_api.h /* function declarations */ void init_lldpLocalSystemData(void); Netsnmp_Node_Handler handle_lldpLocChassisIdSubtype; Netsnmp_Node_Handler handle_lldpLocChassisId; Netsnmp_Node_Handler handle_lldpLocSysName; Netsnmp_Node_Handler handle_lldpLocSysDesc; Netsnmp_Node_Handler handle_lldpLocSysCapSupported; Netsnmp_Node_Handler handle_lldpLocSysCapEnabled; NETSNMP_IMPORT void debugmsg(const char *token, const char *format,...); NETSNMP_IMPORT void debugmsgtoken(const char *token, const char *format,...); #ifdef __cplusplus } #endif #endif /* LLDPLOCALSYSTEMDATA_H */ /* * Note: this file originally auto-generated by mib2c using *$ */ #include net-snmp/net-snmp-config.h #include net-snmp/net-snmp-includes.h #include net-snmp/agent/net-snmp-agent-includes.h #include lldpLocalSystemData.h #include net-snmp/varbind_api.h #include net-snmp/library/snmp_debug.h static u_long chassis_id_subtype = 4; /** Initializes the lldpLocalSystemData module */ void init_lldpLocalSystemData(void) { const oid lldpLocChassisIdSubtype_oid[] = { 1,0,8802,1,1,2,1,3,1 }; const oid lldpLocChassisId_oid[] = { 1,0,8802,1,1,2,1,3,2 }; const oid lldpLocSysName_oid[] = { 1,0,8802,1,1,2,1,3,3 }; const oid lldpLocSysDesc_oid[] = { 1,0,8802,1,1,2,1,3,4 }; const oid lldpLocSysCapSupported_oid[] = { 1,0,8802,1,1,2,1,3,5 }; const oid lldpLocSysCapEnabled_oid[] = { 1,0,8802,1,1,2,1,3,6 }; // DEBUGMSGTL((lldpLocalSystemData, Initializing\n)); netsnmp_register_scalar( netsnmp_create_handler_registration(lldpLocChassisIdSubtype, handle_lldpLocChassisIdSubtype, lldpLocChassisIdSubtype_oid, OID_LENGTH(lldpLocChassisIdSubtype_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration(lldpLocChassisId, handle_lldpLocChassisId, lldpLocChassisId_oid, OID_LENGTH(lldpLocChassisId_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration(lldpLocSysName, handle_lldpLocSysName, lldpLocSysName_oid, OID_LENGTH(lldpLocSysName_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration(lldpLocSysDesc, handle_lldpLocSysDesc, lldpLocSysDesc_oid, OID_LENGTH(lldpLocSysDesc_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration(lldpLocSysCapSupported, handle_lldpLocSysCapSupported, lldpLocSysCapSupported_oid, OID_LENGTH(lldpLocSysCapSupported_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration(lldpLocSysCapEnabled, handle_lldpLocSysCapEnabled, lldpLocSysCapEnabled_oid, OID_LENGTH(lldpLocSysCapEnabled_oid), HANDLER_CAN_RONLY )); } int handle_lldpLocChassisIdSubtype(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { /* We are never called for a GETNEXT if it's registered as a instance, as it's magically handled for us. */ /* a instance handler also only hands us one request at a time, so we don't need to loop over a list of requests; we'll only get one. */ switch(reqinfo-mode) { case MODE_GET: snmp_set_var_typed_value(requests-requestvb
RE: query in mib2c
Hi Janki Did MIB2C also create any files for you that ended with the words: …_data_get.c or …_data_access.c ? I ask because when I ran MIB2C it generated these files to give me an opportunity to write functions that would be called when the SNMP agent wanted to fetch a value to return to the manager when it is polled. I wrote in those functions, compiled and ran the executable and it attached to the snmp agent as an agentx subagent. But then I used a different config file (mib for dummies) so I will have different results, but in any case someone needs to write some code to return values for the MIB variables. You may have done so but I did not see it in your email. This page: http://www.net-snmp.org/wiki/index.php/TUT:mib2c_scalar Says… The mib2c scalar configuration filehttp://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp/net-snmp;a=blob_plain;f=local/mib2c.scalar.conf;hb=HEAD generates a bare-bones skeleton handler for each scalar object. You must then write code to provide data for the object, handling each mode. Did you do that ? Alan From: Janki Chhatbar [mailto:jankihchhat...@gmail.com] Sent: Tuesday, November 25, 2014 2:28 AM To: net-snmp-users@lists.sourceforge.net Subject: Fwd: query in mib2c Hi I am working on net-snmp since past few days. I want lldpLocChassisId from Q-BRIDGE-MIB. I have added the mib and able to translate the OIDs. Now I want to do get. I did mib2c -c mib2c.scalar.conf lldpdLocalSystemData. lldpLocSystemData.c and lldpLocSystemData.h files are generated in the folder /agent/mibgroup I ran ./configure --with-mib-moduleslldpLocSystemData, make and sudo make install lldpLocSystemData.o and lldpLocSystemData.lo files are generated. When I do snmpget -v 2c -c public localhost Q-BRIDGE-MIB:: lldpLocChassisId, I get unidentified object error. When I run gcc lldpLocSsytemData.c -c lldpLocSystemData.o, it gives undefined reference to functions snmp_get_do_debugging, debugmsgtoken, debugmsg, netsnmp_create_handle_registration, netsnmp_register_scalar, snmp_set_var_typed_value, snmp_log. Can anyone please help me? I am attaching .c and .h files Janki Chhatbar M.Tech (Embedded Systems) Nirma University (+91) 9409239106 -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: using Mib2c on an entire MIB, not individual MIB objects
Could someone with the knowledge please reply? Thanks! On 20 October 2014 17:35, Ali Azar azaad2...@gmail.com wrote: I have a mib file which has many tables. I have used mib2c to generate code for each of the tables separately in the following fashion mib2c -c someconfigFile tablename1 mib2c -c someconfigFile tablename2 mib2c -c someconfigFile tablename3 ... etc I am not aware if there is a way that I could specify a mib name itself, and a particular configuration and that it would auto-generate code for ALL the tables. So my question is, is such a thing possible? -- Ali Eshragi MEng electrical computer engineering University of Waterloo -- Ali Eshragi MEng electrical computer engineering University of Waterloo -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
using Mib2c on an entire MIB, not individual MIB objects
I have a mib file which has many tables. I have used mib2c to generate code for each of the tables separately in the following fashion mib2c -c someconfigFile tablename1 mib2c -c someconfigFile tablename2 mib2c -c someconfigFile tablename3 ... etc I am not aware if there is a way that I could specify a mib name itself, and a particular configuration and that it would auto-generate code for ALL the tables. So my question is, is such a thing possible? -- Ali Eshragi MEng electrical computer engineering University of Waterloo -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c mfd for ifTable
Hi Kenneth, I could do both snmpget and snmpset . Thanks for your help Pranesh -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c mfd for ifTable
Hi All , I have kept the function ifTable_container_load() in the function _ifTable_container_init() , the file name ifTable_interface.c . Now am getting the values for the index , I need to put for other values. Is it the right location to keep or i need to keep some where else ? Pranesh On Thu, Sep 18, 2014 at 11:48 AM, Pranesh Kulkarni pranes...@gmail.com wrote: Hi All, I used mib2c compiler for generating mfd option for ifTable I am not getting the values for snmpwalk #snmpwalk -v 2c -c public localhost ifTable IF-MIB::ifTable = No Such Object available on this agent at this OID I have correctly configured config file. running the master agent as /usr/local/sbin/snmpd -I -ifTable -I -ifXTable The logic of getting the values is in ifTable_container_load() , but I did find any function calling this one ifTable_container_load() -- Thanks, Pranesh -- Thanks, Pranesh -- Slashdot TV. Video for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c mfd for ifTable
Hi All, I used mib2c compiler for generating mfd option for ifTable I am not getting the values for snmpwalk #snmpwalk -v 2c -c public localhost ifTable IF-MIB::ifTable = No Such Object available on this agent at this OID I have correctly configured config file. running the master agent as /usr/local/sbin/snmpd -I -ifTable -I -ifXTable The logic of getting the values is in ifTable_container_load() , but I did find any function calling this one ifTable_container_load() -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c compilation issue .
Hello, mib2c throwing compilation error , when i compile with --with-mib-module=mibII/interfaces, we have our own mibII/XYZinterfaces.c module, which i wanted to include with other mib modules. May i know how to remove 'if-mib/data_access/interface' module and add mibII/interface mib module. I tried --without-mib-module but compilation is aborted. Let me know how to resolve this issue. UCD-SNMP compatability: enabled SNMP Versions Supported:1 2c 3 Building for: linux Net-SNMP Version: 5.7.2 Network transport support: Callback Unix Alias TCP UDP IPv4Base SocketBase TCPBase UDPIPv4Base UDPBase SNMPv3 Security Modules: usm *** MIB Module warning *** mib module 'if-mib/data_access/interface' excludes module 'mibII/interfaces' but another module requires it *** MIB Module warning *** mib module 'if-mib/ifTable' requires module 'if-mib/ifTable/ifTable' but someone told me to compile without it Agent MIB code: mibII/vacm_vars mibII/vacm_conf utilities/execute tejas mibII/system_mib mibII/interfaces snmpv3mibs = util_funcs/header_generic mibII/vacm_context mibII/vacm_conf tejas/tejasCard tejas/tejasCurrentAlarms tejas/tejasEqptHolder tejas/tejasEventHistory tejas/tejasMib tejas/tejasPortEth tejas/tejasSNMPConfiguration tejas/tejasSystem util_funcs mibII/updates util_funcs/header_generic if-mib/data_access/interface mibII/var_route snmpv3/snmpMPDStats_5_5 snmpv3/usmStats_5_5 snmpv3/snmpEngine snmpv3/usmConf snmpv3/usmUser MYSQL Trap Logging: unavailable Embedded Perl support: disabled SNMP Perl modules: disabled SNMP Python modules:disabled Crypto support from:internal Authentication support: MD5 SHA1 Encryption support: DES AES Local DNSSEC validation:disabled Thanks, Wilson -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
License of mib2c output
We've recently used mib2c to create a subagent for another open source project (hostapd). We'd like to give that subagent to the other project but can't find a clear statement of license for the mib2c output. Can anyone on this list provide an authoritative statement about what license we need to include? Chris -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
scalars and mib2c for perl
Hi, when I enter # mib2c -c mib2c.perl.conf myOID node code is generated, but the part of the scalars is missing. tables are ok, but no scalars are defined. Not in he oidfunc hash nor in the skel.pl output. It looks as is the scalars are never read into the $scalar variable. Is this a bug? Thanks for any comments. -- Dr. Michael Schwartzkopff Guardinistr. 63 81375 München Tel: (0162) 1650044 Fax: (089) 620 304 13 signature.asc Description: This is a digitally signed message part. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: scalars and mib2c for perl
Am Montag, 6. Januar 2014, 18:15:50 schrieb Michael Schwartzkopff: Hi, when I enter # mib2c -c mib2c.perl.conf myOID node code is generated, but the part of the scalars is missing. tables are ok, but no scalars are defined. Not in he oidfunc hash nor in the skel.pl output. It looks as is the scalars are never read into the $scalar variable. Is this a bug? Solved the problem. It was a bug in my MIB. -- Dr. Michael Schwartzkopff Guardinistr. 63 81375 München Tel: (0162) 1650044 Fax: (089) 620 304 13 signature.asc Description: This is a digitally signed message part. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Mib2c generated code for table setting.
Hello, I'm using net-snmp v5.7.2 and the mib2c tool. When I'm trying to set and created values for table I defined, I got error that the set operation had failed. After investigation I found out that in each table, which had been defined I see in the xxxTable_interface.c inside _xxxTable_initialize_interface() function, the following code: reginfo = netsnmp_handler_registration_create(xxxTable, handler, xxxTable_oid, xxxTable_oid_size, HANDLER_CAN_BABY_STEP | #if !(defined(NETSNMP_NO_WRITE_SUPPORT) || defined(NETSNMP_DISABLE_SET_SUPPORT)) HANDLER_CAN_RONLY #else HANDLER_CAN_RWRITE #endif /* NETSNMP_NO_WRITE_SUPPORT || NETSNMP_DISABLE_SET_SUPPORT */ The above generated code doesn't make sense, because if NETSNMP_NO_WRITE_SUPPORT NETSNMP_DISABLE_SET_SUPPORT are not defined the mode should be HANDLER_CAN_RWRITE and read only. For example, in ifTable_interface.c the code is as following: reginfo = netsnmp_handler_registration_create(ifTable, handler, ifTable_oid, ifTable_oid_size, HANDLER_CAN_BABY_STEP | #if !(defined(NETSNMP_NO_WRITE_SUPPORT) || defined(NETSNMP_DISABLE_SET_SUPPORT)) HANDLER_CAN_RWRITE #else HANDLER_CAN_RONLY #endif /* NETSNMP_NO_WRITE_SUPPORT || NETSNMP_DISABLE_SET_SUPPORT */ In the other places in the code generated which use the macro NETSNMP_NO_WRITE_SUPPORT or NETSNMP_DISABLE_SET_SUPPORT The code is reasonable. Does anyone familiar with this problem? Did I configures something wrong? Thank's in advance. -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c
Hi David, Thanks for your email. Unfortunately the result was the same as before. But I found a simple way to avoid it. Just run plain vanilla mib2c w/o -c ... and it produces just 2 files. I then insert my code into .c file. Thanks a lot again, lg From: David Ganor da...@oliver-solutions.com To: 'Leonard G' ked3...@yahoo.com; net-snmp-users@lists.sourceforge.net Sent: Tuesday, May 21, 2013 4:16 AM Subject: RE: mib2c Hi Leonard, I had a similar issue with adding several tables from a newly MIB, which I've defined. I've solved it is the following manner; Note: Since you're trying to add only a single table, from a MIB, you might need to modify some of the steps below… 1. Place the auto-generated .c and .h files in agent/mibgroups/entity-mib/entAliasMappingTable 2. Create a file: agent/mibgroups/entity-mib/entAliasMappingTable.h that has the following line: /* * module to include the modules */ config_require(entity-mib/entAliasMappingTable/entAliasMappingTable) 3. Create another file: agent/mibgroups/entity-mib.h that has the following lines: /* * module to include the modules */ config_require(entity-mib/entAliasMappingTable) config_add_mib(ENTITY-MIB) 4. Now run the ./configure HTH, David Ganor From:Leonard G [mailto:ked3...@yahoo.com] Sent: Tuesday, May 14, 2013 6:46 PM To: net-snmp-users@lists.sourceforge.net Subject: 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-- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: mib2c
Hi Leonard, I had a similar issue with adding several tables from a newly MIB, which I've defined. I've solved it is the following manner; Note: Since you're trying to add only a single table, from a MIB, you might need to modify some of the steps below… 1. Place the auto-generated .c and .h files in agent/mibgroups/entity-mib/entAliasMappingTable 2. Create a file: agent/mibgroups/entity-mib/entAliasMappingTable.h that has the following line: /* * module to include the modules */ config_require(entity-mib/entAliasMappingTable/entAliasMappingTable) 3. Create another file: agent/mibgroups/entity-mib.h that has the following lines: /* * module to include the modules */ config_require(entity-mib/entAliasMappingTable) config_add_mib(ENTITY-MIB) 4. Now run the ./configure HTH, David Ganor From: Leonard G [mailto:ked3...@yahoo.com] Sent: Tuesday, May 14, 2013 6:46 PM To: net-snmp-users@lists.sourceforge.net Subject: 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 -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
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@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c best configuration mode to access global functions
Thanks Dave, You made my day :-) static will do just fine. Regards, Nuno Magalhães. On 06-01-2013 18:47, Dave Shield wrote: On 5 January 2013 18:10, Nuno Magalhães nuno.magalh...@inov.pt wrote: Here it goes. Thanks for that. In windows embedded code full compilation it doesn't happen. In linux debian dlmod (obu.so) I must declared it inline to proc_status not return always zero. I'm not currently set up for compiling dynamically loaded modules, but I've had a go with compiling this code within the main Net-SNMP agent, and that works as expect (reporting values of '5' and '7' respectively). My suspicion is that there's an issue here that's specific to dynamically loaded modules - and something about the requirements for such modules that isn't quite right in your code. This isn't really my area of expertise, but looking at the documentation (http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object) I note the following comment: These [init_xxx and deinit_xxx] are the only two functions called by the object loaded. All other functions (and module-global variables) therefore should be declared static. As I say, I'm not currently able to check this for you, but it might be worth trying with 'proc_status' being declared as static, rather than inline. Dave -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c best configuration mode to access global functions
On 5 January 2013 18:10, Nuno Magalhães nuno.magalh...@inov.pt wrote: Here it goes. Thanks for that. In windows embedded code full compilation it doesn't happen. In linux debian dlmod (obu.so) I must declared it inline to proc_status not return always zero. I'm not currently set up for compiling dynamically loaded modules, but I've had a go with compiling this code within the main Net-SNMP agent, and that works as expect (reporting values of '5' and '7' respectively). My suspicion is that there's an issue here that's specific to dynamically loaded modules - and something about the requirements for such modules that isn't quite right in your code. This isn't really my area of expertise, but looking at the documentation (http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object) I note the following comment: These [init_xxx and deinit_xxx] are the only two functions called by the object loaded. All other functions (and module-global variables) therefore should be declared static. As I say, I'm not currently able to check this for you, but it might be worth trying with 'proc_status' being declared as static, rather than inline. Dave -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_123012 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c best configuration mode to access global functions
Hi Dave, But why must it be declared as inline? Is there any limitation in global variables and function calls? Otherwise the global function will return always 0 no matter what values is returned. Have you ever experienced the same? Regards, Nuno Magalhães. Em 04-01-2013 21:44, Dave Shield escreveu: On 4 January 2013 19:34, Nuno Magalhães nuno.magalh...@inov.pt wrote: What's the configuration I should use, with the mib2c tool, to access global functions. For example for invoking unix shell commands with popen or system and retrieving a value. There's no special configuration required for mib2c - just take the code template that it generates, and add the necessary #includes yourself. mib2c is designed to look after generating the SNMP-related aspects of the required code - writing the code that relates to the underlying system being monitored (i.e. how you retrieve the actual data) is your responsibility. Dave - Não foram detectados vírus nesta mensagem. Verificado por AVG - www.avg.com Versão: 2013.0.2805 / Base de dados de Vírus: 2637/6009 - Data de Lançamento: 01/04/13 -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c best configuration mode to access global functions
On 5 January 2013 09:05, Nuno Magalhães nuno.magalh...@inov.pt wrote: But why must it be declared as inline? Why must what be declared inline? What has that got to do with using global functions/variables? Is there any limitation in global variables and function calls? Otherwise the global function will return always 0 no matter what values is returned. Have you ever experienced the same? Sorry - I have absolutely no idea what you are asking here. Perhaps if you gave a more concrete description of exactly what you are trying to do. Dave -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c best configuration mode to access global functions
Hi Dave, It seems that normal global functions are not called since I put snmp logs all over the global function and invoke it in the function handler and nothing gets logged. If I use the 'inline' keywork in the global function definition it gets logged. As you're certainly more experienced in Linux than me, do you suspect of anything? Regards, Nuno Magalhães. Em 05-01-2013 10:35, Dave Shield escreveu: On 5 January 2013 09:05, Nuno Magalhães nuno.magalh...@inov.pt wrote: But why must it be declared as inline? Why must what be declared inline? What has that got to do with using global functions/variables? Is there any limitation in global variables and function calls? Otherwise the global function will return always 0 no matter what values is returned. Have you ever experienced the same? Sorry - I have absolutely no idea what you are asking here. Perhaps if you gave a more concrete description of exactly what you are trying to do. Dave - Não foram detectados vírus nesta mensagem. Verificado por AVG - www.avg.com Versão: 2013.0.2805 / Base de dados de Vírus: 2637/6009 - Data de Lançamento: 01/04/13 -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c best configuration mode to access global functions
On 5 January 2013 12:14, Nuno Magalhães nuno.magalh...@inov.pt wrote: It seems that normal global functions are not called since I put snmp logs all over the global function and invoke it in the function handler and nothing gets logged. If I use the 'inline' keywork in the global function definition it gets logged. As you're certainly more experienced in Linux than me, do you suspect of anything? I'm not sure what's happening here - but I suspect that the inline issue is possibly something of a red-herring. Could you possibly post a version of your module code (ideally one that is relatively standalone and doesn't rely on any underlying stuff), so that we can have a proper look at what you are doing, and see if we can spot the problem. Dave -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c best configuration mode to access global functions
Hi, What's the configuration I should use, with the mib2c tool, to access global functions. For example for invoking unix shell commands with popen or system and retrieving a value. Can someone point me sample code. Thanks, Nuno Magalhães. -- Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c best configuration mode to access global functions
On 4 January 2013 19:34, Nuno Magalhães nuno.magalh...@inov.pt wrote: What's the configuration I should use, with the mib2c tool, to access global functions. For example for invoking unix shell commands with popen or system and retrieving a value. There's no special configuration required for mib2c - just take the code template that it generates, and add the necessary #includes yourself. mib2c is designed to look after generating the SNMP-related aspects of the required code - writing the code that relates to the underlying system being monitored (i.e. how you retrieve the actual data) is your responsibility. Dave -- Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c: Use of uninitialized value for read-write table elements
Hi. I have added a new table with read-write elements into my MIB and mib2c reports the following errors : $ env MIBS=+./MY-MIB.mib mib2c -c mib2c.mfd.conf myTable ... ... writing to defaults/table-myTable.m2d Starting MFD code generation... writing to myTable.h | +- Processing table myTable writing to myTable.c writing to myTable_data_get.h writing to myTable_data_get.c | | +- Processing nonindex myVarA | | +- Processing nonindex myVarB writing to myTable_data_set.h writing to myTable_data_set.c Use of uninitialized value $key in hash element at /usr/lib/perl5/SNMP.pm line 1311, GEN89 line 386. Use of uninitialized value $key in hash element at /usr/lib/perl5/SNMP.pm line 1312, GEN89 line 386. Use of uninitialized value in null operation at /usr/lib/perl5/SNMP.pm line 1311, GEN89 line 386. ... ... My table looks like this: myTable OBJECT-TYPE SYNTAX SEQUENCE OF MyEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION My Table ::= { myObjects 13 } myEntry OBJECT-TYPE SYNTAX MyEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION My Entry INDEX { myIndex } ::= { myTable 1 } MyEntry ::= SEQUENCE { myIndex Unsigned32, myVarA Unsigned32, myVarB Unsigned32 } myIndex OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS not-accessible STATUS current DESCRIPTION My Index ::= { myEntry 1 } myVarA OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-write STATUS current DESCRIPTION Var A DEFVAL { 0 } ::= { myEntry 2 } myVarB OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-write STATUS current DESCRIPTION Var B DEFVAL { 0 } ::= { myEntry 3 } I have also added my table into conformance group, like: ... ... myGroupsOBJECT IDENTIFIER ::= { myConformance 2 } ... ... myCompliance MODULE-COMPLIANCE STATUS current DESCRIPTION Describes the requirements for conformance to the MY MIB. MODULE MANDATORY-GROUPS { myGroup } ::= { myCompliances 1 } ... ... myGroup OBJECT-GROUP OBJECTS { myVarA, myVarB } STATUS current DESCRIPTION My table group ::= { myGroups 7 } ... ... Could someone please help me with this? How can I get rid of this problem? If my variables are set to not-accessible I do not get this errors. I am working on Ubuntu 12.04. Perl and netsnmp packages are: libperl-dev5.14.2-6ubuntu2.1 libsnmp-perl 5.4.3~dfsg-2.4ubuntu1.1 libsnmp-dev5.4.3~dfsg-2.4ubuntu1.1 I would really appreciate your help with this. -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: question on mib2c, tables, etc....follow up
On 18 May 2012 14:57, Michael Dorin bsddo...@gmail.com wrote: My question should have been more specific..the Table function is invoked when a get request comes in... and UPSALARMID is built...but it never comes back for the remaining columns.(At least that is how it seems to me)... I thought it would come back and ask for UPSALARMDESCR...but it does not seem to. What table framework are you using? What does the full code of your MIB module look like? switch(vp-magic) { case UPSALARMID: VAR = VALUE; /* XXX */ return (u_char*) VAR; case UPSALARMDESCR: VAR = VALUE; /* XXX */ return (u_char*) VAR; case UPSALARMTIME: VAR = VALUE; /* XXX */ return (u_char*) VAR; default: ERROR_MSG(); This looks like the old v4-style approach. Is there any reason you are using that rather than the current handler-based style? You've omitted the code that handles determining the appropriate row of the table, and setting the result OID, etc. It's impossible to tell what's going wrong, from such a minimal code fragment. If you want us to be able to help you, you must give us something to work with Dave -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: question on mib2c, tables, etc....follow up
Dave, Thanks for your reply. I must admit I did find the bug...and should have posted it..but was a bit ashamed since I had been doing the nasty habit of ignoring warnings! My variables table need something bigger than variable4...once I changed it to variable7 and REGISTER_MIBS in the init function to use variable7 the table started to work properly. (And the warnings went away) Why am I using the old API? What I am doing requires so little and I had used the old api years ago when it was not so old. (neither was I) Thank you again! -Mike On Tue, May 29, 2012 at 2:54 AM, Dave Shield d.t.shi...@liverpool.ac.uk wrote: On 18 May 2012 14:57, Michael Dorin bsddo...@gmail.com wrote: My question should have been more specific..the Table function is invoked when a get request comes in... and UPSALARMID is built...but it never comes back for the remaining columns.(At least that is how it seems to me)... I thought it would come back and ask for UPSALARMDESCR...but it does not seem to. What table framework are you using? What does the full code of your MIB module look like? switch(vp-magic) { case UPSALARMID: VAR = VALUE; /* XXX */ return (u_char*) VAR; case UPSALARMDESCR: VAR = VALUE; /* XXX */ return (u_char*) VAR; case UPSALARMTIME: VAR = VALUE; /* XXX */ return (u_char*) VAR; default: ERROR_MSG(); This looks like the old v4-style approach. Is there any reason you are using that rather than the current handler-based style? You've omitted the code that handles determining the appropriate row of the table, and setting the result OID, etc. It's impossible to tell what's going wrong, from such a minimal code fragment. If you want us to be able to help you, you must give us something to work with Dave -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
SNMP-Agent with mib2c
After Creating MIB2C where i modifed the logic of c file pls help me for simple example with print snmpwalk with hostname display -- Thanks Regards, Murugayen M -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
re: question on mib2c, tables, etc....follow up
My question should have been more specific..the Table function is invoked when a get request comes in... and UPSALARMID is built...but it never comes back for the remaining columns.(At least that is how it seems to me)...I thought it would come back and ask for UPSALARMDESCR...but it does not seem to. switch(vp-magic) { case UPSALARMID: VAR = VALUE;/* XXX */ return (u_char*) VAR; case UPSALARMDESCR: VAR = VALUE;/* XXX */ return (u_char*) VAR; case UPSALARMTIME: VAR = VALUE;/* XXX */ return (u_char*) VAR; default: ERROR_MSG(); Thank you! -Mike -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
question on mib2c, tables, etc.
I am trying to make a subagent for the UPS-MIB. I generate the code with mib2c -c mib2c.conf upsMIB I select 1) ucd-snmp style code I get upsMIB.c I am trying to fill in var_upsAlarmTable, but am running into lots of little errors. Does anybody havae any example code I might be able to review? basically, how might I fill in: switch(vp-magic) { case UPSALARMID: VAR = VALUE;/* XXX */ return (u_char*) VAR; case UPSALARMDESCR: VAR = VALUE;/* XXX */ return (u_char*) VAR; case UPSALARMTIME: VAR = VALUE;/* XXX */ return (u_char*) VAR; default: ERROR_MSG(); Thank you! Any advice would be appreciated. -Mike -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
using external data source with a structure with mib2c
I have separate program that will be serializing a struct and sending it to my mib2c generated agent. Since my structure is already in the MIB, I would think I could generate my C Struct for my separate program. Is there a best practice for this or is there a way you would recommend this to be done? -- James Gosnell, ACP -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c default has no 'ifTable_cache_load()'
Did you just tinker around until you got values? Did you use the dummy.conf file or did you create your own values? Did you create your own rows? Thank you for your response. On Wed, Apr 18, 2012 at 6:12 PM, Zlaja zsadi...@gmail.com wrote: that tutorial is out of date. you only have to modify iftable_data_access.c file, specifically load container function Zlatan S. On Apr 18, 2012, at 7:04 PM, James Gosnell jamesgosn...@gmail.com wrote: I ran `mib2c -c mib2c.mfd.conf ifTable` and used the default settings. Should i have a `int ifTable_cache_load(netsnmp_container * container)` in my code? It's not there. I'm following instructions from: http://www.net-snmp.org/wiki/index.php/MFD:ifTable:Data_Access. I'm trying to make the edits it's telling me to, but the function to edit just isn't there. Thank you for anyone who can help. -- James Gosnell, ACP -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- James Gosnell, ACP -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c default has no 'ifTable_cache_load()'
I ran `mib2c -c mib2c.mfd.conf ifTable` and used the default settings. Should i have a `int ifTable_cache_load(netsnmp_container * container)` in my code? It's not there. I'm following instructions from: http://www.net-snmp.org/wiki/index.php/MFD:ifTable:Data_Access. I'm trying to make the edits it's telling me to, but the function to edit just isn't there. Thank you for anyone who can help. -- James Gosnell, ACP -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c default has no 'ifTable_cache_load()'
that tutorial is out of date. you only have to modify iftable_data_access.c file, specifically load container function Zlatan S. On Apr 18, 2012, at 7:04 PM, James Gosnell jamesgosn...@gmail.com wrote: I ran `mib2c -c mib2c.mfd.conf ifTable` and used the default settings. Should i have a `int ifTable_cache_load(netsnmp_container * container)` in my code? It's not there. I'm following instructions from: http://www.net-snmp.org/wiki/index.php/MFD:ifTable:Data_Access. I'm trying to make the edits it's telling me to, but the function to edit just isn't there. Thank you for anyone who can help. -- James Gosnell, ACP -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Running mib2c
Hello, I am running CentOS release 6.1 linux distribution. How do I install and execute mib2c on my distro? Thanks, Z -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Running mib2c
Isn't there any nestnmp or snmp package you can install from standard repositories? Have you tried `yum net-snmp`? http://www.it-slav.net/blogs/2008/11/11/install-and-configure-snmp-on-rhel-or-centos/ Em 2 de abril de 2012 20:40, Zlatan Sadibasic zsadi...@gmail.com escreveu: Hello, I am running CentOS release 6.1 linux distribution. How do I install and execute mib2c on my distro? Thanks, Z -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Running mib2c
On 3 April 2012 15:38, Jaques Arantes jaques.aran...@gmail.com wrote: Isn't there any nestnmp or snmp package you can install from standard repositories? Have you tried `yum net-snmp`? http://www.it-slav.net/blogs/2008/11/11/install-and-configure-snmp-on-rhel-or-centos/ Note that mib2c is typically part of the 'net-snmp-perl' RPM (since it's written in perl, and relies on the Net-SNMP perl modules) Dave -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Table mib2c script only generate init_mpbcRMHOSU(void) with MIB OID
Hello, There is one table definition in the MIB that only generate init_mpbcRMHOSU(void) when running table_data.conf MIB section of interest: mpbcRMHOSU OBJECT-TYPE SYNTAX SEQUENCE OF MpbcRMHOSUEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION List of all OSU installed in the shelf ::= { mpbcRMHControl 1 } mpbcRMHOSUEntry OBJECT-TYPE SYNTAX MpbcRMHOSUEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION Please replace this text with your description. INDEX { mpbcRMHOsuIndex } ::= { mpbcRMHOSU 1 } MpbcRMHOSUEntry ::= SEQUENCE { mpbcRMHOsuIndex INTEGER, mpbcRMHOsuSlot INTEGER, mpbcRMHOsuState INTEGER, mpbcRMHOsuReset TruthValue, mpbcRMHOsuModel OCTET STRING } mpbcRMHOsuIndex OBJECT-TYPE SYNTAX INTEGER MAX-ACCESS not-accessible STATUS current DESCRIPTION Index ::= { mpbcRMHOSUEntry 1 } mpbcRMHOsuSlot OBJECT-TYPE SYNTAX INTEGER MAX-ACCESS read-only STATUS current DESCRIPTION Position of the Osu within the shelf (19 to 21) ::= { mpbcRMHOSUEntry 2 } mpbcRMHOsuState OBJECT-TYPE SYNTAX INTEGER { laserOff( 1 ), laserOn( 2 ), laserAPR( 3 ) } MAX-ACCESS read-write STATUS current DESCRIPTION LaserOff, LaserOn and LaserAPR ::= { mpbcRMHOSUEntry 3 } mpbcRMHOsuReset OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-write STATUS current DESCRIPTION Normal=false, Reset=true ::= { mpbcRMHOSUEntry 4 } mpbcRMHOsuModel OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-only STATUS current DESCRIPTION Model name of the module ::= { mpbcRMHOSUEntry 5 } generates file with containing only the code : /* * Note: this file originally auto-generated by mib2c using * $ */ #include net-snmp/net-snmp-config.h #include net-snmp/net-snmp-includes.h #include net-snmp/agent/net-snmp-agent-includes.h #include mpbcRMHOSU.h /** Initializes the mpbcRMHOSU module */ void init_mpbcRMHOSU(void) { /* here we initialize all the tables we're planning on supporting */ } using perl script env MIBS=+MPBC-RMH-MIB mib2c -c mib2c.table_data.conf mpbcRMHOSU But using the scalar script it works nicely. Any hints? PS. the HTML documentation file describe the mpbcRMHOSU OID as a scalar. Francois* * -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c on entire MIB -- gluing the bits together
Hi, I'm a new Net-SNMP user, learning how to code my first MIB subagent for a pre-written MIB file. I gather, from searching these archives, that mib2c is intended to be run on a single MIB node with a single type of data, so if I had the following MIB: myMIB myMIB.scalar myMIB.table I would run mib2c on myMIB.scalar and again on myMIB.table, generating two sets of .c/.h files, correct? What do I then need to do to glue the bits together into a working subagent? Presumably I somehow need to run mib2c on the root node, myMIB, to generate code that registers and delegates calls to the scalar and table nodes. And what about the subagent wrapper that talks to the master? Thanks, Chris -- Chris Smith cj...@zepler.net -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c on entire MIB -- gluing the bits together
On 10 February 2012 14:41, Chris Smith cj...@zepler.net wrote: What do I then need to do to glue the bits together into a working subagent? a) Tweak the code that handles the 'initialize' calls, so that both init routines are invoked. (either by adding 'init_myTable' to the scalar initialisation code, adding 'init_myScalars' to the table initialisation code, or calling both of them at the same point in the main subagent driving code) b) Tweak the environment used to build the subagent, so that it compiles and links both (or all) the MIB modules into the same binary. Presumably I somehow need to run mib2c on the root node, myMIB, to generate code that registers and delegates calls to the scalar and table nodes. And what about the subagent wrapper that talks to the master? It's probably not worth trying to handle this using mib2c directly. Take the individual generated code file, and merge them by hand. Dave -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
using mib2c-update for scalars
Hi, I am trying to use mib2c-update tool for updating scalar objects. Even though .orig and .new generate files are different, but mib2c-update is not providing the diff for these ? Any known issues related to this ? If not, any idea on how to use mib2c-update on scalars. -Dheeraj -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
the code from mib2c didn't work
Dear Sir/Madam, In accessory, I send you my code from mib2c. but this function doesn't work, the picture is the error message. It says no v2 trapOID varbind provided, but in function trapOID has provided.If you have time, I hope you can give me some advice. Thank you very much. I have too much puzzle, but I don't know who to ask. So please beg my interruption. BEST WISHES AND HAPPY NEW YEAR. your sincerely, Spring Zhu From China -- From: Spring macrosan.c Description: Binary data attachment: send_trap.jpg -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How to convert entire MIB at once using mib2c
Any feedback on this? I am also interested in such a script. Thanks, Simon On Wed, Nov 9, 2011 at 1:11 PM, Suresh kumar skjaiswa...@hotmail.comwrote: Hello all i want convert entire MIB object to c/h file using mib2c at once can any once do this before please let me know . if not what i need change in mib2c script. Thanks in advance. ~suresh -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How to convert entire MIB at once using mib2c
On 9 November 2011 18:11, Suresh kumar skjaiswa...@hotmail.com wrote: i want convert entire MIB object to c/h file using mib2c at once What do you mean by converting the MIB object? What sort of MIB object(s) do you have in mind. If these are scalar objects, then try mib2c -c mib2c.scalar.conf MY-MIB::myTopLevelObject If this is a MIB table, then try mib2c -c mib2c.table_data.conf MY-MIB::myTable (or one of the other table-based helper frameworks) Naturally, you should use the appropriate values instead of MY-MIB::myTopLevelObject and MY-MIB::myTable Dave -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How to convert entire MIB at once using mib2c
I think what he means (or what I mean) is to have one config file that converts the whole MIB file (which contains any possible object) into C. Simon On Thu, Nov 10, 2011 at 10:30 AM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: On 9 November 2011 18:11, Suresh kumar skjaiswa...@hotmail.com wrote: i want convert entire MIB object to c/h file using mib2c at once What do you mean by converting the MIB object? What sort of MIB object(s) do you have in mind. If these are scalar objects, then try mib2c -c mib2c.scalar.conf MY-MIB::myTopLevelObject If this is a MIB table, then try mib2c -c mib2c.table_data.conf MY-MIB::myTable (or one of the other table-based helper frameworks) Naturally, you should use the appropriate values instead of MY-MIB::myTopLevelObject and MY-MIB::myTable Dave -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How to convert entire MIB at once using mib2c
On 10 November 2011 15:41, Simon Chamlian simon.chaml...@gmail.com wrote: I think what he means (or what I mean) is to have one config file that converts the whole MIB file (which contains any possible object) into C. If the MIB contains scalar objects, then the command I gave will do exactly that. If the MIB contains tables (or a mixture of tables and scalars), then you should look at implementing one table at a time. You can always combine the implementation code for related tables into a single file manually, but the mib2c templates are typically designed to work with just one table at a time. Dave -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
How to convert entire MIB at once using mib2c
Hello all i want convert entire MIB object to c/h file using mib2c at once can any once do this before please let me know . if not what i need change in mib2c script. Thanks in advance. ~suresh -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c -c mib2c.mfd.conf
I installed libper-dev. So now, I did the following steps: ./configure --enable-embedded-perl --enable-shared cd perl perl Makefile.PL make It seems to be working. But when I do: make test I get lots of errors: Test Summary Report --- t/async.t (Wstat: 11 Tests: 3 Failed: 1) Failed test: 3 Non-zero wait status: 11 Parse errors: Bad plan. You planned 20 tests but ran 3. t/bulkwalk.t (Wstat: 0 Tests: 62 Failed: 53) Failed tests: 2-10, 13-31, 34-40, 42, 44-51, 53-61 t/get.t (Wstat: 0 Tests: 17 Failed: 15) Failed tests: 2-16 t/getnext.t (Wstat: 0 Tests: 9 Failed: 7) Failed tests: 2-3, 5-9 t/notify.t (Wstat: 0 Tests: 10 Failed: 3) Failed tests: 7, 9-10 t/session.t (Wstat: 0 Tests: 5 Failed: 3) Failed tests: 1-2, 5 t/set.t (Wstat: 0 Tests: 7 Failed: 1) Failed test: 2 Files=10, Tests=158, 99 wallclock secs ( 0.13 usr 0.03 sys + 1.06 cusr 0.25 csys = 1.47 CPU) Result: FAIL Failed 7/10 test programs. 83/158 subtests failed. make[1]: *** [test_dynamic] Error 255 make[1]: Leaving directory `/tmp/efface/net-snmp-5.7.1/perl/SNMP' make: *** [subdirs-test] Error 2 What am I missing? Thanks, Simon On Fri, Nov 4, 2011 at 3:38 PM, Simon Chamlian simon.chaml...@gmail.comwrote: I took your advice and tried to install net-snmp on my host (Ubuntu PC). I followed the steps in the installation guide: QUICK INSTRUCTIONS == 1) Run ./configure Done 2) Optionally edit include/net-snmp/net-snmp-config.h Didn't touch this file 3) make When I do make, I get the following error: aster_admin.o mibgroup/agentx/.libs/agentx_config.o -Wl,-rpath -Wl,/tmp/efface/net-snmp-5.7.1/snmplib/.libs ../snmplib/.libs/libnetsnmp.so -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -lperl -ldl -lpthread -lc -lcrypt -lm -O2 -fstack-protector -Wl,-E -fstack-protector -Wl,-soname -Wl,libnetsnmpagent.so.30 -o .libs/libnetsnmpagent.so.30.0.1 /usr/bin/ld: cannot find -lperl collect2: ld returned 1 exit status make[1]: *** [libnetsnmpagent.la] Error 1 make[1]: Leaving directory `/tmp/efface/net-snmp-5.7.1/agent' make: *** [subdirs] Error 1 What am I missing? Thanks, Simon On Thu, Nov 3, 2011 at 11:34 AM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: On 3 November 2011 15:21, Simon Chamlian simon.chaml...@gmail.com wrote: What does mib2c do? It produces _template_ code for implementing a MIB module. You would take the generated code file, fill in the gaps, and compile it into the SNMP agent (either a native agent for the system you are developing on, or cross-compiled for some other target system). Once you've got the MIB module code file, mib2c is no longer required. I can always install it on a host computer and run it. But eventually, I will need an application that returns values associated to my MIB OIDs. Yes - no problem there. Is that done by modifying the SNMP agent daemon It's typically done by adding new code files to the agent, yes. or I can have a different application interact with agent? If you've got an AgentX-capable master agent, then you can run a separate AgentX client, to implement a new MIB module without touching the original agent. There are also mechanisms for extending the agent by using scripts - either SNMP-knowledgeable (pass or perl extensions), or SNMP-ignorant (exec or extend) See the FAQ entry How do I extend the agent? for more info Dave -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c -c mib2c.mfd.conf
On 31 October 2011 18:51, Simon Chamlian simon.chaml...@gmail.com wrote: I have an embedded board running Linux/net-snmp (TWR54418 from Freescale). [root@M54418TWR snmp]# mib2c -c mib2c.mfd.conf ERROR: You don't have the SNMP perl module installed. Why do you need to create the MIB template code on the embedded board itself?It would work equally as well to run 'mib2c' on some other system (with a full Net-SNMP environment), tweak the code that's produced to match your embedded environment (which you'd need to do anyway), and then include that module within the embedded agent. Doing the development on the embedded board directly seems unnecessary. It's more usual to cross-compile on another (non-embedded) system and then install the results on the embedded target. I wouldn't normally expect the embedded system to have development tools installed at all.. Dave -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c -c mib2c.mfd.conf
What does mib2c do? I can always install it on a host computer and run it. But eventually, I will need an application that returns values associated to my MIB OIDs. Is that done by modifying the SNMP agent daemon or I can have a different application interact with agent? The tutorial http://www.net-snmp.org/wiki/index.php/Agent_Architecture gives the C code to do it but it is not clear. Thanks, Simon On Thu, Nov 3, 2011 at 4:15 AM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: On 31 October 2011 18:51, Simon Chamlian simon.chaml...@gmail.com wrote: I have an embedded board running Linux/net-snmp (TWR54418 from Freescale). [root@M54418TWR snmp]# mib2c -c mib2c.mfd.conf ERROR: You don't have the SNMP perl module installed. Why do you need to create the MIB template code on the embedded board itself?It would work equally as well to run 'mib2c' on some other system (with a full Net-SNMP environment), tweak the code that's produced to match your embedded environment (which you'd need to do anyway), and then include that module within the embedded agent. Doing the development on the embedded board directly seems unnecessary. It's more usual to cross-compile on another (non-embedded) system and then install the results on the embedded target. I wouldn't normally expect the embedded system to have development tools installed at all.. Dave -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c -c mib2c.mfd.conf
On 3 November 2011 15:21, Simon Chamlian simon.chaml...@gmail.com wrote: What does mib2c do? It produces _template_ code for implementing a MIB module. You would take the generated code file, fill in the gaps, and compile it into the SNMP agent (either a native agent for the system you are developing on, or cross-compiled for some other target system). Once you've got the MIB module code file, mib2c is no longer required. I can always install it on a host computer and run it. But eventually, I will need an application that returns values associated to my MIB OIDs. Yes - no problem there. Is that done by modifying the SNMP agent daemon It's typically done by adding new code files to the agent, yes. or I can have a different application interact with agent? If you've got an AgentX-capable master agent, then you can run a separate AgentX client, to implement a new MIB module without touching the original agent. There are also mechanisms for extending the agent by using scripts - either SNMP-knowledgeable (pass or perl extensions), or SNMP-ignorant (exec or extend) See the FAQ entry How do I extend the agent? for more info Dave -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c -c mib2c.mfd.conf
Hi Simon, Please follow the following steps. [root@venkatesh perl]# cd net-snmp-5.7.pre1/perl [root@venkatesh perl]# make [root@venkatesh perl]# make install Please try this, Regards, Venki. Simon Chamlian wrote: Hi, I have an embedded board running Linux/net-snmp (TWR54418 from Freescale). I am trying to get the agent going on the eval board and create an application in C, to connect to the agent and return a value to a get/set command from a mib bowser running on PC. After reading several tutorials, I came accross, MIB for Dummies. It suggests to create the C code from the MIB I have. But when I run it, I get the following error: [root@M54418TWR snmp]# mib2c -c mib2c.mfd.conf 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. [root@M54418TWR snmp]# I checked the downloads and I don't see any SNMP perl module? Note that Perl is installed on the eval board since snmpconf (perl script) works fine. Any hints will be greatly appreciated to help me out: 1) To launch the SNMP agent daemon 2) When a Get/Set/Get(Walk)/GetTable issued from a MIB browser from a PC, I get to a C application to return actual data. Thanks, Simon -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- RSA#174; Conference 2012 Save $700 by Nov 18 Register now#33; http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c -c mib2c.mfd.conf
The problem is that the net-snmp is compiled in installed using *LTIB* (*Linux Target Image Builder*) , which build an image on an embedded target (cross compiles). Therefore, I don't have the folder net-snmp-5.7.pre1/perl available, nor have any compiler on the target board. Also, I have version 5.5 and not 5.7. Note that I also tried: -- [root@M54418TWR snmp]# snmpd -a -c snmpd.conf,snmp.conf -d -Lf log.txt -r [root@M54418TWR snmp]# cat log.txt /usr/share/snmp/snmpd.conf: line 37: Warning: Unknown token: proc. /usr/share/snmp/snmpd.conf: line 53: Warning: Unknown token: master. snmpd.conf: line 37: Warning: Unknown token: proc. snmpd.conf: line 53: Warning: Unknown token: master. snmp.conf: line 26: Warning: Unknown token: mibdirs. snmp.conf: line 44: Warning: Unknown token: defaultport. snmp.conf: line 50: Warning: Unknown token: defversion. snmp.conf: line 56: Warning: Unknown token: defsecurityname. snmp.conf: line 62: Warning: Unknown token: defauthtype. snmp.conf: line 69: Warning: Unknown token: defauthpassphrase. Error opening specified endpoint 161 Server Exiting with code 1 Basically, the snmpd does not recognize the tokens in snmpd.conf, which was created using snmpconf. Any hints? Thanks, Simon On Wed, Nov 2, 2011 at 1:42 AM, Venki venkatesh...@globaledgesoft.comwrote: ** Hi Simon, Please follow the following steps. [root@venkatesh perl]# cd net-snmp-5.7.pre1/perl [root@venkatesh perl]# make [root@venkatesh perl]# make install Please try this, Regards, Venki. Simon Chamlian wrote: Hi, I have an embedded board running Linux/net-snmp (TWR54418 from Freescale). I am trying to get the agent going on the eval board and create an application in C, to connect to the agent and return a value to a get/set command from a mib bowser running on PC. After reading several tutorials, I came accross, MIB for Dummies. It suggests to create the C code from the MIB I have. But when I run it, I get the following error: [root@M54418TWR snmp]# mib2c -c mib2c.mfd.conf 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. [root@M54418TWR snmp]# I checked the downloads and I don't see any SNMP perl module? Note that Perl is installed on the eval board since snmpconf (perl script) works fine. Any hints will be greatly appreciated to help me out: 1) To launch the SNMP agent daemon 2) When a Get/Set/Get(Walk)/GetTable issued from a MIB browser from a PC, I get to a C application to return actual data. Thanks, Simon -- -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev -- ___ Net-snmp-users mailing listnet-snmp-us...@lists.sourceforge.net Please see the following page to unsubscribe or change other options:https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c -c mib2c.mfd.conf
I also tried: [root@M54418TWR snmp]# snmpd -a -c snmpd.conf,snmp.conf -d -Lf log.txt -r [root@M54418TWR snmp]# cat log.txt /usr/share/snmp/snmpd.conf: line 37: Warning: Unknown token: proc. /usr/share/snmp/snmpd.conf: line 53: Warning: Unknown token: master. snmpd.conf: line 37: Warning: Unknown token: proc. snmpd.conf: line 53: Warning: Unknown token: master. snmp.conf: line 26: Warning: Unknown token: mibdirs. snmp.conf: line 44: Warning: Unknown token: defaultport. snmp.conf: line 50: Warning: Unknown token: defversion. snmp.conf: line 56: Warning: Unknown token: defsecurityname. snmp.conf: line 62: Warning: Unknown token: defauthtype. snmp.conf: line 69: Warning: Unknown token: defauthpassphrase. Error opening specified endpoint 161 Server Exiting with code 1 Basically, the snmpd does not recognize the tokens in snmpd.conf, which was created using snmpconf. Simon On Mon, Oct 31, 2011 at 2:51 PM, Simon Chamlian simon.chaml...@gmail.comwrote: Hi, I have an embedded board running Linux/net-snmp (TWR54418 from Freescale). I am trying to get the agent going on the eval board and create an application in C, to connect to the agent and return a value to a get/set command from a mib bowser running on PC. After reading several tutorials, I came accross, MIB for Dummies. It suggests to create the C code from the MIB I have. But when I run it, I get the following error: [root@M54418TWR snmp]# mib2c -c mib2c.mfd.conf 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. [root@M54418TWR snmp]# I checked the downloads and I don't see any SNMP perl module? Note that Perl is installed on the eval board since snmpconf (perl script) works fine. Any hints will be greatly appreciated to help me out: 1) To launch the SNMP agent daemon 2) When a Get/Set/Get(Walk)/GetTable issued from a MIB browser from a PC, I get to a C application to return actual data. Thanks, Simon -- RSAreg; Conference 2012 Save #36;700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c -c mib2c.mfd.conf
Hi, I have an embedded board running Linux/net-snmp (TWR54418 from Freescale). I am trying to get the agent going on the eval board and create an application in C, to connect to the agent and return a value to a get/set command from a mib bowser running on PC. After reading several tutorials, I came accross, MIB for Dummies. It suggests to create the C code from the MIB I have. But when I run it, I get the following error: [root@M54418TWR snmp]# mib2c -c mib2c.mfd.conf 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. [root@M54418TWR snmp]# I checked the downloads and I don't see any SNMP perl module? Note that Perl is installed on the eval board since snmpconf (perl script) works fine. Any hints will be greatly appreciated to help me out: 1) To launch the SNMP agent daemon 2) When a Get/Set/Get(Walk)/GetTable issued from a MIB browser from a PC, I get to a C application to return actual data. Thanks, Simon -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
[mib2c] getting node Range
Dear net-snmp team I try to figure out how to obtains the range of a given node... I want to do smthg like : @foreach $var scalar@ @if $var.ranges ... @end@ But don't know how to acces the range, And I can' t mange to find how to use @foreach $RANGE_START, $RANGE_END range node@ to find out the ranges... Thank you for your support -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Document for modifying the mib2c generated code
Hi Dave/Dheeraj, Thanks a lot for your pointers and help. I have used the mib2c.table_data.conf with cache configuration to generate a code. After fixing the bugs in the generated code, It works fine now. I just want to list the problems that I have fixed in this generated code. 1) In initialize_table_* functions, replaced 'netsnmp_inject_handler_before' function call by 'netsnmp_inject_handler'. 2) In initialize_table_* functions, replaced 'netsnmp_cache_handler_GET' function call by 'netsnmp_cache_handler_get'. 3) In*_free functions, Replaced 'netsnmp_tdata_get_first_row' function call by 'netsnmp_tdata_row_first'. 4) In *_createEntry functions, Removed the following code and added this in the *_createEntry caller functions: netsnmp_tdata_row_add_index(row, ASN_UNSIGNED, (entry-clmgmtLicenseActionIndex), sizeof(entry-clmgmtLicenseActionIndex)); netsnmp_tdata_add_row(table_data, row); 5) In *_handler function, Added the following code in the MODE_SET_RESERVE2 case: if (*request-requestvb-val.integer == RS_CREATEANDWAIT) { netsnmp_tdata_add_row(table_data, row); } else if (*request-requestvb-val.integer == RS_CREATEANDGO) { netsnmp_insert_tdata_row(request, row); } 6) In *_handler function, Added the following code in the MODE_SET_ACTION case: if (table_entry == NULL) { continue; } Thanks, -karthi From: Dave Shield d.t.shi...@liverpool.ac.uk To: N. Karthikeyan karthik_96...@yahoo.com Cc: net-snmp-users@lists.sourceforge.net net-snmp-users@lists.sourceforge.net Sent: Thursday, September 15, 2011 12:54 AM Subject: Re: Document for modifying the mib2c generated code On 15 September 2011 00:24, N. Karthikeyan karthik_96...@yahoo.com wrote: Could you please let me know whether there is any document available on how to change the mib2c generated code? Not really. I started writing a book on this, but it never really came to fruition. The main problem is that changing mib2c generated code is too vague. There are several different table frameworks, and they all work in different ways. What you need to change will be different for each one. I *think* that Dheeraj's explanation refers to the iterate_access template (or possibly MfD), which are both rather different to ther iterator or table_data approaches. I am trying to implement a table with mib2c.iterate.conf with cache enabled. First thing - if you are caching the data within the agent, then there's probably no point in using the iterator helper. This was originally designed for a situation where the (external) data can come in any order, so does some (relatively inefficient) processing to handle the sorting requirements. If you've got a local cache of the data, then the MIB implementation can know exactly which rows are present in the table, and go straight to the appropriate row. I would strongly suggest that you look at using the table_data template (+ cache) instead. These two are reasonably similar, but the table_data helper (strictly table_tdata) omits the first/next hook processing of the iterator helper. The main things you will need to change are in the xxx_load routine to populate the contents of the cache. You may need to tweak bits of the main handler routine (particularly for SET handling and creating new rows), but at first glance, that code seems more or less OK. The template load routine is very simple (and incomplete (and slightly wrong!)) It assumes the basic data is read from a file - one line per row of the table (read using while fgets). If that's not true, you need to change this driving loop. The first step is to identify the index value(s) of this row, and assign them to the index variables defined at the head of the table. This is simply left as a comment in the generated template - you need to replace this with the necessary code. The next step (creating the entry in the local cache) is slightly wrong. It should actually read row = xxx_createEntry(); this = row-entry; where 'this' is defined as a local variable of type struct xxx_entry (this definition is also missing from the template code) The final element is to populate this data structure with the rest of the values for that row. Again, this is left as a comment in the generated template - you need to provide the relevant code. Hope this helps Dave-- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk
Re: Document for modifying the mib2c generated code
On 15 September 2011 00:24, N. Karthikeyan karthik_96...@yahoo.com wrote: Could you please let me know whether there is any document available on how to change the mib2c generated code? Not really. I started writing a book on this, but it never really came to fruition. The main problem is that changing mib2c generated code is too vague. There are several different table frameworks, and they all work in different ways. What you need to change will be different for each one. I *think* that Dheeraj's explanation refers to the iterate_access template (or possibly MfD), which are both rather different to ther iterator or table_data approaches. I am trying to implement a table with mib2c.iterate.conf with cache enabled. First thing - if you are caching the data within the agent, then there's probably no point in using the iterator helper. This was originally designed for a situation where the (external) data can come in any order, so does some (relatively inefficient) processing to handle the sorting requirements. If you've got a local cache of the data, then the MIB implementation can know exactly which rows are present in the table, and go straight to the appropriate row. I would strongly suggest that you look at using the table_data template (+ cache) instead.These two are reasonably similar, but the table_data helper (strictly table_tdata) omits the first/next hook processing of the iterator helper. The main things you will need to change are in the xxx_load routine to populate the contents of the cache.You may need to tweak bits of the main handler routine (particularly for SET handling and creating new rows), but at first glance, that code seems more or less OK. The template load routine is very simple (and incomplete (and slightly wrong!)) It assumes the basic data is read from a file - one line per row of the table (read using while fgets). If that's not true, you need to change this driving loop. The first step is to identify the index value(s) of this row, and assign them to the index variables defined at the head of the table. This is simply left as a comment in the generated template - you need to replace this with the necessary code. The next step (creating the entry in the local cache) is slightly wrong. It should actually read row = xxx_createEntry(); this = row-entry; where 'this' is defined as a local variable of type struct xxx_entry (this definition is also missing from the template code) The final element is to populate this data structure with the rest of the values for that row. Again, this is left as a comment in the generated template - you need to provide the relevant code. Hope this helps Dave -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Document for modifying the mib2c generated code
Hi Dave, Could you please let me know whether there is any document available on how to change the mib2c generated code? I am trying to implement a table with mib2c.iterate.conf with cache enabled. Thanks in advance for your help and guidance. Thanks, -karthi-- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: Document for modifying the mib2c generated code
Hi, I am not sure of the document. While I was implemented this, I did the following step and it worked good and still working. 1. TABLE_data_access.c is only file I changed, TABLE__container_load() is only function I changed 2. Code generated will contain a while (1) loop in above function. This loop is responsible for caching all the data with-in snmpd. 3. If no data or end of data, set rc as MFD_END_OF_DATA and break out of loop 4. Keep incrementing the idx variable till you have data (already generated) 5. Fill all the indexes of table. For me a string was index, TABLE_variable1, copy the value in generated variable (TABLE_variable1) , set TABLE_variable1_len to the length of string copied. Make string as NULL terminated 6. Now fill values in all the generated variables. For U64, you might have to set VAR.high and VAR.low separately. 7. TABLE_data_access.h will contain a timeout macro, change this value if needed. I use dlmod option in snmpd.conf and started snmpd with /usr/bin/snmpd -f -Ls7 -c /etc/snmpd.conf dlmod name of init-snmp-module function /path/to/snmp-module/ libsnmp-module-name.so That's all -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c config option
On 2 September 2011 19:13, N. Karthikeyan karthik_96...@yahoo.com wrote: I created an executable which contains the mib2c generated code. When I run that executable, it reports the following error. ./test_snmpd: error while loading shared libraries: libssp.so.0: cannot open shared object file: No such file or directory I couldn't find a libssp.so.0 library in my linux machine. Could you please let me know package that needs to be installed to have this library? Sorry - I've no idea. I've no such library on my systems either (and have never needed it) You don't say anything about how you have created the executable (presumably an AgentX subagent). But if you look at the Makefile used to build this, that might have some mention of this library which you could remove. Dave -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: error in mib2c generated files
Sir! i studied again but unable to fix the error, still getting the same error even added 0 at the end of object. Sir! both snmpget and snmpwalk not working for TEST-ENTERPRISE-MIB ... kindly guide me On Mon, Sep 5, 2011 at 12:17 PM, devel tech devel.te...@gmail.com wrote: Thanks sir! Mistakenly i saved MIB by name TEST-MIB.txt but inside the MIB i wrote TEST-ENTERPRISE-MIB, and I read about scalar instance subidentifier from http://www.webnms.com/cagent/help/technology_used/c_snmp_overview.html; and i find out the mistake that i was doing.. I was missing 0 at the end of Object name while running snmpget command. i read some detail what is the purpose of it. Sir! when i run command for sysName object without '0' , i got same error that i got for my MIB object 'teststr'. I concluded that i was missing 0 at the end of Object Name while running command of snmpget. then i placed it at the end of object name but got same error. snmpget -v 1 localhost -c public teststr.0 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: TEST-ENTERPRISE-MIB::teststr.0 I have read about snmp and how it works and also seen codes of net-snmp, but i will study it again. Thanks On Tue, Aug 30, 2011 at 1:31 PM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: On 30 August 2011 05:56, devel tech devel.te...@gmail.com wrote: i performed following snmptranslate steps and got responses. snmptranslate -IR TEST-MIB::teststr Cannot find module (TEST-MIB): At line 0 in (none) That is not surprising - the name of the MIB is TEST-ENTERPRISE-MIBnot TEST-MIB Please see the FAQ question How do I add a MIB to the tools? now i run snmpget command to get the value of teststr object but i got following response command : snmpget -v 1 -c public localhost teststr Error - Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: TEST-ENTERPRISE-MIB::teststr --- Also correct. This is a scalar object, so needs the scalar instance subidentifier. These two mistakes illustrate perfectly why I suggested that you start with the basics of *using* SNMP, before moving on to advanced topics like writing your own code. If you don't properly understand how SNMP works (and I would agree there are some subtle unexpected features), then it makes the task of writing your own MIBs doubly hard. Dave -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: error in mib2c generated files
Thanks sir! Mistakenly i saved MIB by name TEST-MIB.txt but inside the MIB i wrote TEST-ENTERPRISE-MIB, and I read about scalar instance subidentifier from http://www.webnms.com/cagent/help/technology_used/c_snmp_overview.html; and i find out the mistake that i was doing.. I was missing 0 at the end of Object name while running snmpget command. i read some detail what is the purpose of it. Sir! when i run command for sysName object without '0' , i got same error that i got for my MIB object 'teststr'. I concluded that i was missing 0 at the end of Object Name while running command of snmpget. then i placed it at the end of object name but got same error. snmpget -v 1 localhost -c public teststr.0 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: TEST-ENTERPRISE-MIB::teststr.0 I have read about snmp and how it works and also seen codes of net-snmp, but i will study it again. Thanks On Tue, Aug 30, 2011 at 1:31 PM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: On 30 August 2011 05:56, devel tech devel.te...@gmail.com wrote: i performed following snmptranslate steps and got responses. snmptranslate -IR TEST-MIB::teststr Cannot find module (TEST-MIB): At line 0 in (none) That is not surprising - the name of the MIB is TEST-ENTERPRISE-MIBnot TEST-MIB Please see the FAQ question How do I add a MIB to the tools? now i run snmpget command to get the value of teststr object but i got following response command : snmpget -v 1 -c public localhost teststr Error - Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: TEST-ENTERPRISE-MIB::teststr --- Also correct. This is a scalar object, so needs the scalar instance subidentifier. These two mistakes illustrate perfectly why I suggested that you start with the basics of *using* SNMP, before moving on to advanced topics like writing your own code. If you don't properly understand how SNMP works (and I would agree there are some subtle unexpected features), then it makes the task of writing your own MIBs doubly hard. Dave -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: mib2c config option
You need to use mib2c.scalar.conf as config file. http://www.net-snmp.org/docs/man/mib2c.html -Dheeraj -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c config option
On 2 September 2011 08:56, Dheeraj Gautam dgau...@juniper.net wrote: You need to use mib2c.scalar.conf as config file. That will generate template code to implement the scalar objects. For a template of routines to generate the notifications, use mib2c.notify.conf There are a number of possible templates for handling tables - see the FAQ for a discussion about the differences between them. If you want everything handled in the same file, generate them separately, and then stick them together using your favourite text editor. (This is also covered in the FAQ) The MfD framework probably isn't suited to merging in this way, but any of the others should be straightforward enough. Dave -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c config option
Hi Dave/Dheeraj, Thanks for the info. I created an executable which contains the mib2c generated code. When I run that executable, it reports the following error. ./test_snmpd: error while loading shared libraries: libssp.so.0: cannot open shared object file: No such file or directory I couldn't find a libssp.so.0 library in my linux machine. Could you please let me know package that needs to be installed to have this library? Thanks, -karthi From: Dave Shield d.t.shi...@liverpool.ac.uk To: N. Karthikeyan karthik_96...@yahoo.com; Dheeraj Gautam dgau...@juniper.net Cc: net-snmp-users@lists.sourceforge.net net-snmp-users@lists.sourceforge.net Sent: Friday, September 2, 2011 3:14 AM Subject: Re: mib2c config option On 2 September 2011 08:56, Dheeraj Gautam dgau...@juniper.net wrote: You need to use mib2c.scalar.conf as config file. That will generate template code to implement the scalar objects. For a template of routines to generate the notifications, use mib2c.notify.conf There are a number of possible templates for handling tables - see the FAQ for a discussion about the differences between them. If you want everything handled in the same file, generate them separately, and then stick them together using your favourite text editor. (This is also covered in the FAQ) The MfD framework probably isn't suited to merging in this way, but any of the others should be straightforward enough. Dave-- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c config option
Hi All, I am trying to generate a code for the CISCO-LICENSE-MGMT-MIB. This MIB has scalars, tables and notifications defined in it. Could you please let me know the config_file needs to be used with mib2c to generate a code for all of the objects? http://tools.cisco.com/Support/SNMP/do/BrowseMIB.do?local=enstep=2mibName=CISCO-LICENSE-MGMT-MIB Thanks, -karthi-- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: error in mib2c generated files
On 30 August 2011 05:56, devel tech devel.te...@gmail.com wrote: i performed following snmptranslate steps and got responses. snmptranslate -IR TEST-MIB::teststr Cannot find module (TEST-MIB): At line 0 in (none) That is not surprising - the name of the MIB is TEST-ENTERPRISE-MIBnot TEST-MIB Please see the FAQ question How do I add a MIB to the tools? now i run snmpget command to get the value of teststr object but i got following response command : snmpget -v 1 -c public localhost teststr Error - Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: TEST-ENTERPRISE-MIB::teststr --- Also correct. This is a scalar object, so needs the scalar instance subidentifier. These two mistakes illustrate perfectly why I suggested that you start with the basics of *using* SNMP, before moving on to advanced topics like writing your own code. If you don't properly understand how SNMP works (and I would agree there are some subtle unexpected features), then it makes the task of writing your own MIBs doubly hard. Dave -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: error in mib2c generated files
Hi All, Thanks sir for such detail answer, i tried to followed your instructions, so i decided to make it simple, mean i started some exercise to understand template code. I changed my earlier MIB and made it simpler for me , First of all i am trying to define a string object in MIB file for READ only. my MIB file for this purpose is. and i hve object teststr, just want to apply GET request on agent. -- MIB name is TEST-MIB.txt TEST-ENTERPRISE-MIB DEFINITIONS ::= BEGIN IMPORTS enterprises FROM RFC1155-SMI MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, TimeTicks, Counter32, snmpModules, mib-2 FROM SNMPv2-SMI DisplayString, TestAndIncr, TimeStamp FROM SNMPv2-TC MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP FROM SNMPv2-CONF; --iso(1).org(3).dod(6).internet(1) -- | -- private(4) -- | -- enterprises(1) -- | -- test(100) -- | -- .___.. -- || -- system(1) -- -- test OBJECT IDENTIFIER ::= { enterprises 100 } testsystem OBJECT IDENTIFIER ::= { test 1 } teststr OBJECT-TYPE SYNTAX DisplayString (SIZE (0..255)) MAX-ACCESS read-only STATUS current DESCRIPTION An administratively-assigned name for this managed node. By convention, this is the node's fully-qualified domain name. If the name is unknown, the value is the zero-length string. ::= { testsystem 1 } END - then i run command mib2c -c mib2c.scalar.conf teststr in terminal and got teststr.c and teststr.h files that i move to agent/mibgroups/teststr directory. i put following code in my teststr.c file. -- /* * Note: this file originally auto-generated by mib2c using *$ */ #include net-snmp/net-snmp-config.h #include net-snmp/net-snmp-includes.h #include net-snmp/agent/net-snmp-agent-includes.h #include teststr.h /** Initializes the teststr module */ void init_teststr(void) { const oid teststr_oid[] = { 1,3,6,1,4,1,100,1,1 }; DEBUGMSGTL((teststr, Initializing\n)); netsnmp_register_scalar( netsnmp_create_handler_registration(teststr, handle_teststr, teststr_oid, OID_LENGTH(teststr_oid), HANDLER_CAN_RONLY )); } int handle_teststr(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { /* We are never called for a GETNEXT if it's registered as a instance, as it's magically handled for us. */ /* a instance handler also only hands us one request at a time, so we don't need to loop over a list of requests; we'll only get one. */ *char *ptr = test;* switch(reqinfo-mode) { case MODE_GET: * snmp_set_var_typed_value(requests-requestvb, ASN_OCTET_STR,ptr,strlen(ptr));* *break;* default: /* we should never get here, so this is a really bad error */ snmp_log(LOG_ERR, unknown mode (%d) in handle_teststr\n, reqinfo-mode ); return SNMP_ERR_GENERR; } return SNMP_ERR_NOERROR; } then i recompiled the source of net-snmp with mib modules command. ./configure --with-mib-modules=teststr/teststr then I run make and make install commands and successfully compiled the code. i performed following snmptranslate steps and got responses. snmptranslate -IR TEST-MIB::teststr MIB search path: /root/.snmp/mibs:/usr/local/share/snmp/mibs Cannot find module (TEST-MIB): At line 0 in (none) Unknown object identifier: TEST-MIB::teststr but when i run snmptranslate 1.3.6.1.4.1.100.1.1 i got following response TEST-ENTERPRISE-MIB::teststr. --- snmptranslate -On TEST-ENTERPRISE-MIB::teststr .1.3.6.1.4.1.100.1.1 snmptranslate -Of TEST-ENTERPRISE-MIB::teststr .iso.org.dod.internet.private.enterprises.test.testsystem.teststr --- snmptranslate -IR teststr TEST-ENTERPRISE-MIB::teststr - now i run snmpget command to get the value of teststr object but i got following response command : snmpget -v 1 -c public localhost teststr Error - Error in packet Reason: (noSuchName
Re: error in mib2c generated files
On 25 August 2011 09:53, devel tech devel.te...@gmail.com wrote: i compiled [my MIB] using mib2c command and it generated two files .c and h of object Namesys. mib2c -c mib2c.scalar.conf Namesys it was okay, then i run make command and i got following errors test/Namesys.c: In function 'handle_Namesys': test/Namesys.c:43: error: expected expression before ',' token test/Namesys.c:63: error: expected expression before ')' token test/Namesys.c:76: error: expected expression before ')' token test/Namesys.c:83: error: expected expression before ')' token test/Namesys.c:91: error: expected expression before ')' token It looks as if you haven't finished writing the code in the MIB template. Remember that the output of mib2c is the *starting* point for a MIB implementation. It's not finished code. From the FAQ entry Why doesn't my new MIB module report anything? Remember that 'mib2c' simply generates template code for your MIB module. It's up to you to fill in the details, to report the actual information from whatever underlying subsystem is being monitored. Mib2c cannot help with the semantics of the MIB module - it's purely there to provide an initial code framework, based on the _syntax_ of the MIB module objects. Note that word template. I tried to fix above error but i could not. below i pasted mentioned lines of errror. line 43 of Namesys.c is switch(reqinfo-mode) { case MODE_GET: snmp_set_var_typed_value(requests-requestvb, ASN_OCTET_STR, /* XXX: a pointer to the scalar's data */, /* XXX: the length of the data in bytes */); break; You have two comments there, indicating the places where you need to provide suitable code. You need to declare a variable that contains the value to be reported, and this goes into the first gap. The size of this value (typically using 'strlen' for a printable string, or 'sizeof' for a fixed buffer binary string) is provided as the final parameter. Just as the comments tell you. lines no. 63..-65 case MODE_SET_RESERVE2: /* XXX malloc undo storage buffer */ if (/* XXX if malloc, or whatever, failed: */) { netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE); } Again, this block is asking you to provide whatever code is necessary to store a temporary copy of the new (or old) value, so that the assignment can be reversed if necessary. I will repeat my advice that I *strongly* suggest you spend some time getting used to how the agent works before you try to develop your own MIB. Both in terms of simply using the agent, to see how it behaves. And also looking at the existing MIB code, to see how that works. There are plenty of examples of scalar objects in the standard tree. Please look at those, and try to understand how they have been implemented. That will stand you in good stead when you finally come to write your own MIB code. Dave -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c error
Hi, I have a mib file DatronIridium-mib.txt and I put the mib file in /usr/local/share/snmp/mibs directory. But when I use MIBS=+DatronIridium-mib mib2c -c mib2c.scalar.conf datronAntenna, I have got error Cannot find module (DatronIridium-mib): At line 0 in (none) Please see my mib file as following: DatronIridium-mib DEFINITIONS ::= BEGIN IMPORTS enterprises, Counter, TimeTicks FROM RFC1155-SMI TEXTUAL-CONVENTION, RowStatus FROM SNMPv2-TC OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, Integer32, Unsigned32, Counter64, IpAddress FROM SNMPv2-SMI DisplayString, MacAddress, DateAndTime, RowStatus FROM SNMPv2-TC; datronAntenna MODULE-IDENTITY DESCRIPTION The SNMPv2 MIB module for the Datron MIB REVISION200905051000Z DESCRIPTION Public MIB module Datron. ::= { dat 4} l3comm OBJECT IDENTIFIER ::= { enterprises 3231 } dat OBJECT IDENTIFIER ::= { l3comm 101 } iridiumcommand OBJECT IDENTIFIER ::= { datronAntenna 1 } antennaCommand OBJECT IDENTIFIER ::= { iridiumcommand 100 } -- begin antennaCommand Group antennaEnable OBJECT-TYPE SYNTAXINTEGER MAX-ACCESSread-write STATUScurrent DESCRIPTION Antenna Enable disable(0), enable(1) ::= { antennaCommand 1 } antennaAlign OBJECT-TYPE SYNTAXINTEGER MAX-ACCESSread-write STATUScurrent DESCRIPTION Antenna Align disable(0), enable(1) ::= { antennaCommand 2 } -- End antennaCommand Group END -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Can not create template file by mib2c
I finally got snmp perl installed by changing a bunch of Makefiles. But when I use mib2c to create template files from a MIB file, I got the following error: #env MIBS=+RTIRIDIUM-MIB mib2c -c mib2c.scalar.conf iridium writing to iridium.h writing to iridium.c running indent on iridium.c indent: Command line: unknown parameter -orig running indent on iridium.h indent: Command line: unknown parameter -orig No OID file was create in irdium.c except void init_iridium(void) { DEBUGMSGTL((iridium, Initializing\n)); } What went worng? Thanks. -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c result
Hi, I ran mib2c on the nsDemodEventsTable (see below) and I got the following structure struct nsDemodEventsTable_entry { /* * Index values */ longnsDemodEventsUtcSeconds; /* * Column values */ longnsDemodEventsUtcSeconds; nsDemodEventsSeverity; charnsDemodEventsSource[NNN]; size_t nsDemodEventsSource_len; charnsDemodEventsEvent[NNN]; size_t nsDemodEventsEvent_len; charnsDemodEventsDescription[NNN]; size_t nsDemodEventsDescription_len; int valid; }; 1. Why is there two instances of nsDemodEventsUtcSeconds (one under index values and one under column values) 2. Why doesn't nsDemodEventsSeverity have a type? 3. Why do all strings have NNN as length and not the maximum length given in the MIB nsDemodEventsTable OBJECT-TYPE SYNTAX SEQUENCE OF DemodEventsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION List of Events occured ::= { nsDemodEvents 1 } nsDemodEventsEntry OBJECT-TYPE SYNTAX DemodEventsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION Conceptual row in table for each event. INDEX { nsDemodEventsUtcSeconds } ::= { nsDemodEventsTable 1 } DemodEventsEntry ::= SEQUENCE { nsDemodEventsUtcSeconds Integer32, nsDemodEventsSeverity ItuPerceivedSeverity, nsDemodEventsSource DisplayString, nsDemodEventsEvent DisplayString, nsDemodEventsDescription DisplayString } nsDemodEventsUtcSeconds OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION Seconds passed from EPOCH ::= { nsDemodEventsEntry 1 } nsDemodEventsSeverity OBJECT-TYPE SYNTAX ItuPerceivedSeverity MAX-ACCESS read-only STATUS current DESCRIPTION Severity of event ::= { nsDemodEventsEntry 2 } nsDemodEventsSource OBJECT-TYPE SYNTAX DisplayString (SIZE(0..255)) MAX-ACCESS read-only STATUS current DESCRIPTION Severity of event ::= { nsDemodEventsEntry 3 } nsDemodEventsEvent OBJECT-TYPE SYNTAX DisplayString (SIZE(0..255)) MAX-ACCESS read-only STATUS current DESCRIPTION Severity of event ::= { nsDemodEventsEntry 4 } nsDemodEventsDescription OBJECT-TYPE SYNTAX DisplayString (SIZE(0..255)) MAX-ACCESS read-only STATUS current DESCRIPTION Severity of event ::= { nsDemodEventsEntry 5 } Thank you, Naama Bar-Menachem Samuel Monderer -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c result
On 22 March 2011 12:33, Naama Bar Menachem naama.barmenac...@novelsat.com wrote: 1. Why is there two instances of nsDemodEventsUtcSeconds Because the definition of nsDemodEventsUtcSeconds is MAX-ACCESS =read-only Index objects are meant to be defined as not-accessible (unless this is the only column in the table) 2. Why doesn’t nsDemodEventsSeverity have a type? Where is the TC 'ItuPerceivedSeverity' defined? In the same MIB file, or in another MIB? If it's in another MIB, is it listed in the IMPORT section of this MIB? 3. Why do all strings have NNN as length and not the maximum length given in the MIB 'Cos this value isn't easily accessible to mib2c Dave -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Difficulties with mib2c and MFD
Hello. I would appreciate some help getting started with building a subagent using mib2c and MFD. I'm trying to build a simple example to handle a table. (I did a scalar first, and that seemed worked fine, so this is the next step...) I have net-snmp version 5.5. I do: mib2c -c mib2c.mfd.conf netSnmpIETFWGTable (Mostly I select default options. I've tried various permutations. I had to select the non-default m2c_data_transient = 0, otherwise I couldn't get the generated code to compile. I made sure I had a text file at /etc/dummy.conf.) make -f make -f netSnmpIETFWGTable_Makefile sudo ./netSnmpIETFWGTable -f -L -DALL NET-SNMP version 5.5 AgentX subagent connected ... Looks good, but then snmpget -v1 -c public localhost nsIETFWGChair1 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: NET-SNMP-EXAMPLES-MIB::nsIETFWGChair1 Below is a snippet from the the subagent debug, which seems to contain a few clues, but I can't work out what's really going wrong. Can anyone help? Thanks, Alec sess_process_packet: session 0x8e3e9f8 fd 7 pkt 0x8e51da8 length 56 trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1472: dumph_recv: AgentX Header trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1473: dumph_recv: Version dumpx_recv:01 dumpv_recv: Version: 1 trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1480: dumph_recv: Command dumpx_recv:05 dumpv_recv: Command: 5 (Get) trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1488: dumph_recv: Flags dumpx_recv:00 dumpv_recv: Flags: 0x0 trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1495: dumph_recv: Reserved Byte dumpx_recv:00 dumpv_recv: Reserved: 0x0 trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1501: dumph_recv: Session ID dumpx_recv:05 00 00 00 dumpv_recv: Integer: 5 (0x05) trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1509: dumph_recv: Transaction ID dumpx_recv:02 00 00 00 dumpv_recv: Integer: 2 (0x02) trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1517: dumph_recv: Packet ID dumpx_recv:03 00 00 00 dumpv_recv: Integer: 3 (0x03) trace: agentx_parse_header(): mibgroup/agentx/protocol.c, 1524: dumph_recv: Payload Length dumpx_recv:24 00 00 00 dumpv_recv: Integer: 36 (0x24) trace: agentx_parse(): mibgroup/agentx/protocol.c, 1626: dumph_recv: PDU trace: agentx_parse(): mibgroup/agentx/protocol.c, 1748: dumph_recv: Search Range trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1129: dumph_recv: OID Header dumpx_recv: 07 04 00 00 dumpv_recv:# subids:7 (0x07) trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1133: dumpv_recv: prefix: 4 (0x04) trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1136: dumpv_recv: inclusive: 0 (0x00) trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1141: dumph_recv: OID Segments parse_oid sizeof(oid) = 4 dumpx_recv: 01 00 00 00 dumpv_recv:Integer: 1 (0x01) dumpx_recv: 88 1F 00 00 dumpv_recv:Integer: 8072 (0x1F88) dumpx_recv: 02 00 00 00 dumpv_recv:Integer: 2 (0x02) dumpx_recv: 02 00 00 00 dumpv_recv:Integer: 2 (0x02) dumpx_recv: 01 00 00 00 dumpv_recv:Integer: 1 (0x01) dumpx_recv: 01 00 00 00 dumpv_recv:Integer: 1 (0x01) dumpx_recv: 02 00 00 00 dumpv_recv:Integer: 2 (0x02) trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1216: dumpv_recv: OID: NET-SNMP-EXAMPLES-MIB::nsIETFWGChair1 trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1129: dumph_recv: OID Header dumpx_recv: 00 00 00 00 dumpv_recv:# subids:0 (0x00) trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1133: dumpv_recv: prefix: 0 (0x00) trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1136: dumpv_recv: inclusive: 0 (0x00) trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1141: dumph_recv: OID Segments parse_oid sizeof(oid) = 4 trace: agentx_parse_oid(): mibgroup/agentx/protocol.c, 1163: dumpv_recv: OID: NULL (0.0) trace: _sess_process_packet(): snmp_api.c, 5416: sess_process_packet: received message id#0 reqid#3 trace: handle_agentx_packet(): mibgroup/agentx/subagent.c, 309: agentx/subagent: handling agentx request (req=0x3,trans=0x2,sess=0x5) trace: handle_agentx_packet(): mibgroup/agentx/subagent.c, 330: agentx/subagent: - get trace: netsnmp_callback_hook_build(): snmpCallbackDomain.c, 455: transport_callback: hook_build enter trace: netsnmp_callback_hook_build(): snmpCallbackDomain.c, 530: transport_callback: hook_build exit trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#0 reqid#3
Re: Difficulties with mib2c and MFD
On 18 February 2011 11:02, Alec Edgington alec.edging...@thales-esecurity.com wrote: Hello. I would appreciate some help getting started with building a subagent using mib2c and MFD. I have little or no expertise with the MfD framework, but there is one glaring error in your example: snmpget -v1 -c public localhost nsIETFWGChair1 A GET request must always include the instance subidentifiers (i.e. the index to the table). A GET request on the bare MIB object name will never work - be this a column object within a table, or a scalar object (which needs the subidentifier '0') Try snmpgetnext -v1 -c public localhost nsIETFWGChair1 That will at least have a fighting chance of working. Dave -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: Difficulties with mib2c and MFD
I have little or no expertise with the MfD framework, but there is one glaring error in your example: snmpget -v1 -c public localhost nsIETFWGChair1 A GET request must always include the instance subidentifiers (i.e. the index to the table). A GET request on the bare MIB object name will never work - be this a column object within a table, or a scalar object (which needs the subidentifier '0') Ah, thanks. Sorry, I'm very new to this. I did try: snmpget -v1 -c public localhost nsIETFWGChair1.0 which gave: Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: NET-SNMP-EXAMPLES-MIB::nsIETFWGChair1. That does give me a clue: it's looking up something indexed by an empty string. I guess I need to fill in some code to initialize the indexes, but am not sure how or where to do this. I'll keep looking. Thanks for your help! Try snmpgetnext -v1 -c public localhost nsIETFWGChair1 That will at least have a fighting chance of working. That gives me: SNMPv2-MIB::snmpSetSerialNo.0 = INTEGER: 931428471 Consider the environment before printing this mail. Thales e-Security Limited is incorporated in England and Wales with company registration number 2518805. Its registered office is located at 2 Dashwood Lang Road, The Bourne Business Park, Addlestone, Nr. Weybridge, Surrey KT15 2NX. The information contained in this e-mail is confidential. It may also be privileged. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee or the intended addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. If you have received this e-mail in error, please inform us immediately on +44 (0)1223 723600 and delete it and all copies from your system. Commercial matters detailed or referred to in this e-mail are subject to a written contract signed for and on behalf of Thales e-Security Limited. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Difficulties with mib2c and MFD
On 18 February 2011 16:11, Alec Edgington alec.edging...@thales-esecurity.com wrote: snmpget -v1 -c public localhost nsIETFWGChair1.0 which gave: Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: NET-SNMP-EXAMPLES-MIB::nsIETFWGChair1. That implies that the agent does not recognise the object nsIETFWGChair1 In other words, your subagent has not registered the new MIB. Try snmpgetnext -v1 -c public localhost nsIETFWGChair1 That gives me: SNMPv2-MIB::snmpSetSerialNo.0 = INTEGER: 931428471 Again - that indicates that the new MIB is not being recognised. Dave -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
problem to generate the code using mib2c
I have problem to generate the code using mib2c: snmptranslate 1.3.6.1.4.1.388.11.2.2.11.10 SYMBOL-CC-WS2000-MIB::auditLoggingCfgTable sym...@debian-build01:~/Sanjay$ mib2c -c mib2c.iterate.conf SYMBOL-CC-WS2000-MIB::auditLoggingCfgTable *you didn't give me a valid OID to start with at /usr/local/bin/mib2c line 115.* -- Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: problem to generate the code using mib2c
On 11 January 2011 13:31, sanjay kumar fromsan...@gmail.com wrote: I have problem to generate the code using mib2c: snmptranslate 1.3.6.1.4.1.388.11.2.2.11.10 SYMBOL-CC-WS2000-MIB::auditLoggingCfgTable sym...@debian-build01:~/Sanjay$ mib2c -c mib2c.iterate.conf SYMBOL-CC-WS2000-MIB::auditLoggingCfgTable you didn't give me a valid OID to start with at /usr/local/bin/mib2c line 115. If snmptranslate can find the MIB, but mib2c cannot, then my suspicion is that you may be using two different versions of the software. (e.g. one supplied by Debian, and one that you compiled yourself). Particularly since mib2c talks about '/usr/local/bin' - which typically indicates a user-configured installation, rather than a vendor-provided one. Where is the SYMBOL-CC-WS2000-MIB file installed? Try copying it to a MIB directory somewhere under /usr/local (probably /usr/local/share/snmp/mibs) See if mib2c can find it there... Dave -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
how to generate c file using mib2c for node containg both scalars and table
Hi All, I want to generate c implementation file and header file for the MIB-NODE file containing both scalars and table. I have generated c file and header file for scalar using mib2c.scalar.conf and similarly for table using mib2c.table_data.conf, but I want to generate c file and header file for MIB-NODE containg both scalar and table, how should i do that? is there any script? please help me thank you !!! -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: how to generate c file using mib2c for node containg both scalars and table
generate scalar and a table source file, club all together while compiling On Mon, Dec 13, 2010 at 4:54 PM, MAS . mass3m...@gmail.com wrote: Hi All, I want to generate c implementation file and header file for the MIB-NODE file containing both scalars and table. I have generated c file and header file for scalar using mib2c.scalar.conf and similarly for table using mib2c.table_data.conf, but I want to generate c file and header file for MIB-NODE containg both scalar and table, how should i do that? is there any script? please help me thank you !!! -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Rakesh P. Zingade +919420626099 -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: how to generate c file using mib2c for node containg both scalars and table
Very simple, using CLI, run mib2c -c YOUR-MIB's-NODE-NAME On Mon, Dec 13, 2010 at 4:54 PM, MAS . mass3m...@gmail.com wrote: Hi All, I want to generate c implementation file and header file for the MIB-NODE file containing both scalars and table. I have generated c file and header file for scalar using mib2c.scalar.conf and similarly for table using mib2c.table_data.conf, but I want to generate c file and header file for MIB-NODE containg both scalar and table, how should i do that? is there any script? please help me thank you !!! -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: how to generate c file using mib2c for node containg both scalars and table
On 13 December 2010 11:24, MAS . mass3m...@gmail.com wrote: I want to generate c implementation file and header file for the MIB-NODE file containing both scalars and table. Please see the FAQ entry How can I have mib2c generate code for both scalars and tables? This states the following: This uses a very powerful tool called a text editor :-) The mib2c tool uses separate configuration files to generate code for scalar objects, and for tables. This means that it's not possible to automatically generate a single code file that supports both scalars and tables. Instead, the two code files need to be generated separately, and then combined manually. This will typically mean copying the handler routines for the scalar object(s) into the table file, and adding the code to register these handler(s) to the table initialisation routine. Dave -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
which mib2c template to use
Hi I used the mib2c int template to convert a mib with a single read-write object successfully , however now I face a new issue the value that I need to snmpset is `date +%s` (Linux APOC) which I assume will not fit into an integer field , I assume I will need to change the field type to counter32 , however I simply do not know which template to use , nor to code the missing lines after mib2c , below my MIB. Please Assist. Thanks MY-COMPANY4-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-TYPE, enterprises, Counter32 FROM SNMPv2-SMI; -- root of our MIB will point to enterprises myCompany4MIB MODULE-IDENTITY LAST-UPDATED 20101121Z ORGANIZATION my org CONTACT-INFO email: r...@localhost DESCRIPTION Example MIB REVISION 201011210001Z DESCRIPTION snmp SET test mib ::= { enterprises 36506 } Apoc32Value OBJECT IDENTIFIER ::= { myCompany4MIB 1 } -- time to define apoc values apoc32 OBJECT-TYPE SYNTAX Counter3MAX-ACCESS read-write STATUS current DESCRIPTION Apoc Set from script ::= { Apoc32Value2 END -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c generates wrong code for textual conventions
Hi all, in our MIB we have the following definitions (only the important parts are shown): UsnFunctionGroup ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION xxx SYNTAX INTEGER { a(51), b(53), c(54), d(55) e(63), f(64), g(65), h(70) } setsCfgTmFunctionGroup OBJECT-TYPE SYNTAX UsnFunctionGroup (54 | 65) MAX-ACCESS read-write STATUS current DESCRIPTION blabla ::= { setsCfgTmEntry 4 } the generated c code for this object ist: /** Check the ranges of the passed value for legality */ if ( !(*val = 54 *val = 54) || !(*val = 65 *val = 65) ) { return SNMP_ERR_WRONGVALUE; } which yields an error for each of the two correct values 54 oder 65. The '||' should be a ''. If somebody could give me a hint where this has to be corrected in the mib2c compiler I could submit a patch thanks Boris -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c generates wrong code for textual conventions
On 11 October 2010 13:51, Boris Zweimueller boris.zweimuel...@gmail.com wrote: the generated c code for this object ist: /** Check the ranges of the passed value for legality */ if ( !(*val = 54 *val = 54) || !(*val = 65 *val = 65) ) { return SNMP_ERR_WRONGVALUE; } which yields an error for each of the two correct values 54 oder 65. The '||' should be a ''. Try the attached patch - does that fix the problem? Dave Index: local/mib2c.check_values.conf === --- local/mib2c.check_values.conf (revision 19393) +++ local/mib2c.check_values.conf (working copy) @@ -108,7 +108,7 @@ @eval $x = 1@ if ( @else@ - || + @end@ !(*val = $min *val = $max) @end@ -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib2c generates wrong code for textual conventions
perfect, thank you! Boris 2010/10/11 Dave Shield d.t.shi...@liverpool.ac.uk On 11 October 2010 13:51, Boris Zweimueller boris.zweimuel...@gmail.com wrote: the generated c code for this object ist: /** Check the ranges of the passed value for legality */ if ( !(*val = 54 *val = 54) || !(*val = 65 *val = 65) ) { return SNMP_ERR_WRONGVALUE; } which yields an error for each of the two correct values 54 oder 65. The '||' should be a ''. Try the attached patch - does that fix the problem? Dave -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: mib2c does not like object syntax IpAddress
Ok. I cant change templates so easily, but if that's the only way out, I would. Can you tell me why changing the configuration file will enable in_addr_t to be found ? I even tried editing net_snmp_config.h to HAVE_INADDR_T as 0 but still did not work. Kavita --- On Thu, 9/23/10, anup.shan...@emc.com anup.shan...@emc.com wrote: From: anup.shan...@emc.com anup.shan...@emc.com Subject: RE: mib2c does not like object syntax IpAddress To: kraghuna2...@yahoo.com, net-snmp-users@lists.sourceforge.net Cc: net-snmp-cod...@lists.sourceforge.net Date: Thursday, September 23, 2010, 12:42 AM Try using iterate / table.conf file in mib2c , this works.. -Original Message- From: kavita raghunathan [mailto:kraghuna2...@yahoo.com] Sent: Thursday, September 23, 2010 2:07 AM To: net-snmp-users@lists.sourceforge.net Cc: net-snmp-cod...@lists.sourceforge.net Subject: mib2c does not like object syntax IpAddress Hello, even though I import IpAddress, I get an error while generating c files that looks like this: writing to defaults/table-sfOWBFarEndTable.m2d Starting MFD code generation... writing to sfOWBFarEndTable.h | +- Processing table sfOWBFarEndTable writing to defaults/node-sfOWBifIndexNearEnd.m2d writing to defaults/node-sfOWBFarEndSerialNumber.m2d writing to defaults/node-sfOWBFarEndLocationField.m2d writing to defaults/node-sfOWBFarEndIPInBand.m2d writing to defaults/node-sfOWBFarEndIPoutOfBand.m2d writing to defaults/node-sfOWBFarEndMACOutOfBand.m2d writing to defaults/node-sfOWBFarEndMACInBand.m2d writing to defaults/node-sfOWBFarEndNumber.m2d writing to sfOWBFarEndTable.c writing to sfOWBFarEndTable_data_get.h writing to sfOWBFarEndTable_data_get.c | | +- Processing nonindex sfOWBifIndexNearEnd | | +- Processing nonindex sfOWBFarEndSerialNumber | | +- Processing nonindex sfOWBFarEndLocationField | | +- Processing nonindex sfOWBFarEndIPInBand ERROR: unknown node.decl: in_addr_t Imports line in MIB looks like this: MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Counter32, Integer32, Gauge32, Counter64, IpAddress FROM SNMPv2-SMI and the object looks like this: iPoutofband OBJECT-TYPE SYNTAX IpAddress MAX-ACCESS read-only STATUS current DESCRIPTION Far End IP out of band ::= { iPoutofbandtable 6 } If I change the type of the object to INTEGER, it works. So, I have proved that mib2c does not like IpAddress. But, I have to use IP address for this object type, because it is an Ip address. Please help! Kavita -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
mib2c does not like object syntax IpAddress
Hello, even though I import IpAddress, I get an error while generating c files that looks like this: writing to defaults/table-sfOWBFarEndTable.m2d Starting MFD code generation... writing to sfOWBFarEndTable.h | +- Processing table sfOWBFarEndTable writing to defaults/node-sfOWBifIndexNearEnd.m2d writing to defaults/node-sfOWBFarEndSerialNumber.m2d writing to defaults/node-sfOWBFarEndLocationField.m2d writing to defaults/node-sfOWBFarEndIPInBand.m2d writing to defaults/node-sfOWBFarEndIPoutOfBand.m2d writing to defaults/node-sfOWBFarEndMACOutOfBand.m2d writing to defaults/node-sfOWBFarEndMACInBand.m2d writing to defaults/node-sfOWBFarEndNumber.m2d writing to sfOWBFarEndTable.c writing to sfOWBFarEndTable_data_get.h writing to sfOWBFarEndTable_data_get.c | | +- Processing nonindex sfOWBifIndexNearEnd | | +- Processing nonindex sfOWBFarEndSerialNumber | | +- Processing nonindex sfOWBFarEndLocationField | | +- Processing nonindex sfOWBFarEndIPInBand ERROR: unknown node.decl: in_addr_t Imports line in MIB looks like this: MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Counter32, Integer32, Gauge32, Counter64, IpAddress FROM SNMPv2-SMI and the object looks like this: iPoutofband OBJECT-TYPE SYNTAX IpAddress MAX-ACCESS read-only STATUS current DESCRIPTION Far End IP out of band ::= { iPoutofbandtable 6 } If I change the type of the object to INTEGER, it works. So, I have proved that mib2c does not like IpAddress. But, I have to use IP address for this object type, because it is an Ip address. Please help! Kavita -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: mib2c does not like object syntax IpAddress
Try using iterate / table.conf file in mib2c , this works.. -Original Message- From: kavita raghunathan [mailto:kraghuna2...@yahoo.com] Sent: Thursday, September 23, 2010 2:07 AM To: net-snmp-users@lists.sourceforge.net Cc: net-snmp-cod...@lists.sourceforge.net Subject: mib2c does not like object syntax IpAddress Hello, even though I import IpAddress, I get an error while generating c files that looks like this: writing to defaults/table-sfOWBFarEndTable.m2d Starting MFD code generation... writing to sfOWBFarEndTable.h | +- Processing table sfOWBFarEndTable writing to defaults/node-sfOWBifIndexNearEnd.m2d writing to defaults/node-sfOWBFarEndSerialNumber.m2d writing to defaults/node-sfOWBFarEndLocationField.m2d writing to defaults/node-sfOWBFarEndIPInBand.m2d writing to defaults/node-sfOWBFarEndIPoutOfBand.m2d writing to defaults/node-sfOWBFarEndMACOutOfBand.m2d writing to defaults/node-sfOWBFarEndMACInBand.m2d writing to defaults/node-sfOWBFarEndNumber.m2d writing to sfOWBFarEndTable.c writing to sfOWBFarEndTable_data_get.h writing to sfOWBFarEndTable_data_get.c | | +- Processing nonindex sfOWBifIndexNearEnd | | +- Processing nonindex sfOWBFarEndSerialNumber | | +- Processing nonindex sfOWBFarEndLocationField | | +- Processing nonindex sfOWBFarEndIPInBand ERROR: unknown node.decl: in_addr_t Imports line in MIB looks like this: MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Counter32, Integer32, Gauge32, Counter64, IpAddress FROM SNMPv2-SMI and the object looks like this: iPoutofband OBJECT-TYPE SYNTAX IpAddress MAX-ACCESS read-only STATUS current DESCRIPTION Far End IP out of band ::= { iPoutofbandtable 6 } If I change the type of the object to INTEGER, it works. So, I have proved that mib2c does not like IpAddress. But, I have to use IP address for this object type, because it is an Ip address. Please help! Kavita -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users