return (!node || !mib_node_is_leaf(node)) ? NULL : &node->leaf;
}
-// TODO alter the varbind
struct mib_leaf *
snmp_walk_next(struct mib_tree *tree, struct mib_walk_state *walk, struct snmp_pdu *c)
{
* snmp_register_ack - handle registration response
* @p: SNMP protocol instance
* @res: header of agentx-Response-PDU
- * @oid: MIB subtree Object Identifier in cpu native byte order
*/
void
snmp_register_ack(struct snmp_proto *p, struct agentx_response *res)
case AGENTX_RES_DUPLICATE_REGISTER:
case AGENTX_RES_REQUEST_DENIED:
case AGENTX_RES_UNKNOWN_REGISTER:
- // TODO more direct path to mib-specific code
TRACE(D_PACKETS, "SNMP received agentx-Response-PDU with error %u", r->error);
snmp_register_ack(p, r);
break;
response_err_ind(struct agentx_response *res, enum agentx_response_errs err, u16 ind)
{
STORE_U16(res->error, (u16) err);
- // TODO deal with auto-incrementing of snmp_pdu context c.ind
if (err != AGENTX_RES_NO_ERROR && err != AGENTX_RES_GEN_ERROR)
{
//TRACE(D_PACKETS, "Last PDU resulted in error %u", err);