Ifaddrs.h api calls

I couldn’t find if it was answered before, I’m struggling with calling getifaddrs system function declared in ifaddrs.h header. How can I call it from MOE on iOS?

On a side note. When moe ios app is running on a simulator I can’t get Java’s NetworkInterface en0 for wifi connection as NetworkInterface.getNetworkInterfaces() in Java api returns null. Is it possible to tweak moe runtime to have it working in simulator?

Hi,

It is possible that this header is not mapped in the standard bindings. You could try to generate bindings for it yourself.

Best Regards,
Gergely

Gergely, I’m having troubles with locating this and other C headers in xcode libraries:

#import <sys/socket.h>
#import <netinet/in.h>
#import <netinet6/in6.h>
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <netdb.h>

They all rea referenced from iOS Reachability example:
https://developer.apple.com/library/content/samplecode/Reachability/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007324-Intro-DontLinkElementID_2

Hi, were you able to solve this?

I think I’ve used similar Java api instead