Results 1 to 1 of 1
Hi
I'm trying to get 2 programs to communicate through TAP interface using their own TCP/IP software stack (lwIP)...
Here are my setup:
prog1
|
tap0
|
br0 -- wlan0
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-16-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 5
can't receive packets sent to TAP
Hi
I'm trying to get 2 programs to communicate through TAP interface using their own TCP/IP software stack (lwIP)...
Here are my setup:
prog1
|
tap0
|
br0 -- wlan0
|
tap1
|
prog2
on my Ubuntu 10.04 linux box, here are what I did:
e.g.) my WLAN IP is 192.168.1.104
1. brctl addbr br0
2. ifconfig wlan0 0.0.0.0
3. brctl addif br0 wlan0
4. ifconfig br0 192.168.1.104
Then in program 1:
1. open /dev/net/tun
2. ifconfig tap0 0.0.0.0
3. brctl addif br0 tap0
while(1)
4. read /dev/net/tun
5. write /dev/net/tun
In program 2:
1. open /dev/net/tun
2. ifconfig tap1 0.0.0.0
3. brctl addif br0 tap1
while(1)
4. read /dev/net/tun
5. write /dev/net/tun
At this point, both programs can see many INCOMING ethernet packets.
When I do ping to any unused IP (e.g) ping 192.168.1.200, I can see the packet in both program1 and 2.
However, when I send anything for either prog1 or 2 to /dev/net/tun, it does not appear in any of tap0 and tap1 interface...
Am I missing anything?
Thanks in advance!!
Nick


Reply With Quote
