cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/hosts/network/NetworkHost.java
private void collectPacketToSendFromVm(VmPacket vmPkt) {
        final HostPacket hostPkt = new HostPacket(this, vmPkt);
        //Checks if the VM is inside this Host
        final Vm receiverVm = VmList.getById(this.getVmList(), vmPkt.getDestination().getId());
        if (!receiverVm.equals(Vm.NULL)) {
            pktsToSendForLocalVms.add(hostPkt);
        } else {
            pktsToSendForExternalVms.add(hostPkt);
        }
    }
/**
     * Collects a specific packet from a given Vm
     * in order to get it together with other packets to be sent.
     *
     * @param vmPkt a packet to be sent from a Vm to another one
     * @see #collectListOfPacketsToSendFromVm(Vm)
     */
Collects a specific packet from a given Vm
in order to get it together with other packets to be sent.

@param vmPkt a packet to be sent from a Vm to another one
@see #collectListOfPacketsToSendFromVm(Vm)
Collects a specific packet from a given Vm in order to get it together with other packets to be sent . @param vmPkt a packet to be sent from a Vm to another one @see #collectListOfPacketsToSendFromVm ( Vm )
private void collectPacketToSendFromVm(VmPacket vmPkt) {
        final HostPacket hostPkt = new HostPacket(this, vmPkt);
        final Vm receiverVm = VmList.getById(this.getVmList(), vmPkt.getDestination().getId());
        if (!receiverVm.equals(Vm.NULL)) {
            pktsToSendForLocalVms.add(hostPkt);
        } else {
            pktsToSendForExternalVms.add(hostPkt);
        }
    }
private void collectPacketToSendFromVm ( VmPacket vmPkt ) { final HostPacket hostPkt = new HostPacket ( this , vmPkt ) ; final Vm receiverVm = VmList . getById ( this . getVmList ( ) , vmPkt . getDestination ( ) . getId ( ) ) ; if ( ! receiverVm . equals ( Vm . NULL ) ) { pktsToSendForLocalVms . add ( hostPkt ) ; } else { pktsToSendForExternalVms . add ( hostPkt ) ; } }
Collects a specific packet from a given Vm
 in order to get it together with other packets to be sent.
Collects a specific packet from a given Vm in order to get it together with other packets to be sent .
//Checks if the VM is inside this Host