Elements.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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_SRC_FTP_ELEMENTS_H
10 #define SQUID_SRC_FTP_ELEMENTS_H
11 
12 #include "http/forward.h"
13 #include "http/StatusCode.h"
14 #include "sbuf/forward.h"
15 
16 namespace AnyP
17 {
18 class ProtocolVersion;
19 }
20 
21 namespace Ftp
22 {
23 
26 
28 HttpReply *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. */
31 const SBuf &cmdAppe();
32 const SBuf &cmdAuth();
33 const SBuf &cmdCwd();
34 const SBuf &cmdDele();
35 const SBuf &cmdEprt();
36 const SBuf &cmdEpsv();
37 const SBuf &cmdList();
38 const SBuf &cmdMkd();
39 const SBuf &cmdMlsd();
40 const SBuf &cmdMlst();
41 const SBuf &cmdNlst();
42 const SBuf &cmdRetr();
43 const SBuf &cmdRmd();
44 const SBuf &cmdRnfr();
45 const SBuf &cmdRnto();
46 const SBuf &cmdSmnt();
47 const SBuf &cmdStat();
48 const SBuf &cmdStor();
49 const SBuf &cmdStou();
50 const SBuf &cmdUser();
51 
53 inline bool Is1xx(const int sc) { return Http::scContinue <= sc && sc < Http::scOkay; }
54 
55 } // namespace Ftp
56 
57 #endif /* SQUID_SRC_FTP_ELEMENTS_H */
58 
const SBuf & cmdEpsv()
Definition: Elements.cc:91
bool Is1xx(const int sc)
whether this is an informational 1xx response status code
Definition: Elements.h:53
AnyP::ProtocolVersion ProtocolVersion()
Protocol version to use in Http::Message structures wrapping FTP messages.
Definition: Elements.cc:24
const SBuf & cmdMlst()
Definition: Elements.cc:119
const SBuf & cmdAppe()
Definition: Elements.cc:56
Definition: SBuf.h:93
const SBuf & cmdRmd()
Definition: Elements.cc:140
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 & cmdStat()
Definition: Elements.cc:168
StatusCode
Definition: StatusCode.h:20
Definition: forward.h:23
const SBuf & cmdRnfr()
Definition: Elements.cc:147
const SBuf & cmdList()
Definition: Elements.cc:98
Definition: forward.h:14
const SBuf & cmdUser()
Definition: Elements.cc:189
const SBuf & cmdRnto()
Definition: Elements.cc:154
const SBuf & cmdCwd()
Definition: Elements.cc:70
@ scContinue
Definition: StatusCode.h:22
static int sc[16]
Definition: smbdes.c:121
const SBuf & cmdRetr()
Definition: Elements.cc:133
const SBuf & cmdStou()
Definition: Elements.cc:182
const SBuf & cmdNlst()
Definition: Elements.cc:126
const SBuf & cmdAuth()
Definition: Elements.cc:63
const SBuf & cmdMlsd()
Definition: Elements.cc:112
const SBuf & cmdSmnt()
Definition: Elements.cc:161
@ scOkay
Definition: StatusCode.h:27
const SBuf & cmdStor()
Definition: Elements.cc:175
const SBuf & cmdDele()
Definition: Elements.cc:77
const SBuf & cmdMkd()
Definition: Elements.cc:105
const SBuf & cmdEprt()
Definition: Elements.cc:84

 

Introduction

Documentation

Support

Miscellaneous