Home Features Docs Blog Support GitHub

Ifaddrs.h api calls

(Eugene) #1

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?

(Gergely Kis - Migeran) #2


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

Best Regards,

(Eugene) #3

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:

(Guilherme Campos Hazan) #4

Hi, were you able to solve this?

(Eugene) #5

I think I’ve used similar Java api instead