[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] How To Build Networks Header Manually In Linphone

From: Hiral Bhandari
Subject: [Linphone-developers] How To Build Networks Header Manually In Linphone
Date: Tue, 30 Dec 2014 13:12:20 +0530

As I know that when data is sent from application through sento() function, kernel internally encapsulates TCP/UDP,IP and Ethernet headers and then sends them over physical medium. So, In procedure kernel headers and its functions are invoked for encapsulation. For this to happen, we need socket from application side with SOCK_DGRAM or SOCK_STREAM option for(UDP,TCP respectively).

But I want to use RAW socket and want to follow same procedure as kernel follow for sending whole packet(AppData/TCP(or UDP)/IP/Ethernet(or 802.11b)) on my own...

I am working on linphone android application. So, necessity is that I can't invoke kernel headers and functions directly as it requires ROOT permission on device and obviously client's android phones may not ROOTed.

QUESTION: As input, I have only application data. So from onwards, through the help of RAW sockets, HOW CAN I MANUALLY calculate all headers(TCP(or UDP)/IP) with user space application(in user space) and send it over to sender NIC and at receiver side (through Reciever's NIC) vice-versa(manually forming Ethernet,IP,TCP(or UDP),sentAppData); for receiving same application data at client android application(user space).

I know, somehow I need to deal with 'sk_buff' data structure which is defined in kernel space. But, HOW TO FILL UP the bridge between using RAW sockets and calculating SIMILAR headers on user space INSTEAD OF kernel-space ?

Hope that my question is clear. Can anyone explain about solution for such scenario?

Thanks in advance.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]