private synchronized void processNetPacket(Sim_event ev, int tag)
    {
        double nextTime = 0;
        Packet pkt = (Packet) ev.get_data();
        PacketScheduler sched = getScheduler(pkt);

        // 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( super.get_id() );
            ((InfoPacket) pkt).addEntryTime( GridSim.clock() );
            ((InfoPacket) pkt).addBaudRate(sched.getBaudRate());
        }

        // check downlink MTU, and split accordingly
        String linkName = getLinkName( pkt.getDestID() );
        Link downLink = (Link) Sim_system.get_entity(linkName);
        int MTU = downLink.getMTU();
        int numPackets = (int) Math.ceil(pkt.getSize() / (MTU * 1.0));

        // log / record ....
        if (super.reportWriter_ != null)
        {
            super.write("");
            super.write("receive incoming, " + pkt + ", delay, " + nextTime);
            super.write("break this packet into, " + numPackets);
        }

        // break a large packet into smaller ones that fit into MTU
        // by making null or empty packets except for the last one
        for (int i = 0; i < numPackets - 1; i++)
        {
            NetPacket np = new NetPacket(null, pkt.getID(), MTU, tag,
                                         pkt.getSrcID(), pkt.getDestID(),
                                         pkt.getNetServiceType(),i+1,numPackets);

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

            // put the packet into the scheduler
            super.sim_schedule(sched.getSchedID(),0,GridSimTags.SCHEDULER_ENQUE, np);
        }

        // put the actual packet into the last one and resize it accordingly
        pkt.setLast( super.get_id() );
        pkt.setSize(pkt.getSize() - MTU * (numPackets - 1));
        if (super.reportWriter_ != null) {
            super.write("enqueing, " + pkt);
        }

        // put the packet into the scheduler
        super.sim_schedule(sched.getSchedID(),0,GridSimTags.SCHEDULER_ENQUE,pkt);
    }