Skip to content
Snippets Groups Projects
Select Git revision
  • 3aa1d1471f143bd176a7bbbcb2a82a96ca05ee26
  • master default
  • wip-add-ed25519
  • disable-sha1
  • lsh-2.0.4
  • experimental-20050201
  • lsh-1.4.2
  • lsh-1.2
  • lsh_2.1_release_20130626
  • converted-master-branch-to-git
  • nettle_2.4_release_20110903
  • nettle_2.3_release_20110902
  • nettle_2.2_release_20110711
  • nettle_2.1_release_20100725
  • camellia_32bit_20100720
  • nettle_2.0_release_20090608
  • converted-lsh-2.0.4-branch-to-git
  • lsh_2.0.4_release_20070905
  • lsh_2.9_exp_release_20070404
  • nettle_1.15_release_20061128
  • after_experimental_merge_20060516
  • branch_before_experimental_merge_20060516
  • converted-experimental-branch-to-git
  • head_before_experimental_merge_20060516
  • lsh_2.0.3_release_20060509
  • lsh_2.0.2_release_20060127
  • nettle_1.14_release_20051205
  • nettle_1.13_release_20051006
28 results

tcpforward.h

Blame
  • tcpforward.h 2.56 KiB
    /* tcpforward.h
     *
     * $Id$
     */
    
    /* lsh, an implementation of the ssh protocol
     *
     * Copyright (C) 1998 Balázs Scheidler, Niels Möller
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation; either version 2 of the
     * License, or (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful, but
     * WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
     * General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    
    #ifndef LSH_TCPFORWARD_H_INCLUDED
    #define LSH_TCPFORWARD_H_INCLUDED
    
    #include "channel.h"
    #include "command.h"
    #include "io.h"
    #include "resource.h"
    #include "xalloc.h"
    
    #define GABA_DECLARE
    #include "tcpforward.h.x"
    #undef GABA_DECLARE
    
    /* GABA:
       (class
         (name forwarded_port)
         (vars
           ; this could store the type of this forward
           ; tcp, udp etc. Or we could invent relevant methods
           ; and subclasses.
           ; (type simple UINT32)
           
           (listen object address_info)))
    */
    
    /* GABA:
       (class
         (name local_port)
         (super forwarded_port)
         (vars
           ; socket == NULL means that we are setting up a forward for this port,
           ; but are not done yet.
           (socket object lsh_fd)))
    */
    
    /* Used by the client to keep track of remotely forwarded ports */
    /* GABA:
       (class
         (name remote_port)
         (super forwarded_port)
         (vars
           ; Invoked with the peer address_info as argument 
           (c object command_continuation)
           ; Invoked when a forwarded_tcpip request is received.
           ; Called with the struct address_info *peer as argument.
           (callback object command)))
    */
    
    struct remote_port *
    make_remote_port(struct address_info *listen,
    		 struct command *callback);
    
    struct ssh_channel *make_tcpip_channel(struct lsh_fd *socket, UINT32 initial_window);
    void tcpip_channel_start_io(struct ssh_channel *c);
    
    struct channel_open *
    make_channel_open_direct_tcpip(struct command *callback);
    
    extern struct channel_open channel_open_forwarded_tcpip;
    
    struct global_request *make_tcpip_forward_request(struct command *callback);
    
    #if 0
    struct global_request *make_cancel_tcpip_forward_request(void);
    #endif
    
    extern struct global_request tcpip_cancel_forward;
    
    #endif /* LSH_TCPFORWARD_H_INCLUDED */