0

After generating the .c and .h files using mib2c, the next step (if I am correct) is to run configure which is found in ~/net-snmp/. This, combined with make and make install, 'register' the OID node specified by the aforementioned .c file.

If a change is made to either the .c or .h files, is it necessary to go through the process again, or is there a more 'lightweight' way to apply the changes? make and make install tend to take a very long time.

Ctrl S
  • 1,053
  • 12
  • 31
  • 1
    `./configure` is [probably not needed](https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install) all the time unless (guessing) you make significant changes to your MIB like importing a new one. – LMC Jun 14 '18 at 19:49
  • Thanks for the link! Do you know if that applies to net-snmp specifically or not? – Ctrl S Jun 15 '18 at 12:59
  • 1
    Should be similar for any C app. As [suggested here](https://stackoverflow.com/a/10961543/2834978), may be not needed every time. If you have a Makefile.in and it has changed then configure should be run I think. – LMC Jun 15 '18 at 13:12
  • 1
    btw, seems mib2c generates a Makefile, why do you need to run configure? – LMC Jun 15 '18 at 13:18
  • I've seen a few other users report using it, and I guess I also want to make sure that net-snmp is configured to recognize/use my subagent. If the Makefile is unchanged by modifications to subagents, then I suppose I do not need to be running `./configure`. – Ctrl S Jun 15 '18 at 13:30
  • I think the difference is that `./configure` builds a Makefile for *snmpd* whereas `mib2c` creates one for installing the C files? Not sure... – Ctrl S Jun 15 '18 at 14:00
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/173227/discussion-between-luis-munoz-and-ctrl-s). – LMC Jun 15 '18 at 14:56

0 Answers0