Exemplo n.º 1
0
/*
 * Compare the values of the old and the new root port and
 * send a new root notification, if they are not matching.
 */
static void
bridge_new_root(struct bridge_if *bif)
{
	struct snmp_value bif_idx;

	if (bridge_get_default() == bif)
		snmp_send_trap(&oid_newRoot, (struct snmp_value *) NULL);

	if (bridge_basename_var(bif, &bif_idx) == NULL)
		return;

	snmp_send_trap(&oid_begemotTopologyChange,
	    &bif_idx, (struct snmp_value *) NULL);
}
Exemplo n.º 2
0
void
snmp_coldstart_trap(void)
{
  trap_msg.outvb.head = NULL;
  trap_msg.outvb.tail = NULL;
  trap_msg.outvb.count = 0;
  snmp_send_trap(SNMP_GENTRAP_COLDSTART, NULL, 0);
}
Exemplo n.º 3
0
Arquivo: msg_out.c Projeto: harmv/lwip
void
snmp_authfail_trap(void)
{
  u8_t enable;
  mib2_get_snmpenableauthentraps(&enable);
  if (enable == 1) {
    trap_msg.outvb.head = NULL;
    trap_msg.outvb.tail = NULL;
    trap_msg.outvb.count = 0;
    snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0);
  }
}
Exemplo n.º 4
0
/*
 * Generate a link up/down trap
 */
static void
link_trap(struct mibif *ifp, int up)
{
	struct snmp_value ifindex;

	ifindex.var = oid_ifIndex;
	ifindex.var.subs[ifindex.var.len++] = ifp->index;
	ifindex.syntax = SNMP_SYNTAX_INTEGER;
	ifindex.v.integer = ifp->index;

	snmp_send_trap(up ? &oid_linkUp : &oid_linkDown, &ifindex,
	    (struct snmp_value *)NULL);
}
Exemplo n.º 5
0
err_t
snmp_send_trap_specific(s32_t specific_trap)
{
  return snmp_send_trap(NULL, SNMP_GENTRAP_ENTERPRISE_SPECIFIC, specific_trap);
}
Exemplo n.º 6
0
err_t 
snmp_send_trap_generic(s32_t generic_trap)
{
  return snmp_send_trap(NULL, generic_trap, 0);
}
Exemplo n.º 7
0
/**
 * @ingroup snmp_traps
 * Send specific SNMP trap with variable bindings
 */
err_t
snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds)
{
  return snmp_send_trap(NULL, SNMP_GENTRAP_ENTERPRISE_SPECIFIC, specific_trap, varbinds);
}
Exemplo n.º 8
0
/**
 * @ingroup snmp_traps
 * Send generic SNMP trap
 */
err_t
snmp_send_trap_generic(s32_t generic_trap)
{
  static const struct snmp_obj_id oid = { 7, { 1, 3, 6, 1, 2, 1, 11 } };
  return snmp_send_trap(&oid, generic_trap, 0, NULL);
}