Re: Compiling a agent extension under Linux
Rodolfo Leffa <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Mar 16, 2009 at 12:08 PM, Dave Shield <[email protected]>wrote: > 2009/3/16 Rodolfo Leffa <[email protected]>: > > 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 > > It should also appear in agent/mibgroup/mib_module_inits.h > This file only exists in win32/ folder of my net-snmp sources. Nothing like that on net-snmp\agent\mibgroup\ . By the way, i'm using net-snmp-5.4.2.1 . > > > > > 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"*/ > > I'm a little surprised those are commented out, > but checking my setup, there are indeed a number of > header files that are listed in this way. > > Most of them appear to be "conglomeration" header files, rather > than leaf-module headers. > > What is the contents of the file mibgroup/KhompData.h ? > What does the init routine look like? KhompData.h : -- #ifndef KHOMPDATA_H #define KHOMPDATA_H /* function declarations */ extern "C"{ void init_KhompData(void); Netsnmp_Node_Handler handle_KhompData; } #endif /* KHOMPDATA_H */ -- Init routine: -- void init_KhompData(void) { static oid KhompData_oid[] = { 1,3,6,1,4,1,32624,1, }; DEBUGMSGTL(("KhompData", "Initializing\n")); netsnmp_register_handler( netsnmp_create_handler_registration("KhompData", handle_KhompData, KhompData_oid, OID_LENGTH(KhompData_oid), HANDLER_CAN_RONLY )); } -- Thanks. > > 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