FM

//usr/include UP

/*
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.
    * Neither the name of the Lite Speed Technologies Inc nor the
      names of its contributors may be used to endorse or promote
      products derived from this software without specific prior
      written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/


#ifndef  _LSAPIDEF_H_
#define  _LSAPIDEF_H_

#include <inttypes.h>
#include <sys/resource.h>

#if defined (c_plusplus) || defined (__cplusplus)
extern "C" {
#endif

enum
{
    H_ACCEPT = 0,
    H_ACC_CHARSET,
    H_ACC_ENCODING,
    H_ACC_LANG,
    H_AUTHORIZATION,
    H_CONNECTION,
    H_CONTENT_TYPE,
    H_CONTENT_LENGTH,
    H_COOKIE,
    H_COOKIE2,
    H_HOST,
    H_PRAGMA,
    H_REFERER,
    H_USERAGENT,
    H_CACHE_CTRL,
    H_IF_MODIFIED_SINCE,
    H_IF_MATCH,
    H_IF_NO_MATCH,
    H_IF_RANGE,
    H_IF_UNMOD_SINCE,
    H_KEEP_ALIVE,
    H_RANGE,
    H_X_FORWARDED_FOR,
    H_VIA,
    H_TRANSFER_ENCODING

};
#define LSAPI_SOCK_FILENO           0

#define LSAPI_VERSION_B0            'L'
#define LSAPI_VERSION_B1            'S'

/* Values for m_flag in lsapi_packet_header */
#define LSAPI_ENDIAN_LITTLE         0
#define LSAPI_ENDIAN_BIG            1
#define LSAPI_ENDIAN_BIT            1

#if defined(__i386__)||defined( __x86_64 )||defined( __x86_64__ )
#define LSAPI_ENDIAN                LSAPI_ENDIAN_LITTLE
#else
#define LSAPI_ENDIAN                LSAPI_ENDIAN_BIG
#endif

/* Values for m_type in lsapi_packet_header */
#define LSAPI_BEGIN_REQUEST         1
#define LSAPI_ABORT_REQUEST         2
#define LSAPI_RESP_HEADER           3
#define LSAPI_RESP_STREAM           4
#define LSAPI_RESP_END              5
#define LSAPI_STDERR_STREAM         6
#define LSAPI_REQ_RECEIVED          7
#define LSAPI_CONN_CLOSE            8
#define LSAPI_INTERNAL_ERROR        9

/* Cloudlinux added */
#define LSAPI_CONN_REJECT          51


#define LSAPI_MAX_HEADER_LEN        65535
#define LSAPI_MAX_DATA_PACKET_LEN   16384

#define LSAPI_RESP_HTTP_HEADER_MAX  32768
#define LSAPI_PACKET_HEADER_LEN     8


struct lsapi_packet_header
{
    char    m_versionB0;      /* LSAPI protocol version */
    char    m_versionB1;
    char    m_type;
    char    m_flag;
    union
    {
        int32_t m_iLen;       /* include this header */
        char    m_bytes[4];
    }m_packetLen;
};

/*
    LSAPI request header packet

    1. struct lsapi_req_header
    2. struct lsapi_http_header_index
    3. lsapi_header_offset * unknownHeaders
    4. org http request header
    5. request body if available
*/

struct lsapi_req_header
{
    struct lsapi_packet_header m_pktHeader;

    int32_t m_httpHeaderLen;
    int32_t m_reqBodyLen;
    int32_t m_scriptFileOff;   /* path to the script file. */
    int32_t m_scriptNameOff;   /* decrypted URI, without pathinfo, */
    int32_t m_queryStringOff;  /* Query string inside env */
    int32_t m_requestMethodOff;
    int32_t m_cntUnknownHeaders;
    int32_t m_cntEnv;
    int32_t m_cntSpecialEnv;
} ;


struct lsapi_http_header_index
{
    uint16_t m_headerLen[H_TRANSFER_ENCODING+1];
    int32_t m_headerOff[H_TRANSFER_ENCODING+1];
} ;

struct lsapi_header_offset
{
    int32_t nameOff;
    int32_t nameLen;
    int32_t valueOff;
    int32_t valueLen;
} ;

struct lsapi_resp_info
{
    int32_t m_cntHeaders;
    int32_t m_status;
};

struct lsapi_resp_header
{
    struct  lsapi_packet_header  m_pktHeader;
    struct  lsapi_resp_info      m_respInfo;
};

typedef struct lsapi_rlimits_t
{
    // for each kind of limit, .rlim_cur==0 in our code means "limit not defined"
    struct rlimit nofile,
                  nproc,
                  cpu,
                  as;
} lsapi_rlimits_t;

#if defined (c_plusplus) || defined (__cplusplus)
}
#endif


#endif

FlexLexer.h6893V
GeoIP.h17835V
GeoIPCity.h2298V
a.out.h4350V
aio.h7456V
aliases.h2031V
alloca.h1203V
ar.h1730V
argp.h25414V
argz.h6050V
arpa-
asm-
asm-generic-
assert.h4561V
bits-
bsock-
byteswap.h1404V
c++-
com_err.h2118V
complex.h7163V
cpio.h2267V
cpuidle.h844V
criu-
crypt.h9118V
ctype.h10963V
curl-
dirent.h12484V
dlfcn.h7238V
drm-
elf.h174828V
endian.h3189V
envz.h2866V
err.h2209V
errno.h1678V
error.h2039V
et-
execinfo.h1522V
fcntl.h10958V
features.h16062V
fenv.h5857V
finclude-
fmtmsg.h3239V
fnmatch.h2295V
fpu_control.h3583V
fstab.h3111V
fts.h8372V
ftw.h5251V
gconv.h4410V
gdb-
gelf.h11406V
getopt.h1468V
glob.h6614V
gnu-
gnu-versions.h2342V
gnumake.h2912V
grp.h6686V
gshadow.h4528V
gssapi-
gssapi.h181V
gssrpc-
iconv.h1857V
idn2.h13891V
ieee754.h4910V
ifaddrs.h2840V
inttypes.h11892V
kadm5-
kdb.h69285V
keyutils.h7698V
krad.h8933V
krb5-
krb5.h402V
langinfo.h17848V
lastlog.h126V
lauxlib.h8628V
libelf.h20318V
libgen.h1385V
libintl.h4579V
liblsapi-sha1.h569V
libpsl.h5573V
libxml2-
limits.h5412V
link.h7218V
linux-
locale.h7674V
lsapidef.h4971V
lscapi.h25968V
lscapi_config.h599V
lua.h14833V
lua.hpp191V
luaconf-x86_64.h21614V
luaconf.h1655V
lualib.h1301V
lzma-
lzma.h9817V
malloc.h6102V
math.h53318V
mcheck.h2434V
memory.h955V
misc-
mntent.h3358V
monetary.h1803V
mqueue.h3759V
mtd-
mysql-
net-
netash-
netatalk-
netax25-
netdb.h28099V
neteconet-
netinet-
netipx-
netiucv-
netpacket-
netrom-
netrose-
nfs-
nghttp2-
nl_types.h1752V
nlist.h1601V
nss.h1878V
obstack.h21306V
openssl-
paths.h2977V
pcre2.h44802V
pcre2posix.h5804V
perf-
poll.h22V
printf.h6800V
proc_service.h3476V
profile.h12154V
protocols-
pthread.h41269V
pty.h1569V
pwd.h6158V
python2.7-
python3.11-
python3.6m-
python3.8-
rdma-
re_comp.h962V
regex.h24715V
regexp.h1447V
resolv.h12153V
rpc-
sched.h4732V
scsi-
search.h5223V
selinux-
semaphore.h2399V
sepol-
setjmp.h3669V
sgtty.h1343V
shadow.h5471V
signal.h12243V
sound-
spawn.h6690V
stab.h264V
stdc-predef.h2289V
stdint.h8469V
stdio.h30168V
stdio_ext.h2799V
stdlib.h35653V
string.h17587V
strings.h4752V
sys-
syscall.h25V
sysexits.h5232V
syslog.h24V
tar.h3785V
termio.h214V
termios.h3598V
tgmath.h31489V
thread_db.h16023V
threads.h6655V
time.h10360V
ttyent.h2494V
uchar.h2001V
ucontext.h2036V
ulimit.h1583V
unistd.h42738V
utime.h1501V
utmp.h3222V
utmpx.h4099V
values.h1955V
verto-module.h6640V
verto.h19437V
video-
wait.h22V
wchar.h31111V
wctype.h5548V
wordexp.h2501V
xen-
zbuff.h11500V
zconf.h16262V
zdict.h17203V
zlib.h96261V
zstd.h119972V
zstd_errors.h3751V
Blog - My Melon - Digital Marketing & Creative Agency
Skip to content Skip to footer