cpacket => storing initial head and tail values and resetting when calling cpacket::clear()