Hi,
I was trying to extend functionality of the snmpd using AgentX API.
And I have successfully extended the Net-SNMP for some of my custom MIBs
also.
But when I am trying to extend it for "dot1qVlanStaticTable", I am stuck
with a compilation error.
I have looked into many tutorials like "MIB for Dummies".
All of them are taking ifTable as an example.
And ifTable compiles without any problem.
I followed the same process for dot1qVlanStaticTable also.
[root@localhost vlan]# mib2c -c mib2c.mfd.conf dot1qVlanStaticTable
[root@localhost vlan]# net-snmp-config --compile-subagent vlan --norm
dot1qVlanStaticTable.c
generating the tmporary code file: netsnmptmp.14240.c
void init_dot1qVlanStaticTable(void);
checking for init_dot1qVlanStaticTable in dot1qVlanStaticTable.c
init_dot1qVlanStaticTable(void)
DEBUGMSGTL(("verbose:dot1qVlanStaticTable:init_dot1qVlanStaticTable",
} /* init_dot1qVlanStaticTable */
checking for shutdown_dot1qVlanStaticTable in dot1qVlanStaticTable.c
shutdown_dot1qVlanStaticTable(void)
running: gcc -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux
-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -I.
-I/usr/local/include -o vlan netsnmptmp.14240.c dot1qVlanStaticTable.c
-L/usr/local/lib -lnetsnmpmibs -lnetsnmpagent -lnetsnmp -lnetsnmpmibs
-lpci -lrpm -lrpmdb -lrpmio -lnetsnmpagent -Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -lnetsnmp
-lcrypto
/tmp/ccQp6vu3.o: In function `dot1qVlanStaticTable_post_request':
/root/basil/vlan/dot1qVlanStaticTable.c:232: undefined reference to
`dot1qVlanStaticTable_dirty_get'
/root/basil/vlan/dot1qVlanStaticTable.c:245: undefined reference to
`dot1qVlanStaticTable_dirty_set'
/tmp/ccQp6vu3.o: In function `shutdown_table_dot1qVlanStaticTable':
/root/basil/vlan/dot1qVlanStaticTable.c:121: undefined reference to
`_dot1qVlanStaticTable_shutdown_interface'
/tmp/ccQp6vu3.o: In function `initialize_table_dot1qVlanStaticTable':
/root/basil/vlan/dot1qVlanStaticTable.c:109: undefined reference to
`_dot1qVlanStaticTable_initialize_interface'
collect2: ld returned 1 exit status
leaving the tmporary code file: netsnmptmp.14240.c
Why 'dot1qVlanStaticTable_dirty_get' and other functions are showing an
undefined error?
I have checked the file. It is defined in
"dot1qVlanStaticTable_interface.h" and this file is included too.
Ideally there shouldn't be any error.
I have tried to solve this error, but no success
While ifTable is not giving any problems, why dot1qVlanStaticTable is
giving compilation errors.
I just want to create/delete rows in that table. That's all.
No actual vlan configuration is needed for now. I am planning to do it
later.
Can you tell me what went wrong?
=============================
There is one more thing I want to ask.
Entirely different scenario.
When compiling net-snmp it creates so many libraries.
If I want only some specific libraries, say libnetsnmp.la and
libnetsnmp.a; how will I suppress the creation of other libraries?
Any configure script flag available for that?
Thanks and Regards,
Basil Joseph.
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders