A method for routing packets in a multi-hop wireless heterogeneous network including nodes with different computational and energy resources, comprising: monitoring a set of parameters of an operation of a node in the network , wherein the operation includes routing packets to the nodes of the network according to a mode of operation, MOP, specifying a type of the routing; modifying the MOP of the node in response to detecting a change in at least one parameter of the operation; broadcasting information about the modified MOP to the network ; and routing the packets to the nodes according to the modified MOP, wherein steps of the method are performed using a processor of the node ; wherein the MOP is a non-storing MOP or a storing MOP; characterized in that the node operating according to the non-storing MOP does not store a routing table, and the node operating according to the storing MOP stores the routing table and child-parent table specifying child-parent pairs for at least part of the network, and wherein the MOP of the node is the storing MOP and an MOP of a parent of the node is the non-storing MOP, further comprising: receiving 2. a control packet originated by a descendent node, wherein the descendent node is not a direct child of the node; testing if the control packet does not include a child-parent pair for the descendent node; adding in the control packet, if the child-parent pair is not in the control packet, the child-parent pair of the descendent node specifying that the descendent node is the direct child of the node; and transmitting the control packet to ancestors of the node. monitoring a set of parameters of an operation of a node in the network , wherein the operation includes routing packets to the nodes of the network according to a mode of operation, MOP, specifying a type of the routing; modifying the MOP of the node in response to detecting a change in at least one parameter of the operation; broadcasting information about the modified MOP to the network ; and routing the packets to the nodes according to the modified MOP, wherein steps of the method are performed using a processor of the node ; wherein the MOP is a non-storing MOP or a storing MOP; characterized in that the node operating according to the non-storing MOP does not store a routing table, and the node operating according to the storing MOP stores the routing table and child-parent table specifying child-parent pairs for at least part of the network, and wherein the MOP of the node is the storing MOP and an MOP of a parent of the node is the non-storing MOP, further comprising: receiving 2. a control packet originated by a descendent node, wherein the descendent node is not a direct child of the node; testing if the control packet does not include a child-parent pair for the descendent node; adding in the control packet, if the child-parent pair is not in the control packet, the child-parent pair of the descendent node specifying that the descendent node is the direct child of the node; and transmitting the control packet to ancestors of the node. receiving 2. a control packet originated by a descendent node, wherein the descendent node is not a direct child of the node; testing if the control packet does not include a child-parent pair for the descendent node; adding in the control packet, if the child-parent pair is not in the control packet, the child-parent pair of the descendent node specifying that the descendent node is the direct child of the node; and transmitting the control packet to ancestors of the node. <EOS>