Let us suppose there are 2 nodes A & B. A has 10 packets, how these packets will transmit from A to B using any logic without using any network/packet simulator.
If I understand your question and you are simply attempting to move interesting packets from point a to point b, you might be able to use something like scapy to push the packets from the source.
Take a look at using zeromq. You could effectively build up a multihop network on one device or across multiple devices using one of the models provided in zeromq. I have used zeromq to build simple multihop IoT networks within which I simulated/tested certain scenarios.