Detecting If LAN Cable is Unplugged

Anyone Know how i can detect if the Network Cable is plugged in or not ?

try using ‘pd_havelink(IF_ETH0)’