FtpClient.cc
Go to the documentation of this file.
507 debugs(9, DBG_IMPORTANT, "ERROR: Broken FTP Server at " << ctrl.conn->remote << ". Wrong accept code for EPSV");
531 debugs(9, DBG_IMPORTANT, "ERROR: Broken FTP Server at " << ctrl.conn->remote << ". 522 error missing protocol negotiation hints");
552 debugs(9, DBG_IMPORTANT, "WARNING: Server at " << ctrl.conn->remote << " sent unknown protocol negotiation hint: " << buf);
634 debugs(9, 3, "Listening for FTP data connection on port" << comm_local_port(data.conn->fd) << " or port?" << data.conn->local.port());
694 debugs(9, 5, "FTP Channel is IPv6 (" << ctrl.conn->remote << ") attempting EPSV 2 after EPSV ALL has failed.");
703 debugs(9, 5, "FTP Channel is IPv4 (" << ctrl.conn->remote << ") attempting EPSV 1 after EPSV ALL has failed.");
715 debugs(9, 5, "FTP Channel (" << ctrl.conn->remote << ") rejects EPSV connection attempts. Trying PASV instead.");
727 debugs(9, 5, "EPSV support manually disabled. Sending PASV for FTP Channel (" << ctrl.conn->remote <<")");
731 debugs(9, 5, "EPSV ALL manually enabled. Attempting with FTP Channel (" << ctrl.conn->remote <<")");
788 AsyncCall::Pointer callback = JobCallback(9, 3, Dialer, this, Ftp::Client::dataChannelConnected);
870 debugs(9, DBG_IMPORTANT, "ERROR: FTP command write failure: " << io.conn << ": " << xstrerr(io.xerrno));
1056 "; FD " << (ctrl.conn!=nullptr?ctrl.conn->fd:-1) << ", Data FD " << (data.conn!=nullptr?data.conn->fd:-1) << ", this " << this);
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:69
void comm_read(const Comm::ConnectionPointer &conn, char *buf, int len, AsyncCall::Pointer &callback)
Definition: Read.h:59
void error(char *format,...)
Definition: FilledChecklist.h:32
Definition: AsyncJob.h:32
virtual void sentRequestBody(const CommIoCbParams &io)=0
Definition: Client.cc:364
Definition: CommCalls.h:166
Definition: CommCalls.h:128
Definition: CommCalls.h:114
Definition: CommCalls.h:134
Definition: ConnOpener.h:25
Definition: DelayId.h:22
Definition: errorpage.h:89
struct ErrorState::@56 ftp
void close()
planned close: removes the close handler and calls comm_close
Definition: FtpClient.cc:107
void opened(const Comm::ConnectionPointer &conn, const AsyncCall::Pointer &aCloser)
called after the socket is opened, sets up close handler
Definition: FtpClient.cc:90
FTP client functionality shared among FTP Gateway and Relay clients.
Definition: FtpClient.h:111
virtual Http::StatusCode failedHttpStatus(err_type &error)
Definition: FtpClient.cc:311
bool handleEpsvReply(Ip::Address &remoteAddr)
Definition: FtpClient.cc:491
void scheduleReadControlReply(int buffered_ok)
Definition: FtpClient.cc:325
void sentRequestBody(const CommIoCbParams &io) override
Definition: FtpClient.cc:1076
bool handlePasvReply(Ip::Address &remoteAddr)
Definition: FtpClient.cc:455
void switchTimeoutToDataChannel()
Definition: FtpClient.cc:1065
void writeCommandCallback(const CommIoCbParams &io)
Definition: FtpClient.cc:855
void readControlReply(const CommIoCbParams &io)
Definition: FtpClient.cc:362
void doneSendingRequestBody() override
Definition: FtpClient.cc:1087
const Comm::ConnectionPointer & dataConnection() const override
Definition: FtpClient.cc:902
virtual void failed(err_type error=ERR_NONE, int xerrno=0, ErrorState *ftperr=nullptr)
handle a fatal transaction error, closing the control connection
Definition: FtpClient.cc:262
bool parseControlReply(size_t &bytesUsed)
Definition: FtpClient.cc:1101
AsyncCall::Pointer dataCloser()
creates a data channel Comm close callback
Definition: FtpClient.cc:802
void ctrlClosed(const CommCloseCbParams &io)
handler called by Comm when FTP control channel is closed unexpectedly
Definition: FtpClient.cc:879
virtual void dataChannelConnected(const CommConnectCbParams &io)=0
void abortAll(const char *reason) override
abnormal transaction termination; reason is for debugging only
Definition: FtpClient.cc:1053
virtual void dataClosed(const CommCloseCbParams &io)
handler called by Comm when FTP data channel is closed unexpectedly
Definition: FtpClient.cc:810
void noteDelayAwareReadChance() override
Definition: FtpClient.cc:908
SBuf verbose(const HttpRequestPointer &) const override
Definition: FtpClient.cc:81
Definition: FwdState.h:53
Comm::ConnectionPointer const & serverConnection() const
Definition: FwdState.h:104
struct IoStats::@75 Ftp
Definition: Address.h:41
Definition: MemBuf.h:24
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
Definition: Range.h:19
struct SquidConfig::@108 Ftp
struct SquidConfig::@107 accessList
struct SquidConfig::@93 Timeout
struct StatCounters::@123::@133 all
struct StatCounters::@123 server
struct StatCounters::@123::@133 ftp
static ErrorDetail::Pointer NewIfAny(const int errorNo)
Definition: SysErrorDetail.h:22
Definition: wordlist.h:20
int commSetConnTimeout(const Comm::ConnectionPointer &conn, time_t timeout, AsyncCall::Pointer &callback)
Definition: comm.cc:595
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:949
void comm_remove_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:978
int commUnsetConnTimeout(const Comm::ConnectionPointer &conn)
Definition: comm.cc:621
IoStats IOStats
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition: forward.h:25
void * memReallocBuf(void *buf, size_t net_size, size_t *gross_size)
Definition: minimal.cc:53
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
Definition: Write.cc:33
Definition: forward.h:24
bool ParseIpPort(const char *buf, const char *forceIp, Ip::Address &addr)
parses and validates "A1,A2,A3,A4,P1,P2" IP,port sequence
Definition: Parsing.cc:18
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63