ftpserv.c File Reference

Go to the source code of this file.

Defines

#define CC_STRING   "GCC"
#define DBG_BAUDRATE   115200
#define USE_DHCP
#define MY_MAC   { 0x00, 0x06, 0x98, 0x30, 0x00, 0x35 }
#define MY_IPADDR   "192.168.192.35"
#define MY_IPMASK   "255.255.255.0"
#define MY_IPGATE   "192.168.192.1"
#define FTP_PORTNUM   21
#define FTPD_TIMEOUT   600000
#define TCPIP_BUFSIZ   5840
#define TCPIP_MSS   1460
#define FSDEV_NAME   "NONE"
#define MYTZ   -1
 Local timezone, -1 for Central Europe.
#define MYTIMED   "130.149.17.21"
 IP address of the host running a time daemon.

Functions

void FtpService (void)
void FtpThread (void *arg)
void InitDebugDevice (void)
int InitEthernetDevice (void)
int main (void)


Define Documentation

#define CC_STRING   "GCC"

Log
Revision 1.10 2008/01/31 09:38:15 haraldkipp Added return statement in main to avoid warnings with latest GCC.

Revision 1.9 2006/09/07 09:00:19 haraldkipp Discovery registration added. Enabled by default on ARM targets only to avoid blowing up AVR code.

Revision 1.8 2006/09/05 12:26:35 haraldkipp Added support for SAM9 MMC. DHCP enabled by default.

Revision 1.7 2006/08/31 19:15:30 haraldkipp Dummy file system name added to SAM9260 to let it pass the compiler. The application will not yet run on this platform.

Revision 1.6 2006/07/26 11:22:55 haraldkipp Added support for AT91SAM7X-EK.

Revision 1.4 2006/01/22 17:34:38 haraldkipp Added support for Ethernut 3, PHAT file system and realtime clock.

Revision 1.3 2005/04/19 08:51:26 haraldkipp Warn if not Ethernut 2

Revision 1.2 2005/02/07 19:05:23 haraldkipp ATmega 103 compile errors fixed

Revision 1.1 2005/02/05 20:32:57 haraldkipp First release

Examples:
ftpd/ftpserv.c, pppc/pppc.c, and tcps/tcps.c.

Definition at line 111 of file ftpserv.c.

Referenced by main().

#define DBG_BAUDRATE   115200

Examples:
ftpd/ftpserv.c.

Definition at line 130 of file ftpserv.c.

Referenced by InitDebugDevice().

#define USE_DHCP

Definition at line 136 of file ftpserv.c.

#define MY_MAC   { 0x00, 0x06, 0x98, 0x30, 0x00, 0x35 }

Examples:
ftpd/ftpserv.c, httpd/httpserv.c, inetq/inetq.c, and portdio/portdio.c.

Definition at line 150 of file ftpserv.c.

Referenced by InitEthernetDevice(), and main().

#define MY_IPADDR   "192.168.192.35"

Examples:
ftpd/ftpserv.c, and httpd/httpserv.c.

Definition at line 157 of file ftpserv.c.

Referenced by InitEthernetDevice(), and main().

#define MY_IPMASK   "255.255.255.0"

Examples:
ftpd/ftpserv.c, and httpd/httpserv.c.

Definition at line 164 of file ftpserv.c.

Referenced by InitEthernetDevice(), and main().

#define MY_IPGATE   "192.168.192.1"

Examples:
ftpd/ftpserv.c, and httpd/httpserv.c.

Definition at line 171 of file ftpserv.c.

Referenced by InitEthernetDevice(), and main().

#define FTP_PORTNUM   21

Examples:
ftpd/ftpserv.c.

Definition at line 183 of file ftpserv.c.

Referenced by FtpService().

#define FTPD_TIMEOUT   600000

Examples:
ftpd/ftpserv.c.

Definition at line 191 of file ftpserv.c.

Referenced by FtpService().

#define TCPIP_BUFSIZ   5840

Examples:
ftpd/ftpserv.c.

Definition at line 196 of file ftpserv.c.

Referenced by FtpService().

#define TCPIP_MSS   1460

Examples:
ftpd/ftpserv.c.

Definition at line 205 of file ftpserv.c.

Referenced by FtpService().

#define FSDEV_NAME   "NONE"

Examples:
ftpd/ftpserv.c.

Definition at line 247 of file ftpserv.c.

Referenced by main().

#define MYTZ   -1

Local timezone, -1 for Central Europe.

Examples:
ftpd/ftpserv.c, and logtime/logtime.c.

Definition at line 252 of file ftpserv.c.

Referenced by main().

#define MYTIMED   "130.149.17.21"

IP address of the host running a time daemon.

Examples:
ftpd/ftpserv.c, and logtime/logtime.c.

Definition at line 255 of file ftpserv.c.

Referenced by main().


Function Documentation

void FtpService ( void   ) 

Examples:
ftpd/ftpserv.c.

Definition at line 274 of file ftpserv.c.

References FTP_PORTNUM, FTPD_TIMEOUT, inet_ntoa(), NutFtpServerSession(), NutHeapAvailable, NutTcpAccept(), NutTcpCloseSocket(), NutTcpCreateSocket(), NutTcpSetSockOpt(), printf, puts, SO_RCVBUF, SO_RCVTIMEO, tcp_socket::so_remote_addr, TCP_MAXSEG, TCPIP_BUFSIZ, and TCPIP_MSS.

Referenced by FtpThread(), and main().

void FtpThread ( void *  arg  ) 

Examples:
ftpd/ftpserv.c.

Definition at line 327 of file ftpserv.c.

References FtpService().

Referenced by main().

void InitDebugDevice ( void   ) 

Examples:
ftpd/ftpserv.c.

Definition at line 338 of file ftpserv.c.

References _fileno(), _ioctl(), DBG_BAUDRATE, DEV_DEBUG, DEV_DEBUG_NAME, freopen(), NutRegisterDevice(), stdout, and UART_SETSPEED.

Referenced by main().

int InitEthernetDevice ( void   ) 

Examples:
ftpd/ftpserv.c.

Definition at line 352 of file ftpserv.c.

References DEV_ETHER, DEV_ETHER_NAME, inet_addr(), MY_IPADDR, MY_IPGATE, MY_IPMASK, MY_MAC, NutDhcpIfConfig(), NutIpRouteAdd(), NutNetIfConfig(), NutRegisterDevice(), printf, and puts.

Referenced by main().

int main ( void   ) 

Definition at line 482 of file ftpserv.c.

References _O_BINARY, _O_RDWR, _open(), CC_STRING, _CONFNET::cdn_ip_addr, _CONFNET::cdn_ip_mask, confnet, DISF_INITAL_ANN, FSDEV_NAME, FtpService(), FtpThread(), inet_ntoa(), InitDebugDevice(), InitEthernetDevice(), localtime(), NutIpRouteQuery(), NutRegisterDevice(), NutRegisterDiscovery(), NutRegisterFtpRoot(), NutThreadCreate(), NutVersionString(), NutWinsNameQuery(), printf, puts, time(), _tm::tm_hour, _tm::tm_mday, _tm::tm_min, _tm::tm_mon, _tm::tm_sec, and _tm::tm_year.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/