DHCP Renewal Event on Linux Systems

108 Views Asked by At

i am currently developing an Qt C++-Application for an embedded Buysbox Linux System.

Now i have to connnect my application to an DHCP-Server, which works fine. But the App should keep track of the lease time and try to renew the dhcp lease if the lease time is down to 0. I found a soulution to read out the lease time from the Client, but setting up a QTimer running for the same amount of time as the lease time seems to me to be not the best Solution (potential timeing error? -> QTimer would be started some milliseconds later, as the lease time starts).

I have tried to find out how the Linux event system manages DHCP Lease Renewal, but couldn't find any references or docs.

Does anyone knows how the Linux System manages this or where to find the docs for my answer? Or maybe anyone has a good Solution on how to renew DHCP (without permanently polling IP in a QThread)?

Since i have to use QT 5.3.2, i can't use the newest QT Features on Network Programming.

Thanks, Simon

0

There are 0 best solutions below