Re: Compiling a agent extension under Linux

Rodolfo Leffa <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks again Dave.

About the init routine, I have it on my module source file(the same I've
done to Windows).

I've runned configure --with-mib-modules=KhompData (name of my module), and
after I use grep to see what files contains this string in the whole
net-snmp directory. Except for the win32 directory and for the files
themselfs(KhompData.cpp and KhompData.h) , it only appears in this files:

agent/mibgroup/mib_module_includes.h
include/net-snmp/net-snmp-config.h
include/net-snmp/agent/mib_module_config.h

Looking at the files, I started to think my configure isn't working as it
should:

mib_modules_includes.h: the only place it appears is this commented line.

/* This file is automatically generated by configure.  Do not modify by
hand. */
/*#include "mibgroup/KhompData.h"*/
/*#include "mibgroup/default_modules.h"*/
/*#include "mibgroup/snmpv3mibs.h"*/
...

include/net-snmp/net-snmp-config.h :
...
/* configure options specified */
#define NETSNMP_CONFIGURE_OPTIONS "'--with-mib-modules=KhompData'"
...

include/net-snmp/agent/mib_module_config.h :
...
/* Define if compiling with the KhompData module files.  */
#define USING_KHOMPDATA_MODULE 1
...

So, anybody as a clue if this is a problem with configure??

Thanks.


On Fri, Mar 13, 2009 at 6:03 AM, Dave Shield <[email protected]>wrote:

> 2009/3/12 Rodolfo Leffa <[email protected]>:
> > I've compiled it, but i'm getting no answers from the agent to the
> > requisitions to my module. Other stuff like sysUpTime, for example,
> works!
>
> What about other information outside the system group?
> (The IP, UDP or TCP stats & tables, for example).
> It could be a simple matter of access control - see the FAQ.
>
> There are several entries in the FAQ relevant to your problem.
> Please try the suggestions listed there.
>
>
>
> > My question is: do I have to put some include or initialization code
> > somewhere to my module to work??
>
> There should be an "init" routine in the code for your module, yes.
> That is typically where the module registers with the main agent,
> and hence how the agent knows which handler to call for these MIB
> objects.
>
>
> >                                                     Like I've done in
> mib_modules_init.h and
> > mib_modules_include.h under windows. Or just the
> --with-mib-modules=MYMODULE
> > does the magic??
>
>      configure --with-mib-modules=xxx
>
> will add a call to 'xxx_init()' to the file mib_modules_init.h
> and will include the header file 'xxx.h' within mib_modules_include.h
> These files are built automatically by configure.
>
> The only reason you have to edit them manually under Windows is
> that this environment doesn't use 'configure'.
>
> Dave
>



-- 
Rodolfo Leffa de Oliveira

------------------------------------------------------------------------------
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.