0

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 ?

brainydexter
  • 115
  • 1
  • 5
  • 1
    Why the bizarre architecture? It sounds like TCP or UDP sockets would be exactly what you're looking for, albeit at layer 3. Are you trying to develop some layer 2-based product? – Evan Anderson Oct 10 '14 at 04:00
  • Yes, I'm working on layer 2 based product. Why is it bizzare ? – brainydexter Oct 10 '14 at 08:51

1 Answers1

0

Those TAP interfaces are just network interfaces to your host OS. Use the bridge tools to bridge the interfaces together as you desire.

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331