Is it possible in Contiki-NG to send a custom packet from a udp-client node to a neighbour using link address from neighbor cache? I am looking a way to avoid sending icmpv6 packet because it is going up to the root and then root sends it to destination. I saw that Contiki enables mesh topology so it should be possible to send a packet directly to neighbor without forwarding packet to parent. I will appreciate any help on this!
IPv6 has-so called link-local addresses. These are addresses with the prefix fe80::/64
. If you want to send a packet bypassing routing then you should use these addresses. For example, if you have network with a prefix fd00::/64
and neighbor with global IPv6 address fd00::201:1:1:1
, then send a packet to fe80::201:1:1:1
to reach that neighbor directly.
A side note related to "Contiki enables mesh topology" - if you're using RPL Lite or RPL Classic with non-storing mode, all routed packets will go through the root in any case, as the network nodes don't add routes to parents/children to their routing tables in this mode. Enable the storing mode to achieve direct peer-to-peer packet exchange using routing.