#include <FtpPI.h>
Public Member Functions | |
FtpPI () | |
virtual | ~FtpPI () |
OStatus | Initialize (const OID &myoid, const antStackRef &ipstack, void *index, OList< Passwd, MAX_LOGIN > *pass) |
void | ListenCont (TCPEndpointListenMsg *listenMsg) |
void | SendCont (TCPEndpointSendMsg *sendMsg) |
void | ReceiveCont (TCPEndpointReceiveMsg *receiveMsg) |
void | CloseCont (TCPEndpointCloseMsg *closeMsg) |
void | ListenContforDTP (TCPEndpointListenMsg *listenMsg) |
void | ConnectContforDTP (TCPEndpointConnectMsg *connectMsg) |
void | SendContforDTP (TCPEndpointSendMsg *sendMsg) |
void | ReceiveContforDTP (TCPEndpointReceiveMsg *receiveMsg) |
void | CloseContforDTP (TCPEndpointCloseMsg *closeMsg) |
OStatus | Close () |
Private Member Functions | |
OStatus | Listen () |
OStatus | Send (FTPReplyCode, char *format,...) |
OStatus | Receive () |
bool | RequestComplete () |
bool | RequestProcess () |
bool | CommandParser (char **cmd, char **param) |
Private Attributes | |
OID | myOID |
antStackRef | ipstackRef |
void * | continuation |
TCPConnection | connection |
FTPLoginState | state |
FtpDTP | ftpDTP |
IPAddress | ipaddr |
OList< Passwd, MAX_LOGIN > * | passwd |
Definition at line 22 of file FtpPI.h.
OStatus FtpPI::Close | ( | ) |
Definition at line 241 of file FtpPI.cc.
References FtpDTP::Close(), connection, CONNECTION_CLOSED, CONNECTION_CLOSING, continuation, TCPConnection::endpoint, ftpDTP, ipstackRef, myOID, and TCPConnection::state.
Referenced by ListenCont(), ReceiveCont(), RequestProcess(), and SendCont().
void FtpPI::CloseCont | ( | TCPEndpointCloseMsg * | closeMsg | ) |
Definition at line 261 of file FtpPI.cc.
References connection, CONNECTION_CLOSED, Listen(), and TCPConnection::state.
Referenced by TinyFTPD::CloseContforPI().
void FtpPI::CloseContforDTP | ( | TCPEndpointCloseMsg * | closeMsg | ) |
Definition at line 343 of file FtpPI.cc.
References FtpDTP::CloseCont(), and ftpDTP.
Referenced by TinyFTPD::CloseContforDTP().
bool FtpPI::CommandParser | ( | char ** | cmd, | |
char ** | param | |||
) | [private] |
Definition at line 32 of file FtpRequest.cc.
References connection, TCPConnection::recvData, SP, and toupper().
Referenced by RequestProcess().
void FtpPI::ConnectContforDTP | ( | TCPEndpointConnectMsg * | connectMsg | ) |
Definition at line 292 of file FtpPI.cc.
References FtpDTP::ConnectCont(), FTP_DATA_A, FTP_DATA_I, FTP_REPLY_OPEN_CONNECTION, ftpDTP, FtpDTP::GetFilename(), FtpDTP::GetType(), and Send().
Referenced by TinyFTPD::ConnectContforDTP().
OStatus FtpPI::Initialize | ( | const OID & | myoid, | |
const antStackRef & | ipstack, | |||
void * | index, | |||
OList< Passwd, MAX_LOGIN > * | pass | |||
) |
Definition at line 23 of file FtpPI.cc.
References connection, CONNECTION_CLOSED, continuation, FTP_BUFFER_SIZE, FTP_NOT_LOGIN, ftpDTP, FtpDTP::Initialize(), ipstackRef, Listen(), myOID, passwd, TCPConnection::recvBuffer, TCPConnection::recvData, TCPConnection::sendBuffer, TCPConnection::sendData, TCPConnection::state, and state.
OStatus FtpPI::Listen | ( | ) | [private] |
Definition at line 79 of file FtpPI.cc.
References connection, CONNECTION_CLOSED, CONNECTION_LISTENING, continuation, TCPConnection::endpoint, FTP_BUFFER_SIZE, FTP_LISTEN_PORT, ipstackRef, myOID, and TCPConnection::state.
Referenced by CloseCont(), and Initialize().
void FtpPI::ListenCont | ( | TCPEndpointListenMsg * | listenMsg | ) |
Definition at line 117 of file FtpPI.cc.
References Close(), connection, CONNECTION_CONNECTED, FTP_REPLY_SERVICE_READY, ipaddr, Receive(), TCPConnection::recvSize, Send(), and TCPConnection::state.
Referenced by TinyFTPD::ListenContforPI().
void FtpPI::ListenContforDTP | ( | TCPEndpointListenMsg * | listenMsg | ) |
Definition at line 270 of file FtpPI.cc.
References FTP_DATA_A, FTP_DATA_I, FTP_REPLY_OPEN_CONNECTION, ftpDTP, FtpDTP::GetFilename(), FtpDTP::GetType(), FtpDTP::ListenCont(), and Send().
Referenced by TinyFTPD::ListenContforDTP().
OStatus FtpPI::Receive | ( | ) | [private] |
Definition at line 186 of file FtpPI.cc.
References connection, CONNECTION_CONNECTED, CONNECTION_SENDING, continuation, TCPConnection::endpoint, FTP_BUFFER_SIZE, ipstackRef, myOID, TCPConnection::recvData, and TCPConnection::state.
Referenced by ListenCont(), ReceiveCont(), ReceiveContforDTP(), RequestProcess(), and SendContforDTP().
void FtpPI::ReceiveCont | ( | TCPEndpointReceiveMsg * | receiveMsg | ) |
Definition at line 204 of file FtpPI.cc.
References Close(), connection, FTP_BUFFER_SIZE, Receive(), TCPConnection::recvSize, RequestComplete(), and RequestProcess().
Referenced by TinyFTPD::ReceiveContforPI().
void FtpPI::ReceiveContforDTP | ( | TCPEndpointReceiveMsg * | receiveMsg | ) |
Definition at line 329 of file FtpPI.cc.
References connection, CONNECTION_RECEIVING, FTP_REPLY_CLOSE_DATA, FTP_REPLY_TRANSFER_ABORT, ftpDTP, FtpDTP::GetState(), Receive(), FtpDTP::ReceiveCont(), TCPConnection::recvSize, and Send().
Referenced by TinyFTPD::ReceiveContforDTP().
bool FtpPI::RequestComplete | ( | ) | [private] |
Definition at line 17 of file FtpRequest.cc.
References connection, CR, LF, TCPConnection::recvData, and TCPConnection::recvSize.
Referenced by ReceiveCont().
bool FtpPI::RequestProcess | ( | ) | [private] |
Definition at line 52 of file FtpRequest.cc.
References FtpDTP::ChangeDir(), Close(), CommandParser(), connection, continuation, FtpDTP::Delete(), TCPConnection::endpoint, FTP_DATA_A, FTP_DATA_I, FTP_GET_REQUEST, FTP_LOGIN, FTP_NOT_LOGIN, FTP_REPLY_BAD_SEQUENCE, FTP_REPLY_COMMAND_OK, FTP_REPLY_ENTER_PASSIVE, FTP_REPLY_FILE_ACTION_OK, FTP_REPLY_HELP_MESSAGE, FTP_REPLY_NEED_PASSWD, FTP_REPLY_NO_FILE, FTP_REPLY_NOT_AVAILABLE, FTP_REPLY_NOT_IMPLEMENT, FTP_REPLY_NOT_LOGIN, FTP_REPLY_NOT_TAKEN, FTP_REPLY_NOT_TOKEN, FTP_REPLY_PATH_CREATED, FTP_REPLY_REQUESTED_FILE, FTP_REPLY_SERVICE_CLOSE, FTP_REPLY_SYSTEM_TYPE, FTP_REPLY_UNKNOWN_COMMAND, FTP_REPLY_USER_LOGIN, ftpDTP, FtpDTP::GetDirectry(), FtpDTP::GetFilename(), FtpDTP::GetUser(), ipaddr, ipstackRef, FtpDTP::List(), FtpDTP::MakeDir(), MAX_STRING_LENGTH, myOID, passwd, Receive(), TCPConnection::recvSize, FtpDTP::RemoveDir(), FtpDTP::RenameFrom(), FtpDTP::RenameTo(), FtpDTP::ResetFilename(), FtpDTP::Retrieve(), Send(), TCPConnection::sendData, FtpDTP::SetHome(), FtpDTP::SetIP(), FtpDTP::SetPort(), FtpDTP::SetType(), FtpDTP::SetUser(), state, and FtpDTP::Store().
Referenced by ReceiveCont().
OStatus FtpPI::Send | ( | FTPReplyCode | , | |
char * | format, | |||
... | ||||
) | [private] |
Definition at line 142 of file FtpPI.cc.
References connection, CONNECTION_CONNECTED, CONNECTION_SENDING, continuation, TCPConnection::endpoint, ipstackRef, MAX_STRING_LENGTH, myOID, TCPConnection::sendData, TCPConnection::sendSize, and TCPConnection::state.
Referenced by ConnectContforDTP(), ListenCont(), ListenContforDTP(), ReceiveContforDTP(), RequestProcess(), and SendContforDTP().
void FtpPI::SendCont | ( | TCPEndpointSendMsg * | sendMsg | ) |
Definition at line 170 of file FtpPI.cc.
References Close(), connection, CONNECTION_CONNECTED, and TCPConnection::state.
Referenced by TinyFTPD::SendContforPI().
void FtpPI::SendContforDTP | ( | TCPEndpointSendMsg * | sendMsg | ) |
Definition at line 315 of file FtpPI.cc.
References connection, CONNECTION_SENDING, FTP_REPLY_CLOSE_DATA, FTP_REPLY_TRANSFER_ABORT, ftpDTP, FtpDTP::GetState(), Receive(), TCPConnection::recvSize, Send(), and FtpDTP::SendCont().
Referenced by TinyFTPD::SendContforDTP().
TCPConnection FtpPI::connection [private] |
Definition at line 56 of file FtpPI.h.
Referenced by Close(), CloseCont(), CommandParser(), Initialize(), Listen(), ListenCont(), Receive(), ReceiveCont(), ReceiveContforDTP(), RequestComplete(), RequestProcess(), Send(), SendCont(), and SendContforDTP().
void* FtpPI::continuation [private] |
Definition at line 55 of file FtpPI.h.
Referenced by Close(), Initialize(), Listen(), Receive(), RequestProcess(), and Send().
FtpDTP FtpPI::ftpDTP [private] |
Definition at line 58 of file FtpPI.h.
Referenced by Close(), CloseContforDTP(), ConnectContforDTP(), Initialize(), ListenContforDTP(), ReceiveContforDTP(), RequestProcess(), and SendContforDTP().
IPAddress FtpPI::ipaddr [private] |
antStackRef FtpPI::ipstackRef [private] |
Definition at line 54 of file FtpPI.h.
Referenced by Close(), Initialize(), Listen(), Receive(), RequestProcess(), and Send().
OID FtpPI::myOID [private] |
Definition at line 53 of file FtpPI.h.
Referenced by Close(), Initialize(), Listen(), Receive(), RequestProcess(), and Send().
OList<Passwd, MAX_LOGIN>* FtpPI::passwd [private] |
FTPLoginState FtpPI::state [private] |