in reply to how to change ip flags with net::rawip?

Looking at Net::RawIP, I see that frag_off is one of the flags. Most likely, if you can't find it in the source code or documentation, you have to find the numeric value of the flag and set it via the ->set method. Alternatively, look in the libpcap documentation, around which Net::RawIP is a layer.

Replies are listed 'Best First'.
Re^2: how to change ip flags with net::rawip?
by kroupouk (Novice) on May 17, 2009 at 05:15 UTC
    Yes Frag_off is used by the fragment offset field. But it does not control the use of the M or DF bits or the Reserved bit.... Normally the offset is calculated on 13 bits while the other 3 bits are used for M, DF, Reserved
      Wait..... just tried 65535 in frag_off. and then it fills the 3 bits. So in fract frag_off field does more than filling the 13 bits of fragment offset. It does fill as well the 3 remaining bits for M - DF - Reserved. A pitty it's not documented...