Setting DF bit in IP header.

From: Rajat (myself_rajat_at_yahoo.com)
Date: 06/29/04


Date: 29 Jun 2004 07:04:01 -0700

Hello All,

Can any body tell me, How to set the DF bit for IP header 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.



Relevant Pages

  • Setting DF bit in IP header.
    ... How to set the DF bit for IP header over Linux ... As right now I am using setsockopt(), ... But this option also forces the PMTUD for the given socket, ...
    (comp.unix.programmer)
  • Re: Please help linux neophyte restore data to hard drive!
    ... > recorder, on which I had recorded over an hour of multitrack data when ... > what the header would have looked like, I can get all of the data. ... > of blank space using the Alesis HD-24. ... I've heard that linux users ...
    (comp.os.linux.hardware)
  • Linux 2.6.0 no TCP-Connections to Internet
    ... I'm trying to move to linux 2.6. ... I can't make a TCP connection to ... Time delta from previous packet: ... Header checksum: 0x418f ...
    (comp.os.linux.networking)
  • Re: Whois" connected to my network
    ... connection to my network. ... send yourself and email and read header. ... to mess up a linux box, you need to work at it; ... to mess up an ms windows box, you just need to *look at* it. ...
    (Fedora)
  • Re: CLI app - allow access?
    ... working system. ... > A little research indicated it's related to Linux. ... Are some> Windows apps ... Except that a response that dupes their post completely undoes the "X-no-archive: yes" header and why using that header is such a stupid idea that only newbies think is effective, or maybe they hope no one will respond to their post. ...
    (comp.security.firewalls)