I have two processes A and B (simulating real hardware device), each with their own TAP interfaces. If I want to send an ethernet packet to A, I send it on interfaceA, and similarly if I want to send a packet to B, I send it to interfaceB.
I'd like to connect A and B in a way, that under certain conditions, when I send a packet out of A, it is fed into B. How can I do this ?
This is how I was thinking of doing this: Assuming A has 5 interfaces (representing ports): A1, A2, ... A5 and B also has 5 interfaces (representing ports): B1, B2, ... B5
If somehow, I can connect A5 to B5, (in real world I'd just do this with a wire), and I send (write) a packet on A5, process B would be fed with it via B5.
So, the real question is..how can I bridge/connect two interfaces ?