0

For example I have a board PC, at first it has on its eth0 a static IP I gave it. Then I connect it with a router, the router gives the eth0 a dynamic IP (dhcpc gives my eth0 a ip). Can I register a callback function after this change? Currently the only thing I can think is to write a loop function to watch if the configuration has been changed or not. But a callback function is possible?

  • Which software do you use to configure the respective interface? ifconfig, ip, dhclient, dhcpcd, systemd-networkd, netctl, NetworkManager...? – Richard Neumann Mar 5 '18 at 13:17
  • @RichardNeumann dhcpclient – J.R. Mar 5 '18 at 13:18
  • There's even low level ip monitor address that would work whatever the high level tool used – A.B Mar 6 '18 at 0:32
  • @A.B Nice, many thnx – J.R. Mar 6 '18 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.