Elements.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_FTP_ELEMENTS_H
10#define SQUID_FTP_ELEMENTS_H
11
12#include "http/forward.h"
13#include "http/StatusCode.h"
14#include "sbuf/forward.h"
15
16namespace AnyP
17{
18class ProtocolVersion;
19}
20
21namespace Ftp
22{
23
26
28HttpReply *HttpReplyWrapper(const int ftpStatus, const char *ftpReason, const Http::StatusCode httpStatus, const int64_t clen);
29
30/* FTP Commands used by Squid. ALLCAPS case. Safe for static initializaton. */
31const SBuf &cmdAppe();
32const SBuf &cmdAuth();
33const SBuf &cmdCwd();
34const SBuf &cmdDele();
35const SBuf &cmdEprt();
36const SBuf &cmdEpsv();
37const SBuf &cmdList();
38const SBuf &cmdMkd();
39const SBuf &cmdMlsd();
40const SBuf &cmdMlst();
41const SBuf &cmdNlst();
42const SBuf &cmdRetr();
43const SBuf &cmdRmd();
44const SBuf &cmdRnfr();
45const SBuf &cmdRnto();
46const SBuf &cmdSmnt();
47const SBuf &cmdStat();
48const SBuf &cmdStor();
49const SBuf &cmdStou();
50const SBuf &cmdUser();
51
53inline bool Is1xx(const int sc) { return Http::scContinue <= sc && sc < Http::scOkay; }
54
55} // namespace Ftp
56
57#endif /* SQUID_FTP_ELEMENTS_H */
58
Definition: SBuf.h:94
Definition: forward.h:15
Definition: forward.h:28
bool Is1xx(const int sc)
whether this is an informational 1xx response status code
Definition: Elements.h:53
const SBuf & cmdAppe()
Definition: Elements.cc:56
AnyP::ProtocolVersion ProtocolVersion()
Protocol version to use in Http::Message structures wrapping FTP messages.
Definition: Elements.cc:24
const SBuf & cmdDele()
Definition: Elements.cc:77
const SBuf & cmdEpsv()
Definition: Elements.cc:91
const SBuf & cmdSmnt()
Definition: Elements.cc:161
const SBuf & cmdStou()
Definition: Elements.cc:182
const SBuf & cmdStor()
Definition: Elements.cc:175
const SBuf & cmdMlsd()
Definition: Elements.cc:112
const SBuf & cmdList()
Definition: Elements.cc:98
const SBuf & cmdRetr()
Definition: Elements.cc:133
const SBuf & cmdNlst()
Definition: Elements.cc:126
const SBuf & cmdMlst()
Definition: Elements.cc:119
const SBuf & cmdStat()
Definition: Elements.cc:168
const SBuf & cmdAuth()
Definition: Elements.cc:63
const SBuf & cmdCwd()
Definition: Elements.cc:70
const SBuf & cmdEprt()
Definition: Elements.cc:84
const SBuf & cmdRnto()
Definition: Elements.cc:154
const SBuf & cmdMkd()
Definition: Elements.cc:105
const SBuf & cmdUser()
Definition: Elements.cc:189
HttpReply * HttpReplyWrapper(const int ftpStatus, const char *ftpReason, const Http::StatusCode httpStatus, const int64_t clen)
Create an internal HttpReply structure to house FTP control response info.
Definition: Elements.cc:30
const SBuf & cmdRnfr()
Definition: Elements.cc:147
const SBuf & cmdRmd()
Definition: Elements.cc:140
StatusCode
Definition: StatusCode.h:20
@ scOkay
Definition: StatusCode.h:26
@ scContinue
Definition: StatusCode.h:22
static int sc[16]
Definition: smbdes.c:121

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors