/* ftpdLib.c - File Transfer Protocol (FTP) server */
/* Copyright 1990 - 1998 Wind River Systems, Inc. */
#include "copyright_wrs.h"
/*
modification history
--------------------
03d,03dec98,lrn added default home dir control (SPR#23554)
removed dependency on usrLib (SPR#23536)
03c,29sep98,lrn creqated DosFs 2.0 branch for T2.0, verified fix for SPR#20828
03b,14jul98,lrn SPR#6647: adding notes on text file to description
03a,25may98,lrn anonymous access with root dir and upload dir
connection timeout, default mode Binary
enhance transfer rate: bufSize now same as winSize
mget "*" support with wildcards, rework directory travel
standardized directory listing to work with GUI clients
simplified error handling in main loop, to make code smaller
fixed: ASCII transfer of binary files breaks connection
02n,17may98,lrn merged previous additions with SENS source
added support for delete, rename, mkdir and rmdir,
added non-standard service port
02m,05dec97,spm upgraded server shutdown routine to terminate active
sessions (SPR #9906); corrected response for PASV command
to include valid IP address (SPR #1318); modified syntax
of PASV command (SPR #5627); corrected handling of PORT
command to support multiple interfaces (SPR #3500); added
support for maximum number of connections (SPR #2032);
applied changes for configurable password authentication
from SENS branch (SPR #8602); removed incorrect note from
man page concerning user/password verification, which was
actually performed (SPR #7672); general cleanup (reorganized
code, added FTP responses for error conditions, replaced
"static" with LOCAL keyword in function declarations)
02l,09jul97,dgp doc: add note on UID and password per SPR 7672
02k,06feb97,jdi made drawing internal.
02j,30sep96,spm partial fix for spr #7227. Added support for deleting files
and using relative pathnames when listing directories.
02i,05aug96,sgv fix for spr #3583 and spr #5920. Provide login security
for VxWorks login
02h,21may96,sgv Added global variable ftpdWindowSize which can be set by
the user. the server would set the window size after the
connection is established.
02g,29mar95,kdl changed ftpdDirListGet() to use ANSI time format in stat.
02f,11feb95,jdi doc format tweak.
02e,20aug93,jag Fixed memory leak by calling fclose (SPR #2194)
Changed ftpdWorkTask Command Read Logic, Added error checking
on write calls to the network and file operations.
Added case-conversion changes (SPR #2035)
02d,20aug93,jmm Changed ioctl.h and socket.h to sys/ioctl.h and sys/socket.h
02c,27feb93,kdl Removed 01z case-conversion changes (SPR #2035).
02b,05feb93,jag Changed call to inet_ntoa to inet_ntoa_b. SPR# 1814
02a,20jan93,jdi documentation cleanup for 5.1.
01z,09sep92,jmm fixed spr 1568, ftpd now recognizes lower case commands
changed errnoGet() to errno to get rid of warning message
01y,19aug92,smb Changed systime.h to sys/times.h.
01x,16jun92,kdl increased slot buffer to hold null terminator; use calloc()
to allocate slot struct (SPR #1509).
01w,26may92,rrr the tree shuffle
-changed includes to have absolute path from h/
01v,08apr92,jmm cleaned up some ansi warnings
01u,18dec91,rrr removed a recursive macro (killed the mips compiler)
01t,10dec91,gae ANSI cleanup. Changed ftpdSlotSem to an Id so that internal
routine semTerminate() not used.
01s,19nov91,rrr shut up some ansi warnings.
01r,14nov91,rrr shut up some warnings
01q,12nov91,wmd fixed bug in ftpdDataStreamSend() and ftpdDataStreamReceive(),
EOF is cast to type char to prevent endless looping.
01p,04oct91,rrr passed through the ansification filter
-changed functions to ansi style
-changed includes to have absolute path from h/
-changed VOID to void
-changed copyright notice
01o,10jul91,gae i960 fixes: non-varargs usage, added ntohs(). added HELP
command, changed listing to support NFS/DOS not old style.
01n,30apr91,jdi documentation tweaks.
01m,05apr91,jdi documentation -- removed header parens and x-ref numbers;
doc review by dnw.
01l,12feb91,jaa documentation.
01k,08oct90,hjb included "inetLib.h".
01j,05oct90,dnw made ftpdWorkTask() be LOCAL.
documentation tweaks.
01i,02oct90,hjb deleted "inet.h". added more doc to ftpdInit(). added a call
to htons() where needed.
01h,18sep90,kdl removed erroneous forward declaration of "ftpDataStreamRecv()".
01g,10aug90,dnw added forward declaration of ftpdDataStreamReceive().
01f,10aug90,kdl added forward declarations for functions returning void.
01e,26jun90,jcf changed ftpd semaphore to static mutex.
01d,07may90,hjb various bug fixes -- too numerous to mention.
01c,17apr90,jcf changed ftpd work task name to tFtpd...
01b,11apr90,hjb de-linted
01a,01mar90,hjb written
*/
/*
DESCRIPTION
This library implements the server side of the File Transfer Protocol (FTP),
which provides remote access to the file systems available on a target.
The protocol is defined in RFC 959. This implementation supports all commands
required by that specification, as well as several additional commands.
USER INTERFACE
During system startup, the ftpdInit() routine creates a control connection
at the predefined FTP server port which is monitored by the primary FTP
task. Each FTP session established is handled by a secondary server task
created as necessary. The server accepts the following commands:
.TS
tab(|);
l1 l.
HELP | - List supported commands.
USER | - Verify user name.
PASS | - Verify password for the user.
QUIT | - Quit the session.
LIST | - List out contents of a directory.
NLST | - List directory contents using a concise format.
RETR | - Retrieve a file.
STOR | - Store a file.
CWD | - Change working directory.
XCWD | - Change working directory.
CDUP | - Change to parent directory.
XCUP | - Change to parent directory.
TYPE | - Change the data representation type.
PORT | - Change the port number.
PWD | - Get the name of current working directory.
XPWD | - Get the name of current working directory.
STRU | - Change file structure settings.
MODE | - Change file transfer mode.
ALLO | - Reserver sufficient storage.
ACCT | - Identify the user's account.
PASV | - Make the server listen on a port for data connection.
NOOP | - Do nothing.
DELE | - Delete a file
MKD | - Make a directory
XMKD | - Make a directory
RMD | - Remove a directory
XRMD | - Remove a directory
RNFR | - File to rename
RNTO | - a new name for a file that is being renamed
SIZE | - get file size in bytes
MDTM | - get file modification date and time
SYST | - report type of operating system
.TE
The ftpdDelete() routine will disable the FTP server until restarted.
It reclaims all system resources used by the server tasks and cleanly
terminates all active sessions.
This FTP server optionally offers client login via loginLib, or any
other custom user and password verification mechanism, which is
introduced to the FTP server by calling ftpdLoginInstall(). Also,
"anonymous" guest access may be optionally enabled with
ftpdAnonymousAllow(), which imposes certain access restrictions on the
guest client, namely access may be restriced to a certain subdirectory
on the disk, and the access is restirected to read-only, except a
specified directory which is allowed for read-write access.
Please note that if ftpdLoginInstall() is not called, the FTP server will
accept any client, which may potentially cause a security problem, hence if
there is no user login mechanism used, then at least "anonymous"
没有合适的资源?快使用搜索试试~ 我知道了~
Vxworks 9200BSP
共178个文件
h:90个
c:62个
bat:12个
需积分: 10 8 下载量 159 浏览量
2011-09-23
18:27:18
上传
评论
收藏 708KB RAR 举报
温馨提示
Vxworks 9200BSP Vxworks 9200BSP Vxworks 9200BSP
资源推荐
资源详情
资源评论
收起资源包目录
Vxworks 9200BSP (178个子文件)
BOOTROM.bat 291B
BOOTROM.bat 291B
BOOTROM.bat 291B
BOOTROM.bat 291B
VxWorks.bat 281B
VxWorks.bat 281B
VxWorks.bat 281B
VxWorks.bat 281B
CleanAll.bat 267B
CleanAll.bat 267B
CleanAll.bat 267B
CleanAll.bat 267B
bootrom_uncmp.bin 393KB
bootrom_uncmp.bin 393KB
ftpdLib.c 97KB
ftpdLib.c 97KB
AT91emacend.c 50KB
AT91emacend.c 50KB
AT91emacend.c 50KB
AT91emacend.c 50KB
sysLib.c 21KB
sysLib.c 21KB
sysLib.c 21KB
sysLib.c 21KB
at91VXWTimer.c 18KB
at91VXWTimer.c 18KB
at91VXWTimer.c 18KB
at91VXWTimer.c 18KB
at91uart.c 17KB
at91uart.c 17KB
at91uart.c 17KB
at91uart.c 17KB
sysTffs.c 17KB
sysTffs.c 17KB
at91DBGU.c 16KB
at91DBGU.c 16KB
at91DBGU.c 16KB
at91DBGU.c 16KB
AT91twi.c 13KB
AT91twi.c 13KB
AT91twi.c 13KB
AT91twi.c 13KB
tffsConfig.c 12KB
tffsConfig.c 12KB
sst39vf160.c 9KB
sst39vf160.c 9KB
at91pdc.c 6KB
at91pdc.c 6KB
at91pdc.c 6KB
at91pdc.c 6KB
at91IntrCtl.c 6KB
at91IntrCtl.c 6KB
at91IntrCtl.c 6KB
at91IntrCtl.c 6KB
sysSerial.c 5KB
sysSerial.c 5KB
sysSerial.c 5KB
sysSerial.c 5KB
at91pio.c 3KB
at91pio.c 3KB
at91pio.c 3KB
at91pio.c 3KB
romInit_C.c 3KB
romInit_C.c 3KB
romInit_C.c 3KB
romInit_C.c 3KB
initCrtn.c 3KB
initCrtn.c 3KB
at91pmc.c 754B
at91pmc.c 754B
at91pmc.c 754B
at91pmc.c 754B
at91systimer.c 572B
at91systimer.c 572B
at91systimer.c 572B
at91systimer.c 572B
at91emac.h 9KB
at91emac.h 9KB
at91emac.h 9KB
at91emac.h 9KB
config.h 8KB
config.h 8KB
config.h 8KB
config.h 8KB
at91timerall.h 7KB
at91timerall.h 7KB
at91timerall.h 7KB
at91timerall.h 7KB
at91uart.h 7KB
at91uart.h 7KB
at91uart.h 7KB
at91uart.h 7KB
at91pio.h 7KB
at91pio.h 7KB
at91pio.h 7KB
at91pio.h 7KB
at91intrctl.h 5KB
at91intrctl.h 5KB
at91intrctl.h 5KB
at91intrctl.h 5KB
共 178 条
- 1
- 2
资源评论
chenxiuyuan_2000
- 粉丝: 0
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功