00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PACKET_H_
00023 #define PACKET_H_
00024
00025
00026 typedef struct packet_struct {
00027 int valid;
00028 uint32_t len;
00029 uint8_t type;
00030 } PACKET;
00031
00033 enum ssh_packet_state_e {
00035 PACKET_STATE_INIT,
00037 PACKET_STATE_SIZEREAD,
00040 PACKET_STATE_PROCESSING
00041 };
00042
00043 int packet_send(ssh_session session);
00044
00045 #ifdef WITH_SSH1
00046 int packet_send1(ssh_session session) ;
00047 void ssh_packet_set_default_callbacks1(ssh_session session);
00048
00049 SSH_PACKET_CALLBACK(ssh_packet_disconnect1);
00050 SSH_PACKET_CALLBACK(ssh_packet_smsg_success1);
00051 SSH_PACKET_CALLBACK(ssh_packet_smsg_failure1);
00052 int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user);
00053
00054 #endif
00055
00056 SSH_PACKET_CALLBACK(ssh_packet_unimplemented);
00057 int ssh_packet_send_unimplemented(ssh_session session, uint32_t seqnum);
00058 int ssh_packet_parse_type(ssh_session session);
00059
00060
00061
00062 #endif