2

Before I get into what I want to do, be assured that I've done some searching on SO for the answer already - the highest-ranked results either a) didn't have enough detail as to be of any help, or b) used languages (C#, etc.) that I don't want to use, much less can use, as I'm on my OS X machine right now.

There was one result that sounded like what I wanted, but not only was the answer not helpful whatsoever, but the question itself is a couple layers higher in the stack than I need.

I want to implement a TCP/IP stack in Objective-C for learning purposes. Force myself to write all the layers and actually comprehend what's going on in them. I don't intend to attempt to reinvent the wheel here, nor am I trying to come up with any sort of optimized result. I just want to write a stack framework that I can use in a simple app so I can see what's going on in the 'black box'. I want to get into networking more and I feel I'm doing myself a disservice if I don't at least have a rudimentary amount of knowledge regarding the transport mechanisms.

However, this requires that I'm able to obtain the raw, uncut, not edited or parsed Ethernet frame directly as it comes out of the cable. How would I obtain such a thing working in Objective-C?

blasthash
  • 98
  • 1
  • 9

1 Answers1

0

Please have look at THIS ,It tells how can we capture raw packets on iOS using pcap library There is no straight way to get raw packets using RAW_SOCKETS. So you have to go through lirabry provided by Mac. Please have look at this quetsion also also may have data of your interst

Community
  • 1
  • 1
jnix
  • 480
  • 3
  • 10