Descriptiongo.net/ipv4: make setting IPv4 header flags easier Current implementation of Header uses Header.FragOffset to fill both flags and fragment offset fields of the IP header(total 16 bits), even though fragment offset is only 13 bits wide according to RFC791. The current implementation allows weird fragment offsets and makes setting the flags kind of nasty. This change adds a new field 'Flags' to Header which allows setting of DF and MF flags without having to manually mask the bits to Header.FragOffset. Header.Marshal takes care of the required bit shifting. Patch Set 1 #Patch Set 2 : diff -r 84a4013f96e0 https://code.google.com/p/go.net #
|