Perl RawIP CWR Flag

I am using Net :: RawIP to send packets with specific TCP flags. Is there a way to set the CWR flag? TCP protokey "res2" sets the ECE flag, but "res1" seems to set the NS flag:

$n = Net::RawIP->new({
ip  => {
        saddr => 'my.target.lan',
        daddr => 'my.target.lan',
       },
tcp => {
        source => 123,
        dest   => 123,
        res1   => 1,
        res2   => 1,
        fin    => 1,
        syn    => 1
       }
});

      

Here's the Wireshark capture of the packet flags:

Capturing Wireshark packet flags

+3


source to share


1 answer


res2

is two bits wide.

res2 => 1   # ECE
res2 => 2   # CWR
res2 => 3   # ECE & CWR

      



(This may be the other way around on big end machines, but I doubt it.)

( res1

is 4 bits marked as "Reserved" and "Nons" in Wireshark capture.)

+1


source







All Articles