Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/ttssh2/ttxssh/ed25519_crypto_api.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4928 - (hide annotations) (download) (as text)
Thu May 3 14:39:47 2012 UTC (11 years, 11 months ago) by yutakapon
Original Path: trunk/ttssh2/ttxssh/sftp.h
File MIME type: text/x-chdr
File size: 3723 byte(s)
- SFTP実装のため、バッファ操作関数の整理。
- SFTPバージョン交換まで実装確認。

1 maya 3227 /*
2 yutakapon 4926 Copyright (c) 2008-2012 TeraTerm Project
3 maya 3227 All rights reserved.
4    
5     Redistribution and use in source and binary forms, with or without modification,
6     are permitted provided that the following conditions are met:
7    
8 yutakapon 4926 1. Redistributions of source code must retain the above copyright notice,
9     this list of conditions and the following disclaimer.
10     2. Redistributions in binary form must reproduce the above copyright notice,
11     this list of conditions and the following disclaimer in the documentation
12     and/or other materials provided with the distribution.
13     3. The name of the author may not be used to endorse or promote products derived
14     from this software without specific prior written permission.
15 maya 3227
16 yutakapon 4926 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
17     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19     DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20     BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
21     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
24     OF SUCH DAMAGE.
25 maya 3227 */
26    
27     #ifndef __SFTP_H
28     #define __SFTP_H
29    
30     // for debug mode
31     #ifdef _DEBUG
32     #define SFTP_DEBUG
33     #endif
34    
35 yutakapon 4926 /* version */
36     #define SSH2_FILEXFER_VERSION 3
37 maya 3227
38 yutakapon 4926 /* client to server */
39     #define SSH2_FXP_INIT 1
40     #define SSH2_FXP_OPEN 3
41     #define SSH2_FXP_CLOSE 4
42     #define SSH2_FXP_READ 5
43     #define SSH2_FXP_WRITE 6
44     #define SSH2_FXP_LSTAT 7
45     #define SSH2_FXP_STAT_VERSION_0 7
46     #define SSH2_FXP_FSTAT 8
47     #define SSH2_FXP_SETSTAT 9
48     #define SSH2_FXP_FSETSTAT 10
49     #define SSH2_FXP_OPENDIR 11
50     #define SSH2_FXP_READDIR 12
51     #define SSH2_FXP_REMOVE 13
52     #define SSH2_FXP_MKDIR 14
53     #define SSH2_FXP_RMDIR 15
54     #define SSH2_FXP_REALPATH 16
55     #define SSH2_FXP_STAT 17
56     #define SSH2_FXP_RENAME 18
57     #define SSH2_FXP_READLINK 19
58     #define SSH2_FXP_SYMLINK 20
59    
60     /* server to client */
61     #define SSH2_FXP_VERSION 2
62     #define SSH2_FXP_STATUS 101
63     #define SSH2_FXP_HANDLE 102
64     #define SSH2_FXP_DATA 103
65     #define SSH2_FXP_NAME 104
66     #define SSH2_FXP_ATTRS 105
67    
68     #define SSH2_FXP_EXTENDED 200
69     #define SSH2_FXP_EXTENDED_REPLY 201
70    
71     /* attributes */
72     #define SSH2_FILEXFER_ATTR_SIZE 0x00000001
73     #define SSH2_FILEXFER_ATTR_UIDGID 0x00000002
74     #define SSH2_FILEXFER_ATTR_PERMISSIONS 0x00000004
75     #define SSH2_FILEXFER_ATTR_ACMODTIME 0x00000008
76     #define SSH2_FILEXFER_ATTR_EXTENDED 0x80000000
77    
78     /* portable open modes */
79     #define SSH2_FXF_READ 0x00000001
80     #define SSH2_FXF_WRITE 0x00000002
81     #define SSH2_FXF_APPEND 0x00000004
82     #define SSH2_FXF_CREAT 0x00000008
83     #define SSH2_FXF_TRUNC 0x00000010
84     #define SSH2_FXF_EXCL 0x00000020
85    
86     /* statvfs@openssh.com f_flag flags */
87     #define SSH2_FXE_STATVFS_ST_RDONLY 0x00000001
88     #define SSH2_FXE_STATVFS_ST_NOSUID 0x00000002
89    
90     /* status messages */
91     #define SSH2_FX_OK 0
92     #define SSH2_FX_EOF 1
93     #define SSH2_FX_NO_SUCH_FILE 2
94     #define SSH2_FX_PERMISSION_DENIED 3
95     #define SSH2_FX_FAILURE 4
96     #define SSH2_FX_BAD_MESSAGE 5
97     #define SSH2_FX_NO_CONNECTION 6
98     #define SSH2_FX_CONNECTION_LOST 7
99     #define SSH2_FX_OP_UNSUPPORTED 8
100     #define SSH2_FX_MAX 8
101    
102 yutakapon 4928 /* Maximum packet that we are willing to send/accept */
103     #define SFTP_MAX_MSG_LENGTH (256 * 1024)
104 yutakapon 4926
105     void sftp_do_init(PTInstVar pvar, Channel_t *c);
106     void sftp_response(PTInstVar pvar, Channel_t *c, unsigned char *data, unsigned int buflen);
107    
108 maya 3227 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26