ftp_server.c

来自「embedded_ethernet_complete_code_rabbit」· C语言 代码 · 共 36 行

C
36
字号
// FTP Server demo
// Creates two files, one for anonymous access and accessible only to a
// specified user.
// Enables users to download and upload files.

// This file and other embedded Ethernet and Internet code and resources are
// available from www.Lvr.com.

// Select a network configuration from \lib\tcpip\tcp_config.lib
// in the Dynamic C distribution.
#define TCPCONFIG 1

// Format the file system and reset the list of files in the user block.
// Execute this statement the first time the program runs,
// to put the file system in a known state.
#define FORMAT

// Enables file system 2 (FS2) support in the default functions for the file
// handler and enables clients to write files to the file system.
#define FTP_USE_FS2_HANDLERS

// The maximum number of files the file system can handle.
#define FS_MAX_FILES 50

// Specifies how many kilobytes of program Flash memory the file system can use.
#define FS2_USE_PROGRAM_FLASH 32

// Provides the servermask parameter for the sspec_addfsfile() function,
// which makes files available to the FTP server.
// SERVER_FTP specifies the FTP server.
// SERVER_WRITABLE enables authorized users to delete and overwrite files
// on the server.
#define FTP_CREATE_MASK SERVER_FTP | SERVER_WRITABLE

// A portion of the user block in memory holds a structure that associates
// the names of files with the files

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?