private synchronized void processFlowPacket(Sim_event ev, int tag)
    {
        Packet pkt = (Packet) ev.get_data();
        PacketScheduler sched = getScheduler(pkt);
        //System.out.println("Packet id is " + pkt.getID());

        // if a packet scheduler is not found, then try reschedule this packet
        // in the future
        if (sched == null)
        {
            System.out.println(super.get_name() + ".processNetPacket(): " +
                "Warning - can't find a packet scheduler for " + pkt);
            System.out.println("-> Will reschedule it again in the future.");

            super.sim_schedule(super.get_id(), Router.DELAY, tag, pkt);
            return;
        }

        // process ping() request
        if (pkt instanceof InfoPacket)
        {
            ((InfoPacket) pkt).addHop(id);
            ((InfoPacket) pkt).addEntryTime( GridSim.clock() );
            ((InfoPacket) pkt).addBaudRate(sched.getBaudRate());
        }


        //System.out.println(super.get_name() +
        //    ".processNetPacket() check sched Time now " + GridSim.clock());

        // if no packets at the moment
        if (sched.size() == 0)
        {
            /******  // NOTE: debugging information
            System.out.println(super.get_name() + ".processNetPacket() #packets " +
            		" size " + pkt.getSize()*NetIO.BITS + " baud sched "
                    + sched.getBaudRate() + " largest double " + Double.MAX_VALUE);

            System.out.println(super.get_name() +
                ".processNetPacket() set internal event to fire");
            ******/

            // Fire internal event without delay (delay is incurred entirely at
            // source of Flow
            sendInternalEvent(GridSimTags.SCHEDULE_NOW, sched);
        }

        //System.out.println(super.get_name() +
        //    ".processNetPacket() done sched Time now " + GridSim.clock());

        // log / record ....
        if (super.reportWriter_ != null)
        {
            super.write("");
            super.write("receive incoming, " + pkt + ", delay, " + 0.0);
        }

        // put the actual packet into the last one and resize it accordingly
        pkt.setLast(id);
        pkt.setSize(pkt.getSize());

        if (super.reportWriter_ != null) {
            super.write("enqueing, " + pkt);
        }

        sched.enque(pkt);  // put the packet into the scheduler
    }