/** registers a table after attaching it to a table_iterator helper */ int netsnmp_register_table_iterator(netsnmp_handler_registration *reginfo, netsnmp_iterator_info *iinfo) { netsnmp_inject_handler(reginfo, netsnmp_get_table_iterator_handler(iinfo)); if (!iinfo) return SNMPERR_GENERR; #ifndef NOT_SERIALIZED netsnmp_inject_handler(reginfo, netsnmp_get_serialize_handler()); #endif return netsnmp_register_table(reginfo, iinfo->table_reginfo); }
/** * initializes the serialize helper which then registers a serialize * handler as a run-time injectable handler for configuration file * use. */ void netsnmp_init_serialize(void) { netsnmp_register_handler_by_name("serialize", netsnmp_get_serialize_handler()); }
/** functionally the same as calling netsnmp_register_handler() but also * injects a serialize handler at the same time for you. */ int netsnmp_register_serialize(netsnmp_handler_registration *reginfo) { netsnmp_inject_handler(reginfo, netsnmp_get_serialize_handler()); return netsnmp_register_handler(reginfo); }