LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-24-2009, 05:05 AM   #1
kiran_4u
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
Question Modifying IPv4 headers


Hi,

My query is:
I need to set the IPv4 header fields(like TOS, TTL, Precedence and Flags) in the linux kernel using the system calls.
I tried setting the fields using the setsockopt() call using sockets but it is not reflecting the actual IPv4 header fields. Is it possible to modify these fields? Please let me know the way of setting IPv4 header fields using the system calls.

Also, I can set the TTL field using /proc interface - /proc/sys/net/ipv4/ip_default_ttl. Anyone knows how to set for other header fields?

I tried googling but I couldn't find it. Please help me.

Thanks in advance,
Kiran.

Last edited by kiran_4u; 12-24-2009 at 10:05 PM.
 
Old 12-24-2009, 06:13 AM   #2
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
Quote:
Originally Posted by kiran_4u View Post
Hi,

My query is:
I need to set the IPv4 header fields(like TOS, TTL, Precedence and Flags) in the linux kernel using the system calls.
I tried setting the fields using the setsockopt() call using sockets but it is not reflecting the actual IPv4 header fields. Is it possible to modify these fields? Please let me know the way of setting IPv4 header fields using the system calls.

Also, I can set the TTL field using /proc interface - /proc/sys/net/ipv4/ip_default_ttl. Anyone knows how to set for other header fields?

I tried googling but I couldn't find it. Please help me.

Thanks in advance,
Kiran.
Have you looked into dnet?

http://libdnet.sourceforge.net/

not sure what your application is, but if you're doing testing or research, dnet is great.
 
  


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
Zypper wants to dl the wrong kernel headers... YaST doesnt have current headers zorb SUSE / openSUSE 2 11-28-2009 11:12 AM
IPv6 over IPv4 lo-kəy Linux - Networking 1 05-04-2009 01:45 AM
IPv4 not there??? Goblin82 Linux - Networking 4 03-03-2006 07:07 PM
Ipv4 reverse Tomanas Slackware 2 07-26-2005 04:29 AM
IPv6 to IPv4 thomjakub *BSD 1 03-06-2004 01:17 AM

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

All times are GMT -5. The time now is 04:41 AM.

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