Re: mib2c mfd for ifTable

2014-09-24 Thread Pranesh Kulkarni
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=154622311&iu=/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

2014-09-19 Thread Pranesh Kulkarni
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 
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=160591471&iu=/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

2013-05-22 Thread Leonard G
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 
To: 'Leonard G' ; 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

2013-05-21 Thread David Ganor
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 best configuration mode to access global functions

2013-01-07 Thread Nuno Magalhães
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  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

2013-01-06 Thread Dave Shield
On 5 January 2013 18:10, Nuno Magalhães  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

2013-01-05 Thread Dave Shield
On 5 January 2013 12:14, Nuno Magalhães  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


Re: mib2c best configuration mode to access global functions

2013-01-05 Thread Nuno Magalhães
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  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

2013-01-05 Thread Dave Shield
On 5 January 2013 09:05, Nuno Magalhães  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

2013-01-05 Thread Nuno Magalhães
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  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

2013-01-04 Thread Dave Shield
On 4 January 2013 19:34, Nuno Magalhães  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


Re: mib2c default has no 'ifTable_cache_load()'

2012-04-19 Thread James Gosnell
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  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  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


Re: mib2c default has no 'ifTable_cache_load()'

2012-04-18 Thread Zlaja
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  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


Re: mib2c on entire MIB -- gluing the bits together

2012-02-10 Thread Dave Shield
On 10 February 2012 14:41, Chris Smith  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


Re: mib2c -c mib2c.mfd.conf

2011-11-04 Thread Simon Chamlian
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 wrote:

> 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 
> wrote:
>
>> On 3 November 2011 15:21, Simon Chamlian 
>> 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

2011-11-03 Thread Dave Shield
On 3 November 2011 15:21, Simon Chamlian  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

2011-11-03 Thread Simon Chamlian
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 wrote:

> On 31 October 2011 18:51, Simon Chamlian  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

2011-11-03 Thread Dave Shield
On 31 October 2011 18:51, Simon Chamlian  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

2011-11-02 Thread Simon Chamlian
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 wrote:

> **
> 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™ now supports Android™ Apps
> for the BlackBerry® PlayBook™. 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

2011-11-01 Thread Venki

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™ now supports Android™ Apps 
for the BlackBerry® PlayBook™. 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® 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

2011-11-01 Thread Simon Chamlian
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 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
>
>
>
>
--
RSA® 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 config option

2011-09-12 Thread N. Karthikeyan
Hi Dave,

    That was due to an issue in my makefile.
This problem is gone after I passed the correct CFLAGS option
and rebuilt the executable.

Thanks,
-karthi



From: Dave Shield 
To: N. Karthikeyan 
Cc: "net-snmp-users@lists.sourceforge.net" 

Sent: Monday, September 12, 2011 2:43 AM
Subject: Re: mib2c config option

On 2 September 2011 19:13, N. Karthikeyan  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: mib2c config option

2011-09-12 Thread Dave Shield
On 2 September 2011 19:13, N. Karthikeyan  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: mib2c config option

2011-09-02 Thread N. Karthikeyan
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 
To: N. Karthikeyan ; Dheeraj Gautam 

Cc: "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  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

2011-09-02 Thread Dave Shield
On 2 September 2011 08:56, Dheeraj Gautam  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

2011-09-02 Thread Dheeraj Gautam
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 result

2011-03-22 Thread Dave Shield
On 22 March 2011 12:33, Naama Bar Menachem
 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


Re: mib2c generates wrong code for textual conventions

2010-10-11 Thread Boris Zweimueller
perfect, thank you!

Boris

2010/10/11 Dave Shield 

> On 11 October 2010 13:51, Boris Zweimueller 
> 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 generates wrong code for textual conventions

2010-10-11 Thread Dave Shield
On 11 October 2010 13:51, Boris Zweimueller  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 does not like object syntax "IpAddress"

2010-09-23 Thread kavita raghunathan
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  wrote:

> From: 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 AT&T 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


RE: mib2c does not like object syntax "IpAddress"

2010-09-22 Thread anup.shankar
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


RE: mib2c generation of snmpNotifyFilterTable code

2010-01-13 Thread Lewis Adam-VNQM87
I think my overriding concern is to minimise merge issues when we
periodically upgrade to subsequent releases of net-snmp. I am more than
happy to feed back any bugs I might find but the grey area is knowing
exactly which part should be fixed.

Personally speaking, the old-school code in
snmpNotificationProfileTable.c is a lot easier to follow than the
auto-generated snmpNotificationFilter files.

Adam.


> -Original Message-
> From: dave.shi...@googlemail.com 
> [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield
> Sent: Wednesday, January 13, 2010 3:39 PM
> To: Lewis Adam-VNQM87
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: Re: mib2c generation of snmpNotifyFilterTable code
> 
> 2010/1/13 Lewis Adam-VNQM87 :
> > Okay, thanks again. I may well speak to the -coders. It 
> seems a shame 
> > to have gone to the effort of creating scripts that cannot 
> be re-run.
> 
> Bear in mind that the MfD code structure is an order of 
> magnitude more complete (if you ask Robert) / complicated (if 
> you ask me) than the alternative approaches.  So it's 
> probably only MfD-based MIB implementations where there's any 
> real benefit to re-generating the code.
> 
>With all the others, it's as simple (IMO) to fix any 
> problems manually.
> None of the other approaches have the same concept of coder-editable
> vs hands-off code.   (Or rather, the "hands-off" processing 
> is typically
> done within various helpers, rather than being MIB-specific).
> 
> 
> As you may have gathered - I'm not a great fan of the MfD
> style.   But that's primarily my personal prejudice, and I do
> try hard not to bad-mouth Robert's code in public.
> 
> Dave
> 

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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 generation of snmpNotifyFilterTable code

2010-01-13 Thread Dave Shield
2010/1/13 Lewis Adam-VNQM87 :
> Okay, thanks again. I may well speak to the -coders. It seems a shame to
> have gone to the effort of creating scripts that cannot be re-run.

Bear in mind that the MfD code structure is an order of magnitude
more complete (if you ask Robert) / complicated (if you ask me)
than the alternative approaches.  So it's probably only MfD-based
MIB implementations where there's any real benefit to re-generating
the code.

   With all the others, it's as simple (IMO) to fix any problems manually.
None of the other approaches have the same concept of coder-editable
vs hands-off code.   (Or rather, the "hands-off" processing is typically
done within various helpers, rather than being MIB-specific).


As you may have gathered - I'm not a great fan of the MfD
style.   But that's primarily my personal prejudice, and I do
try hard not to bad-mouth Robert's code in public.

Dave

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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 generation of snmpNotifyFilterTable code

2010-01-13 Thread Lewis Adam-VNQM87
Okay, thanks again. I may well speak to the -coders. It seems a shame to
have gone to the effort of creating scripts that cannot be re-run.

Adam. 

> -Original Message-
> From: dave.shi...@googlemail.com 
> [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield
> Sent: Wednesday, January 13, 2010 3:10 PM
> To: Lewis Adam-VNQM87
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: Re: mib2c generation of snmpNotifyFilterTable code
> 
> 2010/1/13 Lewis Adam-VNQM87 :
> >  Are the mib2c scripts purely for the benefit of creating new 
> > user-defined tables?
> 
> That's how I view them, yes.
> 
> I seem to recall Robert had some method of re-running mib2c 
> to update the standard structure of MfD-based MIB code.
> But I have no involvement with this style of MIB implementation.
> 
> You might want to ask on the -coders list about this.
> But as far as I'm concerned, mib2c is a one-shot tool.
> 
> Dave
> 

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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 generation of snmpNotifyFilterTable code

2010-01-13 Thread Dave Shield
2010/1/13 Lewis Adam-VNQM87 :
>  Are the mib2c scripts purely for the benefit of creating
> new user-defined tables?

That's how I view them, yes.

I seem to recall Robert had some method of re-running
mib2c to update the standard structure of MfD-based MIB code.
But I have no involvement with this style of MIB implementation.

You might want to ask on the -coders list about this.
But as far as I'm concerned, mib2c is a one-shot tool.

Dave

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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 generation of snmpNotifyFilterTable code

2010-01-13 Thread Lewis Adam-VNQM87
Hi Dave,
 thanks for the quick response. Yes, I did mean snmp-notification-mib.

I guess I am trying to get the correct "workflow". I understand that the mib2c 
will not generate the finished code but now that we have cranked the handle 
once with snmpNotifyFilterTable files, do we simply treat them (from now on) as 
files to be hand-coded? Or, do we somehow feed back corrections into the 
generator and then re-run mib2c? Ideally, there would be hand-coded 
functionality specific to the tables and this would be separate to the 
auto-generated code, so that if generic problems were found, the scripts could 
be re-run without losing hand-crafted edits.

With each suite of software delivered (say net-snmp-5.5) both the mib2c scripts 
and the already-generated files (snmpNotifyFilterTable.c, etc) are provided. 
Are the mib2c scripts purely for the benefit of creating new user-defined 
tables? As I said previously, I still can't see exactly what commands would 
have been run to re-generate the files.

Regards,
Adam.




> -Original Message-
> From: dave.shi...@googlemail.com 
> [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield
> Sent: Wednesday, January 13, 2010 1:43 PM
> To: Lewis Adam-VNQM87
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: Re: mib2c generation of snmpNotifyFilterTable code
> 
> 2010/1/13 Lewis Adam-VNQM87 :
> > Looking at the files that combine to provide support for the
> > snmpNotifyFilterTable:
> >
> >  agent\mibgroup\notification\snmpNotifyFilterTable.c
> >  agent\mibgroup\notification\snmpNotifyFilterTable_data_access.c
> >  agent\mibgroup\notification\snmpNotifyFilterTable_interface.c
> >  etc.
> 
> I presume you mean "snmp-notification-mib" rather than "notification"
> The FilterTable has been implemented separately from the 
> basic NotifyTable, and the FilterProfileTable
> 
> 
> > I can see that these files are generated by mib2c but what 
> I can't see 
> > are the exact commands (presumably in a makefile somewhere) that 
> > generate these files.
> 
> From the style of the filenames, this looks like an MfD-based 
> implementation.
> 
> 
> > Is the code generation completely generic or has there been some 
> > customisation specifically for snmpNotifyFilterTable?
> 
> Almost *every* MIB implementation will include specific customisation.
> There are very few MIBs where mib2c will generate fully-working code.
> 
> The purpose of mib2c is to produce a *template* for a MIB 
> implementation,
> not to generate the final code automatically.   It only knows 
> about the
> syntax of the MIB objects - it can't possible handle the semantics
> of these objects.   That's what the (human) coder is for.
> 
> 
> > I think I have found a problem (setting rowStatus to createAndWait 
> > should leave it in notInService state rather than 
> createAndWait state) 
> > and I wanted to know how best to apply a fix.
> 
> I think you're probably right.
> The routine snmpNotifyFilterTable_check_dependencies()
> handles the mapping of createAndGo into Active, but doesn't 
> do anything with createAndWait vs notInService/notReady
> 
> 
> Feel free to submit a patch to the project tracker.
> 
> Dave
> 

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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 generation of snmpNotifyFilterTable code

2010-01-13 Thread Dave Shield
2010/1/13 Lewis Adam-VNQM87 :
> Looking at the files that combine to provide support for the
> snmpNotifyFilterTable:
>
>  agent\mibgroup\notification\snmpNotifyFilterTable.c
>  agent\mibgroup\notification\snmpNotifyFilterTable_data_access.c
>  agent\mibgroup\notification\snmpNotifyFilterTable_interface.c
>  etc.

I presume you mean "snmp-notification-mib" rather than "notification"
The FilterTable has been implemented separately from the basic
NotifyTable, and the FilterProfileTable


> I can see that these files are generated by mib2c but what I can't see
> are the exact commands (presumably in a makefile somewhere) that
> generate these files.

>From the style of the filenames, this looks like an MfD-based
implementation.


> Is the code generation completely generic or has there been some
> customisation specifically for snmpNotifyFilterTable?

Almost *every* MIB implementation will include specific customisation.
There are very few MIBs where mib2c will generate fully-working code.

The purpose of mib2c is to produce a *template* for a MIB implementation,
not to generate the final code automatically.   It only knows about the
syntax of the MIB objects - it can't possible handle the semantics
of these objects.   That's what the (human) coder is for.


> I think I have found a problem (setting rowStatus to createAndWait
> should leave it in notInService state rather than createAndWait state)
> and I wanted to know how best to apply a fix.

I think you're probably right.
The routine snmpNotifyFilterTable_check_dependencies()
handles the mapping of createAndGo into Active,
but doesn't do anything with createAndWait vs notInService/notReady


Feel free to submit a patch to the project tracker.

Dave

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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 not working, perl module perl/SNMP not installed correctly

2009-10-27 Thread maniraj . patri
Hi,

I also faced the same problem in Fedora core 6. and solved it by setting the 
LD_LIBRARY_PATH as follows

export LD_LIBRARY_PATH=/usr/local/lib

As it is just a matter of setting LD_LIBRARY_PATH, I think it should work witha 
ll Unix based systems.

Thanks,
Maniraj Patri

--
This message was sent on behalf of maniraj.pa...@gmail.com at openSubscriber.com
http://www.opensubscriber.com/message/net-snmp-users@lists.sourceforge.net/2805916.html

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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 compilation issue

2009-07-03 Thread Dave Shield
2009/7/3 Jaikar Nalthooru :
>  I am trying to compile the H.323 MIB file
   [snip]
> But the generated files are not complete.
> I got the MIB subtree without any variables

What variables were you expecting to see?

Have a proper look at the MIB you are working with.
What management objects does it actually define?

I think that you will find that mib2c *has* generated
support for every management object in this particular MIB!

Dave

--
___
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 format

2009-06-04 Thread Dave Shield
2009/6/4 kusuma.bm :
> i would like to know the mib2c command format that has been used to
> generate the VACM MIBS that exposes API's like vacm_parse_group,
> vacm_parse_access and vacm_parse_view

The vacm_parse_xxx  routines are hand coded, and weren't generated
via mib2c.They are really concerned with reading settings in from
the config file, and creating suitable entries in the internal tables,
rather than working with MIB variables as such.

The corresponding MIB-side processing  (in mibII/vacm_vars.c)
is basically carried over from the old UCD agent, and uses the
old-style v4 MIB API.   We wouldn't advise you to develop new code
in this style - it's much less efficient than the newer handler-based
approach, and there's much more coding involved - particularly for
non-integer indexed tables.

If you insist on working with this MIB interface, then mib2c.old-api.conf
would generate a vaguely sensible starting point.   But the output is
not particularly solid or complete, and you'll have a lot of manual
coding to get it to a useable state.



> i want to generate code
> for a mib snmpTargetAddrExtTable , and  i want it to be generated in the
> above format ie like parse functions.

The simplest way to do this would probably be to start from the
existing 'snmpTargetAddrEntry' code (under agent/mibgroup/target)

Just add another couple of fields to the targetAddrTable_struct data
structure, anothyer couple of branches to the cases statement in the
var_snmpTargetAddrEntry routine, and extend the parse_ and
store_snmpTargetAddrEntry routines to handle these extra fields.
   Then define a new "struct variable2' array to hold information about
the extension table, and register this within the init routine.

That's definitely going to be the easiest way to implement this table.

Dave

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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 API style of TargetAddrTable.

2009-04-14 Thread Dave Shield
2009/4/14 kusuma.bm :
> i would like which API style has been used to generate
> snmpTargetAddrTable code (netsnmp-5.4.2.1) using mib2c compiler so that
> i can use the same API style to generate code for snmpCommunityTable .

That's probably a bad idea.
The snmpTargetAddrTable implementation is relatively old,
and still uses the pre-net-snmp v4 API.
   You *can* generate code in this form using the 'old_api'
mib2c template, but the resulting code is not particularly solid,
and this is a relatively inefficient mechanism.
   Most new MIB implementations will use one of the various
handler-based approaches.


If you are interested in the snmpCommunityTable, you should
probably take a look at the project 'patches' tracker, where there
is an example of this MIB already waiting.
   I've not had the chance to look at it myself, so I've no idea how
solid or functional it is.   But it might save you a bit of time getting
started.

Dave

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
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 gives an error "you didn't give me a valid OID to start with.."

2009-03-24 Thread Pranesh Kulkarni
You have to set the environmental variable

If it is  bash shell,
  export MIBS=ALL

If it is csh shell,
 setenv MIBS ALL




On Wed, Mar 25, 2009 at 10:20 AM, Tanisha Kashyap <
tanisha.kash...@aricent.com> wrote:

>  Hi,
>
>
>
> I am trying to generate the code using: mib2c -c mib2c.scalar.conf abc and
> I get an error “you didn't give me a valid OID to start with…"
>
> Abc is the name of one of the objects in the mib.
>
>
>
> The mib is placed in the mibs dir: /usr/sma/snmp/mibs
>
>
>
> Tanisha
>
>
>
> *"No task is so humble that it does not offer an outlet for individuality"
> ***
>
>
>
> --
> "DISCLAIMER: This message is proprietary to Aricent and is intended solely
> for the use of the individual to whom it is addressed. It may contain
> privileged or confidential information and should not be circulated or used
> for any purpose other than for what it is intended. If you have received
> this message in error,please notify the originator immediately. If you are
> not the intended recipient, you are notified that you are strictly
> prohibited from using, copying, altering, or disclosing the contents of this
> message. Aricent accepts no responsibility for loss or damage arising from
> the use of the information transmitted by this email including damage from
> virus."
>
>
> --
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> ___
> 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
>
>
--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com___
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 without perl

2008-09-02 Thread Wes Hardaker
> On Tue, 02 Sep 2008 23:27:25 +0200, Thomas Anders <[EMAIL PROTECTED]> 
> said:

>> Is it possible to run mib2c without perl modules installed? I get an
>> error and haven't found a workaround.

TA> No. mib2c is a Perl program that requires our Perl modules (see the FAQ).

It should be possible using the PAR::Packer perl module to get mib2c
working on a system without perl installed.  But you'd have to get it
working on a system with perl first, and then run 'pp' from the
PAR::Packer module to build it.

(Having tinkered with PAR::Packer and 'pp' recently, it's pretty cool)
-- 
Wes Hardaker
Sparta, Inc.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
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 without perl

2008-09-02 Thread Thomas Anders
dan anderson wrote:
> Is it possible to run mib2c without perl modules installed? I get an
> error and haven't found a workaround.

No. mib2c is a Perl program that requires our Perl modules (see the FAQ).

> Either way, is it possible to use the resulting .c and .h files
> without the perl modules? 

Yes.


+Thomas

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
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 code] code for MODE_SET_ACTION

2008-05-17 Thread Dave Shield
2008/5/15 CHAHIBI Samira <[EMAIL PROTECTED]>:
> I have run mib2c and obtained my .c and .h files. I have one single RW
> scalar variable named "id".

Which mib2c template did you use?   scalar or int_watch?
Your requirements match the 'mib2c.int_watch.conf' template almost
exactly.   That will handle all of the details for you - all you need to do
is specify the OID and the integer variable which holds the value.
The watcher helper does everything else.

Dave

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 code] code for MODE_SET_ACTION

2008-05-15 Thread Wes Hardaker
> On Thu, 15 May 2008 16:59:19 +, CHAHIBI Samira <[EMAIL PROTECTED]> 
> said:

CS> Hi all,
CS> I have run mib2c and obtained my .c and .h files. I have one single RW 
scalar variable named "id". I I have completed the MODE_GET case by giving the 
pointor and lenght of "id". The problem is that i don't know how to complete 
the MODE_SET_ACTION, all i want is to affect an integer value to my scalar 
object "id".
CS> Please help, I'm totally begineer. Thanks a lot.

In the ACTION portion, use

   id = *request->requestvb->val.integer;

-- 
Wes Hardaker
Sparta, Inc.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 linker errors ifTable

2008-02-06 Thread Pranesh Kulkarni
Hi Dave,

When I run my subagent as ...

 ./simpleTable  -f -L -DsimpleTable -M localhost:1161

 Its running correctly , and I am getting the values from snmpget and
snmpwalk command.

My next strep will be AgentX configuration.

Thanks for your valuable help and its required in future also 

Thanks,
Pranesh

On Feb 6, 2008 3:10 PM, Dave Shield <[EMAIL PROTECTED]> wrote:

> On 05/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> >  So when I run the subagent,
> >  ./simpleTable -f -L
>
> > Its saying
> >   Warning: Failed to connect to the agentx master agent ([NIL]):
>
> > In my /usr/local/share/snmp , I have kept the line
> >  master agentx
>
>
> Is that the *only* AgentX configuration you have set up?
> In which case, the master agent should be listening for
> connections on the named socket /var/agentx/master
>
> Does this socket exist after you start the master agent?
> Does it disappear when you shut the master agent down?
> Does the master agent log any error messages when you
> start it up.
>
>
> > Do we need another configuration file for the subagent ?
>
> As long as the master agent is creating the AgentX socket
> successfully, and the master/subagent agree on what socket
> they are using, then you shouldn't need a subagent config file, no.
>
> It might be worth looking at the FAQ entry
>How can I run AgentX with a different socket address?
>http://www.net-snmp.org/wiki/index.php/FAQ:Agent_13
>
> for a bit more info about this.
>
> Dave
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-02-06 Thread Dave Shield
On 05/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
>  So when I run the subagent,
>  ./simpleTable -f -L

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

> In my /usr/local/share/snmp , I have kept the line
>  master agentx


Is that the *only* AgentX configuration you have set up?
In which case, the master agent should be listening for
connections on the named socket /var/agentx/master

Does this socket exist after you start the master agent?
Does it disappear when you shut the master agent down?
Does the master agent log any error messages when you
start it up.


> Do we need another configuration file for the subagent ?

As long as the master agent is creating the AgentX socket
successfully, and the master/subagent agree on what socket
they are using, then you shouldn't need a subagent config file, no.

It might be worth looking at the FAQ entry
How can I run AgentX with a different socket address?
http://www.net-snmp.org/wiki/index.php/FAQ:Agent_13

for a bit more info about this.

Dave

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 linker errors ifTable

2008-02-05 Thread Pranesh Kulkarni
 It was library linking issue its resolved , Thanks Dave

 So when I run the subagent,
 ./simpleTable -f -L


Its saying

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



In my /usr/local/share/snmp , I have kept the line
 master agentx


Do we need another configuration file for the subagent ?

Thanks,
Pranesh

On Feb 5, 2008 3:04 PM, Dave Shield <[EMAIL PROTECTED]> wrote:

> On 05/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> > I created my module and generated using mib2c tool.
> >  $ mib2c -c mib2c.mfd.conf simple-MIB::simpleTable
>
> Urkhh.  That's one framework that I don't know much about.
> You may need to try asking Robert for help.
> (Which is best done on the project IRC channel).
>
>
>
> >  When I done with make command , I got the executable ,
> simpleTable
> >
> >  When I do
> >   ./simpleTable ,
> > ./simpleTable: symbol lookup error: ./simpleTable: undefined
> symbol:
> > netsnmp_cache_create
>
> What was the exact command used to link the 'simpleTable' binary?
> (i.e. the output of the "make" command")
>
>
> It might be easier to start by compiling your module into the main
> agent binary:
>
>mv  simpleTable   agent/mibgroup
>configure   --with-mib-modules=simpleTable
>make
>make install
>
> i.e. taking the AgentX step out of the equation.
> That might also avoid the library linking problem above.
>
>
>
> Dave
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-02-05 Thread Dave Shield
On 05/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> I created my module and generated using mib2c tool.
>  $ mib2c -c mib2c.mfd.conf simple-MIB::simpleTable

Urkhh.  That's one framework that I don't know much about.
You may need to try asking Robert for help.
(Which is best done on the project IRC channel).



>  When I done with make command , I got the executable , simpleTable
>
>  When I do
>   ./simpleTable ,
> ./simpleTable: symbol lookup error: ./simpleTable: undefined symbol:
> netsnmp_cache_create

What was the exact command used to link the 'simpleTable' binary?
(i.e. the output of the "make" command")


It might be easier to start by compiling your module into the main
agent binary:

mv  simpleTable   agent/mibgroup
configure   --with-mib-modules=simpleTable
make
make install

i.e. taking the AgentX step out of the equation.
That might also avoid the library linking problem above.



Dave

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 linker errors ifTable

2008-02-04 Thread Pranesh Kulkarni
Hi ,


I want to have a subagent to master net-snmp agent.

Dircectory structure is

~/net-snmp-5.4.1
 and
I have wriiten my mib module simple-MIB  in /usr/local/share/snmp/mibs
directory and checked with snmptranslate command.
 I am generating C files using mib2c tool in ~/simpleTable .

I created my module and generated using mib2c tool.
 $ mib2c -c mib2c.mfd.conf simple-MIB::simpleTable

 It generated .c and .h files

 In simpleTable_data_access.c assigned some defalut values
int simpleName_len=30;
char simpleName[255];
int simpleAddress_len=10;
char simpleAddress [255];
int simpleLocation_len=10;
char simpleLocation_len[255];

In fact I have to read from some file and fill the values . But here just
assigned some values.

 When I done with make command , I got the executable , simpleTable

 When I do
  ./simpleTable ,
./simpleTable: symbol lookup error: ./simpleTable: undefined symbol:
netsnmp_cache_create


I have kept an entry in /usr/local/share/snmp/snmpd.conf
master agentx

and the agent is running with command
/usr/local/sbin/snmpd

Please help me in resloving this issue.


Thanks,
Pranesh




On Feb 1, 2008 9:14 PM, Dave Shield <[EMAIL PROTECTED]> wrote:

> On 01/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> > May be this sounding simple to you , please help me in this regard,
>
> It's not a matter of being "simple" or complex.
> The problem is that you are not giving us sufficient
> information to work with.
>
> You say that:
>
> >   Using mib2c tool , I generated code for the scalar and table and then
> >   configured , make and make install
>
> But *how* did you run configure?
> What was the exact command that you used?
> What were the names files produced by mib2c, and where did you put them?
>
> Similarly:
>
> >   if I issue snmpget it replies ,  No Such Instance currently exists at
> this OID
>
> That's omitting all of the useful information.
> What was the exact "snmpget" command that you used?
> It sounds as if you supplied at least one OID to retrieve,
> but what was it?   And how does this fit into the structure
> of your MIB, or the initialisation that you've got in your C code?
>
>
> None of us can read your mind.  And we don't have access to
> your private files.   If you don't tell us exactly what you've tried
> (including the details - not something vague like "issue snmpget"),
> then there is no way on earth that we can even start to guess
> what might be wrong!
>
>
> The more detail you can provide, the greater the chance of
> someone being able to help.
>
> Dave
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-02-01 Thread Dave Shield
On 01/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> May be this sounding simple to you , please help me in this regard,

It's not a matter of being "simple" or complex.
The problem is that you are not giving us sufficient
information to work with.

You say that:

>   Using mib2c tool , I generated code for the scalar and table and then
>   configured , make and make install

But *how* did you run configure?
What was the exact command that you used?
What were the names files produced by mib2c, and where did you put them?

Similarly:

>   if I issue snmpget it replies ,  No Such Instance currently exists at this 
> OID

That's omitting all of the useful information.
What was the exact "snmpget" command that you used?
It sounds as if you supplied at least one OID to retrieve,
but what was it?   And how does this fit into the structure
of your MIB, or the initialisation that you've got in your C code?


None of us can read your mind.  And we don't have access to
your private files.   If you don't tell us exactly what you've tried
(including the details - not something vague like "issue snmpget"),
then there is no way on earth that we can even start to guess
what might be wrong!


The more detail you can provide, the greater the chance of
someone being able to help.

Dave

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 linker errors ifTable

2008-02-01 Thread Pranesh Kulkarni
Hi

With mib2c tool , I generated the code and and it corrected errors for table
by assigning default values for integers 1 and string "abc" , and I did not
write any code for doing get, get-next request . Just I wanted to make sure
that  make runs the clean and installs.


For get-req , get-next-req ,  I have to fill the skelton code for which
mib2c generated .

Just to make sure that my mib is associated with the agent , I want to test
with  snmptable command , which  I suppose it should work. Or for that also
I have to fill the skelton.

Please help me after compling and doing make and make install ... how to
test the my generated code will be part of the agent.

May be this sounding simple to you , please help me in this regard,

Thanks in advance,
Pranesh







On Feb 1, 2008 7:58 PM, Dave Shield <[EMAIL PROTECTED]> wrote:

> On 01/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> > Using mib2c tool , I generated code for the scalar and table and then
> > configured , make and make install . Then I ran snmpd
> >
> > if I issue snmpget it replies,
> > No Such Instance currently exists at this OID
>
>
> You've probably done something wrong.
>
>
> If you had provided a bit more detail about exactly what you did, then
> we might have been able to offer more detailed advice or assistance.
> But given the level of information you have provided, then all
> we can really say is that you've probably done something wrong.
>
> Dave
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-02-01 Thread Dave Shield
On 01/02/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> Using mib2c tool , I generated code for the scalar and table and then
> configured , make and make install . Then I ran snmpd
>
> if I issue snmpget it replies,
> No Such Instance currently exists at this OID


You've probably done something wrong.


If you had provided a bit more detail about exactly what you did, then
we might have been able to offer more detailed advice or assistance.
But given the level of information you have provided, then all
we can really say is that you've probably done something wrong.

Dave

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 linker errors ifTable

2008-02-01 Thread Pranesh Kulkarni
Hi ,

I am going through how to make subagent . I have written mib(xyz) and loaded
/usr/local/share/snmp/mibs and tested with snmptranslate.

Using mib2c tool , I generated code for the scalar and table and then
configured , make and make install . Then I ran snmpd

if I issue snmpget it replies ,  No Such Instance currently exists at this
OID

 snmptable , no entries


 My Question whether this mib is part of agent,  if it is yes  or a subagent
to the agent ..

 Please help me in this regard

Thanks in advance
Pranesh
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-01-31 Thread Mike Ayers
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Pranesh Kulkarni
> Sent: Thursday, January 31, 2008 4:54 AM

> Hi Dave,

The net-snmp-users list is more commonly known as "Dave and Friends".

>  # ./ifTable
> Error: Failed to connect to the agentx master agent: Unknown 
> host (No such file or directory)
> ./ifTable: symbol lookup error: ./ifTable: undefined symbol: 
> netsnmp_baby_steps_access_multiplexer_get
> 
>Is this is library linking issue ?? 

There is definitely a dynamic linking problem with 
netsnmp_baby_steps_access_multiplexer_get - make sure that the directory which 
contains the library which provides this function is listed in the dynamic 
library path environment variable (LD_LIBRARY_PATH for Linux and Solaris).

There is also a problem connecting to the master agent.  Verify that:

(1)  You have agentx support:

$ net-snmp-config | tr " " "\n" | grep agentx

agentx/master
agentx/subagent
agentx/protocol
agentx/client
agentx/master_admin
agentx/agentx_config
$ 

(2)  You have enabled AgentX on the master agent.  At minimum, your 
snmpd.conf must have the "master agentx" line.

(3)  You are using the same connection method (domain socket, TCP) on 
both master and subagent.

(4)  There may be a typo in the subagent's snmp.conf file.

(5)  Make sure the master agent is started (ps).


HTH,

Mike

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 linker errors ifTable

2008-01-31 Thread Pranesh Kulkarni
Hi Dave,

   I have installed net-snmp 5.4.1 and generated subagent code ifTable
as given in tutorial with mib2c

  Iam getting symbol error . I have uninstalled other net-snmp versions.


 # ./ifTable
Error: Failed to connect to the agentx master agent: Unknown host (No such
file or directory)
./ifTable: symbol lookup error: ./ifTable: undefined symbol:
netsnmp_baby_steps_access_multiplexer_get

   Is this is library linking issue ??


Thanks,
Pranesh





On Jan 31, 2008 4:28 PM, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:

> Hi Dave,
>From which relative path we should issue command mib2c for
> generating code for subagent .
>
> Suppose say ,
>   i have installed net-snmp package in   /home/xyz/net-
> snmp-5.4.1 , from which directory I should issue mib2 command.
>
> Thanks,
> Pranesh
>
>
> On Jan 31, 2008 4:22 PM, Dave Shield <[EMAIL PROTECTED]> wrote:
>
> > On 31/01/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> > >With the makefile of Subagent, these are the libraries linking,
> > >
> > >  -L/usr/lib64 -L/usr/local/lib -lnetsnmpmibs
> > -lnetsnmpagent
> > >-lnetsnmphelpers -lnetsnmp
> >
> > Try using
> >  -L/usr/lib64 -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs
> > -lnetsnmp
> >
> > This may require you to install 5.4.1 first - I'm not sure.
> >
> > Dave
> >
>
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-01-31 Thread Pranesh Kulkarni
Hi Dave,
   From which relative path we should issue command mib2c for generating
code for subagent .

Suppose say ,
  i have installed net-snmp package in   /home/xyz/net-
snmp-5.4.1 , from which directory I should issue mib2 command.

Thanks,
Pranesh

On Jan 31, 2008 4:22 PM, Dave Shield <[EMAIL PROTECTED]> wrote:

> On 31/01/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> >With the makefile of Subagent, these are the libraries linking,
> >
> >  -L/usr/lib64 -L/usr/local/lib -lnetsnmpmibs
> -lnetsnmpagent
> >-lnetsnmphelpers -lnetsnmp
>
> Try using
>  -L/usr/lib64 -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp
>
> This may require you to install 5.4.1 first - I'm not sure.
>
> Dave
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-01-31 Thread Dave Shield
On 31/01/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
>With the makefile of Subagent, these are the libraries linking,
>
>  -L/usr/lib64 -L/usr/local/lib -lnetsnmpmibs -lnetsnmpagent
>-lnetsnmphelpers -lnetsnmp

Try using
  -L/usr/lib64 -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp

This may require you to install 5.4.1 first - I'm not sure.

Dave

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 linker errors ifTable

2008-01-31 Thread Pranesh Kulkarni
Hi Dave,
 OK I will go ahead with 5.4.1 version .

   I configured 5.2.4 as following steps

   1)./configure --enable-embedded-perl --enable-shared
--with-ldflags=-L/usr/lib64

   2)make

   3)make test

   4)make install


   Then i created directory ifTable and using the command mib2c

 mib2c -c mib2c.mfd.conf ifTable


   With the makefile of Subagent, these are the libraries linking,

 -L/usr/lib64 -L/usr/local/lib -lnetsnmpmibs -lnetsnmpagent
-lnetsnmphelpers -lnetsnmp -ldl -lcrypto -lm -Wl,-E
-Wl,-rpath,/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE
/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/auto/DynaLoader/DynaLoader.a
-L/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE -lperl -lresolv
-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc


Thanks,
Pranesh














On Jan 31, 2008 3:57 PM, Dave Shield <[EMAIL PROTECTED]> wrote:

> On 31/01/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> > I have installed net-snmp 5.2.4 package.
>
> That's a fairly old version of the code.
> If you are installing things yourself, then we'd suggest you work
> with the most recent release (5.4.1).
>
>
> > I am able to generate source code and modified according tutorials
> page
> > , but while linking its giving error
>
> And what exactly is the command that you are using to link?
>
>
> >/usr/lib64/libnetsnmpmibs.a(lmSensors.o)(.text+0x3d):  In function
> `_sensor_load':
> >   undefined reference to `sensors_get_detected_chips'
>
> That looks suspiciously as if there's another version of the Net-SNMP
> suite installed on your system.   If you're compiling the software
> yourself,
> then I would strongly suggest that you remove any vendor-supplied
> versions first.   Having multiple copies of the Net-SNMP libraries is
> just asking for trouble.
>
>
> Dave
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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 linker errors ifTable

2008-01-31 Thread Dave Shield
On 31/01/2008, Pranesh Kulkarni <[EMAIL PROTECTED]> wrote:
> I have installed net-snmp 5.2.4 package.

That's a fairly old version of the code.
If you are installing things yourself, then we'd suggest you work
with the most recent release (5.4.1).


> I am able to generate source code and modified according tutorials page
> , but while linking its giving error

And what exactly is the command that you are using to link?


>/usr/lib64/libnetsnmpmibs.a(lmSensors.o)(.text+0x3d):  In function 
> `_sensor_load':
>   undefined reference to `sensors_get_detected_chips'

That looks suspiciously as if there's another version of the Net-SNMP
suite installed on your system.   If you're compiling the software yourself,
then I would strongly suggest that you remove any vendor-supplied
versions first.   Having multiple copies of the Net-SNMP libraries is
just asking for trouble.


Dave

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 - allocate and free memory question

2008-01-13 Thread Manfred Wassmann
On Sat, 12 Jan 2008, Andrey Kamchatnikov wrote:

> I have created a file with this tool (C code template) and it calls malloc
> function (see below):
>
> (* myDetail_val_ptr ) = malloc(mydata.Detail_len*
> sizeof(mydata.Detail[0]));
>
> But I could find in net-snmp library where this memory is freed.

Hi,

I'm rather new to the net-snmp stuff, but I guess except for those
deeply involved with the code, people will need some more information
to answer your question.

1) which mib2c config file did you use to generate the code
2) a bit more code preceding the malloc statement would be helpful.

Apart from that, if there is no free statement in the generated code,
chances are you have to do it yourself. I'd recomment to doublecheck
the comments, especially those starting with XXX: for hints where to
do it.

HTH

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
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-update: unable to merge automatically.

2008-01-09 Thread Paul Herring
On Jan 9, 2008 9:10 AM, Dave Shield <[EMAIL PROTECTED]> wrote:
> On 08/01/2008, Paul Herring <[EMAIL PROTECTED]> wrote:
> > Deleting .M2C-UPDATE-MERGE-FAILED in the root of the build tree (and
> > all the .directories mib2c-update creates) /appears/ to have resolved
> > my problem.
>
> That's fine.
> This is exactly the effect of choosing "re-run" within the script.

Not IME.

> > I still look forward to any input as to how I can avoid the 'problem'
> > again in the future from anyone who can give advice.
>
> Select "re-run" when prompted to do so.

Selecting 're-run' did *not* solve my problem. I was still given the
same prompts on the next run, for the same files.

-- 
PJH

http://shabbleland.myminicity.com/ind

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
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-update: unable to merge automatically.

2008-01-09 Thread Dave Shield
On 08/01/2008, Paul Herring <[EMAIL PROTECTED]> wrote:
> Deleting .M2C-UPDATE-MERGE-FAILED in the root of the build tree (and
> all the .directories mib2c-update creates) /appears/ to have resolved
> my problem.

That's fine.
This is exactly the effect of choosing "re-run" within the script.


> I still look forward to any input as to how I can avoid the 'problem'
> again in the future from anyone who can give advice.

Select "re-run" when prompted to do so.

Dave

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
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-update: unable to merge automatically.

2008-01-08 Thread Paul Herring
On Jan 8, 2008 11:00 AM, Paul Herring <[EMAIL PROTECTED]> wrote:
> On Jan 8, 2008 10:56 AM, Dave Shield <[EMAIL PROTECTED]> wrote:
>
> > But Robert is the expert here.
>
> Ok - thanks for the help anyway.
>
> What you've said amounts to what I /think/ I found out by trying to
> reverse engineer the script myself - but would like to know
> causes/solutions rather than relying on my rather incomplete
> understanding of bash ;)

Well having got a bit sick of the errors, I persevered a bit more with
the script.

Deleting .M2C-UPDATE-MERGE-FAILED in the root of the build tree (and
all the .directories mib2c-update creates) /appears/ to have resolved
my problem.

Whether it was the correct thing to do or not (I suspect not) I don't
know, but I'm happy. For the moment. I wouldn't advise anyone coming
across this thread in the future to just blithely do the same based on
this post.

I still look forward to any input as to how I can avoid the 'problem'
again in the future from anyone who can give advice.

-- 
PJH

http://shabbleland.myminicity.com/ind

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
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-update: unable to merge automatically.

2008-01-08 Thread Paul Herring
On Jan 8, 2008 10:56 AM, Dave Shield <[EMAIL PROTECTED]> wrote:

> But Robert is the expert here.

Ok - thanks for the help anyway.

What you've said amounts to what I /think/ I found out by trying to
reverse engineer the script myself - but would like to know
causes/solutions rather than relying on my rather incomplete
understanding of bash ;)


-- 
PJH

http://shabbleland.myminicity.com/

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
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-update: unable to merge automatically.

2008-01-08 Thread Dave Shield
On 07/01/2008, Paul Herring <[EMAIL PROTECTED]> wrote:
> > What happens if you create a completely new directory,
> > copy your current code file there, and run "mib2c-update"
> > in that new directory?
> >
> > Do you get an error or not?
> > If so, what is the output?
>
> It appears to have worked. Well not complained anyway. Any clues please?:


Robert's the expert on the 'mib2c-update' script.
I've never used it myself (and wouldn't trust a
computer to do my thinking for me!)

But a quick look at the script source seems to indicate
that it uses a particular hidden file to indicate when there's
been a problem.

The run that fails to merge the changes successfully should
issue an error, telling you which file needs attention.
It also leaves behind this hidden file, as a signal for the
next run of the script.

When you run the update script a second time (presumably
having fixed whatever failed first time around),  it detects
this hidden file, and asks you what you want to do.

If you've tweaked the code to address the original conflict,
but haven't tried to merge in the changes, then choose "re-run".
If you *have* merged in any changes from the mib2c template,
then choose "copy".
(As far as I can tell, if you choose "quit", it will simply ask
you the same things all over again!)


But Robert is the expert here.

Dave

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
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-update: unable to merge automatically.

2008-01-07 Thread Paul Herring
On Jan 7, 2008 4:41 PM, Dave Shield <[EMAIL PROTECTED]> wrote:
> On 07/01/2008, Paul Herring <[EMAIL PROTECTED]> wrote:
> > I'm starting to get this 'error' cropping up on my files when using
> > mib2c-update on my source files (it's previously had no problem
> > merging MIB changes into my modified sources.):
>
> What happens if you create a completely new directory,
> copy your current code file there, and run "mib2c-update"
> in that new directory?
>
> Do you get an error or not?
> If so, what is the output?

It appears to have worked. Well not complained anyway. Any clues please?:

---8<
[EMAIL PROTECTED] ndsnmp]$ cd ..
[EMAIL PROTECTED] apps]$ md test
[EMAIL PROTECTED] apps]$ cd test
[EMAIL PROTECTED] test]$ cp ../ndsnmp/ndCCUGPRMCGroup.* .
[EMAIL PROTECTED] test]$ ls
ndCCUGPRMCGroup.c  ndCCUGPRMCGroup.c~  ndCCUGPRMCGroup.h
ndCCUGPRMCGroup.o  ndCCUGPRMCGroup.so*
[EMAIL PROTECTED] test]# export UPDATE_MIB2C_OPTS="-q -I mib2c_config"; \
>export UPDATE_CONF=mib2c.scalar.conf; \
>export UPDATE_OID=ndCCUGPRMCGroup; \
>export MIBS="+NDRAIL-MIB"; \
>mib2c-update; \
>
Creating missing directory /home/paul/Documents/svn/trunk/apps/test/.orig
Creating missing directory /home/paul/Documents/svn/trunk/apps/test/.new
Creating missing directory /home/paul/Documents/svn/trunk/apps/test/.merged
Creating missing directory /home/paul/Documents/svn/trunk/apps/test/.patch
Creating missing directory /home/paul/Documents/svn/trunk/apps/test/.backup
Creating missing directory /home/paul/Documents/svn/trunk/apps/test/.backup/curr
Creating missing directory /home/paul/Documents/svn/trunk/apps/test/.backup/orig
Starting regneration of ndCCUGPRMCGroup using mib2c.scalar.conf at
2008-01-07_04.44
Creating patch for your custom code
  checking files in /home/paul/Documents/svn/trunk/apps/test/.orig/
(/home/paul/Documents/svn/trunk/apps/test/.orig)
1=/home/paul/Documents/svn/trunk/apps/test/.orig/,
2=/home/paul/Documents/svn/trunk/apps/test/,
3=/home/paul/Documents/svn/trunk/apps/test/.patch/custom.2008-01-07_04.44
  Would do rm -f
/home/paul/Documents/svn/trunk/apps/test/.patch/custom.2008-01-07_04.44
/home/paul/Documents/svn/trunk/apps/test
   no custom code changes found.
mib2c  -c mib2c.scalar.conf -q -I mib2c_config ndCCUGPRMCGroup
/home/paul/Documents/svn/trunk/apps/test
Checking for updates to generated code
  checking files in /home/paul/Documents/svn/trunk/apps/test/.orig/
(/home/paul/Documents/svn/trunk/apps/test/.orig)
1=/home/paul/Documents/svn/trunk/apps/test/.orig/,
2=/home/paul/Documents/svn/trunk/apps/test/.new/,
3=/home/paul/Documents/svn/trunk/apps/test/.patch/generated.2008-01-07_04.44
  Would do rm -f
/home/paul/Documents/svn/trunk/apps/test/.patch/generated.2008-01-07_04.44
/home/paul/Documents/svn/trunk/apps/test
Generated code has not changed.
[EMAIL PROTECTED] test]$
---8<



-- 
PJH

http://shabbleland.myminicity.com/

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
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-update: unable to merge automatically.

2008-01-07 Thread Dave Shield
On 07/01/2008, Paul Herring <[EMAIL PROTECTED]> wrote:
> I'm starting to get this 'error' cropping up on my files when using
> mib2c-update on my source files (it's previously had no problem
> merging MIB changes into my modified sources.):

What happens if you create a completely new directory,
copy your current code file there, and run "mib2c-update"
in that new directory?

Do you get an error or not?
If so, what is the output?

Dave

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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 error

2007-10-10 Thread Dave Shield
[ First - *please* don't mail me privately, without copying
 any responses to the mailing list.  I don't have the time
 or inclination to offer private, unpaid, SNMP consultancy.
 Keep discussions to the list, where others can both learn
 and offer advice.  Thanks.   ]

On 10/10/2007, Yogesh Ankolekar <[EMAIL PROTECTED]> wrote:
> Hi Dave,
>
> Thanks for your response.
> I donot have anything like SNMP.pm in response to "perl -V"
> What does that signify ?

It signifies that I wasn't clear enough last night.

The output of "perl -V" should end with a block looking something like:

  @INC:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8

(The exact list will be different, but it should look something like that).

This is a list of directories on your system.   These directories are
where perl will look for various modules.

If the file SNMP.pm exists in one of these directories, then perl
should be picking it up (and the question is why this isn't working)
If the file SNMP.pm does *not* exist in any of these directories,
then that would explain the problems you are seeing.


> Regarding the build option, I thought that might help in resolving the
> issue.  Isn't that related ?

The configure option "--with-perl-modules" doesn't typically take any
value - it's simply a flag to say "Yes, I want the perl stuff included".

Although it is possible to give a value with this option, that's a fairly
specialised requirement.   You should only do this if you *know* that
this is needed.  And it wouldn't be the path to perl anyway.


Start with a clean slate.
Run configure using "--with-perl-modules"  (no value).
When you come to install the software, run this as

make install 2>&1 | tee _make_install.txt

If mib2c still doesn't work, please post the output of "perl -V"
and the _make_install.txt file.

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
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 error

2007-10-09 Thread Dave Shield
On 08/10/2007, Yogesh Ankolekar <[EMAIL PROTECTED]> wrote:
> I installed net-snmp-5.3.1 using the option
>   "--with-perl-modules=/usr/bin/perl".

That doesn't feel right.
What happens if you try "--with-perl-modules"   ?


> When I try to use mib2c, it always complains me as below.
>
> ERROR: You don't have the SNMP perl module installed.

If you run the command 'perl -V', it will report the locations where
it will look for perl modules.   Have a look through this list.
Do you see 'SNMP.pm' anywhere there?

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
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: invalid OID

2007-08-14 Thread Dave Shield
On 14/08/07, Patrik Nagel <[EMAIL PROTECTED]> wrote:
> > I'm not convinced that this is a valid MIB definition, though.
> > SMI (as used to define MIB modules) is not the same as full ASN.1,
> > and doesn't support SEQUENCEs, except as part of defining a table.
>
> I tried to rewrite this MIB (see below) by means of comparing with other
> (standard) MIBs. But I don't know how to design the nested NodesTable.

I think you probably need to look at a book that explains these concepts
properly.   Trying to guess the correct syntax from existing MIB files is
not a reliable way to proceed.

The usual recommendation for MIB design is "Understanding SNMP MIBs"
by Perkins & McGinnis.


>  Finally, there should be one tMergeLayerTable which contains multiple
> NodesTables (cntNodes entry in TMergeLayerEntry).

This book will also explain how to represent "nested tables" within the SMI
structure.

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
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: invalid OID

2007-08-14 Thread Patrik Nagel
Dave Shield wrote:
> The definition 'MergeLayerInfo' is defining the *syntax* for a MIB bject,
> not the actual MIB object itself.   Try
>
>snmptranslate -m +IEC-62439-2-MIB -IR tMergeLayerInterFace

The snmp translation works after syntax correction in the MIB and using the 
command above.


> I'm not convinced that this is a valid MIB definition, though.
> SMI (as used to define MIB modules) is not the same as full ASN.1,
> and doesn't support SEQUENCEs, except as part of defining a table.

I tried to rewrite this MIB (see below) by means of comparing with other 
(standard) MIBs. But I don't know how to design the nested NodesTable. Finally, 
there should be one tMergeLayerTable which contains multiple NodesTables 
(cntNodes entry in TMergeLayerEntry).


> Who developed this particular MIB?
I don't know that, I got it as a part of a project at the university.

Thanks for your assistance,
Patrik

--MIB
IEC-62439-2-MIB DEFINITIONS ::= BEGIN

IMPORTS
Counter
FROM RFC1155-SMI
DisplayString, TruthValue
FROM SNMPv2-TC
experimental, OBJECT-TYPE, Integer32
FROM SNMPv2-SMI;

tMergeLayerTable OBJECT-TYPE
SYNTAX SEQUENCE OF TMergeLayerEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Status of the redundant LANs in a doubly attached device"
::= { experimental 1 }

tMergeLayerEntry OBJECT-TYPE
SYNTAX  TMergeLayerEntry
MAX-ACCESS  not-accessible
STATUS  current
DESCRIPTION
"An entry containing management information applicable to a
particular interface."
::= { tMergeLayerTable 1 }

TMergeLayerEntry ::= SEQUENCE {
node DisplayString,
manufacturer DisplayString,
version INTEGER16,
macAddressA INTEGER48,
macAddressB INTEGER48,
adapterActiveA TruthValue,
adapterActiveB TruthValue,
duplicateDiscard TruthValue,
transparentReception TruthValue,
bridging TruthValue,
cntTotalSentA Counter,
cntTotalSentB Counter,
cntTotalReceivedA Counter,
cntTotalReceivedB Counter,
cntErrorsA Counter,
cntErrorsB Counter,
noteTableEmpty TruthValue,
cntNodes INTEGER
}

node OBJECT-TYPE
SYNTAX  DisplayString (SIZE (0..31))
MAX-ACCESS  read-only
STATUS  current
DESCRIPTION
"node"
::= { tMergeLayerEntry 1 }

manufacturer OBJECT-TYPE
SYNTAX  DisplayString (SIZE (0..255))
MAX-ACCESS  read-only
STATUS  current
DESCRIPTION
"manufacturer"
::= { tMergeLayerEntry 2}

adapterActiveA OBJECT-TYPE
SYNTAX TruthValue
MAX-ACCESS  read-only
STATUS  current
DESCRIPTION
"adapterActiveA"
::= { tMergeLayerEntry 6 }

.
.
.

cntNodes OBJECT-TYPE
SYNTAX  Integer32 (0..65535)
MAX-ACCESS  read-only
STATUS  current
DESCRIPTION
"cntNodes"
::= { tMergeLayerEntry 18 }

--object types not yet defined
NodesTable ::= SEQUENCE OF {
macAddress(A) NetworkAddress
macAddress(B) NetworkAddress
cntReceived(A) Counter,
cntReceived(B) Counter,
cntKeptFrames(A) Counter
cntKeptFrames(B) Counter
cntErrOutOfSequence(A) Counter
cntErrOutOfSequence(B) Counter
cntErrWrongLAN(A) Counter
cntErrWrongLAN(B) Counter
timeLastSeen(A) TimeTicks,
timeLastSeen(B) TimeTicks,
SAN(A) BOOLEAN,
SAN(B) BOOLEAN,
sendSeq INTEGER16
}

END
---

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
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: invalid OID

2007-08-14 Thread Dave Shield
On 14/08/07, Patrik Nagel <[EMAIL PROTECTED]> wrote:
> For testing purposes I tired to run
> "snmptranslate -m +IEC-62439-2-MIB -IR MergeLayerInfo"
> and get the similiar error message "Unknown object identifier: 
> MergeLayerInfo".

The definition 'MergeLayerInfo' is defining the *syntax* for a MIB object,
not the actual MIB object itself.   Try

   snmptranslate -m +IEC-62439-2-MIB -IR tMergeLayerInterFace


I'm not convinced that this is a valid MIB definition, though.
SMI (as used to define MIB modules) is not the same as full ASN.1,
and doesn't support SEQUENCEs, except as part of defining a table.

Who developed this particular MIB?

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
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, IEEE802dot110MIB] Using mib2c to generate code with IEEE802dot-MIB

2007-05-10 Thread bowmanchen

 Hi  Dave:
  I forget to tell you .
  I use under commande  instead of " MIBS=+IEEE802dot11-MIB  mib2c 
ieee802dot11".

 export MIBS=ALL
  mib2c IEEE802dot11-MIB::ieee802dot11
  I think it is same.

But  I also have try "MIBS=+IEEE802dot11-MIB  mib2c 
ieee802dot11".

The result is  fail for 5.3.1.

BR,
Bowman Chen

- Original Message - 
From: "Dave Shield" <[EMAIL PROTECTED]>

To: "bowmanchen" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, May 10, 2007 4:34 PM
Subject: Re: [mib2c,IEEE802dot110MIB] Using mib2c to generate code with
IEEE802dot-MIB



On 10/05/07, bowmanchen <[EMAIL PROTECTED]> wrote:

 Step7:   $>  mib2c IEEE802dot11-MIB::ieee802dot11
For 5.4 is OK.
For 5.3.1 is Fail


Do you get the same results when running

MIBS=+IEEE802dot11-MIB  mib2c ieee802dot11

?

Dave

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Net-snmp-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



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Net-snmp-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, IEEE802dot110MIB] Using mib2c to generate code with IEEE802dot-MIB

2007-05-10 Thread Dave Shield
On 10/05/07, bowmanchen <[EMAIL PROTECTED]> wrote:
>  Step7:   $>  mib2c IEEE802dot11-MIB::ieee802dot11
> For 5.4 is OK.
> For 5.3.1 is Fail

Do you get the same results when running

 MIBS=+IEEE802dot11-MIB  mib2c ieee802dot11

?

Dave

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Net-snmp-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, IEEE802dot110MIB] Using mib2c to generate code with IEEE802dot-MIB

2007-05-09 Thread bowmanchen

  Hi  Dave:
 May be I said not clearly.
  Yes,  5.3.1 installation compiled from pure source.
   I have put IEEE802dot11-MIB.txt to
   "/usr/local/share/snmp/mibs/" .
   Using snmptranslate  command to test IEEE802dot11-MIB is OK.

For 5.3.1  or 5.4  source complie
Setp1 :  $> 
./configure --with-perl-modules --enable-embedded-perl --enable-shared

Step2:   $>  make
Step3:   $>  make   test
Step4:   $>  make   install
Step5:   $>  cp IEEE802dot11-MIB.txt 
/usr/local/share/snmp/mibs/

Step6:   $> snmptranslate  IEEE802dot11-MIB::ieee802dot11
IEEE802dot11-MIB::ieee802dot11
Step7:   $>  mib2c IEEE802dot11-MIB::ieee802dot11
   For 5.4 is OK.
   For 5.3.1 is Fail that said "You didn't 
give mib2c a valid OID to start with"


  Thanks for your help.

BR,
Bowman Chen


- Original Message - 
From: "Dave Shield" <[EMAIL PROTECTED]>

To: "bowmanchen" <[EMAIL PROTECTED]>
Cc: 
Sent: Wednesday, May 09, 2007 9:15 PM
Subject: Re: [mib2c, IEEE802dot110MIB] Using mib2c to generate code with
IEEE802dot-MIB



On 08/05/07, bowmanchen <[EMAIL PROTECTED]> wrote:

   I want to use IEEE802dot-MIB.txt.  I have put it in
/usr/local/share/snmp/mibs  .

  My problem is
  Using mib2c to generate code by NET-SNMP 5.4  is OK.
  Using mib2c to generate code by NET-SNMP 5.3.1  is fail.

Why I can't usign mib2c to generate code by NET-SNMP 5.3.1 ???





 For NET-SNMP 5.3.1 see following text:
You didn't give mib2c a valid OID to start with



Is the 5.3.1 installation compiled from source, or a vendor-supplied
version?
It may be that the library cannot find the IEEE802dot-MIB.txt file.



You might wish to start by reading the MIB loading tutorial at:
http://www.net-snmp.org/tutorial-5/commands/mib-options.html
And making sure you can get snmptranslate to display information about
your MIB node.


Does the 5.3.1 version of snmptranslate display information about this
MIB?

Dave



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Net-snmp-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, IEEE802dot110MIB] Using mib2c to generate code with IEEE802dot-MIB

2007-05-09 Thread Dave Shield
On 08/05/07, bowmanchen <[EMAIL PROTECTED]> wrote:
>I want to use IEEE802dot-MIB.txt.  I have put it in
> /usr/local/share/snmp/mibs  .
>
>   My problem is
>   Using mib2c to generate code by NET-SNMP 5.4  is OK.
>   Using mib2c to generate code by NET-SNMP 5.3.1  is fail.
>
> Why I can't usign mib2c to generate code by NET-SNMP 5.3.1 ???



>  For NET-SNMP 5.3.1 see following text:
> You didn't give mib2c a valid OID to start with


Is the 5.3.1 installation compiled from source, or a vendor-supplied version?
It may be that the library cannot find the IEEE802dot-MIB.txt file.


> You might wish to start by reading the MIB loading tutorial at:
> http://www.net-snmp.org/tutorial-5/commands/mib-options.html
> And making sure you can get snmptranslate to display information about
> your MIB node.

Does the 5.3.1 version of snmptranslate display information about this MIB?

Dave

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Net-snmp-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 with mib2c.mfd.conf

2007-04-04 Thread Thomas Anders
Augusto Salazar wrote:
>>> /usr/local/share/snmp//mib2c.mfd.conf:25 contained a line that started 
>>> with a @ but did not match any mib2c configuration tokens.
>>> (maybe missing the trailing @?)
[...]
> Thanks for the answer, I am working in net-snmp-5.4.

It's a bug in 5.4, fixed in SVN Rev 15885. Please refer to this patch:

http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=rev&revision=15885


+Thomas

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

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

2007-04-04 Thread Joao Miguel Ferreira
On Wed, 2007-04-04 at 08:47 +0800, Augusto Salazar wrote:
> Hi,
> 
> Has abyone been able to use this command with net-snmp for the bridge-mib?
> 

Hello Augusto,

I just tried:  mib2c dot1dStpPortTable

and it seems to work (I've chosen the mfd option !!!)

I haven't checked the code but it should be ok !

I'm using net-snmp 5.2.3 on Debian 

jmf




> Thanks,
> 
> Augusto.
> 
> 
> - Original Message - 
> From: "Thomas Anders" <[EMAIL PROTECTED]>
> To: "Augusto Salazar" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Monday, April 02, 2007 2:45 PM
> Subject: Re: Mib2c with mib2c.mfd.conf
> 
> 
> > Augusto Salazar wrote:
> >> /usr/local/share/snmp//mib2c.mfd.conf:25 contained a line that started 
> >> with a @ but did not match any mib2c configuration tokens.
> >> (maybe missing the trailing @?)
> >
> > What exact Net-SNMP version/package is this?
> > Have you tried with 5.4?
> >
> >
> > +Thomas
> >
> > -- 
> > Thomas Anders (thomas.anders at blue-cable.de) 
> 
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Net-snmp-users mailing list
> 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


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

2007-04-03 Thread Augusto Salazar

Hi,

Has abyone been able to use this command with net-snmp for the bridge-mib?

Thanks,

Augusto.


- Original Message - 
From: "Thomas Anders" <[EMAIL PROTECTED]>
To: "Augusto Salazar" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, April 02, 2007 2:45 PM
Subject: Re: Mib2c with mib2c.mfd.conf


> Augusto Salazar wrote:
>> /usr/local/share/snmp//mib2c.mfd.conf:25 contained a line that started 
>> with a @ but did not match any mib2c configuration tokens.
>> (maybe missing the trailing @?)
>
> What exact Net-SNMP version/package is this?
> Have you tried with 5.4?
>
>
> +Thomas
>
> -- 
> Thomas Anders (thomas.anders at blue-cable.de) 


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

2007-04-02 Thread Augusto Salazar
Hi Thomas,

Thanks for the answer, I am working in net-snmp-5.4.

BR.

Augusto Salazar.

- Original Message - 
From: "Thomas Anders" <[EMAIL PROTECTED]>
To: "Augusto Salazar" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, April 02, 2007 2:45 PM
Subject: Re: Mib2c with mib2c.mfd.conf


> Augusto Salazar wrote:
>> /usr/local/share/snmp//mib2c.mfd.conf:25 contained a line that started 
>> with a @ but did not match any mib2c configuration tokens.
>> (maybe missing the trailing @?)
>
> What exact Net-SNMP version/package is this?
> Have you tried with 5.4?
>
>
> +Thomas
>
> -- 
> Thomas Anders (thomas.anders at blue-cable.de) 


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

2007-04-01 Thread Thomas Anders
Augusto Salazar wrote:
> /usr/local/share/snmp//mib2c.mfd.conf:25 contained a line that started with a 
> @ but did not match any mib2c configuration tokens.
> (maybe missing the trailing @?)

What exact Net-SNMP version/package is this?
Have you tried with 5.4?


+Thomas

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

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

2007-03-27 Thread Joao Miguel Ferreira
Got it.

I thought min_column and max_column were indexes for the rows and not
for the columns.

Now it is clear. Thanks

jmf



On Tue, 2007-03-27 at 14:38 +0100, Dave Shield wrote:
> On 07/03/07, Joao Miguel Ferreira <[EMAIL PROTECTED]> wrote:
> > About this piece of code generated by mib2c what is the usage/meaning of
> > min_column and max_column ??
> 
> 'min_column' is the column number of the first (accessible) column in the
> table, and 'max_column' is the column number of the last column.
> 
> For example, sysORTable (in SNMPv2-MIB) is defined as:
> 
> SysOREntry ::= SEQUENCE {
> sysORIndex INTEGER,
> sysORIDOBJECT IDENTIFIER,
> sysORDescr DisplayString,
> sysORUpTimeTimeStamp
> }
> 
> with
> sysORID OBJECT-TYPE  ::= { sysOREntry 2 }
> &
> sysORUpTime OBJECT-TYPE  ::= { sysOREntry 4 }
> 
> so   min_column=2 and max_column=4
> 
> (Note that sysORIndex is defined as "not-accessible", which
> is why min_column isn't 1)
> 
> 
> > This is part of the table initialization code Am I compromising the
> > future possible growth of the table or this is only for initialization
> > purposes ?
> 
> This doesn't affect the number of *rows* in the table - just the
> number of columns.   If the definition of the table changes, then
> you'd have to update these values.  But you'd need to add code
> to handle the new columns anyway.
> 
> 
> > Put it another way: if I simply do not initialize it (ex: max=0, min=0)
> > would the subsequent procedures work ?
> 
> No.
> The agent wouldn't know which columns were valid.
> 
> Dave


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

2007-03-27 Thread Dave Shield
On 07/03/07, Joao Miguel Ferreira <[EMAIL PROTECTED]> wrote:
> About this piece of code generated by mib2c what is the usage/meaning of
> min_column and max_column ??

'min_column' is the column number of the first (accessible) column in the
table, and 'max_column' is the column number of the last column.

For example, sysORTable (in SNMPv2-MIB) is defined as:

SysOREntry ::= SEQUENCE {
sysORIndex INTEGER,
sysORIDOBJECT IDENTIFIER,
sysORDescr DisplayString,
sysORUpTimeTimeStamp
}

with
sysORID OBJECT-TYPE  ::= { sysOREntry 2 }
&
sysORUpTime OBJECT-TYPE  ::= { sysOREntry 4 }

so   min_column=2 and max_column=4

(Note that sysORIndex is defined as "not-accessible", which
is why min_column isn't 1)


> This is part of the table initialization code Am I compromising the
> future possible growth of the table or this is only for initialization
> purposes ?

This doesn't affect the number of *rows* in the table - just the
number of columns.   If the definition of the table changes, then
you'd have to update these values.  But you'd need to add code
to handle the new columns anyway.


> Put it another way: if I simply do not initialize it (ex: max=0, min=0)
> would the subsequent procedures work ?

No.
The agent wouldn't know which columns were valid.

Dave

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

2007-03-22 Thread Adam Bell
I could not find something like this either. I wrote a bash script and named
every scalar, table, and trap so I could run them all. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Madan
Mohan
Sent: Thursday, March 22, 2007 2:04 AM
To: net-snmp-users@lists.sourceforge.net
Subject: MIB2C for compiling MIB

Hi all,
Is there any way we can compile the entire MIB through mib2C
compiler in a single shot?

I know that we can have a MIBNODE as input for mib2C compiler. But just
wondering if any body did something like what I asked above. 

Thanks in advance,
Madan.


-
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Net-snmp-users mailing list
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 information contained in this electronic mail transmission may be 
privileged and confidential, and therefore, protected from disclosure. If you 
have received this communication in error, please notify us immediately by 
replying to this message and deleting it from your computer without copying or 
disclosing it.

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

2007-03-22 Thread Dave Shield
On 22/03/07, Madan Mohan <[EMAIL PROTECTED]> wrote:
> Is there any way we can compile the entire MIB through
> mib2C compiler in a single shot?

For what purpose?
What exactly are you trying to do?

Dave

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

2007-03-07 Thread Joao Miguel Ferreira
Hi Dave,

On Wed, 2007-03-07 at 09:03 +, Dave Shield wrote:
> On 06/03/07, Joao Miguel Ferreira <[EMAIL PROTECTED]> wrote:
> > what is the best approach when trying to implement the agent extension
> > for tables with complex indexes like multi-valued indexes.
> 


About this piece of code generated by mib2c what is the usage/meaning of
min_column and max_column ??

This is part of the table initialization code Am I compromising the
future possible growth of the table or this is only for initialization
purposes ?

Put it another way: if I simply do not initialize it (ex: max=0, min=0)
would the subsequent procedures work ?


--
table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info);
netsnmp_table_helper_add_indexes(table_info, ASN_UNSIGNED, 
/* index: dot1qFdbId */
ASN_OCTET_STR,
/* index: dot1qTpFdbAddress */
 0);
table_info->min_column = XXX;
table_info->max_column = YYY;
-

thx
jmf


> 
> In fact, you should find that the mib2c template will include this
> registration for you automatically.
> 
> There's no real difference between a single-indexed table,
> and one with multiple indexes.   Referencing an individual
> row is a little more complex perhaps, but the basic operation
> is exactly the same as "simple" tables.   That's one of the
> advantages of the v5 handler-based API.
> 
> Which helper to use depends purely on the characteristics
> of the table, and where the information will be stored, etc.
> See the FAQ for details.
> 
> 
> Dave


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

2007-03-07 Thread Joao Miguel Ferreira
Thanks Dave,

I'll check it out.


joao
jmf




On Wed, 2007-03-07 at 09:03 +, Dave Shield wrote:
> On 06/03/07, Joao Miguel Ferreira <[EMAIL PROTECTED]> wrote:
> > what is the best approach when trying to implement the agent extension
> > for tables with complex indexes like multi-valued indexes.
> 
> It doesn't matter.
> Almost all of the table helpers can handle complex indexing requirements.
> If you look at the initialization code for most handler-based MIB modules,
> you'll see a line of the form:
> 
> netsnmp_table_helper_add_indexes(table_info,
>ASN_{SOMETHING}, 0);
> 
> (The same code is also present in MfD-based tables, though it's
> not quite as obvious).  This call specifies the indexing for that table,
> and can handle multiple indexes quite easily,
> 
> 
> > For example this table has an index of 3 values (one number, one string
> > and one number)
> 
> netsnmp_table_helper_add_indexes(table_info,
>ASN_INTEGER,
>ASN_OCTET_STR,
>ASN_INTEGER, 0);
> 
> 
> In fact, you should find that the mib2c template will include this
> registration for you automatically.
> 
> There's no real difference between a single-indexed table,
> and one with multiple indexes.   Referencing an individual
> row is a little more complex perhaps, but the basic operation
> is exactly the same as "simple" tables.   That's one of the
> advantages of the v5 handler-based API.
> 
> Which helper to use depends purely on the characteristics
> of the table, and where the information will be stored, etc.
> See the FAQ for details.
> 
> 
> Dave


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

2007-03-07 Thread Dave Shield
On 06/03/07, Joao Miguel Ferreira <[EMAIL PROTECTED]> wrote:
> what is the best approach when trying to implement the agent extension
> for tables with complex indexes like multi-valued indexes.

It doesn't matter.
Almost all of the table helpers can handle complex indexing requirements.
If you look at the initialization code for most handler-based MIB modules,
you'll see a line of the form:

netsnmp_table_helper_add_indexes(table_info,
   ASN_{SOMETHING}, 0);

(The same code is also present in MfD-based tables, though it's
not quite as obvious).  This call specifies the indexing for that table,
and can handle multiple indexes quite easily,


> For example this table has an index of 3 values (one number, one string
> and one number)

netsnmp_table_helper_add_indexes(table_info,
   ASN_INTEGER,
   ASN_OCTET_STR,
   ASN_INTEGER, 0);


In fact, you should find that the mib2c template will include this
registration for you automatically.

There's no real difference between a single-indexed table,
and one with multiple indexes.   Referencing an individual
row is a little more complex perhaps, but the basic operation
is exactly the same as "simple" tables.   That's one of the
advantages of the v5 handler-based API.

Which helper to use depends purely on the characteristics
of the table, and where the information will be stored, etc.
See the FAQ for details.


Dave

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

2007-01-30 Thread vijaya.dlakshmi

Check ur LD_LIBRARY_PATH properly...

source ur .bashrc once again

-Original Message-
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Tue 1/30/2007 4:49 PM
To: Net-snmp-users@lists.sourceforge.net
Subject: mib2c query
 
i want to generete c and h file for my WMAN-IF-MIB.txt file..i already
installed nert-snmp 5.3.0.1 and already put one copy my mib file in to
usr/local/share/snmp/mibs..also EXPORT=Mibs and MIBS=ALL done...already
SNMP/perl also installed..using perl MAKEFILE.PL,make,make install..

but still it shows the follwoing error..can you solve this problem   


ERROR: You don't have the SNMP perl module installed.  Please obtain
his 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.



mail2web - Check your email from the web at
http://link.mail2web.com/mail2web



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

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Net-snmp-users mailing list
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 - More the one node and type in the Mib File

2006-08-09 Thread Dave Shield
On 09/08/06, Boris von Alten Blaskowitz <[EMAIL PROTECTED]> wrote:
>  One more question, I tried to run mib2c with
> configuration "mfd" of root node in my mib file and it started with the
> first table, but then it stoped and I had just the headerfile.

You'll have to ask Robert about that - he's the expert on the MfD framework.

> My question now is, can I use my root node and once run "mfd" and the also
> with the root note use "scalar"?

That should work - I think.  (but untested!)

>The next point is, does the agent call
> automatically all init_xxx function when the SO-Lib is loaded, so all
> handels are resisted in net-snmpd-agent?

I don't think so - my *belief* (and I've never really used the dlmod
approach to any great extent), is that

"dlmod  someName   /path/so/some/module.so"

will load the named library file, and invoke the routine "init_someName".
If you need to run several init routines, then you'll need to craft a
suitable 'init_someName' function to do this:

void init_someName() {
init_this();
init_that();
init_theOther();
}

Dave

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

2006-08-09 Thread Boris von Alten Blaskowitz
Hi Dave,

thanks for the fast answer. One more question, I tried to run mib2c with
configuration "mfd" of root node in my mib file and it started with the
first table, but then it stoped and I had just the headerfile. My
question now is, can I use my root node and once run "mfd" and the also
with the root note use "scalar"? The next point is, does the agent call
automatically all init_xxx function when the SO-Lib is loaded, so all
handels are resisted in net-snmpd-agent?

Regardes,
Boris

Dave Shield schrieb:
> On 09/08/06, Boris von Alten Blaskowitz <[EMAIL PROTECTED]> wrote:
>> I have a big mib-file with all kind of types(table, int, ...) and like
>> to make only one SO-library with all handlers inside. Is this possible
>> in general?
>
> Yes.
>
>>  Is there one mib2c configfile what I can use?
>
> No.
>
>> Or do I have to call mib2c for each note?
>
> For each _group_ of nodes - yes.
> The usual approach would be to run mib2c on each table separately, and
> then again for all the scalar objects.  (Though some of these might
> fit better within one or other of the table
> handler files.)
>
> Note that you can always link several .o object files into a single
> .so library.
> Depending on the mib2c template you use, it might even be possible to
> merge the output of mib2c into a single code file.  But it's probably
> clearer to keep them separate, and just link everything together into
> the one library.
>
> Dave
>

-- 
Boris von Alten Blaskowitz
Product Manager
NCP engineering GmbH
Dombuehler Str. 2, D-90449 Nuernberg, Germany
Phone: +49 911 9968 125, Fax: +49 911 9968 458
E-Mail: [EMAIL PROTECTED]  Internet: http://www.ncp.de
___

NCP Secure Communications
Remote Access Software for Corporate VPN & PKI Solutions
Was unsere Kunden sagen:
http://www.ncp.de/deutsch/unternehmen/kundenzitate/index.html 
___

Der Inhalt dieser E-Mail ist vertraulich und ausschließlich für den 
bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat 
dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass 
jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung oder Weitergabe 
des Inhalts dieser E-Mail unzulässig ist. Wir bitten Sie, sich in diesem Fall 
mit dem Absender der E-Mail in Verbindung zu setzen.

This e-mail message including any attachments is for the sole use of the 
intended recipient(s) and may contain privileged or confidential information. 
Any unauthorized review, use, disclosure or distribution is prohibited. If you 
are not the intended recipient, please immediately contact the sender by reply 
e-mail and delete the original message and destroy all copies thereof.

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

2006-08-09 Thread Dave Shield
On 09/08/06, Boris von Alten Blaskowitz <[EMAIL PROTECTED]> wrote:
> I have a big mib-file with all kind of types(table, int, ...) and like
> to make only one SO-library with all handlers inside. Is this possible
> in general?

Yes.

>  Is there one mib2c configfile what I can use?

No.

> Or do I have to call mib2c for each note?

For each _group_ of nodes - yes.
The usual approach would be to run mib2c on each table separately, and
then again for all the scalar objects.  (Though some of these might
fit better within one or other of the table
handler files.)

Note that you can always link several .o object files into a single .so library.
Depending on the mib2c template you use, it might even be possible to
merge the output of mib2c into a single code file.  But it's probably
clearer to keep them separate, and just link everything together into
the one library.

Dave

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

2006-03-02 Thread Dave Shield
On Fri, 2006-02-24 at 12:03 +0100, Palmentieri Nunzio wrote:
> I wrote a MIB with several table objects.
> How can I generate code for it?
> I think I have to run mib2c on both the tables, and then compile the
> code generated, as follows:
>  
> mib2c peProcessTable
> mib2c peObjectTable

That's certainly the most reliable way to do this
(and typically the easiest to maintain).

Depending on the mib2c template that you are using,
it *might* be possible to run mib2c on a higher-level
root object, and allow it to generate code for both
tables in the same file.   But not all templates
support this, and it's probably easier to work on
one table at once.

You can always combine the files manually, once you're
happy that they work individually.

Dave


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

2006-02-24 Thread Raffles
I don't know about tables specifically, but in general the other way (i.e. 
apart from using a sub-agent) is to build your stuff into the agent directly. 
You compile your MIB definition files using an appropriate mib2c config file 
and then drop the output files in the agents/mibgroup folder in the main 
distribution. Then you need to rerun ./configure using --with-mib-modules 
"", and rebuild the agent.


Depending on your needs and the availability of an appropriate mib2c config 
file you may have to hand edit the mib2c output to hook into whatever it is 
you're managing and/or produce your own mib2c config file to do it for you.


There's quite a nice section on this in the FAQ IIRC (e.g. see 
http://net-snmp.sourceforge.net/docs/FAQ.html#How_do_I_add_a_MIB_to_the_agent_). 
If you're going to modify/create mib2c config files, somebody sent me this 
link, which I found helpful: 
http://net-snmp.sourceforge.net/docs/man/mib2c.conf.html


Hope this helps

Cheers

Raffles

Palmentieri Nunzio wrote:

Hi all,
my question is:
 
I wrote a MIB with several table objects.

How can I generate code for it?
I think I have to run mib2c on both the tables, and then compile the 
code generated, as follows:
 
mib2c peProcessTable

mib2c peObjectTable
 
and then compile them to obtain one sub-agent responding to get on both 
objects.
 
Am I right?

Is there another way to do that?
 
Thanks in advance to all.
 


*Nunzio Palmentieri
*Web Care Solution
* 
Atos Origin

*Via Antiniana 2/a
80078 Pozzuoli (NA) - ITALY

** 


Direct+39 081 6103 388
Mobile   +39 335 1214 806
Fax +39 081 6103 200
e-mailmailto:[EMAIL PROTECTED]
Webwww.atosorigin.com 

This electronic message contains information from Atos Origin, which may 
be privileged and confidential. The information is intended to be use of 
the individual(s) or entity named above. If you are not the intended 
recipient, be aware that any disclosure, copying, distribution or use of 
the contents of this information is prohibited.


 


--

Visit our website at www.roke.co.uk

Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire SO51 0ZN, UK.

The information contained in this e-mail and any attachments is proprietary to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.



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

2006-01-11 Thread Finking, Robert
Thanks to both you and Peter Martin and also to Dave Shield who replied
direct =)

Raffles

PS this is yet another attempt at finding a way of sending mails that
avoids the annoying formatting problems - please bear with me!

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Makavy, Erez (Erez)
> Sent: 11 January 2006 11:18
> To: Finking, Robert
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: RE: mib2c config file format - testing read-only
> 
> 
>  
> I think this manual could be what you are looking for:
> 
> http://net-snmp.sourceforge.net/docs/man/mib2c.conf.html
> 
> Erez.
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Dave Shield
> Sent: Wednesday, January 11, 2006 1:11 PM
> To: Finking, Robert
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: Re: mib2c config file format - testing read-only
> 
> On Fri, 2005-12-23 at 10:41 +, Finking, Robert wrote:
> 
> > Is the mib2c config file format published anywhere,
> 
> Nope.
> Possibly in the darker recesses of Wes' subconscious, but 
> certainly nowhere useful.
> 
> >  is it just a case of looking at the mib2c source code?
> 
> That's what the rest of us have had to do.
> 
> 
> >  I note that the manual page reads as though the config 
> files shipped
> > with NetSNMP are really part of mib2c, but presumably it's not that 
> > hard to tweak it to your own design?
> 
> Nope.  Go right ahead.
> That's the advantage of Open Source - you have the freedom to 
> turn this to your own warped intentions :-)
> 
> 
> >  One particular thing I'd like to know, how do you test if 
> an object's
> 
> > access mode (in particular if it is read-only).
> 
> Have a look at some of the other mib2c.*.conf files:
> 
>   @foreach $i table@
>  :
> reg = netsnmp_create_handler_registration(
>   "$i", ${i}_handler,
>   ${i}_oid, ${i}_oid_len,
> @if $i.settable@
>   HANDLER_CAN_RWRITE
> @else@
>   HANDLER_CAN_RONLY
> @end@
>   );
>  :
>   @end@
> 
> 
> That's for the table as a whole, but the same test can be 
> applied to individual column object (or scalars) too.  See 
> the existing configs for examples.
> 
> Dave
> 
> 
> 
> > The information contained in this e-mail and any attachments is
> > proprietary to Roke Manor Research Ltd and must not be 
> passed to any 
> > third party without permission. This communication is for 
> information 
> > only and shall not create or change any contractual relationship.
> 
> The information contained in this e-mail is not proprietary 
> in any manner, and may be passed to anyone who might find it 
> useful. This communication is for information only, and 
> contractual relationships don't enter into it.  There should 
> be no attachments or any other form of relationships either.
> 
> 
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files for problems?  Stop!  Download the new AJAX 
> search engine that makes searching your log files as easy as 
> surfing the  web.  DOWNLOAD SPLUNK! 
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> ___
> 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
> 
> 
> 
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files for problems?  Stop!  Download the new AJAX 
> search engine that makes searching your log files as easy as 
> surfing the  web.  DOWNLOAD SPLUNK! 
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick
> ___
> 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
> 


smime.p7s
Description: S/MIME cryptographic signature


Re: mib2c config file format - testing read-only

2006-01-11 Thread Peter Martin

Is the mib2c config file format published anywhere,


Nope.
Possibly in the darker recesses of Wes' subconscious,
but certainly nowhere useful.


Try man mib2c.conf

Pete



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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 file format - testing read-only

2006-01-11 Thread Makavy, Erez (Erez)
 
I think this manual could be what you are looking for:

http://net-snmp.sourceforge.net/docs/man/mib2c.conf.html

Erez.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave
Shield
Sent: Wednesday, January 11, 2006 1:11 PM
To: Finking, Robert
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: mib2c config file format - testing read-only

On Fri, 2005-12-23 at 10:41 +, Finking, Robert wrote:

> Is the mib2c config file format published anywhere,

Nope.
Possibly in the darker recesses of Wes' subconscious, but certainly
nowhere useful.

>  is it just a case of looking at the mib2c source code?

That's what the rest of us have had to do.


>  I note that the manual page reads as though the config files shipped 
> with NetSNMP are really part of mib2c, but presumably it's not that 
> hard to tweak it to your own design?

Nope.  Go right ahead.
That's the advantage of Open Source - you have the freedom to turn this
to your own warped intentions :-)


>  One particular thing I'd like to know, how do you test if an object's

> access mode (in particular if it is read-only).

Have a look at some of the other mib2c.*.conf files:

  @foreach $i table@
 :
reg = netsnmp_create_handler_registration(
  "$i", ${i}_handler,
  ${i}_oid, ${i}_oid_len,
@if $i.settable@
  HANDLER_CAN_RWRITE
@else@
  HANDLER_CAN_RONLY
@end@
  );
 :
  @end@


That's for the table as a whole, but the same test can be applied to
individual column object (or scalars) too.  See the existing configs for
examples.

Dave



> The information contained in this e-mail and any attachments is 
> proprietary to Roke Manor Research Ltd and must not be passed to any 
> third party without permission. This communication is for information 
> only and shall not create or change any contractual relationship.

The information contained in this e-mail is not proprietary in any
manner, and may be passed to anyone who might find it useful.
This communication is for information only, and contractual
relationships don't enter into it.  There should be no attachments or
any other form of relationships either.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
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 file format - testing read-only

2006-01-11 Thread Dave Shield
On Fri, 2005-12-23 at 10:41 +, Finking, Robert wrote:

> Is the mib2c config file format published anywhere,

Nope.
Possibly in the darker recesses of Wes' subconscious,
but certainly nowhere useful.

>  is it just a case of looking at the mib2c source code?

That's what the rest of us have had to do.


>  I note that the manual page reads as though the config
> files shipped with NetSNMP are really part of mib2c, but
> presumably it's not that hard to tweak it to your own design?

Nope.  Go right ahead.
That's the advantage of Open Source - you have the freedom to
turn this to your own warped intentions :-)


>  One particular thing I'd like to know, how do you test if an
> object's access mode (in particular if it is read-only).

Have a look at some of the other mib2c.*.conf files:

  @foreach $i table@
 :
reg = netsnmp_create_handler_registration(
  "$i", ${i}_handler,
  ${i}_oid, ${i}_oid_len,
@if $i.settable@
  HANDLER_CAN_RWRITE
@else@
  HANDLER_CAN_RONLY
@end@
  );
 :
  @end@


That's for the table as a whole, but the same test can be applied
to individual column object (or scalars) too.  See the existing
configs for examples.

Dave



> The information contained in this e-mail and any attachments is
> proprietary to Roke Manor Research Ltd and must not be passed to
> any third party without permission. This communication is for
> information only and shall not create or change any contractual
> relationship.

The information contained in this e-mail is not proprietary in
any manner, and may be passed to anyone who might find it useful.
This communication is for information only, and contractual
relationships don't enter into it.  There should be no attachments
or any other form of relationships either.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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


  1   2   >