LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-29-2004, 09:06 AM   #1
myself_rajat
LQ Newbie
 
Registered: May 2004
Location: India
Posts: 21

Rep: Reputation: 15
Lightbulb Setting DF bit in IP header for Raw socket


Hello All,

Can any body tell me, How to set the DF bit for IP header (for raw sockets) over Linux
OS. As right now I am using setsockopt(), with option IP_MTU_DISCOVER
and optval as IP_PMTUDISC_DO. Like,

int optval = IP_PMTUDISC_DO;
err_code = setsockopt(socket,
SOL_IP,
IP_MTU_DISCOVER,
&optval,
sizeof(int));

But this option also forces the PMTUD for the given socket, that I
don't want. This PMTUD I am implementing by my own.

So can you tell me any other way to set it ON.

I am also not intrested in setting IP_HDRINCL option, to provide my
own IP header while sending, for just setting the DF bit value.

Thanks in advance.

Rajat.
 
  


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
Raw Socket Programing djgerbavore Programming 2 08-18-2004 12:58 PM
Using Raw Socket for UDP myself_rajat Linux - Networking 0 05-17-2004 03:35 AM
Socket Raw linuxanswer Programming 1 04-01-2004 09:43 PM
ping without raw socket linuxnw Linux - Networking 3 12-09-2003 11:57 PM
raw socket permition moonloader Linux - Networking 2 12-08-2003 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:01 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