Getting ARP table on iPhone/iPad

半世苍凉 提交于 2019-11-27 04:42:19
GreyHands

After importing <netinet/if_ether.h>, you should edit it and change the line

#include <net/if_arp.h>

to

#include "if_arp.h"

and then import <net/if_arp.h> in your project as well. This should fix that error.

Anyway the headers you need to import to compile the code you posted are:

#include "if_ether.h"
#include "route.h"
#include "if_arp.h"
#include "if_dl.h"

Hope this helps =)

EDIT:

You need to "Add files to project", not simply importing it with #import or #include. You can find above files from following links: Files under "netinet" Files under "net"

ohho
#include <net/ethernet.h>

instead of messing with the original headers. More info here: Implicit declaration of function 'ether_ntoa' is invalid in C99

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!