LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-25-2007, 11:11 PM   #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, 04:16 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
not about networking. moved to Programming.
 
Old 12-26-2007, 11:38 PM   #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



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 09:20 PM
a question about kernel copy userspace data linwenyuan Programming 0 03-28-2007 09:55 AM
passing options to build-in-modules nielchiano Linux - General 4 02-17-2004 11:40 PM
Shell script problems, passing options to gcc usernamed Programming 2 09-10-2003 06:47 AM
Passing options using k3b vexer Linux - General 1 06-06-2003 03:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:19 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
Open Source Consulting | Domain Registration