version 1.12, 2000/05/03 18:03:06 |
version 1.12.2.2, 2000/09/01 18:23:18 |
|
|
/* RCSID("$Id$"); */ |
/* RCSID("$OpenBSD$"); */ |
|
|
#ifndef CHANNELS_H |
#ifndef CHANNELS_H |
#define CHANNELS_H |
#define CHANNELS_H |
|
|
* Data structure for channel data. This is iniailized in channel_allocate |
* Data structure for channel data. This is iniailized in channel_allocate |
* and cleared in channel_free. |
* and cleared in channel_free. |
*/ |
*/ |
|
struct Channel; |
|
typedef struct Channel Channel; |
|
|
typedef void channel_callback_fn(int id, void *arg); |
typedef void channel_callback_fn(int id, void *arg); |
|
typedef int channel_filter_fn(struct Channel *c, char *buf, int len); |
|
|
typedef struct Channel { |
struct Channel { |
int type; /* channel type/state */ |
int type; /* channel type/state */ |
int self; /* my own channel identifier */ |
int self; /* my own channel identifier */ |
int remote_id; /* channel identifier for remote peer */ |
int remote_id; /* channel identifier for remote peer */ |
|
|
void *cb_arg; |
void *cb_arg; |
int cb_event; |
int cb_event; |
channel_callback_fn *dettach_user; |
channel_callback_fn *dettach_user; |
} Channel; |
|
|
|
|
/* filter */ |
|
channel_filter_fn *input_filter; |
|
}; |
|
|
#define CHAN_EXTENDED_IGNORE 0 |
#define CHAN_EXTENDED_IGNORE 0 |
#define CHAN_EXTENDED_READ 1 |
#define CHAN_EXTENDED_READ 1 |
#define CHAN_EXTENDED_WRITE 2 |
#define CHAN_EXTENDED_WRITE 2 |
|
|
void channel_request_start(int id, char *service, int wantconfirm); |
void channel_request_start(int id, char *service, int wantconfirm); |
void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); |
void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); |
void channel_register_cleanup(int id, channel_callback_fn *fn); |
void channel_register_cleanup(int id, channel_callback_fn *fn); |
|
void channel_register_filter(int id, channel_filter_fn *fn); |
void channel_cancel_cleanup(int id); |
void channel_cancel_cleanup(int id); |
Channel *channel_lookup(int id); |
Channel *channel_lookup(int id); |
|
|
|
|
char *auth_get_socket_name(void); |
char *auth_get_socket_name(void); |
|
|
/* |
/* |
* This if called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server. |
* This is called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server. |
* This starts forwarding authentication requests. |
* This starts forwarding authentication requests. |
*/ |
*/ |
void auth_input_request_forwarding(struct passwd * pw); |
int auth_input_request_forwarding(struct passwd * pw); |
|
|
/* This is called to process an SSH_SMSG_AGENT_OPEN message. */ |
/* This is called to process an SSH_SMSG_AGENT_OPEN message. */ |
void auth_input_open_request(int type, int plen); |
void auth_input_open_request(int type, int plen); |