So I'm running PPP under linux with a cellular modem. The program I'm writing needs to know if the link is active before sending any data.
What are my options to check
- if the link is available
- if it routes to a server I control (it doesn't go to the internet as I said earlier)
Also, what is the best way to restart it - I'd like to have program control over when it starts and stops, so I assume an init.d isn't appropriate. Using system() doesn't seem to give a PID, are there other options besides fork() and the gaggle of exec??() calls?
C on Linux on ARM (custom distribution using buildroot). Yes, even though I've got my hands inside the kernel I'm still a newbie, so please be verbose or give pointers where possible to more in-depth info.