Hi,
I created a tunnel device using the kernel supported function tun_open.
Then I assigned an ip address to tun0 using ifconfig tun0 192.168.0.10.
I want to read now the plain ip packets, but how can I do this?
In my test program I have
while(1)
{
readn_t(fd_tun,buf,100,timeout); //read with timeout
printf("tun:%s\n",buf);
}
I never receive any data from the tun device.
Do I have to listen on the fd socket for incoming connects? Or How can I set
the tun device to accept every connect request?
when I do ssh 192.168.0.10 it says connection refused (Port 22).
regards,
Benjamin
|