max size of data portion= total length - header size
here assume 20 byte header(minimum) and total length field shows max when all 16 bits in total length field are 1
so its decimal equivalent is 216 -1 (total length)
so max data length= (216 -1) - 20.