Make it possible to provide feedback to the neighbor modules
This commit is contained in:
parent
814dd8bf59
commit
c316fc2fa9
1 changed files with 19 additions and 4 deletions
|
@ -32,7 +32,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: sicslowpan.c,v 1.24 2010/03/09 20:40:50 adamdunkels Exp $
|
* $Id: sicslowpan.c,v 1.25 2010/03/12 13:20:13 nvt-se Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
|
@ -288,6 +288,17 @@ addr_context_lookup_by_number(u8_t number) {
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
/*--------------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
+ * Callback function for the MAC packet sent callback
|
||||||
|
+ */
|
||||||
|
static void
|
||||||
|
packet_sent(void *ptr, int status, int transmissions)
|
||||||
|
{
|
||||||
|
#if SICSLOWPAN_CONF_NEIGHBOR_INFO
|
||||||
|
neighbor_info_packet_sent(status, transmissions);
|
||||||
|
#endif /* SICSLOWPAN_CONF_NEIGHBOR_INFO */
|
||||||
|
}
|
||||||
/*--------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Compress IP/UDP header
|
* \brief Compress IP/UDP header
|
||||||
|
@ -1268,9 +1279,9 @@ send_packet(rimeaddr_t *dest)
|
||||||
*/
|
*/
|
||||||
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, dest);
|
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, dest);
|
||||||
|
|
||||||
/* XXX we should provide a callback function that is called when the
|
/* Provide a callback function to receive the result of
|
||||||
packet is sent. For now, we just supply a NULL pointer. */
|
a packet transmission. */
|
||||||
NETSTACK_MAC.send(NULL, NULL);
|
NETSTACK_MAC.send(&packet_sent, NULL);
|
||||||
|
|
||||||
/* If we are sending multiple packets in a row, we need to let the
|
/* If we are sending multiple packets in a row, we need to let the
|
||||||
watchdog know that we are still alive. */
|
watchdog know that we are still alive. */
|
||||||
|
@ -1637,6 +1648,10 @@ input(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SICSLOWPAN_CONF_NEIGHBOR_INFO
|
||||||
|
neighbor_info_packet_received();
|
||||||
|
#endif /* SICSLOWPAN_CONF_NEIGHBOR_INFO */
|
||||||
|
|
||||||
tcpip_input();
|
tcpip_input();
|
||||||
#if SICSLOWPAN_CONF_FRAG
|
#if SICSLOWPAN_CONF_FRAG
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue