Black Glix
Black Glix

Reputation: 709

Net-SNMP Custom MIB handlers

I want to create custom MIB and custom controller for this mib. I use Net-SNMP and Agent device is Debian based Linux machine that snmpd installed on it.I created template and generated .c and .h files using mib2c. At this point, I don't know what to do with these generated files? I want to handle some (The ones I created in MIB) SNMP request in my Clang application. So basically, if I copy the source that mib2c generated to my C project, will it work? Shouldn't I need to register these handlers to snmpd?

I followed this tutorial, but It focused on writing the code. It didn't mention compiling and executing.

Upvotes: 1

Views: 939

Answers (1)

Shihab Pullissery
Shihab Pullissery

Reputation: 196

After generating the .c and .h file you need to rebuild the netsnmp code again. To link your new .c and .h file into netsnmp, when you run the ./configure pass it as argument. (./configure --with-mib-modules="Object" where Object is the .c/.h filename). After that make using make command

Upvotes: 2

Related Questions