1

I am making an application using tun interface tun0. I have been successfully able to send and receive packets through the interface. Is there any way to know when the tun interface is opened as in ifconfig tun0 up?

I want do some part of my underlying device initialization only when the interface is active. (added later) I am following the examples from http://backreference.org/2010/03/26/tuntap-interface-tutorial/

hiteshradia
  • 357
  • 2
  • 9
  • http://stackoverflow.com/questions/12101919/how-do-i-open-a-tun-device-created-with-ip-tuntap – Satish Feb 19 '13 at 15:08
  • its not a duplicate. one way i thought of is that we can know that interface has been opened(using `ifconfig` or `ip link set`) is when the first packet is read. – hiteshradia Feb 24 '13 at 15:33

0 Answers0