[Vtun-devel] How to setup tun0 using tun/tap
Status: Inactive
Brought to you by:
mtbishop
|
From: Mike H. <mik...@ya...> - 2006-03-15 10:25:50
|
I am new to tun/tap programming. Start to setup an interface tun0, and test whether able to receive packet from normal client program. Firstly I adopted the tun related code from vtun. Then call tun_open and ifconfig to turn tun0 on, and repeatly tun_read() from tun0 in a loop. On the other hand, I start a UDP client program to send UDP packet to tun0. I expected I could read the whole UDP packet including header, and print it out char by char. However, nothing is printed. Where is my mistake? Hope to get help, thank you. _______________________________________ YM - 離線訊息 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。 http://messenger.yahoo.com.hk |