Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - How to tell if ethernet cable is unplugged?: Page 1 of 3 (3 Items)
   
How to tell if ethernet cable is unplugged?  
How do I programmatically detect if the Ethernet cable has been unplugged?  I tried the ioctl SIOCGIFFLAGS command to 
look at the IFF_UP and IFF_RUNNING flags, but these are always set.  ifconfig seems to know because when the cable is 
plugged in, it displays:

  status: active

Since the source code is nearly impossible to access, I can't see how it knows.  Does anyone know the magic function to 
determine this?