Getting ARP table on iPhone/iPad

前端 未结 2 408
抹茶落季
抹茶落季 2020-11-30 08:32

I am trying to get the ARP entries on my iPad like here.

When compiling the code to run on my iPad (so not the simulator) I am getting missing header error messages.

2条回答
  •  日久生厌
    2020-11-30 08:51

    After importing , you should edit it and change the line

    #include 
    

    to

    #include "if_arp.h"
    

    and then import 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"

提交回复
热议问题