0

I want to make an iPad app that analyze the data traffic using: "tcpdump" The app should be somehow a implementation/adaptation/wrapper the/for the "tcpdump" command.

I zapped through the http://www.tcpdump.org/, but I want to save time, so I want ask you for some guidelines in order to solve this.

  1. Is there any wrapper "libpcap" library for objective-c? Or any other API that handles the "tcpdump" command in iOS.

  2. How do I use a C/C++ library in an iPhone/iPad app?

Thanks in advance.

Filburt
  • 17,626
  • 12
  • 64
  • 115

1 Answers1

0
  1. I didn't find an Obj-C wrapper for pcap either. Not surprising considering some points raised in this answer. @Guy Harris points out the problem specifically: unless you're running on a jailbroken device, you're going to be lacking the permissions to read the data.

  2. This question (specifically this answer) suggests that you just properly name the files, then compile and link

Good luck.

Community
  • 1
  • 1
Thompsonian
  • 407
  • 5
  • 23
  • 1
    In particular, note that the answer mentioned in point 1 says that, unless you are doing this on a jailbroken iPad, you will not be able to give tcpdump (or any other app) sufficient privileges to open a BPF device and thus will not be able to give it sufficient privileges to capture traffic. –  May 02 '12 at 17:51
  • Thanks again for these observations. – Don Alexandru Calin May 03 '12 at 07:17