'Attempts to install a path between this switch and some destination'

def install_path(self, dst_sw, last_port, match, event):

    p = _get_path(self, dst_sw, event.port, last_port)
    if (p is None):
        log.warning("Can't    get    from    %s    to    %s", match.dl_src, match.dl_dst)
        import pox.lib.packet as pkt
        if ((match.dl_type == pkt.ethernet.IP_TYPE) and event.parsed.find('ipv4')):
            log.debug('Dest    unreachable    (%s    ->    %s)', match.dl_src, match.dl_dst)
            from pox.lib.addresses import EthAddr
            e = pkt.ethernet()
            e.src = EthAddr(dpid_to_str(self.dpid))
            e.dst = match.dl_src
            e.type = e.IP_TYPE
            ipp = pkt.ipv4()
            ipp.protocol = ipp.ICMP_PROTOCOL
            ipp.srcip = match.nw_dst
            ipp.dstip = match.nw_src
            icmp = pkt.icmp()
            icmp.type = pkt.ICMP.TYPE_DEST_UNREACH
            icmp.code = pkt.ICMP.CODE_UNREACH_HOST
            orig_ip = event.parsed.find('ipv4')
            d = orig_ip.pack()
            d = d[:((orig_ip.hl * 4) + 8)]
            import struct
            d = (struct.pack('!HH', 0, 0) + d)
            icmp.payload = d
            ipp.payload = icmp
            e.payload = ipp
            msg = of.ofp_packet_out()
            msg.actions.append(of.ofp_action_output(port=event.port))
            msg.data = e.pack()
            self.connection.send(msg)
        return
    log.debug('Installing    path    for    %s    ->    %s    %04x    (%i    hops)', match.dl_src, match.dl_dst, match.dl_type, len(p))
    self._install_path(p, match, event.ofp)
    p = [(sw, out_port, in_port) for (sw, in_port, out_port) in p]
    self._install_path(p, match.flip())
