Load SMI MIB module

If tcpdump is built with libsmi support, “-m module“ option can be used to load MIB module (code is here):

  1. int
  2. nd_load_smi_module(const char *module, char *errbuf, size_t errbuf_size)
  3. {
  4. #ifdef USE_LIBSMI
  5. if (smiLoadModule(module) == 0) {
  6. nd_snprintf(errbuf, errbuf_size, "could not load MIB module %s",
  7. module);
  8. return (-1);
  9. }
  10. nd_smi_module_loaded = 1;
  11. return (0);
  12. #else
  13. nd_snprintf(errbuf, errbuf_size, "MIB module %s not loaded: no libsmi support",
  14. module);
  15. return (-1);
  16. #endif
  17. }