38 std::cout <<
"Front_Drop_Queue::push_packet"
45 while ((!std::queue<Packet*>::empty()) &&
46 ((8*bytes_in_queue + packet->
bit_size()) > 8*max_bytes_in_queue)) {
47 hol_packet = std::queue<Packet*>::front();
55 std::cout <<
"Link_With_Input_Q::received_packet, "
56 <<
"Packet Dropped, buffer overflow."
61 bytes_in_queue += packet->
bit_size() / 8;
62 std::queue<Packet*>::push(packet);
69 hol_packet = std::queue<Packet*>::front();
70 bytes_in_queue -= (hol_packet->
bit_size() / 8);
72 std::cout <<
"Front_Drop_Queue::pop_packet"
73 <<
" ptr=" << hol_packet
76 std::queue<Packet*>::pop();