From: Guus Sliepen Date: Sun, 18 Oct 2020 20:50:50 +0000 (+0200) Subject: Handle network change detection on macOS and iOS. X-Git-Url: http://git.meshlink.io/?a=commitdiff_plain;h=c68c5ebd8abf7a91f3d0ea3d05aa872b6a40d78e;hp=c68c5ebd8abf7a91f3d0ea3d05aa872b6a40d78e;p=meshlink Handle network change detection on macOS and iOS. Apple has no usable PFROUTE sockets anymore, instead network change detection should be done via SystemConfiguration callbacks. However, actually parsing the messages is very annoying in C, so we only use it to get notified of changes, we use getifaddrs() to get the actual list of network interfaces and addresses. The only issue is that interface up/down state changes do not result in a notification, only interface and address addition/removal. ---