core/net: Added support for "bridge mode".
"Bridge mode" allows devices to more easily send 802.15.4 packets as if they were a different device. It also turns off any packet filtering that may be implemented at layer 2. It works by allowing `PACKETBUF_ADDR_SENDER` to be set earlier in the stack. This is useful for implementing 6LoWPAN-ethernet bridges. Enabled via setting `NETSTACK_CONF_BRIDGE_MODE` to 1. Disabled by default.
This commit is contained in:
parent
4e40cb8a8d
commit
c0a693672c
4 changed files with 17 additions and 0 deletions
|
@ -1329,6 +1329,11 @@ send_packet(rimeaddr_t *dest)
|
|||
*/
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, dest);
|
||||
|
||||
#if NETSTACK_CONF_BRIDGE_MODE
|
||||
/* This needs to be explicitly set here for bridge mode to work */
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER,(void*)&uip_lladdr);
|
||||
#endif
|
||||
|
||||
/* Force acknowledge from sender (test hardware autoacks) */
|
||||
#if SICSLOWPAN_CONF_ACK_ALL
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_RELIABLE, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue