489Wireless Sensor Network Simulations Using Castalia
fromMacLayer() is a callback method that is called once the SBDRouting module receives
a packet from the MAC layer. There are seven types of network layer packets that could
come to the SBDRouting module from the MAC layer. SHs push all SBD_ DATA_ PACKET_
LOCAL_UPDATE received from their associated MNs to the application layer. SBD_RANGE_
LOCAL_QUERY is the query response from MNs to SHs. If the packet is destined for this
node, then it is pushed to an upper layer, that is, the application layer. When an SH receives
SBD_DATA_PACKET_REMOTE_UPDATE from the MAC layer, there could be two differ-
ent actions. In the first case, the packet is received by a target or relay SH from a remote SH,
while ...