Need to understand the example Confd_installation/examples.confd/snmpa/3-sendtrap

In this example, in sendtrap.c,

int test8(struct confd_notification_ctx *nctx)
{
  struct confd_snmp_varbind vb;
  vb.type = CONFD_SNMP_COL_ROW;
  /* RowIndex = 6."saturn" */
  strcpy(vb.var.cr.column, "hostNumberOfServers");
  vb.var.cr.rowindex.oid[0] = 6;
  vb.var.cr.rowindex.oid[1] = 's';
  vb.var.cr.rowindex.oid[2] = 'a';
  vb.var.cr.rowindex.oid[3] = 't';
  vb.var.cr.rowindex.oid[4] = 'u';
  vb.var.cr.rowindex.oid[5] = 'r';
  vb.var.cr.rowindex.oid[6] = 'n';
  vb.var.cr.rowindex.len = 7;
  CONFD_SET_NOEXISTS(&vb.val); /* let ConfD get the value */
  OK(confd_notification_send_snmp(nctx, "notif1", &vb, 1));
  return 1;
}


what is vb.var.cr.rowindex.oid[0] = 6; here? What 6 refers to here ?

and here data is updated correspoding to an existing entry and then sent in trap…What if there is no data correspoding to this mib in confd?

This refers to the length of the octet-string in the variable binding. In this particular, it is the length of “saturn”.

The trap can be generated with values regardless of the actual data stored in ConfD.

By the way, SNMP questions can best be answered by filing RT tickets with your support contact.