The queue length of the packet is attached in ip header of the packet and it is accessed in routing layer to find the current traffic status of the node.
struct hdr_cmn *ch = HDR_CMN(p);
struct hdr_ip *ih = HDR_IP(p);
int p_len = q_->length();
ih->qlengt_ = p_len;