Hi Ti Folks,
I am writing my own IP stack [in my user space] on top of NDK and for this purpose, i want to receive Raw packets. Kindly note i will be
writing even CONNECTION ESTABLISHMENT HANDSHAKE protocols. In NDK, i see
there is a way to receive Raw packets [#define SOCK_RAW 3 // raw-protocol interface] and on top of those packets, user can write their own applications in user space [creating a Daemon using RAW SOCK Mode]. I have few doubts on them,please clarify
1. As part of TCP connection establishment, there is a 3-way handshake being done. In raw socket mode, are those packets delivered to receiving entity.
2. Do i receive ethernet header [source mac address,destination mac address and type/length field] also as part of raw socket functionality in NDK. [i see it as yes, as part of raw socket
""In contrast, raw sockets usually receive raw packets including the header"" ---->wikipedia
http://en.wikipedia.org/wiki/Raw_socket]
3. Also please let me know if NDK meddles [Acks/Nacks/Replies/Responsds] to any incoming packets in raw socket mode. If so, what are those?
4. what is the difference between
SOCK_RAWETH // non-copy raw eth socket
and
SOCK_RAW //raw-protocol interface
based reception. what does it mean by non-copy. As my objective is "writing my own IP stack [in my user space] on top of NDK", which one is best suited for my application.
I see there is an example as part of client.c, will go through it.
meanwhile, kindly answer my questions
Thanks
RC Reddy