Commit 92c4f5b5 authored by Niels Möller's avatar Niels Möller
Browse files

*** empty log message ***

Rev: doc/HACKING:1.11
Rev: doc/TODO:1.51
Rev: src/tcpforward.h:1.10
Rev: src/tcpforward_commands.h:1.3
parent 14b915b1
......@@ -407,3 +407,25 @@ These are short names of fairly abstract types.
These are names of packet handlers. There's no common suffix for
packet handler types; perhaps there should be.
Types that inherit command or command_continuation should have a
_command or _continuation prefix. Below, TYPE stands for a type name,
and METHOD for the name one of its methods.
The constructor function for a TYPE should be make_TYPE(). Functions
implementing its methods should be do_TYPE_METHOD. Except for
closure-like objects, i.e. objects with essentially only one method,
where the method implementation is do_TYPE. The do_* functions are not
intended to be called directly; they are only installed in objects'
method pointers. Most of them, but not all, are declared static.
Functions related to the collect_info-mechanism have a collect_
prefix. They take and return arguments of type struct lsh_object *,
and do typechecking at run time.
At last we have the functions generated by /* GABA: (expr ...) */
constructions. The naming of these is currently very inconsistent.
Perhaps it would make sense to use a expr_ prefix on all these
functions.
......@@ -248,3 +248,12 @@ write on a connection. When the limit is exceeded, the connection
should be dropped. The problem: if a client connects and sends a lot
of packets, without ever reading anything from its socket, the server
will eventually run out of memory.
Consider removing the write-attribute from ssh_channel.
Try to get rid of some of the LSH_*-status codes, in particular
LSH_CHANNEL_READY_REC. Use functions instead. The reason is that the
function that wants to start receiving is not necessaily called from
the functions in channel.c, and therefore the status code doesn't pass
through channel_process_status().
......@@ -74,7 +74,7 @@ struct remote_port *
make_remote_port(struct address_info *listen,
struct command *callback);
struct ssh_channel *make_tcpip_channel(struct io_fd *socket);
struct ssh_channel *make_tcpip_channel(struct io_fd *socket, UINT32 max_window);
void tcpip_channel_start_io(struct ssh_channel *c);
struct channel_open *
......@@ -90,12 +90,4 @@ struct global_request *make_cancel_tcpip_forward_request(void);
extern struct global_request tcpip_cancel_forward;
struct command *forward_local_port(struct io_backend *backend,
struct address_info *local,
struct address_info *target);
struct command *forward_remote_port(struct io_backend *backend,
struct address_info *local,
struct address_info *target);
#endif /* LSH_TCPFORWARD_H_INCLUDED */
......@@ -54,11 +54,20 @@ make_remote_listen_value(struct channel_open_callback *c,
}
#endif
/* FIXME: The naming is inconsistent */
struct command *
make_forward_local_port(struct io_backend *backend,
struct address_info *local,
struct address_info *target);
struct command *
make_forward_remote_port(struct io_backend *backend,
struct address_info *local,
struct address_info *target);
struct command *
make_direct_tcpip_hook(struct io_backend *backend);
struct command *
tcpip_forward_hook(struct io_backend *backend);
make_tcpip_forward_hook(struct io_backend *backend);
#endif /* LSH_TCPFORWARD_COMMANDS_H_INCLUDED */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment