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(, "hostNumberOfServers");[0] = 6;[1] = 's';[2] = 'a';[3] = 't';[4] = 'u';[5] = 'r';[6] = 'n'; = 7;
  CONFD_SET_NOEXISTS(&vb.val); /* let ConfD get the value */
  OK(confd_notification_send_snmp(nctx, "notif1", &vb, 1));
  return 1;

what is[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.