'targetip    = Destination IP (on the target)
targetport  = Destination Port (on the target)
redirip     = IP of the LP
redirport   = Port on the LP'

def redirect_local(self, l, plugin, session_data):

    params = iDict(plugin.getParameters())
    laddr = self.conv_param(l.listenaddr, params, session_data['params'])
    lport = self.conv_param(l.listenport, params, session_data['params'])
    daddr = self.conv_param(l.destaddr, params, session_data['params'])
    dport = self.conv_param(l.destport, params, session_data['params'])
    if (None in (laddr, lport, daddr, dport)):
        for (p, n) in ((laddr, l.listenaddr), (lport, l.listenport), (daddr, l.destaddr), (dport, l.destport)):
            if (p == None):
                self.io.print_warning(('Parameter    %s    referenced    by    tunnel    %s    not    found.    This    tunnel    will    be    ignored' % (n, l.name)))
        return
    self.io.print_success(('Local    Tunnel    -    %s' % l.name))
    targetip = self.prompt_redir_fake('Destination    IP', daddr)
    targetport = self.prompt_redir_fake('Destination    Port', dport)
    redirip = self.prompt_redir(plugin, l.listenaddr, 'Listen    IP', '127.0.0.1')
    if (not dport):
        dport = targetport
    redirport = self.prompt_redir(plugin, l.listenport, 'Listen    Port', lport)
    session_data['params'][l.listenaddr] = targetip
    session_data['params'][l.listenport] = targetport
    session_data['local'].append(LocalRedirection(l.protocol, redirip, redirport, targetip, targetport, name=l.name))
    self.io.print_success(('(%s)    Local    %s:%s    ->    %s:%s' % (l.protocol, redirip, redirport, targetip, targetport)))
