LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Passing IP options data to kernel from userspace (https://www.linuxquestions.org/questions/programming-9/passing-ip-options-data-to-kernel-from-userspace-609122/)

kaushik1 12-25-2007 11:11 PM

Passing IP options data to kernel from userspace
 
Hello,

I need to put some IP options data as part of each IP packet. Browsing through some sources, it looks like setsockopt() can be used to pass the data to be put into thte IP options header to the kernel from user application.

I then tried a sending a single IP packet after doing socket(2) call by doing
setsockopt(sockfd, IPPROTO_IP, IP_OPTIONS, &data, sizeof(data)) and captured the packet at the receiver end using ethereal but there was no IP otions header at the packet received.

Can somebody help me out with how to send the IP options data from userland to kernel so that kernel creates the IP options header and puts the data in there ?

-Kaushik

acid_kewpie 12-26-2007 04:16 PM

not about networking. moved to Programming.

kaushik1 12-26-2007 11:38 PM

no offence meant but I thought this had all to do with networking... :) ... who said networking doesnt involve programming ? :)


All times are GMT -5. The time now is 04:08 PM.