diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-09-26 14:05:58 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-09-26 14:05:58 +0200 |
commit | cd7f6bea573e345ac01e0c5226a3fa27ca83e2a8 (patch) | |
tree | f5760ca5f8bc63e6da0e93ae0b3fe53bc64085f0 /include/libssh/messages.h | |
parent | c3dc60103f03142873bdb78d112adbe423c94c2e (diff) | |
download | libssh-cd7f6bea573e345ac01e0c5226a3fa27ca83e2a8.tar.gz libssh-cd7f6bea573e345ac01e0c5226a3fa27ca83e2a8.tar.xz libssh-cd7f6bea573e345ac01e0c5226a3fa27ca83e2a8.zip |
more priv.h splitting
Diffstat (limited to 'include/libssh/messages.h')
-rw-r--r-- | include/libssh/messages.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/include/libssh/messages.h b/include/libssh/messages.h new file mode 100644 index 00000000..0eb7b64f --- /dev/null +++ b/include/libssh/messages.h @@ -0,0 +1,84 @@ +/* + * This file is part of the SSH Library + * + * Copyright (c) 2009 by Aris Adamantiadis + * + * The SSH Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The SSH Library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the SSH Library; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#ifndef MESSAGES_H_ +#define MESSAGES_H_ + +#include "config.h" + +struct ssh_auth_request { + char *username; + int method; + char *password; + struct ssh_public_key_struct *public_key; + char signature_state; +}; + +struct ssh_channel_request_open { + int type; + uint32_t sender; + uint32_t window; + uint32_t packet_size; + char *originator; + uint16_t originator_port; + char *destination; + uint16_t destination_port; +}; + +struct ssh_service_request { + char *service; +}; + +struct ssh_channel_request { + int type; + ssh_channel channel; + uint8_t want_reply; + /* pty-req type specifics */ + char *TERM; + uint32_t width; + uint32_t height; + uint32_t pxwidth; + uint32_t pxheight; + ssh_string modes; + + /* env type request */ + char *var_name; + char *var_value; + /* exec type request */ + char *command; + /* subsystem */ + char *subsystem; +}; + +struct ssh_message_struct { + ssh_session session; + int type; + struct ssh_auth_request auth_request; + struct ssh_channel_request_open channel_request_open; + struct ssh_channel_request channel_request; + struct ssh_service_request service_request; +}; + + +void message_handle(ssh_session session, uint32_t type); +int ssh_execute_message_callbacks(ssh_session session); + +#endif /* MESSAGES_H_ */ |