LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 12-26-2007, 12:11 AM   #1
kaushik1
LQ Newbie
 
Registered: May 2007
Posts: 7

Rep: Reputation: 0
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
 
Old 12-26-2007, 05:16 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
not about networking. moved to Programming.
 
Old 12-27-2007, 12:38 AM   #3
kaushik1
LQ Newbie
 
Registered: May 2007
Posts: 7

Original Poster
Rep: Reputation: 0
no offence meant but I thought this had all to do with networking... ... who said networking doesnt involve programming ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dpkg-buildpackage: passing ./configure options? neocookie Debian 3 08-27-2008 10:20 PM
a question about kernel copy userspace data linwenyuan Programming 0 03-28-2007 10:55 AM
passing options to build-in-modules nielchiano Linux - General 4 02-18-2004 12:40 AM
Shell script problems, passing options to gcc usernamed Programming 2 09-10-2003 07:47 AM
Passing options using k3b vexer Linux - General 1 06-06-2003 04:19 PM


All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration