Subversion Repositories Kolibri OS

Rev

Rev 3818 | Rev 3967 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3818 Rev 3821
Line 19... Line 19...
19
STATUS_CONNECTING       = 0
19
STATUS_CONNECTING       = 0
20
STATUS_CONNECTED        = 1
20
STATUS_CONNECTED        = 1
21
STATUS_NEEDPASSWORD     = 2
21
STATUS_NEEDPASSWORD     = 2
22
STATUS_LOGGED_IN        = 3
22
STATUS_LOGGED_IN        = 3
Line -... Line 23...
-
 
23
 
23
 
24
OPERATION_NONE          = 0
24
OPERATION_LIST          = 0
25
OPERATION_LIST          = 1
25
OPERATION_RETR          = 1
26
OPERATION_RETR          = 2
Line 26... Line 27...
26
OPERATION_STOR          = 2
27
OPERATION_STOR          = 3
27
 
28
 
28
use32
29
use32
29
; standard header
30
; standard header
Line 285... Line 286...
285
 
286
 
286
open_dataconnection:                    ; only passive for now..
287
open_dataconnection:                    ; only passive for now..
287
        cmp     [status], STATUS_LOGGED_IN
288
        cmp     [status], STATUS_LOGGED_IN
Line 288... Line -...
288
        jne     .fail
-
 
289
 
-
 
290
        mov     dword[s], "PASV"
289
        jne     .fail
291
        mov     word[s+4], 0x0a0d
290
 
Line 292... Line 291...
292
        mcall   send, [socketnum], s, 6, 0
291
        mcall   send, [socketnum], str_PASV, str_PASV.length, 0
293
        ret
292
        ret
294
 
293
 
Line 327... Line 326...
327
 
326
 
328
 
327
 
329
 
328
 
330
; data
329
; data
331
str_title       db 'FTP client',0
330
str_title       db 'FTP client',0
Line 332... Line 331...
332
str_welcome     db 'FTP client for KolibriOS v0.09',10
331
str_welcome     db 'FTP client for KolibriOS v0.10',10
333
                db 10
332
                db 10
Line 363... Line 362...
363
                db "retr      - retreive file from the server",10
362
                db "retr      - retreive file from the server",10
364
                db "rmd  - remove directory from the server",10
363
                db "rmd  - remove directory from the server",10
365
                db "stor      - store file on the server",10
364
                db "stor      - store file on the server",10
366
                db 10,0
365
                db 10,0
Line -... Line 366...
-
 
366
 
-
 
367
 
-
 
368
; FTP strings
-
 
369
 
-
 
370
str_PASV        db 'PASV',13,10
-
 
371
.length = $ - str_PASV
367
 
372
 
368
sockaddr1:
373
sockaddr1:
369
        dw AF_INET4
374
        dw AF_INET4
370
.port   dw 0x1500       ; 21
375
.port   dw 0x1500       ; 21
371
.ip     dd 0
376
.ip     dd 0