How to get packet route in iOS OR get OSI model layer info in iOS?
<p>I am currently working on kind of network diagnostic application, In which I need to track packet rote with all IP address. I think this all information is in OSI model layer no. 3 network layer, but I am not able to extract this information.</p>

<p>I am using cocoaasyncsocket library to create sockets also I am able to send and receive data but did not get how to extract layer information. Below is how I am using cocoaasyncsocket.</p>

<pre><code>// To send data
char bytes[] = "abcd\r\n";
NSData* data = [[NSData alloc] initWithBytes:bytes length:sizeof(bytes)];
[socket writeData:data withTimeout:-1 tag:0];


// To read data
- (void)onSocket:(AsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag
{
    NSString* newStr = [NSString stringWithUTF8String:[data bytes]];    
    NSLog(@"socket socketDidReadData:%@", newStr);
}
</code></pre>

<p><a href="https://developer.apple.com/library/ios/qa/qa1176/_index.html#//apple_ref/doc/uid/DTS10001707-CH1" rel="nofollow noreferrer">In this link apple say packet tracing is not possible on iPhone, but I am still not sure.</a>
<a href="https://developer.apple.com/library/ios/qa/qa1176/_index.html#//apple_ref/doc/uid/DTS10001707-CH1" rel="nofollow noreferrer">https://developer.apple.com/library/ios/qa/qa1176/_index.html#//apple_ref/doc/uid/DTS10001707-CH1</a></p>

<p>Below is diagram what I need to draw something like this on iPhone. I am trying since last two days and able to get any other information related to do this.</p>

<p><a href="https://i.stack.imgur.com/jvBYH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jvBYH.png" alt="enter image description here"></a></p>

<p><a href="http://useyourloaf.com/blog/remote-packet-capture-for-ios-devices/" rel="nofollow noreferrer">I found a solution but It’s require a MAC system and also a MAC app which will grab this info and then send to iPhone via USB cable.</a>
<a href="http://useyourloaf.com/blog/remote-packet-capture-for-ios-devices/" rel="nofollow noreferrer">http://useyourloaf.com/blog/remote-packet-capture-for-ios-devices/</a></p>

<p>Any helpful link, information can save my days.</p>