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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-05-2004, 10:07 AM
|
#1
|
|
LQ Newbie
Registered: Feb 2004
Location: Korea
Posts: 25
Rep:
|
Using the option field in IP header
Hello everyone,
I want to use the option field of IP header and add some custom information to the IP header. Can anyone suggest me how is it possible?
From some research, I found that I can use ip_var.h file. But I can not find the file in /usr/include/netinet directory. I am using Redhat 8.0.
Appreciate your help.
Thanks
Guam
|
|
|
|
11-06-2004, 03:11 PM
|
#2
|
|
LQ Newbie
Registered: Sep 2003
Posts: 6
Rep:
|
Assuming you have nothing but good intentions in mind, don't touch the IP options. Write your own layer 7 header that contains your "custom information".
If you put your own crap in the IP header, no one else's computer will know what to do with it. If it's a good stack (the thing that takes packets apart inside your computer), the packet's will be dropped. If it's a bad stack... well, who knows.
|
|
|
|
11-06-2004, 09:51 PM
|
#3
|
|
Member
Registered: May 2004
Posts: 552
Rep:
|
The first byte of IP packet is normally 0x45, the 5 means 5*4=20 bytes in the header. If you make it 0x46 then you have an additional 4 bytes of options immediately following the header. The previous post is right, don't modify the ip header by adding options, your results will only be frustrating when the receiving computer doesn't handle it the way you expect. This doesn't mean they don't exist, but I've never seen the options used for anything in modern computers and I wouldn't be surprised if its broken in most stacks.
|
|
|
|
08-22-2011, 11:39 PM
|
#4
|
|
LQ Newbie
Registered: Aug 2011
Posts: 9
Rep: 
|
hey guam i have similar problem as u... I also want to add my custom info in the options field of ip header... Have you find any solution how to do it... Please help me... Please give me a reply...
|
|
|
|
08-23-2011, 03:56 AM
|
#5
|
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,386
|
Quote:
Originally Posted by Maitrikkshah
hey guam i have similar problem as u... I also want to add my custom info in the options field of ip header... Have you find any solution how to do it... Please help me... Please give me a reply...
|
Do you realize that you posted to a thread that is nearly 7 years old? I'm sure Guam has moved onto other things, and probably doesn't monitor this forum anymore.
You'll have better luck opening a new thread.
|
|
|
|
08-25-2011, 04:52 AM
|
#6
|
|
LQ Newbie
Registered: Aug 2011
Posts: 9
Rep: 
|
Yes for that reason i have sent him an email also...
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:04 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|