packetbuf: Added function "packetbuf_holds_broadcast()" for checking whether the current packet is a

broadcast
This commit is contained in:
kkrentz 2014-08-04 04:34:49 -07:00
parent fb05d22623
commit 3e44e8b258
2 changed files with 13 additions and 0 deletions

View file

@ -320,4 +320,11 @@ packetbuf_addr(uint8_t type)
}
/*---------------------------------------------------------------------------*/
#endif /* PACKETBUF_CONF_ATTRS_INLINE */
int
packetbuf_holds_broadcast(void)
{
return linkaddr_cmp(&packetbuf_addrs[PACKETBUF_ADDR_RECEIVER - PACKETBUF_ADDR_FIRST].addr, &linkaddr_null);
}
/*---------------------------------------------------------------------------*/
/** @} */