packetbuf: Added function "packetbuf_holds_broadcast()" for checking whether the current packet is a
broadcast
This commit is contained in:
parent
fb05d22623
commit
3e44e8b258
|
@ -320,4 +320,11 @@ packetbuf_addr(uint8_t type)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#endif /* PACKETBUF_CONF_ATTRS_INLINE */
|
#endif /* PACKETBUF_CONF_ATTRS_INLINE */
|
||||||
|
int
|
||||||
|
packetbuf_holds_broadcast(void)
|
||||||
|
{
|
||||||
|
return linkaddr_cmp(&packetbuf_addrs[PACKETBUF_ADDR_RECEIVER - PACKETBUF_ADDR_FIRST].addr, &linkaddr_null);
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -453,6 +453,12 @@ int packetbuf_set_addr(uint8_t type, const linkaddr_t *addr);
|
||||||
const linkaddr_t *packetbuf_addr(uint8_t type);
|
const linkaddr_t *packetbuf_addr(uint8_t type);
|
||||||
#endif /* PACKETBUF_CONF_ATTRS_INLINE */
|
#endif /* PACKETBUF_CONF_ATTRS_INLINE */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Checks whether the current packet is a broadcast.
|
||||||
|
* \retval 0 iff current packet is not a broadcast
|
||||||
|
*/
|
||||||
|
int packetbuf_holds_broadcast(void);
|
||||||
|
|
||||||
void packetbuf_attr_clear(void);
|
void packetbuf_attr_clear(void);
|
||||||
|
|
||||||
void packetbuf_attr_copyto(struct packetbuf_attr *attrs,
|
void packetbuf_attr_copyto(struct packetbuf_attr *attrs,
|
||||||
|
|
Loading…
Reference in a new issue