├── AUTHORS ├── ChangeLog-CN ├── ChangeLog-EN ├── Dockerfile ├── INSTALL ├── LICENSE ├── README ├── TODO ├── bin ├── hetao.exe ├── hetao.sh ├── hetaocheck.exe ├── libeay32.dll ├── mfc90d.dll ├── minihetao.exe ├── msvcr90d.dll ├── pcre3.dll ├── pcreposix3.dll ├── press.sh ├── ssleay32.dll └── zlib1.dll ├── certs ├── gencert.sh ├── server.crt ├── server.csr ├── server.key └── server.pem ├── conf ├── hetao.conf ├── hetao.conf.Linux ├── hetao.conf.Linux.minimize ├── hetao.conf.WINDOWS ├── hetao.conf.WINDOWS.minimize ├── limits.conf.add ├── profile.add └── sysctl.conf.add ├── doc ├── Architecture.jpg ├── Benchmark.xls ├── Benchmark_hetao0_2_0_nginx_apache_tengine.jpg ├── Benchmark_hetao0_7_0_nginx_apache_tengine.jpg ├── Implementation.jpg ├── ab2_apache.jpg ├── ab2_hetao.jpg ├── ab2_nginx.jpg ├── ab2_tengine.jpg ├── hetao-CN.doc ├── hetao-CN.pdf ├── hetao.ppt └── hetao.vsd ├── expack ├── openssl-0.9.8a.win32 │ ├── bin │ │ ├── libeay32.dll │ │ ├── openssl.exe │ │ └── ssleay32.dll │ ├── include │ │ └── openssl │ │ │ ├── aes.h │ │ │ ├── applink.c │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1t.h │ │ │ ├── bio.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── buffer.h │ │ │ ├── cast.h │ │ │ ├── comp.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── crypto.h │ │ │ ├── des.h │ │ │ ├── des_old.h │ │ │ ├── dh.h │ │ │ ├── dsa.h │ │ │ ├── dso.h │ │ │ ├── dtls1.h │ │ │ ├── e_os2.h │ │ │ ├── ebcdic.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── engine.h │ │ │ ├── err.h │ │ │ ├── evp.h │ │ │ ├── hmac.h │ │ │ ├── idea.h │ │ │ ├── krb5_asn.h │ │ │ ├── kssl.h │ │ │ ├── lhash.h │ │ │ ├── md2.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── ocsp.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs7.h │ │ │ ├── pq_compat.h │ │ │ ├── pqueue.h │ │ │ ├── rand.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── safestack.h │ │ │ ├── sha.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl23.h │ │ │ ├── ssl3.h │ │ │ ├── stack.h │ │ │ ├── store.h │ │ │ ├── symhacks.h │ │ │ ├── tls1.h │ │ │ ├── tmdiff.h │ │ │ ├── txt_db.h │ │ │ ├── ui.h │ │ │ ├── ui_compat.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ └── x509v3.h │ └── lib │ │ ├── libeay32.lib │ │ ├── libeay32_a.lib │ │ ├── ssleay32.lib │ │ └── ssleay32_a.lib ├── pcre-7.0-win32 │ ├── bin │ │ ├── pcre-config │ │ ├── pcre3.dll │ │ ├── pcregrep.exe │ │ ├── pcreposix3.dll │ │ └── pcretest.exe │ ├── contrib │ │ └── pcre │ │ │ └── 7.0 │ │ │ ├── pcre-7.0-GnuWin32.README │ │ │ ├── pcre-7.0-src │ │ │ ├── AUTHORS │ │ │ ├── COPYING │ │ │ ├── ChangeLog │ │ │ ├── INSTALL │ │ │ ├── LICENCE │ │ │ ├── NEWS │ │ │ └── README │ │ │ └── pcre-7.0 │ │ │ └── check.log │ ├── include │ │ ├── pcre.h │ │ ├── pcreposix.h │ │ └── regex.h │ ├── lib │ │ ├── libpcre.dll.a │ │ ├── libpcreposix.dll.a │ │ ├── pcre-bcc.lib │ │ ├── pcre.lib │ │ ├── pcre3.dll.def │ │ ├── pcreposix-bcc.lib │ │ ├── pcreposix.lib │ │ ├── pcreposix3.dll.def │ │ └── pkgconfig │ │ │ └── libpcre.pc │ ├── man │ │ ├── cat1 │ │ │ ├── pcregrep.1.txt │ │ │ └── pcretest.1.txt │ │ └── cat3 │ │ │ ├── pcre.3.txt │ │ │ ├── pcre_compile.3.txt │ │ │ ├── pcre_compile2.3.txt │ │ │ ├── pcre_config.3.txt │ │ │ ├── pcre_copy_named_substring.3.txt │ │ │ ├── pcre_copy_substring.3.txt │ │ │ ├── pcre_dfa_exec.3.txt │ │ │ ├── pcre_exec.3.txt │ │ │ ├── pcre_free_substring.3.txt │ │ │ ├── pcre_free_substring_list.3.txt │ │ │ ├── pcre_fullinfo.3.txt │ │ │ ├── pcre_get_named_substring.3.txt │ │ │ ├── pcre_get_stringnumber.3.txt │ │ │ ├── pcre_get_stringtable_entries.3.txt │ │ │ ├── pcre_get_substring.3.txt │ │ │ ├── pcre_get_substring_list.3.txt │ │ │ ├── pcre_info.3.txt │ │ │ ├── pcre_maketables.3.txt │ │ │ ├── pcre_refcount.3.txt │ │ │ ├── pcre_study.3.txt │ │ │ ├── pcre_version.3.txt │ │ │ ├── pcreapi.3.txt │ │ │ ├── pcrebuild.3.txt │ │ │ ├── pcrecallout.3.txt │ │ │ ├── pcrecompat.3.txt │ │ │ ├── pcrematching.3.txt │ │ │ ├── pcrepartial.3.txt │ │ │ ├── pcrepattern.3.txt │ │ │ ├── pcreperform.3.txt │ │ │ ├── pcreposix.3.txt │ │ │ ├── pcreprecompile.3.txt │ │ │ ├── pcresample.3.txt │ │ │ └── pcrestack.3.txt │ └── manifest │ │ ├── pcre-7.0-bin.mft │ │ ├── pcre-7.0-bin.ver │ │ ├── pcre-7.0-lib.mft │ │ └── pcre-7.0-lib.ver └── zlib-1.2.3.win32 │ ├── bin │ ├── minigzip.exe │ └── zlib1.dll │ ├── include │ ├── zconf.h │ └── zlib.h │ └── lib │ ├── zdll.lib │ └── zlib.lib ├── git_clean.sh.old ├── install.bat ├── log ├── access.log └── error.log ├── makefile ├── makefile.Linux ├── mkdir.bat ├── src ├── Config.c ├── Envirment.c ├── HtmlCacheEventHander.c ├── HtmlCachePathfilenameTree.c ├── HtmlCacheSession.c ├── HtmlCacheWdTree.c ├── HttpSession.c ├── HttpSessionElapseTree.c ├── HttpSessionTimeoutTree.c ├── IDL_hetao_conf.dsc ├── IDL_hetao_conf.dsc.LOG.c ├── IDL_hetao_conf.dsc.c ├── IDL_hetao_conf.dsc.h ├── IpLimitsHash.c ├── LOGC.c ├── LOGC.h ├── LeastConnectionCountTree.c ├── ListenSession.c ├── MimeTypeHash.c ├── MonitorProcess.c ├── OnAcceptingSocket.c ├── OnAcceptingSslSocket.c ├── OnConnectingForward.c ├── OnConnectingSslForward.c ├── OnReceivingForward.c ├── OnReceivingSocket.c ├── OnSendingForward.c ├── OnSendingSocket.c ├── ProcessHttpRequest.c ├── RedirectDomain.c ├── RewriteUri.c ├── TimerThread.c ├── Util.c ├── VirtualHostHash.c ├── WindowsService.c ├── WorkerProcess.c ├── WorkerThread.c ├── fasterhttp.c ├── fasterhttp.h ├── fasterjson.c ├── fasterjson.h ├── hetao.c ├── hetao_in.h ├── hetaocheck.c ├── list.c ├── list.h ├── makefile ├── makefile.Linux ├── minihetao.c ├── pp.bat ├── rbtree.c ├── rbtree.h └── vc2008 │ ├── clean.bat │ ├── hetao │ ├── Debug │ │ └── BuildLog.htm │ ├── hetao.vcproj │ └── hetao.vcproj.WWW-0DA2CF5DB53.Calvin.user │ ├── hetaocheck │ ├── Debug │ │ └── BuildLog.htm │ ├── hetaocheck.vcproj │ └── hetaocheck.vcproj.WWW-0DA2CF5DB53.Calvin.user │ ├── minihetao │ ├── ClassDiagram1.cd │ ├── Debug │ │ └── BuildLog.htm │ ├── ReadMe.txt │ ├── minihetao.aps │ ├── minihetao.cpp │ ├── minihetao.h │ ├── minihetao.rc │ ├── minihetao.vcproj │ ├── minihetao.vcproj.WWW-0DA2CF5DB53.Calvin.user │ ├── minihetaoDlg.cpp │ ├── minihetaoDlg.h │ ├── res │ │ ├── minihetao.ico │ │ ├── minihetao.ico.old │ │ └── minihetao.rc2 │ ├── resource.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h │ ├── vc2008.sln │ └── vc2008.suo ├── uninstall.bat └── www ├── error_pages ├── error_page_400.html ├── error_page_401.html ├── error_page_403.html ├── error_page_404.html ├── error_page_408.html ├── error_page_500.html ├── error_page_503.html └── error_page_505.html └── index.html /AUTHORS: -------------------------------------------------------------------------------- 1 | calvin calvinwilliams@163.com 2 | -------------------------------------------------------------------------------- /ChangeLog-CN: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/ChangeLog-CN -------------------------------------------------------------------------------- /ChangeLog-EN: -------------------------------------------------------------------------------- 1 | 0.14.0 2017-09-09 calvin 2 | * Add Dockerfile , support docker container 3 | * Adjust kernel options addon file : conf/sysctl.conf.add 4 | 5 | 0.13.0 2017-05-03 calvin 6 | * Update LOGC,fasterhttp 7 | 8 | 0.12.5 2016-11-23 calvin 9 | * Fixed a bug about not enough load-balace on multi-processes 10 | 11 | 0.12.4 2016-11-13 calvin 12 | * Fixed a bug about buffer in fasterhttp 13 | 14 | 0.12.3 2016-11-07 calvin 15 | * Fixed some bugs on WINDOWS version 16 | 17 | 0.12.2 2016-11-04 calvin 18 | * Fixed a bug about PUTENV buffer too short to can't running 19 | 20 | 0.12.1 2016-10-26 calvin 21 | * Process framework on WINDOWS version , parent process monitoring child process 22 | * Fixed a bug about include file in configure 23 | 24 | 0.11.0 2016-10-22 calvin 25 | * Add redirect domain 26 | * Adjust some log content 27 | * Adjust some varibles in code 28 | *** Configuration file format is not compatible between 0.10.2 and 0.11.0 *** 29 | 30 | 0.10.2 2016-10-21 calvin 31 | * Add include file in configure : "!include filename" 32 | * modify 'new_url' to 'new_uri' in configure 33 | *** Configuration file format is not compatible between 0.10.1 and 0.10.2 *** 34 | 35 | 0.10.1 2016-10-17 calvin 36 | * Add minihetao for WINDOWS 37 | 38 | 0.10.0 2016-10-13 calvin 39 | * Add minihetao for Linux , launch need only a directory as "minihetao /var/hetao/www" 40 | 41 | 0.9.2 2016-10-11 calvin 42 | * Find synchronous call with SSL_accept and SSL_connect , refactored asynchronous mode 43 | * Fixed a bug about Starving for SSL_read in fasterhttp 44 | 45 | 0.9.1 2016-10-09 calvin 46 | * Support HTTPS in WINDOWS version 47 | 48 | 0.9.0 2016-10-07 calvin 49 | * Transplant to WINDOWS based on IOCP , but not support HTTPS 50 | 51 | 0.8.0 2016-09-19 calvin 52 | * Add connections limit per ip 53 | *** Configuration file format is not compatible between 0.7.4 and 0.8.0 *** 54 | 55 | 0.7.4 2016-09-18 calvin 56 | * The timeout is divided into active timeout and cumulative elapse 57 | *** Configuration file format is not compatible between 0.7.3 and 0.7.4 *** 58 | 59 | 0.7.3 2016-09-17 calvin 60 | * Avoid copy between file cache and response buffer , improve performance 61 | 62 | 0.7.2 2016-09-13 calvin 63 | * Fixed a bug about processing directory index files and forward file type 64 | * Optimize fasterhttp performance 65 | 66 | 0.7.1 2016-09-12 calvin 67 | * Optimize memory , drops to 30% 68 | 69 | 0.7.0 2016-09-10 calvin 70 | * Support running as other user 71 | * Fixed a fatal problem with fasterhttp 72 | * Support compile and install to system folder directly 73 | * Add config checker 'hetaocheck' 74 | 75 | 0.6.0 2016-09-07 calvin 76 | * Add 'mimetype.compress_enable' in configure 77 | * Add 'limits.max_file_cache' in configure 78 | * Support convert between HTTP and HTTPS on reverse proxy 79 | *** Configuration file format is not compatible between 0.5.0 and 0.6.0 *** 80 | 81 | 0.5.0 2016-09-06 calvin 82 | * Support rewrite 83 | *** Configuration file format is not compatible between 0.4.0 and 0.5.0 *** 84 | 85 | 0.4.0 2016-09-03 calvin 86 | * Adjust hierarchical relationship for 'listen - server - forward' in configure , adjust code architecture synchronously 87 | *** Configuration file format is not compatible between 0.3.0 and 0.4.0 *** 88 | 89 | 0.3.0 2016-09-01 calvin 90 | * Support HTTPS 91 | 92 | 0.2.0 2016-08-27 calvin 93 | * Add reverse proxy with round-robin rule and least-connections 94 | 95 | 0.1.0 2016-08-17 calvin 96 | * Create hetao v0.1.0 from htmlserver v1.0.0 97 | 98 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # NOTICE : 2 | # docker pull centos 3 | # AFTER make -f makefile.Linux && sudo make -f makefile.Linux install , NOT make -f makefile.Linux clean 4 | 5 | # build like this : docker build -f Dockerfile -t hetao . 6 | 7 | FROM centos 8 | 9 | MAINTAINER calvinwilliams@163.com 10 | 11 | RUN yum install net-tools -y 12 | RUN yum install telnet -y 13 | RUN yum install lynx -y 14 | 15 | COPY src/hetao /usr/local/bin/hetao 16 | COPY src/hetaocheck /usr/local/bin/hetaocheck 17 | COPY src/minihetao /usr/local/bin/minihetao 18 | 19 | RUN mkdir -p /etc/hetao 20 | RUN mkdir -p /var/hetao/www 21 | RUN mkdir -p /var/hetao/log 22 | 23 | WORKDIR /tmp 24 | 25 | RUN echo "then run the following command to start docker container" 26 | RUN echo "docker run -d -v /etc/hetao:/etc/hetao -v /var/hetao/www:/var/hetao/www -v /var/hetao/log:/var/hetao/log -p 80:80 --net=host hetao /usr/local/bin/hetao /etc/hetao/hetao.conf --no-daemon" 27 | 28 | # DISCARD : 29 | # docker run -it -v /media:/media -v /etc/hetao:/etc/hetao -v /var/hetao/www:/var/hetao/www -v /var/hetao/log:/var/hetao/log -p 80:80 --net=host --privileged=true hetao /bin/bash 30 | 31 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | see doc/* 2 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/README -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/TODO -------------------------------------------------------------------------------- /bin/hetao.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/hetao.exe -------------------------------------------------------------------------------- /bin/hetao.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | usage() 4 | { 5 | echo "USAGE : hetao.sh [ status | start | stop | kill | restart | restart_graceful | relog ]" 6 | } 7 | 8 | if [ $# -eq 0 ] ; then 9 | usage 10 | exit 9 11 | fi 12 | 13 | case $1 in 14 | status) 15 | ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3=="1")print $0}' 16 | ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3!="1")print $0}' 17 | ;; 18 | start) 19 | PID=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3=="1")print $2}'` 20 | if [ x"$PID" != x"" ] ; then 21 | echo "*** WARN : hetao existed" 22 | exit 1 23 | fi 24 | hetao /etc/hetao/hetao.conf 25 | if [ $? -ne 0 ] ; then 26 | exit 1 27 | fi 28 | while [ 1 ] ; do 29 | sleep 1 30 | PID=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3=="1")print $2}'` 31 | if [ x"$PID" != x"" ] ; then 32 | break 33 | fi 34 | done 35 | echo "hetao start ok" 36 | hetao.sh status 37 | ;; 38 | stop) 39 | hetao.sh status 40 | if [ $? -ne 0 ] ; then 41 | exit 1 42 | fi 43 | PID=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3=="1")print $2}'` 44 | if [ x"$PID" = x"" ] ; then 45 | echo "*** WARN : hetao not existed" 46 | exit 1 47 | fi 48 | kill $PID 49 | while [ 1 ] ; do 50 | sleep 1 51 | PID=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3=="1")print $2}'` 52 | if [ x"$PID" = x"" ] ; then 53 | break 54 | fi 55 | done 56 | echo "hetao end ok" 57 | ;; 58 | kill) 59 | hetao.sh status 60 | killall -9 hetao 61 | ;; 62 | restart) 63 | hetao.sh stop 64 | hetao.sh start 65 | ;; 66 | restart_graceful) 67 | hetao.sh status 68 | if [ $? -ne 0 ] ; then 69 | exit 1 70 | fi 71 | PID=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3=="1")print $2}'` 72 | if [ x"$PID" = x"" ] ; then 73 | echo "*** WARN : hetao not existed" 74 | exit 1 75 | fi 76 | kill -USR2 $PID 77 | while [ 1 ] ; do 78 | sleep 1 79 | PID2=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk -v pid="$PID" '{if($3=="1"&&$2!=pid)print $2}'` 80 | if [ x"$PID2" != x"" ] ; then 81 | break 82 | fi 83 | done 84 | echo "new hetao pid[$PID2] start ok" 85 | kill $PID 86 | while [ 1 ] ; do 87 | sleep 1 88 | PID3=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk -v pid="$PID" '{if($3=="1"&&$2==pid)print $2}'` 89 | if [ x"$PID3" = x"" ] ; then 90 | break 91 | fi 92 | done 93 | echo "old hetao pid[$PID] end ok" 94 | hetao.sh status 95 | if [ $? -ne 0 ] ; then 96 | exit 1 97 | fi 98 | ;; 99 | relog) 100 | hetao.sh status 101 | if [ $? -ne 0 ] ; then 102 | exit 1 103 | fi 104 | PID=`ps -ef | grep -w hetao | grep -v "hetao.sh" | grep -v grep | awk '{if($3=="1")print $2}'` 105 | if [ x"$PID" = x"" ] ; then 106 | echo "*** WARN : hetao not existed" 107 | exit 1 108 | fi 109 | kill -USR1 $PID 110 | echo "send signal to hetao for reopenning log" 111 | ;; 112 | *) 113 | usage 114 | ;; 115 | esac 116 | 117 | -------------------------------------------------------------------------------- /bin/hetaocheck.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/hetaocheck.exe -------------------------------------------------------------------------------- /bin/libeay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/libeay32.dll -------------------------------------------------------------------------------- /bin/mfc90d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/mfc90d.dll -------------------------------------------------------------------------------- /bin/minihetao.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/minihetao.exe -------------------------------------------------------------------------------- /bin/msvcr90d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/msvcr90d.dll -------------------------------------------------------------------------------- /bin/pcre3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/pcre3.dll -------------------------------------------------------------------------------- /bin/pcreposix3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/pcreposix3.dll -------------------------------------------------------------------------------- /bin/press.sh: -------------------------------------------------------------------------------- 1 | if [ $# -ne 5 ] ; then 2 | echo "USAGE : press.sh C_PARAM N_PARAM STYLE ROUNDS PRESS_FILE" 3 | exit 9 4 | fi 5 | 6 | C_PARAM=$1 7 | N_PARAM=$2 8 | STYLE=$3 9 | MAX_ROUND=$4 10 | PRESS_FILE=$5 11 | 12 | ROUND=0 13 | while [ $ROUND -le $MAX_ROUND ] ; do 14 | if [ x"$STYLE" = x"1" ] ; then 15 | TIME1=`ab -c $C_PARAM -n $N_PARAM http://192.168.6.111:9527/$PRESS_FILE | grep "Requests per second" | awk '{print $4}'` 16 | elif [ x"$STYLE" = x"2" ] ; then 17 | TIME1=`ab -kc $C_PARAM -n $N_PARAM http://192.168.6.111:9527/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 18 | elif [ x"$STYLE" = x"3" ] ; then 19 | TIME1=`ab2 -kc $C_PARAM -n $N_PARAM -H "Accept-Encoding: gzip" http://192.168.6.111:9527/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 20 | fi 21 | 22 | sleep 1 23 | 24 | if [ x"$STYLE" = x"1" ] ; then 25 | TIME2=`ab -c $C_PARAM -n $N_PARAM http://192.168.6.111:9528/$PRESS_FILE | grep "Requests per second" | awk '{print $4}'` 26 | elif [ x"$STYLE" = x"2" ] ; then 27 | TIME2=`ab -kc $C_PARAM -n $N_PARAM http://192.168.6.111:9528/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 28 | elif [ x"$STYLE" = x"3" ] ; then 29 | TIME2=`ab2 -kc $C_PARAM -n $N_PARAM -H "Accept-Encoding: gzip" http://192.168.6.111:9528/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 30 | fi 31 | 32 | sleep 120 33 | 34 | if [ x"$STYLE" = x"1" ] ; then 35 | TIME3=`ab -c $C_PARAM -n $N_PARAM http://192.168.6.111:9529/$PRESS_FILE | grep "Requests per second" | awk '{print $4}'` 36 | elif [ x"$STYLE" = x"2" ] ; then 37 | TIME3=`ab -kc $C_PARAM -n $N_PARAM http://192.168.6.111:9529/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 38 | elif [ x"$STYLE" = x"3" ] ; then 39 | TIME3=`ab2 -kc $C_PARAM -n $N_PARAM -H "Accept-Encoding: gzip" http://192.168.6.111:9529/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 40 | fi 41 | 42 | sleep 1 43 | 44 | if [ x"$STYLE" = x"1" ] ; then 45 | TIME4=`ab -c $C_PARAM -n $N_PARAM http://192.168.6.111:9530/$PRESS_FILE | grep "Requests per second" | awk '{print $4}'` 46 | elif [ x"$STYLE" = x"2" ] ; then 47 | TIME4=`ab -kc $C_PARAM -n $N_PARAM http://192.168.6.111:9530/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 48 | elif [ x"$STYLE" = x"3" ] ; then 49 | TIME4=`ab2 -kc $C_PARAM -n $N_PARAM -H "Accept-Encoding: gzip" http://192.168.6.111:9530/$PRESS_FILE | grep 'Requests per second' | awk '{print $4}'` 50 | fi 51 | 52 | sleep 1 53 | 54 | if [ x"$TIME1" = x"" ] ; then 55 | TIMES1[$ROUND]=0 56 | else 57 | TIMES1[$ROUND]=$TIME1 58 | fi 59 | if [ x"$TIME2" = x"" ] ; then 60 | TIMES2[$ROUND]=0 61 | else 62 | TIMES2[$ROUND]=$TIME2 63 | fi 64 | if [ x"$TIME3" = x"" ] ; then 65 | TIMES3[$ROUND]=0 66 | else 67 | TIMES3[$ROUND]=$TIME3 68 | fi 69 | if [ x"$TIME4" = x"" ] ; then 70 | TIMES4[$ROUND]=0 71 | else 72 | TIMES4[$ROUND]=$TIME4 73 | fi 74 | 75 | echo "ROUND: $ROUND hetao: ${TIMES1[$ROUND]} nginx: ${TIMES2[$ROUND]} apache: ${TIMES3[$ROUND]} tengine: ${TIMES4[$ROUND]}" 76 | sleep 1 77 | ROUND=`expr $ROUND + 1` 78 | done 79 | 80 | echo "--- result ---------" 81 | 82 | ROUND=0 83 | echo "ROUND hetao nginx apache tengine" 84 | while [ $ROUND -le $MAX_ROUND ] ; do 85 | echo "$ROUND ${TIMES1[$ROUND]} ${TIMES2[$ROUND]} ${TIMES3[$ROUND]} ${TIMES4[$ROUND]}" 86 | ROUND=`expr $ROUND + 1` 87 | done 88 | 89 | -------------------------------------------------------------------------------- /bin/ssleay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/ssleay32.dll -------------------------------------------------------------------------------- /bin/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/bin/zlib1.dll -------------------------------------------------------------------------------- /certs/gencert.sh: -------------------------------------------------------------------------------- 1 | openssl genrsa -out server.key 4096 2 | openssl req -new -key server.key -out server.csr 3 | openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt 4 | cat server.crt server.key > server.pem 5 | 6 | -------------------------------------------------------------------------------- /certs/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFYjCCA0oCCQDBgT63hRYT0DANBgkqhkiG9w0BAQUFADBzMQswCQYDVQQGEwJD 3 | TjELMAkGA1UECBMCWkoxCzAJBgNVBAcTAkhaMRMwEQYDVQQKEwpuZXRpdGFuaXVt 4 | MQwwCgYDVQQLEwNJVEQxFTATBgNVBAMTDDE5Mi4xNjguNi4xNzEQMA4GCSqGSIb3 5 | DQEJARYBQDAeFw0xNjAzMjYwMDMwMzVaFw0xNzAzMjYwMDMwMzVaMHMxCzAJBgNV 6 | BAYTAkNOMQswCQYDVQQIEwJaSjELMAkGA1UEBxMCSFoxEzARBgNVBAoTCm5ldGl0 7 | YW5pdW0xDDAKBgNVBAsTA0lURDEVMBMGA1UEAxMMMTkyLjE2OC42LjE3MRAwDgYJ 8 | KoZIhvcNAQkBFgFAMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAuhru 9 | k9FqIUAMPhV3jwvvu+BMtfNP2+m5AE5kKNlqwL/tieg76lxcfZH7wY1tZDdkxyhW 10 | jljpvO89NWpvAMQQeDLZXIuI2n+WZV8VKrB+deYFK2GPphX+Q9fTstKzpkgwJsdf 11 | 9NcizBkfcar/sKnMuxcanyjOHo36VnX3zCITqP1KIt4Xns+PUyRc/M2YwNrvfi0g 12 | 3uQD6h2tvF3088LM7V9u03XY1tfsujvZxcd5lfkpCr6VXdItfWWcfd/vc4DDIYws 13 | ZMiH2mMiVG+GQtT4JaDXjIADB9QDe12fveZtBgUsySs/GjccpmBcgmp5j9ymR4H4 14 | kkw+m5ha2lt2FA+J5X5klETkNNmTebAX647+JNV8ojD+jat/lGbgbhg5bbg2PGwc 15 | wLl+/+iDyGTGVm4ui2iBzjeWgKsi9o6DQW9PkZS0aeHq3R3FVWBzKc05zstUptkr 16 | F9KhdtPI/6lSl2B6AlPACgmqGAyUUACxPxzFJiuWz7Ob9k3bpRoyf1/TMjMztZBD 17 | 0KRK/tEsTeUE1m78LItBbHP2JfVAJxjq5Oj8tTnGScAZ9gQNAKORpQETy9h5aswA 18 | 0JyqS4n+63ElmYgHkz1CWuMLS6hQG175erXoLMfi9EVZbhbLEFQItgy1e1Fd+Or5 19 | bi3WCxsQniNs95/j3hPobqpQLZqs18Hy1bmwmacCAwEAATANBgkqhkiG9w0BAQUF 20 | AAOCAgEAJMJIKAvo44ciEHraBkPIdmDb8DaBZNL8cs5P/FZOTTeM2GVRlufBYx7X 21 | hyoU1S/XuXRoSDOn+f/LBGqlH0Qo7caHeSvFTZDZ9EfCV5hWrv0xha/m5vdHWdKl 22 | 0RPPJpLWXhDy0Ib9zY2FrPk9uWkLEXHcqvYtx9rqFeP1WXrtn0YTKj4HfHqvkcD8 23 | 25cH89K/lgjKIoRyeHnnj9w6kALDhgUv3obSDLnrLexw6R7S7yWg/WIi88fBsnlI 24 | IFRxxj/dA/nibjc0lNDGz3s1gbbc7kbg1W2xkYctrdfDDflHwZhMkW+Ixkro+5zi 25 | 2QeCY/aUMtLZzV9zL4/+mbOHbyanJ0QkUoJ4QpCSr1vakcEqPFs5q019cJ1+hN21 26 | wLFFE9XmE0nmyHm3O4O7+v3F3a6yFoZMrlbDDnGDFkAT2quQf3lRZ3zd/W4aqKJI 27 | LoTamavsN3KB4TzNJ+61/BzMaZCMW4/s4Tbom3R6ptd5RvRrVNKv7b09VojeUL29 28 | qhLhh22SRAYgRwjLD32o938P5sPSYyl3gGSQGZVoo7eQ8SKGnRoYNLjKdi4N1mlH 29 | nK2GimurALK5V9lHD0k2pZPBbEFuoi7DqCip/hQGRa6tqyoQMWrq+YteFbgTRHuA 30 | pq1FCZ5omUVaq0dWSS1ze3qXRLSS59hvGcffbWms0h/avtNPxNw= 31 | -----END CERTIFICATE----- 32 | -------------------------------------------------------------------------------- /certs/server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIEuDCCAqACAQAwczELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAlpKMQswCQYDVQQH 3 | EwJIWjETMBEGA1UEChMKbmV0aXRhbml1bTEMMAoGA1UECxMDSVREMRUwEwYDVQQD 4 | EwwxOTIuMTY4LjYuMTcxEDAOBgkqhkiG9w0BCQEWAUAwggIiMA0GCSqGSIb3DQEB 5 | AQUAA4ICDwAwggIKAoICAQC6Gu6T0WohQAw+FXePC++74Ey180/b6bkATmQo2WrA 6 | v+2J6DvqXFx9kfvBjW1kN2THKFaOWOm87z01am8AxBB4Mtlci4jaf5ZlXxUqsH51 7 | 5gUrYY+mFf5D19Oy0rOmSDAmx1/01yLMGR9xqv+wqcy7FxqfKM4ejfpWdffMIhOo 8 | /Uoi3heez49TJFz8zZjA2u9+LSDe5APqHa28XfTzwsztX27TddjW1+y6O9nFx3mV 9 | +SkKvpVd0i19ZZx93+9zgMMhjCxkyIfaYyJUb4ZC1PgloNeMgAMH1AN7XZ+95m0G 10 | BSzJKz8aNxymYFyCanmP3KZHgfiSTD6bmFraW3YUD4nlfmSUROQ02ZN5sBfrjv4k 11 | 1XyiMP6Nq3+UZuBuGDltuDY8bBzAuX7/6IPIZMZWbi6LaIHON5aAqyL2joNBb0+R 12 | lLRp4erdHcVVYHMpzTnOy1Sm2SsX0qF208j/qVKXYHoCU8AKCaoYDJRQALE/HMUm 13 | K5bPs5v2TdulGjJ/X9MyMzO1kEPQpEr+0SxN5QTWbvwsi0Fsc/Yl9UAnGOrk6Py1 14 | OcZJwBn2BA0Ao5GlARPL2HlqzADQnKpLif7rcSWZiAeTPUJa4wtLqFAbXvl6tegs 15 | x+L0RVluFssQVAi2DLV7UV346vluLdYLGxCeI2z3n+PeE+huqlAtmqzXwfLVubCZ 16 | pwIDAQABoAAwDQYJKoZIhvcNAQEFBQADggIBAE/7lyAHNd9YDu1LGu+W3TDTAiGk 17 | /owHuBWXkNS0RUsIgIbtQlO02zlGvSn1AKwYEB+m0Q1Mr5FAIRH546dQKoYkOLtp 18 | yhGYOBVbvyKdnpgXp1StUEC8orDKeKWdDtAjM5D6T24n6sRINBeGdizFVixEFdcc 19 | r4V8vCzYFZ20EkMPChUIEAO8H7xM8DjmYD2542JhqYQyLvJcOJxHN8pKVpx8Rb/g 20 | fDvAk5jvvZhaG2gaIhrbht0R6zn+4uADfJDGfc/ld1W2DjM1slKhpEbNXaRDni+b 21 | nQm01aIWRuSnXqbAN6QCC/kuRqgpZCOTsE15tzFkkqeEg3RUkI5uzh4YJP6f2bNE 22 | osCSoIY9fLY8LjIqDuVzPWpy2uva7qOp7FWuNoF21AN0vnRfwcvX9iZT7ODSEEsD 23 | /EUkUux/1zzBSfqTbgY8r/3NlVeQYsSKNen3j68LvkhTATgqZLG59BdbjAQxkJqZ 24 | JB2sw7T3e9U5BXPRlBq6wucpb47FQCeeMgBzCQ+Per69hwYwk3rbKcLNM+zaYT4R 25 | SvTbyKDMbG0ePHVjS4hXQ8jrexPtQsfeJ9IfERwfAW1iJ96oAb7S7ln1+KAh19HQ 26 | OkVwhuS+MqYITKnbZi870npTFtu6j+hg6IwV7D1oqCJassaa4IAsrUs2WRcfQLvi 27 | I1BKe09Zu1BIChyJ 28 | -----END CERTIFICATE REQUEST----- 29 | -------------------------------------------------------------------------------- /certs/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIJKQIBAAKCAgEAuhruk9FqIUAMPhV3jwvvu+BMtfNP2+m5AE5kKNlqwL/tieg7 3 | 6lxcfZH7wY1tZDdkxyhWjljpvO89NWpvAMQQeDLZXIuI2n+WZV8VKrB+deYFK2GP 4 | phX+Q9fTstKzpkgwJsdf9NcizBkfcar/sKnMuxcanyjOHo36VnX3zCITqP1KIt4X 5 | ns+PUyRc/M2YwNrvfi0g3uQD6h2tvF3088LM7V9u03XY1tfsujvZxcd5lfkpCr6V 6 | XdItfWWcfd/vc4DDIYwsZMiH2mMiVG+GQtT4JaDXjIADB9QDe12fveZtBgUsySs/ 7 | GjccpmBcgmp5j9ymR4H4kkw+m5ha2lt2FA+J5X5klETkNNmTebAX647+JNV8ojD+ 8 | jat/lGbgbhg5bbg2PGwcwLl+/+iDyGTGVm4ui2iBzjeWgKsi9o6DQW9PkZS0aeHq 9 | 3R3FVWBzKc05zstUptkrF9KhdtPI/6lSl2B6AlPACgmqGAyUUACxPxzFJiuWz7Ob 10 | 9k3bpRoyf1/TMjMztZBD0KRK/tEsTeUE1m78LItBbHP2JfVAJxjq5Oj8tTnGScAZ 11 | 9gQNAKORpQETy9h5aswA0JyqS4n+63ElmYgHkz1CWuMLS6hQG175erXoLMfi9EVZ 12 | bhbLEFQItgy1e1Fd+Or5bi3WCxsQniNs95/j3hPobqpQLZqs18Hy1bmwmacCAwEA 13 | AQKCAgEAl4MTlr5YBAfrr6O0eX4DR9Z9PWiALI6kce5gNq2C7reSgMLT/KIDHqv5 14 | 5YLpezxpzIY3qZ4TdSDkmRc0ldAJhIIJWgGzggd7fr4hMmcMHZoNvVqpI1MmdT9B 15 | 94T4gzikEv4gTenUR4twgQ7xKXej2PEfWFJVNKTsGPXjropTrTHA6JAddMqQaeTh 16 | 22LaqK/VaMj+yNejpDdTWVa49Lc0NVCLnpaD2a1i6d+OFSmoAAQgeMHeQsq5BCz0 17 | cbodbNB4jFhdUBO+Hnq02T8OdFyERcYjlhwl23qs9wOq6GSvf8Y4xvJxZjtWFNHA 18 | nuBmZUwDB5Z1s01lbzFjTgBGKmDYJtvOR3JjmU3Ss68+sLpaFLZo6+Ozds8cFLP6 19 | WaMnB8wkZsTaPaOR69EexlSfsujR8aiO7JFhrvebUoDpi+YrSyMfzsXHgGbt3Cec 20 | SGdnFl4bMeESJ4GPk3OVjPptKxzqd77E9qeZlUKMSPSRK11Y+21FcuNmDgGUeW1T 21 | Z4mrOcG2i1GU1MB2MEO1q0A6jAI84lYKfCUKEK1SvmgZEMBD96m8Yy4/DocyZHh7 22 | D9o88HbXHiKX9Azq9qeAcPna+TcevFhQpP0TSdmXLKpKg5xhoMDiNTzFCCjZc1lN 23 | 8qfqXciEriTDxi655Ug3oK4D8wMQ9PfKCgYct++JOR2M1LnyZvkCggEBAPREXxNl 24 | c0wbxvMGy9v+Snl875HCnSaBAshS3RFV7p+AyZqNcQom/LDIq+J2xD/kFq0eTg2e 25 | LUq8gRf1IYwYrUx36VZMwmXJDezSgVzOI2XIVGUTe9pCqbFYAEUcZ9BY7H3rJV8z 26 | fDpn2M2XMFnkyipFh/MmgEeiSpfYdjsOsR+TB3qw8O3yGF84gbhq+LbRvjHr9EGM 27 | qwfBkOCAVUS7HbHPov5fRfCuWZO3lK2qKZtxTxzbEaI/m29cLLroowA54UmJU7R6 28 | j7iNbWPce5CsVJPXpkg2Shbv6LBQa5BimFtTJXJpFHK58wiV/4FwTEEzBdWIbNGO 29 | 1hNJTrQChoq3NAUCggEBAMMLX5mghEFnb2cn7xNYXzSYHHbKJ/aJOBA+F+v0OQPu 30 | qTBa15wdhcDWUGwJwvl5f6KzLSzmgkQ6v4Foet6bfHb5cypktFS9x3/yZcHhKRXi 31 | JlHaaYKttIeEYkPWqKfi6yfNi527olTRNEvatZZEa0V1w45/O5OCiwEJEvXICwpF 32 | H5sFbP1Pi5gyqqaWcGu7ukiEfowJ4ptfssAWphIoLBSG5UW2gAvD5J8cBV7VPvBi 33 | g1yhURRXLluTrnz87/6+G9vyzzzreG22x3r2Fb6o7rB2bONsWEZXYBvlLoS5nUFt 34 | UnMA2cTvjvjeD0wpRtnECC1p9FghXXVBl0DCihSkUrsCggEBAMKVgKOj6oATlJ3e 35 | qSEb5ln3I6UawjN9DClmkUKREOExJ+idihILUrrFcN+buuQmn8XS4VzJx8zEc5YR 36 | KWM/+TV0RIYB6c5JpnUkj/bNI7eeKVTHe584AZQLxVNIuI5peCMq4f9/tROVzEii 37 | itrhfgbEkvMolYH7D678udp77q93YbrkH1l9xNp92iB93plMZlXAYDijhU9NbErb 38 | EJIK+TG/dVlrrfx391XMJX1ek3yHe/1Bqj90qi7A38UZM1gnw4bgBbU8+SaMSzsE 39 | 1c4+6bVIUecukEDLZrKlrbo8QKBnkOoeOTLXXHpXe02ylpxNt/UNk5owTerZOAAA 40 | DwuLu70CggEANMKe2a/SFt8kA4OJ6HG/TzrWeEu3A7masMobLnih865blfj82f4i 41 | cEeI+bCqTVHQdPKDBeJU2qAJrbfVhOIKiSRxQsZ7AXFUxgeL/yYpNwI12255nB/g 42 | 9ceZzUAD32ZCtkGjwsc+4jK1Ms+2zy8y1VdFzwYb14s4js8lkdbLJbwNEKInGV6r 43 | JECQaP/I6VueyH8OvFLwOZdpgwydX8v+II9c9b6oZIZZEbFCwqRsohoD7sq0ZAwx 44 | PhR03tqNERvb7WOBK7mGmicXTuvCdhC8gH+IdPyZ5G0+Uk1sh/qtz0UDSJiyT9N9 45 | mVR4TuHbiIy+qYo/zpc38MANajc1ot/QgQKCAQB03FrCBpKl72UTBNot09ScRof0 46 | RlnEFP3/yqVwT6wR6gmfiKGaY8BmE1sKn9wmRsx/wD2pkmgEpEMgJCEwEaYahrO8 47 | 0/Z+0/v9gw09Q9a8gmpiVlrAj+dzJZld9Fesm/OP8vQYje4qXAqOeAVYcQ0TOMRw 48 | o3cgwnuj7CWFShU23YgfaTAeUovuqtKHMoLGAHQcjPqQpBNQpaMUXfhLJRrZUoL7 49 | nlGLDO4xPwnOBhzn0YYG5I7XuS+j3PWLdTHmIp55z2BDGet9aFbprjznnBqTnCGk 50 | uWLw/KTOtQDB8W+GTwK5PM+6AG1MrJOGzuq1LUjgzG2EAXF/OKCwIjlRMd3t 51 | -----END RSA PRIVATE KEY----- 52 | -------------------------------------------------------------------------------- /conf/hetao.conf.Linux.minimize: -------------------------------------------------------------------------------- 1 | { 2 | "listen" : 3 | { 4 | "ip" : "" , 5 | "port" : 80 , 6 | "website" : 7 | { 8 | "domain" : "" , 9 | "wwwroot" : "/var/hetao/www" , 10 | "index" : "/index.html,/index.htm" , 11 | "access_log" : "/var/hetao/log/access.log" 12 | } 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /conf/hetao.conf.WINDOWS.minimize: -------------------------------------------------------------------------------- 1 | { 2 | "listen" : 3 | { 4 | "ip" : "" , 5 | "port" : 80 , 6 | "website" : 7 | { 8 | "domain" : "" , 9 | "wwwroot" : "$ProgramFiles$/hetao/www" , 10 | "index" : "/index.html,/index.htm" , 11 | "access_log" : "$ProgramFiles$/hetao/log/access.log" 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /conf/limits.conf.add: -------------------------------------------------------------------------------- 1 | * soft nofile 65536 2 | * hard nofile 65536 3 | * soft nproc unlimited 4 | * hard nproc unlimited 5 | -------------------------------------------------------------------------------- /conf/profile.add: -------------------------------------------------------------------------------- 1 | ################################################# 2 | # for basic 3 | 4 | export OSNAME=`uname -a|awk '{print $1}'` 5 | export HOSTNAME=`hostname` 6 | export USERNAME=$LOGNAME 7 | export PS1='[$USERNAME@$HOSTNAME $PWD] ' 8 | 9 | set -o vi 10 | 11 | # export LC_ALL=en_US 12 | # export LANG=en_US 13 | export LC_ALL=zh_CN.gb18030 14 | export LANG=zh_CN.gb18030 15 | 16 | alias l='ls -l' 17 | alias ll='ls -lF' 18 | alias lf='ls -F' 19 | alias lrt='ls -lrt' 20 | 21 | alias rm='rm -i' 22 | alias mv='mv -i' 23 | alias cp='cp -i' 24 | 25 | export PATH=.:/root/setup/httpd-2.2.17/httpd-2.2.17/support:$PATH:/usr/local/bin 26 | export PATH=$PATH:$HOME/shbin:$HOME/bin:$HOME/exsh:$HOME/exbin 27 | 28 | if [ x"$OSNAME" = x"Linux" ] ; then 29 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 30 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib:/usr/local/lib:$HOME/exlib:$HOME/lib 31 | elif [ x"$OSNAME" = x"AIX" ] ; then 32 | export LIBPATH=$LIBPATH:/usr/local/lib 33 | export LIBPATH=$LIBPATH:/lib:/usr/lib:/usr/local/lib:$HOME/exlib:$HOME/lib 34 | export OBJECT_MODE=64 35 | fi 36 | 37 | ulimit -c unlimited 38 | 39 | -------------------------------------------------------------------------------- /conf/sysctl.conf.add: -------------------------------------------------------------------------------- 1 | fs.file-max=65536 2 | net.ipv4.tcp_tw_reuse=1 3 | net.ipv4.tcp_tw_recycle=0 4 | net.ipv4.tcp_fin_timeout = 30 5 | net.ipv4.ip_local_port_range = 1024 65000 6 | 7 | -------------------------------------------------------------------------------- /doc/Architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/Architecture.jpg -------------------------------------------------------------------------------- /doc/Benchmark.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/Benchmark.xls -------------------------------------------------------------------------------- /doc/Benchmark_hetao0_2_0_nginx_apache_tengine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/Benchmark_hetao0_2_0_nginx_apache_tengine.jpg -------------------------------------------------------------------------------- /doc/Benchmark_hetao0_7_0_nginx_apache_tengine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/Benchmark_hetao0_7_0_nginx_apache_tengine.jpg -------------------------------------------------------------------------------- /doc/Implementation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/Implementation.jpg -------------------------------------------------------------------------------- /doc/ab2_apache.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/ab2_apache.jpg -------------------------------------------------------------------------------- /doc/ab2_hetao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/ab2_hetao.jpg -------------------------------------------------------------------------------- /doc/ab2_nginx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/ab2_nginx.jpg -------------------------------------------------------------------------------- /doc/ab2_tengine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/ab2_tengine.jpg -------------------------------------------------------------------------------- /doc/hetao-CN.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/hetao-CN.doc -------------------------------------------------------------------------------- /doc/hetao-CN.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/hetao-CN.pdf -------------------------------------------------------------------------------- /doc/hetao.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/hetao.ppt -------------------------------------------------------------------------------- /doc/hetao.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/doc/hetao.vsd -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/bin/libeay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/openssl-0.9.8a.win32/bin/libeay32.dll -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/bin/openssl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/openssl-0.9.8a.win32/bin/openssl.exe -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/bin/ssleay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/openssl-0.9.8a.win32/bin/ssleay32.dll -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/applink.c: -------------------------------------------------------------------------------- 1 | #define APPLINK_STDIN 1 2 | #define APPLINK_STDOUT 2 3 | #define APPLINK_STDERR 3 4 | #define APPLINK_FPRINTF 4 5 | #define APPLINK_FGETS 5 6 | #define APPLINK_FREAD 6 7 | #define APPLINK_FWRITE 7 8 | #define APPLINK_FSETMOD 8 9 | #define APPLINK_FEOF 9 10 | #define APPLINK_FCLOSE 10 /* should not be used */ 11 | 12 | #define APPLINK_FOPEN 11 /* solely for completeness */ 13 | #define APPLINK_FSEEK 12 14 | #define APPLINK_FTELL 13 15 | #define APPLINK_FFLUSH 14 16 | #define APPLINK_FERROR 15 17 | #define APPLINK_CLEARERR 16 18 | #define APPLINK_FILENO 17 /* to be used with below */ 19 | 20 | #define APPLINK_OPEN 18 /* formally can't be used, as flags can vary */ 21 | #define APPLINK_READ 19 22 | #define APPLINK_WRITE 20 23 | #define APPLINK_LSEEK 21 24 | #define APPLINK_CLOSE 22 25 | #define APPLINK_MAX 22 /* always same as last macro */ 26 | 27 | #ifndef APPMACROS_ONLY 28 | #include 29 | #include 30 | #include 31 | 32 | static void *app_stdin(void) { return stdin; } 33 | static void *app_stdout(void) { return stdout; } 34 | static void *app_stderr(void) { return stderr; } 35 | static int app_feof(FILE *fp) { return feof(fp); } 36 | static int app_ferror(FILE *fp) { return ferror(fp); } 37 | static void app_clearerr(FILE *fp) { clearerr(fp); } 38 | static int app_fileno(FILE *fp) { return _fileno(fp); } 39 | static int app_fsetmod(FILE *fp,char mod) 40 | { return _setmode (_fileno(fp),mod=='b'?_O_BINARY:_O_TEXT); } 41 | 42 | __declspec(dllexport) void **OPENSSL_Applink(void) 43 | { static int once=1; 44 | static void *OPENSSL_ApplinkTable[APPLINK_MAX+1]={(void *)APPLINK_MAX}; 45 | 46 | if (once) 47 | { OPENSSL_ApplinkTable[APPLINK_STDIN] = app_stdin; 48 | OPENSSL_ApplinkTable[APPLINK_STDOUT] = app_stdout; 49 | OPENSSL_ApplinkTable[APPLINK_STDERR] = app_stderr; 50 | OPENSSL_ApplinkTable[APPLINK_FPRINTF] = fprintf; 51 | OPENSSL_ApplinkTable[APPLINK_FGETS] = fgets; 52 | OPENSSL_ApplinkTable[APPLINK_FREAD] = fread; 53 | OPENSSL_ApplinkTable[APPLINK_FWRITE] = fwrite; 54 | OPENSSL_ApplinkTable[APPLINK_FSETMOD] = app_fsetmod; 55 | OPENSSL_ApplinkTable[APPLINK_FEOF] = app_feof; 56 | OPENSSL_ApplinkTable[APPLINK_FCLOSE] = fclose; 57 | 58 | OPENSSL_ApplinkTable[APPLINK_FOPEN] = fopen; 59 | OPENSSL_ApplinkTable[APPLINK_FSEEK] = fseek; 60 | OPENSSL_ApplinkTable[APPLINK_FTELL] = ftell; 61 | OPENSSL_ApplinkTable[APPLINK_FFLUSH] = fflush; 62 | OPENSSL_ApplinkTable[APPLINK_FERROR] = app_ferror; 63 | OPENSSL_ApplinkTable[APPLINK_CLEARERR] = app_clearerr; 64 | OPENSSL_ApplinkTable[APPLINK_FILENO] = app_fileno; 65 | 66 | OPENSSL_ApplinkTable[APPLINK_OPEN] = _open; 67 | OPENSSL_ApplinkTable[APPLINK_READ] = _read; 68 | OPENSSL_ApplinkTable[APPLINK_WRITE] = _write; 69 | OPENSSL_ApplinkTable[APPLINK_LSEEK] = _lseek; 70 | OPENSSL_ApplinkTable[APPLINK_CLOSE] = _close; 71 | 72 | once = 0; 73 | } 74 | 75 | return OPENSSL_ApplinkTable; 76 | } 77 | #endif 78 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* crypto/cast/cast.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CAST_H 60 | #define HEADER_CAST_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | #include 67 | 68 | #ifdef OPENSSL_NO_CAST 69 | #error CAST is disabled. 70 | #endif 71 | 72 | #define CAST_ENCRYPT 1 73 | #define CAST_DECRYPT 0 74 | 75 | #define CAST_LONG unsigned long 76 | 77 | #define CAST_BLOCK 8 78 | #define CAST_KEY_LENGTH 16 79 | 80 | typedef struct cast_key_st 81 | { 82 | CAST_LONG data[32]; 83 | int short_key; /* Use reduced rounds for short key */ 84 | } CAST_KEY; 85 | 86 | 87 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 88 | void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, 89 | int enc); 90 | void CAST_encrypt(CAST_LONG *data,CAST_KEY *key); 91 | void CAST_decrypt(CAST_LONG *data,CAST_KEY *key); 92 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 93 | CAST_KEY *ks, unsigned char *iv, int enc); 94 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 95 | long length, CAST_KEY *schedule, unsigned char *ivec, 96 | int *num, int enc); 97 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 98 | long length, CAST_KEY *schedule, unsigned char *ivec, 99 | int *num); 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif 106 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef HEADER_COMP_H 3 | #define HEADER_COMP_H 4 | 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef struct comp_ctx_st COMP_CTX; 12 | 13 | typedef struct comp_method_st 14 | { 15 | int type; /* NID for compression library */ 16 | const char *name; /* A text string to identify the library */ 17 | int (*init)(COMP_CTX *ctx); 18 | void (*finish)(COMP_CTX *ctx); 19 | int (*compress)(COMP_CTX *ctx, 20 | unsigned char *out, unsigned int olen, 21 | unsigned char *in, unsigned int ilen); 22 | int (*expand)(COMP_CTX *ctx, 23 | unsigned char *out, unsigned int olen, 24 | unsigned char *in, unsigned int ilen); 25 | /* The following two do NOTHING, but are kept for backward compatibility */ 26 | long (*ctrl)(void); 27 | long (*callback_ctrl)(void); 28 | } COMP_METHOD; 29 | 30 | struct comp_ctx_st 31 | { 32 | COMP_METHOD *meth; 33 | unsigned long compress_in; 34 | unsigned long compress_out; 35 | unsigned long expand_in; 36 | unsigned long expand_out; 37 | 38 | CRYPTO_EX_DATA ex_data; 39 | }; 40 | 41 | 42 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 43 | void COMP_CTX_free(COMP_CTX *ctx); 44 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 45 | unsigned char *in, int ilen); 46 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 47 | unsigned char *in, int ilen); 48 | COMP_METHOD *COMP_rle(void ); 49 | COMP_METHOD *COMP_zlib(void ); 50 | 51 | /* BEGIN ERROR CODES */ 52 | /* The following lines are auto generated by the script mkerr.pl. Any changes 53 | * made after this point may be overwritten when the script is next run. 54 | */ 55 | void ERR_load_COMP_strings(void); 56 | 57 | /* Error codes for the COMP functions. */ 58 | 59 | /* Function codes. */ 60 | 61 | /* Reason codes. */ 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | #endif 67 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* conf_api.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CONF_API_H 60 | #define HEADER_CONF_API_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* Up until OpenSSL 0.9.5a, this was new_section */ 70 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 71 | /* Up until OpenSSL 0.9.5a, this was get_section */ 72 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 73 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 74 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 75 | const char *section); 76 | 77 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 78 | char *_CONF_get_string(const CONF *conf, const char *section, 79 | const char *name); 80 | long _CONF_get_number(const CONF *conf, const char *section, const char *name); 81 | 82 | int _CONF_new_data(CONF *conf); 83 | void _CONF_free_data(CONF *conf); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | 90 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* crypto/ebcdic.h */ 2 | 3 | #ifndef HEADER_EBCDIC_H 4 | #define HEADER_EBCDIC_H 5 | 6 | #include 7 | 8 | /* Avoid name clashes with other applications */ 9 | #define os_toascii _openssl_os_toascii 10 | #define os_toebcdic _openssl_os_toebcdic 11 | #define ebcdic2ascii _openssl_ebcdic2ascii 12 | #define ascii2ebcdic _openssl_ascii2ebcdic 13 | 14 | extern const unsigned char os_toascii[256]; 15 | extern const unsigned char os_toebcdic[256]; 16 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 17 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 18 | 19 | #endif 20 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* crypto/idea/idea.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_IDEA_H 60 | #define HEADER_IDEA_H 61 | 62 | #include /* IDEA_INT, OPENSSL_NO_IDEA */ 63 | 64 | #ifdef OPENSSL_NO_IDEA 65 | #error IDEA is disabled. 66 | #endif 67 | 68 | #define IDEA_ENCRYPT 1 69 | #define IDEA_DECRYPT 0 70 | 71 | #define IDEA_BLOCK 8 72 | #define IDEA_KEY_LENGTH 16 73 | 74 | #ifdef __cplusplus 75 | extern "C" { 76 | #endif 77 | 78 | typedef struct idea_key_st 79 | { 80 | IDEA_INT data[9][6]; 81 | } IDEA_KEY_SCHEDULE; 82 | 83 | const char *idea_options(void); 84 | void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 85 | IDEA_KEY_SCHEDULE *ks); 86 | void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 87 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 88 | void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 89 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); 90 | void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, 91 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 92 | int *num,int enc); 93 | void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); 95 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif 101 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/md2.h: -------------------------------------------------------------------------------- 1 | /* crypto/md/md2.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MD2_H 60 | #define HEADER_MD2_H 61 | 62 | #include /* OPENSSL_NO_MD2, MD2_INT */ 63 | #ifdef OPENSSL_NO_MD2 64 | #error MD2 is disabled. 65 | #endif 66 | 67 | #define MD2_DIGEST_LENGTH 16 68 | #define MD2_BLOCK 16 69 | 70 | #ifdef __cplusplus 71 | extern "C" { 72 | #endif 73 | 74 | typedef struct MD2state_st 75 | { 76 | unsigned int num; 77 | unsigned char data[MD2_BLOCK]; 78 | MD2_INT cksm[MD2_BLOCK]; 79 | MD2_INT state[MD2_BLOCK]; 80 | } MD2_CTX; 81 | 82 | const char *MD2_options(void); 83 | int MD2_Init(MD2_CTX *c); 84 | int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); 85 | int MD2_Final(unsigned char *md, MD2_CTX *c); 86 | unsigned char *MD2(const unsigned char *d, size_t n,unsigned char *md); 87 | #ifdef __cplusplus 88 | } 89 | #endif 90 | 91 | #endif 92 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_OPENSSLV_H 2 | #define HEADER_OPENSSLV_H 3 | 4 | /* Numeric release version identifier: 5 | * MNNFFPPS: major minor fix patch status 6 | * The status nibble has one of the values 0 for development, 1 to e for betas 7 | * 1 to 14, and f for release. The patch level is exactly that. 8 | * For example: 9 | * 0.9.3-dev 0x00903000 10 | * 0.9.3-beta1 0x00903001 11 | * 0.9.3-beta2-dev 0x00903002 12 | * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) 13 | * 0.9.3 0x0090300f 14 | * 0.9.3a 0x0090301f 15 | * 0.9.4 0x0090400f 16 | * 1.2.3z 0x102031af 17 | * 18 | * For continuity reasons (because 0.9.5 is already out, and is coded 19 | * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level 20 | * part is slightly different, by setting the highest bit. This means 21 | * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start 22 | * with 0x0090600S... 23 | * 24 | * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) 25 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for 26 | * major minor fix final patch/beta) 27 | */ 28 | #define OPENSSL_VERSION_NUMBER 0x0090801fL 29 | #ifdef OPENSSL_FIPS 30 | #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8a-fips 11 Oct 2005" 31 | #else 32 | #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8a 11 Oct 2005" 33 | #endif 34 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 35 | 36 | 37 | /* The macros below are to be used for shared library (.so, .dll, ...) 38 | * versioning. That kind of versioning works a bit differently between 39 | * operating systems. The most usual scheme is to set a major and a minor 40 | * number, and have the runtime loader check that the major number is equal 41 | * to what it was at application link time, while the minor number has to 42 | * be greater or equal to what it was at application link time. With this 43 | * scheme, the version number is usually part of the file name, like this: 44 | * 45 | * libcrypto.so.0.9 46 | * 47 | * Some unixen also make a softlink with the major verson number only: 48 | * 49 | * libcrypto.so.0 50 | * 51 | * On Tru64 and IRIX 6.x it works a little bit differently. There, the 52 | * shared library version is stored in the file, and is actually a series 53 | * of versions, separated by colons. The rightmost version present in the 54 | * library when linking an application is stored in the application to be 55 | * matched at run time. When the application is run, a check is done to 56 | * see if the library version stored in the application matches any of the 57 | * versions in the version string of the library itself. 58 | * This version string can be constructed in any way, depending on what 59 | * kind of matching is desired. However, to implement the same scheme as 60 | * the one used in the other unixen, all compatible versions, from lowest 61 | * to highest, should be part of the string. Consecutive builds would 62 | * give the following versions strings: 63 | * 64 | * 3.0 65 | * 3.0:3.1 66 | * 3.0:3.1:3.2 67 | * 4.0 68 | * 4.0:4.1 69 | * 70 | * Notice how version 4 is completely incompatible with version, and 71 | * therefore give the breach you can see. 72 | * 73 | * There may be other schemes as well that I haven't yet discovered. 74 | * 75 | * So, here's the way it works here: first of all, the library version 76 | * number doesn't need at all to match the overall OpenSSL version. 77 | * However, it's nice and more understandable if it actually does. 78 | * The current library version is stored in the macro SHLIB_VERSION_NUMBER, 79 | * which is just a piece of text in the format "M.m.e" (Major, minor, edit). 80 | * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, 81 | * we need to keep a history of version numbers, which is done in the 82 | * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and 83 | * should only keep the versions that are binary compatible with the current. 84 | */ 85 | #define SHLIB_VERSION_HISTORY "" 86 | #define SHLIB_VERSION_NUMBER "0.9.8" 87 | 88 | 89 | #endif /* HEADER_OPENSSLV_H */ 90 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * 3. All advertising materials mentioning features or use of this 17 | * software must display the following acknowledgment: 18 | * "This product includes software developed by the OpenSSL Project 19 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 20 | * 21 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 22 | * endorse or promote products derived from this software without 23 | * prior written permission. For written permission, please contact 24 | * licensing@OpenSSL.org. 25 | * 26 | * 5. Products derived from this software may not be called "OpenSSL" 27 | * nor may "OpenSSL" appear in their names without prior written 28 | * permission of the OpenSSL Project. 29 | * 30 | * 6. Redistributions of any form whatsoever must retain the following 31 | * acknowledgment: 32 | * "This product includes software developed by the OpenSSL Project 33 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 34 | * 35 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 36 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 37 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 38 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 39 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 41 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 42 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 44 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 45 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 46 | * OF THE POSSIBILITY OF SUCH DAMAGE. 47 | * ==================================================================== 48 | * 49 | * This product includes cryptographic software written by Eric Young 50 | * (eay@cryptsoft.com). This product includes software written by Tim 51 | * Hudson (tjh@cryptsoft.com). 52 | * 53 | */ 54 | 55 | /* 56 | * This header only exists to break a circular dependency between pem and err 57 | * Ben 30 Jan 1999. 58 | */ 59 | 60 | #ifdef __cplusplus 61 | extern "C" { 62 | #endif 63 | 64 | #ifndef HEADER_PEM_H 65 | void ERR_load_PEM_strings(void); 66 | #endif 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/pqueue.h: -------------------------------------------------------------------------------- 1 | /* crypto/pqueue/pqueue.h */ 2 | /* 3 | * DTLS implementation written by Nagendra Modadugu 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * openssl-core@OpenSSL.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | 60 | #ifndef HEADER_PQUEUE_H 61 | #define HEADER_PQUEUE_H 62 | 63 | #include 64 | #include 65 | #include 66 | 67 | #include 68 | 69 | typedef struct _pqueue *pqueue; 70 | 71 | typedef struct _pitem 72 | { 73 | PQ_64BIT priority; 74 | void *data; 75 | struct _pitem *next; 76 | } pitem; 77 | 78 | typedef struct _pitem *piterator; 79 | 80 | pitem *pitem_new(PQ_64BIT priority, void *data); 81 | void pitem_free(pitem *item); 82 | 83 | pqueue pqueue_new(void); 84 | void pqueue_free(pqueue pq); 85 | 86 | pitem *pqueue_insert(pqueue pq, pitem *item); 87 | pitem *pqueue_peek(pqueue pq); 88 | pitem *pqueue_pop(pqueue pq); 89 | pitem *pqueue_find(pqueue pq, PQ_64BIT priority); 90 | pitem *pqueue_iterator(pqueue pq); 91 | pitem *pqueue_next(piterator *iter); 92 | 93 | void pqueue_print(pqueue pq); 94 | 95 | #endif /* ! HEADER_PQUEUE_H */ 96 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc2/rc2.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC2_H 60 | #define HEADER_RC2_H 61 | 62 | #include /* OPENSSL_NO_RC2, RC2_INT */ 63 | #ifdef OPENSSL_NO_RC2 64 | #error RC2 is disabled. 65 | #endif 66 | 67 | #define RC2_ENCRYPT 1 68 | #define RC2_DECRYPT 0 69 | 70 | #define RC2_BLOCK 8 71 | #define RC2_KEY_LENGTH 16 72 | 73 | #ifdef __cplusplus 74 | extern "C" { 75 | #endif 76 | 77 | typedef struct rc2_key_st 78 | { 79 | RC2_INT data[64]; 80 | } RC2_KEY; 81 | 82 | 83 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); 84 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, 85 | int enc); 86 | void RC2_encrypt(unsigned long *data,RC2_KEY *key); 87 | void RC2_decrypt(unsigned long *data,RC2_KEY *key); 88 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 89 | RC2_KEY *ks, unsigned char *iv, int enc); 90 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 91 | long length, RC2_KEY *schedule, unsigned char *ivec, 92 | int *num, int enc); 93 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, RC2_KEY *schedule, unsigned char *ivec, 95 | int *num); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif 102 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc4/rc4.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC4_H 60 | #define HEADER_RC4_H 61 | 62 | #include /* OPENSSL_NO_RC4, RC4_INT */ 63 | #ifdef OPENSSL_NO_RC4 64 | #error RC4 is disabled. 65 | #endif 66 | 67 | #ifdef __cplusplus 68 | extern "C" { 69 | #endif 70 | 71 | typedef struct rc4_key_st 72 | { 73 | RC4_INT x,y; 74 | RC4_INT data[256]; 75 | } RC4_KEY; 76 | 77 | 78 | const char *RC4_options(void); 79 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 80 | void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, 81 | unsigned char *outdata); 82 | 83 | #ifdef __cplusplus 84 | } 85 | #endif 86 | 87 | #endif 88 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* crypto/ripemd/ripemd.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RIPEMD_H 60 | #define HEADER_RIPEMD_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #ifdef OPENSSL_NO_RIPEMD 69 | #error RIPEMD is disabled. 70 | #endif 71 | 72 | #if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) 73 | #define RIPEMD160_LONG unsigned long 74 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 75 | #define RIPEMD160_LONG unsigned long 76 | #define RIPEMD160_LONG_LOG2 3 77 | #else 78 | #define RIPEMD160_LONG unsigned int 79 | #endif 80 | 81 | #define RIPEMD160_CBLOCK 64 82 | #define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 83 | #define RIPEMD160_DIGEST_LENGTH 20 84 | 85 | typedef struct RIPEMD160state_st 86 | { 87 | RIPEMD160_LONG A,B,C,D,E; 88 | RIPEMD160_LONG Nl,Nh; 89 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 90 | unsigned int num; 91 | } RIPEMD160_CTX; 92 | 93 | int RIPEMD160_Init(RIPEMD160_CTX *c); 94 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 95 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 96 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, 97 | unsigned char *md); 98 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif 104 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | /* ssl/ssl23.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_SSL23_H 60 | #define HEADER_SSL23_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | /*client */ 67 | /* write to server */ 68 | #define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT) 69 | #define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT) 70 | /* read from server */ 71 | #define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT) 72 | #define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT) 73 | 74 | /* server */ 75 | /* read from client */ 76 | #define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) 77 | #define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT) 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | 84 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/tmdiff.h: -------------------------------------------------------------------------------- 1 | /* crypto/tmdiff.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | /* Header for dynamic hash table routines 60 | * Author - Eric Young 61 | */ 62 | /* ... erm yeah, "dynamic hash tables" you say? 63 | * 64 | * And what would dynamic hash tables have to do with any of this code *now*? 65 | * AFAICS, this code is only referenced by crypto/bn/exp.c which is an unused 66 | * file that I doubt compiles any more. speed.c is the only thing that could 67 | * use this (and it has nothing to do with hash tables), yet it instead has its 68 | * own duplication of all this stuff and looks, if anything, more complete. See 69 | * the corresponding note in apps/speed.c. 70 | * The Bemused - Geoff 71 | */ 72 | 73 | #ifndef HEADER_TMDIFF_H 74 | #define HEADER_TMDIFF_H 75 | 76 | #ifdef __cplusplus 77 | extern "C" { 78 | #endif 79 | 80 | typedef struct ms_tm MS_TM; 81 | 82 | MS_TM *ms_time_new(void ); 83 | void ms_time_free(MS_TM *a); 84 | void ms_time_get(MS_TM *a); 85 | double ms_time_diff(MS_TM *start, MS_TM *end); 86 | int ms_time_cmp(const MS_TM *ap, const MS_TM *bp); 87 | 88 | #ifdef __cplusplus 89 | } 90 | #endif 91 | 92 | #endif 93 | 94 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* crypto/txt_db/txt_db.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_TXT_DB_H 60 | #define HEADER_TXT_DB_H 61 | 62 | #include 63 | #ifndef OPENSSL_NO_BIO 64 | #include 65 | #endif 66 | #include 67 | #include 68 | 69 | #define DB_ERROR_OK 0 70 | #define DB_ERROR_MALLOC 1 71 | #define DB_ERROR_INDEX_CLASH 2 72 | #define DB_ERROR_INDEX_OUT_OF_RANGE 3 73 | #define DB_ERROR_NO_INDEX 4 74 | #define DB_ERROR_INSERT_INDEX_CLASH 5 75 | 76 | #ifdef __cplusplus 77 | extern "C" { 78 | #endif 79 | 80 | typedef struct txt_db_st 81 | { 82 | int num_fields; 83 | STACK /* char ** */ *data; 84 | LHASH **index; 85 | int (**qual)(char **); 86 | long error; 87 | long arg1; 88 | long arg2; 89 | char **arg_row; 90 | } TXT_DB; 91 | 92 | #ifndef OPENSSL_NO_BIO 93 | TXT_DB *TXT_DB_read(BIO *in, int num); 94 | long TXT_DB_write(BIO *out, TXT_DB *db); 95 | #else 96 | TXT_DB *TXT_DB_read(char *in, int num); 97 | long TXT_DB_write(char *out, TXT_DB *db); 98 | #endif 99 | int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(char **), 100 | LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); 101 | void TXT_DB_free(TXT_DB *db); 102 | char **TXT_DB_get_by_index(TXT_DB *db, int idx, char **value); 103 | int TXT_DB_insert(TXT_DB *db,char **value); 104 | 105 | #ifdef __cplusplus 106 | } 107 | #endif 108 | 109 | #endif 110 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/include/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | /* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 3 | * project 2001. 4 | */ 5 | /* ==================================================================== 6 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. All advertising materials mentioning features or use of this 21 | * software must display the following acknowledgment: 22 | * "This product includes software developed by the OpenSSL Project 23 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 24 | * 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26 | * endorse or promote products derived from this software without 27 | * prior written permission. For written permission, please contact 28 | * openssl-core@openssl.org. 29 | * 30 | * 5. Products derived from this software may not be called "OpenSSL" 31 | * nor may "OpenSSL" appear in their names without prior written 32 | * permission of the OpenSSL Project. 33 | * 34 | * 6. Redistributions of any form whatsoever must retain the following 35 | * acknowledgment: 36 | * "This product includes software developed by the OpenSSL Project 37 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 38 | * 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * ==================================================================== 52 | * 53 | * This product includes cryptographic software written by Eric Young 54 | * (eay@cryptsoft.com). This product includes software written by Tim 55 | * Hudson (tjh@cryptsoft.com). 56 | * 57 | */ 58 | 59 | #ifndef HEADER_UI_COMPAT_H 60 | #define HEADER_UI_COMPAT_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* The following functions were previously part of the DES section, 70 | and are provided here for backward compatibility reasons. */ 71 | 72 | #define des_read_pw_string(b,l,p,v) \ 73 | _ossl_old_des_read_pw_string((b),(l),(p),(v)) 74 | #define des_read_pw(b,bf,s,p,v) \ 75 | _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) 76 | 77 | int _ossl_old_des_read_pw_string(char *buf,int length,const char *prompt,int verify); 78 | int _ossl_old_des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif 84 |  -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/lib/libeay32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/openssl-0.9.8a.win32/lib/libeay32.lib -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/lib/libeay32_a.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/openssl-0.9.8a.win32/lib/libeay32_a.lib -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/lib/ssleay32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/openssl-0.9.8a.win32/lib/ssleay32.lib -------------------------------------------------------------------------------- /expack/openssl-0.9.8a.win32/lib/ssleay32_a.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/openssl-0.9.8a.win32/lib/ssleay32_a.lib -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/bin/pcre-config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | prefix=c:/progra~1/Pcre 4 | exec_prefix=${prefix} 5 | exec_prefix_set=no 6 | 7 | usage="\ 8 | Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]" 9 | 10 | if test $# -eq 0; then 11 | echo "${usage}" 1>&2 12 | exit 1 13 | fi 14 | 15 | libR= 16 | case `uname -s` in 17 | *SunOS*) 18 | libR=" -R${exec_prefix}/lib" 19 | ;; 20 | esac 21 | 22 | while test $# -gt 0; do 23 | case "$1" in 24 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 25 | *) optarg= ;; 26 | esac 27 | 28 | case $1 in 29 | --prefix=*) 30 | prefix=$optarg 31 | if test $exec_prefix_set = no ; then 32 | exec_prefix=$optarg 33 | fi 34 | ;; 35 | --prefix) 36 | echo $prefix 37 | ;; 38 | --exec-prefix=*) 39 | exec_prefix=$optarg 40 | exec_prefix_set=yes 41 | ;; 42 | --exec-prefix) 43 | echo $exec_prefix 44 | ;; 45 | --version) 46 | echo 7.0 47 | ;; 48 | --cflags | --cflags-posix) 49 | if test ${prefix}/include != /usr/include ; then 50 | includes=-I${prefix}/include 51 | fi 52 | echo $includes 53 | ;; 54 | --libs-posix) 55 | echo -L${exec_prefix}/lib$libR -lpcreposix -lpcre -Wl,-s 56 | ;; 57 | --libs) 58 | echo -L${exec_prefix}/lib$libR -lpcre -Wl,-s 59 | ;; 60 | *) 61 | echo "${usage}" 1>&2 62 | exit 1 63 | ;; 64 | esac 65 | shift 66 | done 67 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/bin/pcre3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/bin/pcre3.dll -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/bin/pcregrep.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/bin/pcregrep.exe -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/bin/pcreposix3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/bin/pcreposix3.dll -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/bin/pcretest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/bin/pcretest.exe -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/contrib/pcre/7.0/pcre-7.0-GnuWin32.README: -------------------------------------------------------------------------------- 1 | * Pcre-7.0 for Windows * 2 | ======================== 3 | 4 | What is it? 5 | ----------- 6 | Pcre: Perl-compatible regular-expression library 7 | 8 | Description 9 | ----------- 10 | The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API. The PCRE library is free, even for building commercial software. 11 | 12 | Homepage 13 | -------- 14 | http://www.pcre.org 15 | 16 | System 17 | ------ 18 | - Win32, i.e. MS-Windows 95 / 98 / ME / NT / 2000 / XP / 2003 with msvcrt.dll 19 | - if msvcrt.dll is not in your Windows/System folder, get it from 20 | Microsoft 21 | or by installing Internet Explorer 4.0 or higher 22 | 23 | - libgw32c (for developing with Pcre library) 24 | 25 | Notes 26 | ----- 27 | - Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net 28 | 29 | Package Availability 30 | -------------------- 31 | - in: http://gnuwin32.sourceforge.net 32 | Installation 33 | ------------ 34 | 35 | Sources 36 | ------- 37 | - pcre-7.0-src.zip 38 | 39 | Compilation 40 | ----------- 41 | The package has been compiled with GNU auto-tools, GNU make, and Mingw 42 | (GCC for MS-Windows). Any differences from the original sources are given 43 | in pcre-7.0-GnuWin32.diffs in pcre-7.0-src.zip. Libraries needed 44 | for compilation can be found at the lines starting with 'LIBS = ' in the 45 | Makefiles. Usually, these are standard libraries provided with Mingw, or 46 | libraries from the package itself; 'gw32c' refers to the libgw32c package, 47 | which provides MS-Windows substitutes or stubs for functions normally found in 48 | Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html 49 | and http://gnuwin32.sourceforge.net/packages/libgw32c.htm. 50 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/contrib/pcre/7.0/pcre-7.0-src/AUTHORS: -------------------------------------------------------------------------------- 1 | THE MAIN PCRE LIBRARY 2 | --------------------- 3 | 4 | Written by: Philip Hazel 5 | Email local part: ph10 6 | Email domain: cam.ac.uk 7 | 8 | University of Cambridge Computing Service, 9 | Cambridge, England. Phone: +44 1223 334714. 10 | 11 | Copyright (c) 1997-2006 University of Cambridge 12 | All rights reserved 13 | 14 | 15 | THE C++ WRAPPER LIBRARY 16 | ----------------------- 17 | 18 | Written by: Google Inc. 19 | 20 | Copyright (c) 2006 Google Inc 21 | All rights reserved 22 | 23 | #### 24 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/contrib/pcre/7.0/pcre-7.0-src/COPYING: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | ------------ 3 | 4 | PCRE is a library of functions to support regular expressions whose syntax 5 | and semantics are as close as possible to those of the Perl 5 language. 6 | 7 | Release 7 of PCRE is distributed under the terms of the "BSD" licence, as 8 | specified below. The documentation for PCRE, supplied in the "doc" 9 | directory, is distributed under the same terms as the software itself. 10 | 11 | The basic library functions are written in C and are freestanding. Also 12 | included in the distribution is a set of C++ wrapper functions. 13 | 14 | 15 | THE BASIC LIBRARY FUNCTIONS 16 | --------------------------- 17 | 18 | Written by: Philip Hazel 19 | Email local part: ph10 20 | Email domain: cam.ac.uk 21 | 22 | University of Cambridge Computing Service, 23 | Cambridge, England. Phone: +44 1223 334714. 24 | 25 | Copyright (c) 1997-2006 University of Cambridge 26 | All rights reserved. 27 | 28 | 29 | THE C++ WRAPPER FUNCTIONS 30 | ------------------------- 31 | 32 | Contributed by: Google Inc. 33 | 34 | Copyright (c) 2006, Google Inc. 35 | All rights reserved. 36 | 37 | 38 | THE "BSD" LICENCE 39 | ----------------- 40 | 41 | Redistribution and use in source and binary forms, with or without 42 | modification, are permitted provided that the following conditions are met: 43 | 44 | * Redistributions of source code must retain the above copyright notice, 45 | this list of conditions and the following disclaimer. 46 | 47 | * Redistributions in binary form must reproduce the above copyright 48 | notice, this list of conditions and the following disclaimer in the 49 | documentation and/or other materials provided with the distribution. 50 | 51 | * Neither the name of the University of Cambridge nor the name of Google 52 | Inc. nor the names of their contributors may be used to endorse or 53 | promote products derived from this software without specific prior 54 | written permission. 55 | 56 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 57 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 58 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 59 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 60 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 61 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 62 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 63 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 64 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 65 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 66 | POSSIBILITY OF SUCH DAMAGE. 67 | 68 | End 69 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/contrib/pcre/7.0/pcre-7.0-src/LICENCE: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | ------------ 3 | 4 | PCRE is a library of functions to support regular expressions whose syntax 5 | and semantics are as close as possible to those of the Perl 5 language. 6 | 7 | Release 7 of PCRE is distributed under the terms of the "BSD" licence, as 8 | specified below. The documentation for PCRE, supplied in the "doc" 9 | directory, is distributed under the same terms as the software itself. 10 | 11 | The basic library functions are written in C and are freestanding. Also 12 | included in the distribution is a set of C++ wrapper functions. 13 | 14 | 15 | THE BASIC LIBRARY FUNCTIONS 16 | --------------------------- 17 | 18 | Written by: Philip Hazel 19 | Email local part: ph10 20 | Email domain: cam.ac.uk 21 | 22 | University of Cambridge Computing Service, 23 | Cambridge, England. Phone: +44 1223 334714. 24 | 25 | Copyright (c) 1997-2006 University of Cambridge 26 | All rights reserved. 27 | 28 | 29 | THE C++ WRAPPER FUNCTIONS 30 | ------------------------- 31 | 32 | Contributed by: Google Inc. 33 | 34 | Copyright (c) 2006, Google Inc. 35 | All rights reserved. 36 | 37 | 38 | THE "BSD" LICENCE 39 | ----------------- 40 | 41 | Redistribution and use in source and binary forms, with or without 42 | modification, are permitted provided that the following conditions are met: 43 | 44 | * Redistributions of source code must retain the above copyright notice, 45 | this list of conditions and the following disclaimer. 46 | 47 | * Redistributions in binary form must reproduce the above copyright 48 | notice, this list of conditions and the following disclaimer in the 49 | documentation and/or other materials provided with the distribution. 50 | 51 | * Neither the name of the University of Cambridge nor the name of Google 52 | Inc. nor the names of their contributors may be used to endorse or 53 | promote products derived from this software without specific prior 54 | written permission. 55 | 56 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 57 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 58 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 59 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 60 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 61 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 62 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 63 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 64 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 65 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 66 | POSSIBILITY OF SUCH DAMAGE. 67 | 68 | End 69 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/include/regex.h: -------------------------------------------------------------------------------- 1 | #ifndef _REGEX_H 2 | #define _REGEX_H 1 3 | 4 | # include 5 | # include 6 | 7 | #endif /* _REGEX_H */ 8 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/libpcre.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/lib/libpcre.dll.a -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/libpcreposix.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/lib/libpcreposix.dll.a -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/pcre-bcc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/lib/pcre-bcc.lib -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/pcre.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/lib/pcre.lib -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/pcre3.dll.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | DllGetVersion 3 | pcre_callout DATA 4 | pcre_compile 5 | pcre_compile2 6 | pcre_config 7 | pcre_copy_named_substring 8 | pcre_copy_substring 9 | pcre_dfa_exec 10 | pcre_exec 11 | pcre_free DATA 12 | pcre_free_substring 13 | pcre_free_substring_list 14 | pcre_fullinfo 15 | pcre_get_named_substring 16 | pcre_get_stringnumber 17 | pcre_get_stringtable_entries 18 | pcre_get_substring 19 | pcre_get_substring_list 20 | pcre_info 21 | pcre_maketables 22 | pcre_malloc DATA 23 | pcre_refcount 24 | pcre_stack_free DATA 25 | pcre_stack_malloc DATA 26 | pcre_study 27 | pcre_version 28 | regcomp 29 | regerror 30 | regexec 31 | regfree 32 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/pcreposix-bcc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/lib/pcreposix-bcc.lib -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/pcreposix.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/pcre-7.0-win32/lib/pcreposix.lib -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/pcreposix3.dll.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | DllGetVersion 3 | pcre_callout DATA 4 | pcre_free DATA 5 | pcre_malloc DATA 6 | pcre_stack_free DATA 7 | pcre_stack_malloc DATA 8 | regcomp 9 | regerror 10 | regexec 11 | regfree 12 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/lib/pkgconfig/libpcre.pc: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=c:/progra~1/Pcre 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libpcre 9 | Description: PCRE - Perl compatible regular expressions C library 10 | Version: 7.0 11 | Libs: -L${libdir} -lpcre 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_compile.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_COMPILE(3) PCRE_COMPILE(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | pcre *pcre_compile(const char *pattern, int options, 13 | const char **errptr, int *erroffset, 14 | const unsigned char *tableptr); 15 | 16 | DESCRIPTION 17 | 18 | This function compiles a regular expression into an 19 | internal form. It is the same as pcre_compile2(), except 20 | for the absence of the errorcodeptr argument. Its argu- 21 | ments are: 22 | 23 | pattern A zero-terminated string containing the 24 | regular expression to be compiled 25 | options Zero or more option bits 26 | errptr Where to put an error message 27 | erroffset Offset in pattern where error was found 28 | tableptr Pointer to character tables, or NULL to 29 | use the built-in default 30 | 31 | The option bits are: 32 | 33 | PCRE_ANCHORED Force pattern anchoring 34 | PCRE_AUTO_CALLOUT Compile automatic callouts 35 | PCRE_CASELESS Do caseless matching 36 | PCRE_DOLLAR_ENDONLY $ not to match newline at end 37 | PCRE_DOTALL . matches anything including NL 38 | PCRE_DUPNAMES Allow duplicate names for sub- 39 | patterns 40 | PCRE_EXTENDED Ignore whitespace and # comments 41 | PCRE_EXTRA PCRE extra features 42 | (not much use currently) 43 | PCRE_FIRSTLINE Force matching to be before new- 44 | line 45 | PCRE_MULTILINE ^ and $ match newlines within 46 | data 47 | PCRE_NEWLINE_ANY Recognize any Unicode newline 48 | sequence 49 | PCRE_NEWLINE_CR Set CR as the newline sequence 50 | PCRE_NEWLINE_CRLF Set CRLF as the newline sequence 51 | PCRE_NEWLINE_LF Set LF as the newline sequence 52 | PCRE_NO_AUTO_CAPTURE Disable numbered capturing 53 | paren- 54 | theses (named ones available) 55 | PCRE_UNGREEDY Invert greediness of quantifiers 56 | PCRE_UTF8 Run in UTF-8 mode 57 | PCRE_NO_UTF8_CHECK Do not check the pattern for 58 | UTF-8 59 | validity (only relevant if 60 | PCRE_UTF8 is set) 61 | 62 | PCRE must be built with UTF-8 support in order to use 63 | PCRE_UTF8 and PCRE_NO_UTF8_CHECK. 64 | 65 | The yield of the function is a pointer to a private data 66 | structure that contains the compiled pattern, or NULL if 67 | an error was detected. 68 | 69 | There is a complete description of the PCRE native API 70 | in the pcreapi page and a description of the POSIX API 71 | in the pcreposix page. 72 | 73 | 74 | 75 | PCRE_COMPILE(3) 76 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_compile2.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_COMPILE2(3) PCRE_COMPILE2(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | pcre *pcre_compile2(const char *pattern, int options, 13 | int *errorcodeptr, 14 | const char **errptr, int *erroffset, 15 | const unsigned char *tableptr); 16 | 17 | DESCRIPTION 18 | 19 | This function compiles a regular expression into an 20 | internal form. It is the same as pcre_compile(), except 21 | for the addition of the errorcodeptr argument. The argu- 22 | ments are: 23 | 24 | 25 | pattern A zero-terminated string containing the 26 | regular expression to be compiled 27 | options Zero or more option bits 28 | errorcodeptr Where to put an error code 29 | errptr Where to put an error message 30 | erroffset Offset in pattern where error was found 31 | tableptr Pointer to character tables, or NULL to 32 | use the built-in default 33 | 34 | The option bits are: 35 | 36 | PCRE_ANCHORED Force pattern anchoring 37 | PCRE_AUTO_CALLOUT Compile automatic callouts 38 | PCRE_CASELESS Do caseless matching 39 | PCRE_DOLLAR_ENDONLY $ not to match newline at end 40 | PCRE_DOTALL . matches anything including NL 41 | PCRE_DUPNAMES Allow duplicate names for sub- 42 | patterns 43 | PCRE_EXTENDED Ignore whitespace and # comments 44 | PCRE_EXTRA PCRE extra features 45 | (not much use currently) 46 | PCRE_FIRSTLINE Force matching to be before new- 47 | line 48 | PCRE_MULTILINE ^ and $ match newlines within 49 | data 50 | PCRE_NEWLINE_ANY Recognize any Unicode newline 51 | sequence 52 | PCRE_NEWLINE_CR Set CR as the newline sequence 53 | PCRE_NEWLINE_CRLF Set CRLF as the newline sequence 54 | PCRE_NEWLINE_LF Set LF as the newline sequence 55 | PCRE_NO_AUTO_CAPTURE Disable numbered capturing 56 | paren- 57 | theses (named ones available) 58 | PCRE_UNGREEDY Invert greediness of quantifiers 59 | PCRE_UTF8 Run in UTF-8 mode 60 | PCRE_NO_UTF8_CHECK Do not check the pattern for 61 | UTF-8 62 | validity (only relevant if 63 | PCRE_UTF8 is set) 64 | 65 | PCRE must be built with UTF-8 support in order to use 66 | PCRE_UTF8 and PCRE_NO_UTF8_CHECK. 67 | 68 | The yield of the function is a pointer to a private data 69 | structure that contains the compiled pattern, or NULL if 70 | an error was detected. 71 | 72 | There is a complete description of the PCRE native API 73 | in the pcreapi page and a description of the POSIX API 74 | in the pcreposix page. 75 | 76 | 77 | 78 | PCRE_COMPILE2(3) 79 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_config.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_CONFIG(3) PCRE_CONFIG(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_config(int what, void *where); 13 | 14 | DESCRIPTION 15 | 16 | This function makes it possible for a client program to 17 | find out which optional features are available in the 18 | version of the PCRE library it is using. Its arguments 19 | are as follows: 20 | 21 | what A code specifying what information is 22 | required 23 | where Points to where to put the data 24 | 25 | The available codes are: 26 | 27 | PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 28 | 4 29 | PCRE_CONFIG_MATCH_LIMIT Internal resource limit 30 | PCRE_CONFIG_MATCH_LIMIT_RECURSION 31 | Internal recursion depth 32 | limit 33 | PCRE_CONFIG_NEWLINE Value of the newline 34 | sequence: 35 | 13 (0x000d) for CR 36 | 10 (0x000a) for LF 37 | 3338 (0x0d0a) for CRLF 38 | -1 for ANY 39 | PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 40 | Threshold of return slots, 41 | above 42 | which malloc() is used by 43 | the POSIX API 44 | PCRE_CONFIG_STACKRECURSE Recursion implementation 45 | (1=stack 0=heap) 46 | PCRE_CONFIG_UTF8 Availability of UTF-8 sup- 47 | port (1=yes 0=no) 48 | PCRE_CONFIG_UNICODE_PROPERTIES 49 | Availability of Unicode 50 | property support 51 | (1=yes 0=no) 52 | 53 | The function yields 0 on success or PCRE_ERROR_BADOPTION 54 | otherwise. 55 | 56 | There is a complete description of the PCRE native API 57 | in the pcreapi page and a description of the POSIX API 58 | in the pcreposix page. 59 | 60 | 61 | 62 | PCRE_CONFIG(3) 63 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_copy_named_substring.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_COPY_NAMED_SUBSTRING(3) PCRE_COPY_NAMED_SUBSTRING(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_copy_named_substring(const pcre *code, 13 | const char *subject, int *ovector, 14 | int stringcount, const char *stringname, 15 | char *buffer, int buffersize); 16 | 17 | DESCRIPTION 18 | 19 | This is a convenience function for extracting a captured 20 | substring, identified by name, into a given buffer. The 21 | arguments are: 22 | 23 | code Pattern that was successfully matched 24 | subject Subject that has been successfully 25 | matched 26 | ovector Offset vector that pcre_exec() used 27 | stringcount Value returned by pcre_exec() 28 | stringname Name of the required substring 29 | buffer Buffer to receive the string 30 | buffersize Size of buffer 31 | 32 | The yield is the length of the substring, 33 | PCRE_ERROR_NOMEMORY if the buffer was too small, or 34 | PCRE_ERROR_NOSUBSTRING if the string name is invalid. 35 | 36 | There is a complete description of the PCRE native API 37 | in the pcreapi page and a description of the POSIX API 38 | in the pcreposix page. 39 | 40 | 41 | 42 | PCRE_COPY_NAMED_SUBSTRING(3) 43 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_copy_substring.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_COPY_SUBSTRING(3) PCRE_COPY_SUBSTRING(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_copy_substring(const char *subject, int *ovec- 13 | tor, 14 | int stringcount, int stringnumber, char *buffer, 15 | int buffersize); 16 | 17 | DESCRIPTION 18 | 19 | This is a convenience function for extracting a captured 20 | substring into a given buffer. The arguments are: 21 | 22 | subject Subject that has been successfully 23 | matched 24 | ovector Offset vector that pcre_exec() used 25 | stringcount Value returned by pcre_exec() 26 | stringnumber Number of the required substring 27 | buffer Buffer to receive the string 28 | buffersize Size of buffer 29 | 30 | The yield is the length of the string, PCRE_ERROR_NOMEM- 31 | ORY if the buffer was too small, or PCRE_ERROR_NOSUB- 32 | STRING if the string number is invalid. 33 | 34 | There is a complete description of the PCRE native API 35 | in the pcreapi page and a description of the POSIX API 36 | in the pcreposix page. 37 | 38 | 39 | 40 | PCRE_COPY_SUBSTRING(3) 41 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_dfa_exec.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_DFA_EXEC(3) PCRE_DFA_EXEC(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_dfa_exec(const pcre *code, const pcre_extra 13 | *extra, 14 | const char *subject, int length, int startoffset, 15 | int options, int *ovector, int ovecsize, 16 | int *workspace, int wscount); 17 | 18 | DESCRIPTION 19 | 20 | This function matches a compiled regular expression 21 | against a given subject string, using an alternative 22 | matching algorithm that scans the subject string just 23 | once (not Perl-compatible). Note that the main, Perl- 24 | compatible, matching function is pcre_exec(). The argu- 25 | ments for this function are: 26 | 27 | code Points to the compiled pattern 28 | extra Points to an associated pcre_extra struc- 29 | ture, 30 | or is NULL 31 | subject Points to the subject string 32 | length Length of the subject string, in bytes 33 | startoffset Offset in bytes in the subject at which 34 | to 35 | start matching 36 | options Option bits 37 | ovector Points to a vector of ints for result 38 | offsets 39 | ovecsize Number of elements in the vector 40 | workspace Points to a vector of ints used as work- 41 | ing space 42 | wscount Number of elements in the vector 43 | 44 | The options are: 45 | 46 | PCRE_ANCHORED Match only at the first position 47 | PCRE_NEWLINE_ANY Recognize any Unicode newline 48 | sequence 49 | PCRE_NEWLINE_CR Set CR as the newline sequence 50 | PCRE_NEWLINE_CRLF Set CRLF as the newline sequence 51 | PCRE_NEWLINE_LF Set LF as the newline sequence 52 | PCRE_NOTBOL Subject is not the beginning of a 53 | line 54 | PCRE_NOTEOL Subject is not the end of a line 55 | PCRE_NOTEMPTY An empty string is not a valid 56 | match 57 | PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8 58 | validity (only relevant if 59 | PCRE_UTF8 60 | was set at compile time) 61 | PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a 62 | partial match 63 | PCRE_DFA_SHORTEST Return only the shortest match 64 | PCRE_DFA_RESTART This is a restart after a partial 65 | match 66 | 67 | There are restrictions on what may appear in a pattern 68 | when using this matching function. Details are given in 69 | the pcrematching documentation. 70 | 71 | A pcre_extra structure contains the following fields: 72 | 73 | flags Bits indicating which fields are set 74 | study_data Opaque data from pcre_study() 75 | match_limit Limit on internal resource use 76 | match_limit_recursion Limit on internal recursion 77 | depth 78 | callout_data Opaque data passed back to callouts 79 | tables Points to character tables or is NULL 80 | 81 | The flag bits are PCRE_EXTRA_STUDY_DATA, 82 | PCRE_EXTRA_MATCH_LIMIT, PCRE_EXTRA_MATCH_LIMIT_RECUR- 83 | SION, PCRE_EXTRA_CALLOUT_DATA, and PCRE_EXTRA_TABLES. 84 | For this matching function, the match_limit and 85 | match_limit_recursion fields are not used, and must not 86 | be set. 87 | 88 | There is a complete description of the PCRE native API 89 | in the pcreapi page and a description of the POSIX API 90 | in the pcreposix page. 91 | 92 | 93 | 94 | PCRE_DFA_EXEC(3) 95 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_exec.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_EXEC(3) PCRE_EXEC(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_exec(const pcre *code, const pcre_extra *extra, 13 | const char *subject, int length, int startoffset, 14 | int options, int *ovector, int ovecsize); 15 | 16 | DESCRIPTION 17 | 18 | This function matches a compiled regular expression 19 | against a given subject string, using a matching algo- 20 | rithm that is similar to Perl's. It returns offsets to 21 | captured substrings. Its arguments are: 22 | 23 | code Points to the compiled pattern 24 | extra Points to an associated pcre_extra struc- 25 | ture, 26 | or is NULL 27 | subject Points to the subject string 28 | length Length of the subject string, in bytes 29 | startoffset Offset in bytes in the subject at which 30 | to 31 | start matching 32 | options Option bits 33 | ovector Points to a vector of ints for result 34 | offsets 35 | ovecsize Number of elements in the vector (a mul- 36 | tiple of 3) 37 | 38 | The options are: 39 | 40 | PCRE_ANCHORED Match only at the first position 41 | PCRE_NEWLINE_ANY Recognize any Unicode newline 42 | sequence 43 | PCRE_NEWLINE_CR Set CR as the newline sequence 44 | PCRE_NEWLINE_CRLF Set CRLF as the newline sequence 45 | PCRE_NEWLINE_LF Set LF as the newline sequence 46 | PCRE_NOTBOL Subject is not the beginning of a 47 | line 48 | PCRE_NOTEOL Subject is not the end of a line 49 | PCRE_NOTEMPTY An empty string is not a valid 50 | match 51 | PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8 52 | validity (only relevant if 53 | PCRE_UTF8 54 | was set at compile time) 55 | PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a 56 | partial match 57 | 58 | There are restrictions on what may appear in a pattern 59 | when partial matching is requested. For details, see the 60 | pcrepartial page. 61 | 62 | A pcre_extra structure contains the following fields: 63 | 64 | flags Bits indicating which fields are set 65 | study_data Opaque data from pcre_study() 66 | match_limit Limit on internal resource use 67 | match_limit_recursion Limit on internal recursion 68 | depth 69 | callout_data Opaque data passed back to callouts 70 | tables Points to character tables or is NULL 71 | 72 | The flag bits are PCRE_EXTRA_STUDY_DATA, 73 | PCRE_EXTRA_MATCH_LIMIT, PCRE_EXTRA_MATCH_LIMIT_RECUR- 74 | SION, PCRE_EXTRA_CALLOUT_DATA, and PCRE_EXTRA_TABLES. 75 | 76 | There is a complete description of the PCRE native API 77 | in the pcreapi page and a description of the POSIX API 78 | in the pcreposix page. 79 | 80 | 81 | 82 | PCRE_EXEC(3) 83 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_free_substring.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_FREE_SUBSTRING(3) PCRE_FREE_SUBSTRING(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | void pcre_free_substring(const char *stringptr); 13 | 14 | DESCRIPTION 15 | 16 | This is a convenience function for freeing the store 17 | obtained by a previous call to pcre_get_substring() or 18 | pcre_get_named_substring(). Its only argument is a 19 | pointer to the string. 20 | 21 | There is a complete description of the PCRE native API 22 | in the pcreapi page and a description of the POSIX API 23 | in the pcreposix page. 24 | 25 | 26 | 27 | PCRE_FREE_SUBSTRING(3) 28 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_free_substring_list.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_FREE_SUBSTRING_LIST(3) PCRE_FREE_SUBSTRING_LIST(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | void pcre_free_substring_list(const char **stringptr); 13 | 14 | DESCRIPTION 15 | 16 | This is a convenience function for freeing the store 17 | obtained by a previous call to pcre_get_sub- 18 | string_list(). Its only argument is a pointer to the 19 | list of string pointers. 20 | 21 | There is a complete description of the PCRE native API 22 | in the pcreapi page and a description of the POSIX API 23 | in the pcreposix page. 24 | 25 | 26 | 27 | PCRE_FREE_SUBSTRING_LIST(3) 28 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_fullinfo.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_FULLINFO(3) PCRE_FULLINFO(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_fullinfo(const pcre *code, const pcre_extra 13 | *extra, 14 | int what, void *where); 15 | 16 | DESCRIPTION 17 | 18 | This function returns information about a compiled pat- 19 | tern. Its arguments are: 20 | 21 | code Compiled regular expression 22 | extra Result of pcre_study() or 23 | NULL 24 | what What information is required 25 | where Where to put the information 26 | 27 | The following information is available: 28 | 29 | PCRE_INFO_BACKREFMAX Number of highest back ref- 30 | erence 31 | PCRE_INFO_CAPTURECOUNT Number of capturing subpat- 32 | terns 33 | PCRE_INFO_DEFAULT_TABLES Pointer to default tables 34 | PCRE_INFO_FIRSTBYTE Fixed first byte for a 35 | match, or 36 | -1 for start of string 37 | or after newline, or 38 | -2 otherwise 39 | PCRE_INFO_FIRSTTABLE Table of first bytes 40 | (after studying) 41 | PCRE_INFO_LASTLITERAL Literal last byte required 42 | PCRE_INFO_NAMECOUNT Number of named subpatterns 43 | PCRE_INFO_NAMEENTRYSIZE Size of name table entry 44 | PCRE_INFO_NAMETABLE Pointer to name table 45 | PCRE_INFO_OPTIONS Option bits used for compi- 46 | lation 47 | PCRE_INFO_SIZE Size of compiled pattern 48 | PCRE_INFO_STUDYSIZE Size of study data 49 | 50 | The yield of the function is zero on success or: 51 | 52 | PCRE_ERROR_NULL the argument code was NULL 53 | the argument where was NULL 54 | PCRE_ERROR_BADMAGIC the "magic number" was not 55 | found 56 | PCRE_ERROR_BADOPTION the value of what was 57 | invalid 58 | 59 | There is a complete description of the PCRE native API 60 | in the pcreapi page and a description of the POSIX API 61 | in the pcreposix page. 62 | 63 | 64 | 65 | PCRE_FULLINFO(3) 66 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_get_named_substring.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_GET_NAMED_SUBSTRING(3) PCRE_GET_NAMED_SUBSTRING(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_get_named_substring(const pcre *code, 13 | const char *subject, int *ovector, 14 | int stringcount, const char *stringname, 15 | const char **stringptr); 16 | 17 | DESCRIPTION 18 | 19 | This is a convenience function for extracting a captured 20 | substring by name. The arguments are: 21 | 22 | code Compiled pattern 23 | subject Subject that has been successfully 24 | matched 25 | ovector Offset vector that pcre_exec() used 26 | stringcount Value returned by pcre_exec() 27 | stringname Name of the required substring 28 | stringptr Where to put the string pointer 29 | 30 | The memory in which the substring is placed is obtained 31 | by calling pcre_malloc(). The convenience function 32 | pcre_free_substring() can be used to free it when it is 33 | no longer needed. The yield of the function is the 34 | length of the extracted substring, PCRE_ERROR_NOMEMORY 35 | if sufficient memory could not be obtained, or 36 | PCRE_ERROR_NOSUBSTRING if the string name is invalid. 37 | 38 | There is a complete description of the PCRE native API 39 | in the pcreapi page and a description of the POSIX API 40 | in the pcreposix page. 41 | 42 | 43 | 44 | PCRE_GET_NAMED_SUBSTRING(3) 45 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_get_stringnumber.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_GET_STRINGNUMBER(3) PCRE_GET_STRINGNUMBER(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_get_stringnumber(const pcre *code, 13 | const char *name); 14 | 15 | DESCRIPTION 16 | 17 | This convenience function finds the number of a named 18 | substring capturing parenthesis in a compiled pattern. 19 | Its arguments are: 20 | 21 | code Compiled regular expression 22 | name Name whose number is required 23 | 24 | The yield of the function is the number of the parenthe- 25 | sis if the name is found, or PCRE_ERROR_NOSUBSTRING oth- 26 | erwise. When duplicate names are allowed (PCRE_DUPNAMES 27 | is set), it is not defined which of the numbers is 28 | returned by pcre_get_stringnumber(). You can obtain the 29 | complete list by calling pcre_get_stringtable_entries(). 30 | 31 | There is a complete description of the PCRE native API 32 | in the pcreapi page and a description of the POSIX API 33 | in the pcreposix page. 34 | 35 | 36 | 37 | PCRE_GET_STRINGNUMBER(3) 38 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_get_stringtable_entries.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_GET_STRINGTABLE_ENTRIES(3) PCRE_GET_STRINGTABLE_ENTRIES(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_get_stringtable_entries(const pcre *code, 13 | const char *name, char **first, char **last); 14 | 15 | DESCRIPTION 16 | 17 | This convenience function finds, for a compiled pattern, 18 | the first and last entries for a given name in the table 19 | that translates capturing parenthesis names into num- 20 | bers. When names are required to be unique (PCRE_DUP- 21 | NAMES is not set), it is usually easier to use 22 | pcre_get_stringnumber() instead. 23 | 24 | code Compiled regular expression 25 | name Name whose entries required 26 | first Where to return a pointer to the first entry 27 | last Where to return a pointer to the last entry 28 | 29 | The yield of the function is the length of each entry, 30 | or PCRE_ERROR_NOSUBSTRING if none are found. 31 | 32 | There is a complete description of the PCRE native API, 33 | including the format of the table entries, in the 34 | pcreapi page, and a description of the POSIX API in the 35 | pcreposix page. 36 | 37 | 38 | 39 | PCRE_GET_STRINGTABLE_ENTRIES(3) 40 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_get_substring.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_GET_SUBSTRING(3) PCRE_GET_SUBSTRING(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_get_substring(const char *subject, int *ovec- 13 | tor, 14 | int stringcount, int stringnumber, 15 | const char **stringptr); 16 | 17 | DESCRIPTION 18 | 19 | This is a convenience function for extracting a captured 20 | substring. The arguments are: 21 | 22 | subject Subject that has been successfully 23 | matched 24 | ovector Offset vector that pcre_exec() used 25 | stringcount Value returned by pcre_exec() 26 | stringnumber Number of the required substring 27 | stringptr Where to put the string pointer 28 | 29 | The memory in which the substring is placed is obtained 30 | by calling pcre_malloc(). The convenience function 31 | pcre_free_substring() can be used to free it when it is 32 | no longer needed. The yield of the function is the 33 | length of the substring, PCRE_ERROR_NOMEMORY if suffi- 34 | cient memory could not be obtained, or PCRE_ERROR_NOSUB- 35 | STRING if the string number is invalid. 36 | 37 | There is a complete description of the PCRE native API 38 | in the pcreapi page and a description of the POSIX API 39 | in the pcreposix page. 40 | 41 | 42 | 43 | PCRE_GET_SUBSTRING(3) 44 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_get_substring_list.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_GET_SUBSTRING_LIST(3) PCRE_GET_SUBSTRING_LIST(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_get_substring_list(const char *subject, 13 | int *ovector, int stringcount, const char 14 | ***listptr); 15 | 16 | DESCRIPTION 17 | 18 | This is a convenience function for extracting a list of 19 | all the captured substrings. The arguments are: 20 | 21 | subject Subject that has been successfully 22 | matched 23 | ovector Offset vector that pcre_exec used 24 | stringcount Value returned by pcre_exec 25 | listptr Where to put a pointer to the list 26 | 27 | The memory in which the substrings and the list are 28 | placed is obtained by calling pcre_malloc(). The conve- 29 | nience function pcre_free_substring_list() can be used 30 | to free it when it is no longer needed. A pointer to a 31 | list of pointers is put in the variable whose address is 32 | in listptr. The list is terminated by a NULL pointer. 33 | The yield of the function is zero on success or 34 | PCRE_ERROR_NOMEMORY if sufficient memory could not be 35 | obtained. 36 | 37 | There is a complete description of the PCRE native API 38 | in the pcreapi page and a description of the POSIX API 39 | in the pcreposix page. 40 | 41 | 42 | 43 | PCRE_GET_SUBSTRING_LIST(3) 44 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_info.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_INFO(3) PCRE_INFO(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_info(const pcre *code, int *optptr, int 13 | *firstcharptr); 14 | 15 | DESCRIPTION 16 | 17 | This function is obsolete. You should be using 18 | pcre_fullinfo() instead. 19 | 20 | There is a complete description of the PCRE native API 21 | in the pcreapi page and a description of the POSIX API 22 | in the pcreposix page. 23 | 24 | 25 | 26 | PCRE_INFO(3) 27 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_maketables.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_MAKETABLES(3) PCRE_MAKETABLES(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | const unsigned char *pcre_maketables(void); 13 | 14 | DESCRIPTION 15 | 16 | This function builds a set of character tables for char- 17 | acter values less than 256. These can be passed to 18 | pcre_compile() to override PCRE's internal, built-in 19 | tables (which were made by pcre_maketables() when PCRE 20 | was compiled). You might want to do this if you are 21 | using a non-standard locale. The function yields a 22 | pointer to the tables. 23 | 24 | There is a complete description of the PCRE native API 25 | in the pcreapi page and a description of the POSIX API 26 | in the pcreposix page. 27 | 28 | 29 | 30 | PCRE_MAKETABLES(3) 31 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_refcount.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_REFCOUNT(3) PCRE_REFCOUNT(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | int pcre_refcount(pcre *code, int adjust); 13 | 14 | DESCRIPTION 15 | 16 | This function is used to maintain a reference count 17 | inside a data block that contains a compiled pattern. 18 | Its arguments are: 19 | 20 | code Compiled regular expression 21 | adjust Adjustment to reference 22 | value 23 | 24 | The yield of the function is the adjusted reference 25 | value, which is constrained to lie between 0 and 65535. 26 | 27 | There is a complete description of the PCRE native API 28 | in the pcreapi page and a description of the POSIX API 29 | in the pcreposix page. 30 | 31 | 32 | 33 | PCRE_REFCOUNT(3) 34 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_study.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_STUDY(3) PCRE_STUDY(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | pcre_extra *pcre_study(const pcre *code, int options, 13 | const char **errptr); 14 | 15 | DESCRIPTION 16 | 17 | This function studies a compiled pattern, to see if 18 | additional information can be extracted that might speed 19 | up matching. Its arguments are: 20 | 21 | code A compiled regular expression 22 | options Options for pcre_study() 23 | errptr Where to put an error message 24 | 25 | If the function succeeds, it returns a value that can be 26 | passed to pcre_exec() via its extra argument. 27 | 28 | If the function returns NULL, either it could not find 29 | any additional information, or there was an error. You 30 | can tell the difference by looking at the error value. 31 | It is NULL in first case. 32 | 33 | There are currently no options defined; the value of the 34 | second argument should always be zero. 35 | 36 | There is a complete description of the PCRE native API 37 | in the pcreapi page and a description of the POSIX API 38 | in the pcreposix page. 39 | 40 | 41 | 42 | PCRE_STUDY(3) 43 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcre_version.3.txt: -------------------------------------------------------------------------------- 1 | PCRE_VERSION(3) PCRE_VERSION(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | SYNOPSIS 9 | 10 | #include 11 | 12 | char *pcre_version(void); 13 | 14 | DESCRIPTION 15 | 16 | This function returns a character string that gives the 17 | version number of the PCRE library and the date of its 18 | release. 19 | 20 | There is a complete description of the PCRE native API 21 | in the pcreapi page and a description of the POSIX API 22 | in the pcreposix page. 23 | 24 | 25 | 26 | PCRE_VERSION(3) 27 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/man/cat3/pcresample.3.txt: -------------------------------------------------------------------------------- 1 | PCRESAMPLE(3) PCRESAMPLE(3) 2 | 3 | 4 | 5 | NAME 6 | PCRE - Perl-compatible regular expressions 7 | 8 | PCRE SAMPLE PROGRAM 9 | 10 | A simple, complete demonstration program, to get you 11 | started with using PCRE, is supplied in the file pcre- 12 | demo.c in the PCRE distribution. 13 | 14 | The program compiles the regular expression that is its 15 | first argument, and matches it against the subject 16 | string in its second argument. No PCRE options are set, 17 | and default character tables are used. If matching suc- 18 | ceeds, the program outputs the portion of the subject 19 | that matched, together with the contents of any captured 20 | substrings. 21 | 22 | If the -g option is given on the command line, the pro- 23 | gram then goes on to check for further matches of the 24 | same regular expression in the same subject string. The 25 | logic is a little bit tricky because of the possibility 26 | of matching an empty string. Comments in the code 27 | explain what is going on. 28 | 29 | If PCRE is installed in the standard include and library 30 | directories for your system, you should be able to com- 31 | pile the demonstration program using this command: 32 | 33 | gcc -o pcredemo pcredemo.c -lpcre 34 | 35 | If PCRE is installed elsewhere, you may need to add 36 | additional options to the command line. For example, on 37 | a Unix-like system that has PCRE installed in 38 | /usr/local, you can compile the demonstration program 39 | using a command like this: 40 | 41 | gcc -o pcredemo -I/usr/local/include pcredemo.c \ 42 | -L/usr/local/lib -lpcre 43 | 44 | Once you have compiled the demonstration program, you 45 | can run simple tests like this: 46 | 47 | ./pcredemo 'cat|dog' 'the cat sat on the mat' 48 | ./pcredemo -g 'cat|dog' 'the dog sat on the cat' 49 | 50 | Note that there is a much more comprehensive test pro- 51 | gram, called pcretest, which supports many more facili- 52 | ties for testing regular expressions and the PCRE 53 | library. The pcredemo program is provided as a simple 54 | coding example. 55 | 56 | On some operating systems (e.g. Solaris), when PCRE is 57 | not installed in the standard library directory, you may 58 | get an error like this when you try to run pcredemo: 59 | 60 | ld.so.1: a.out: fatal: libpcre.so.0: open failed: No 61 | such file or directory 62 | 63 | This is caused by the way shared library support works 64 | on those systems. You need to add 65 | 66 | -R/usr/local/lib 67 | 68 | (for example) to the compile command to get round this 69 | problem. 70 | 71 | Last updated: 09 September 2004 72 | Copyright (c) 1997-2004 University of Cambridge. 73 | 74 | 75 | 76 | PCRESAMPLE(3) 77 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/manifest/pcre-7.0-bin.mft: -------------------------------------------------------------------------------- 1 | bin/ 2 | bin/pcre-config 3 | bin/pcre3.dll 4 | bin/pcregrep.exe 5 | bin/pcreposix3.dll 6 | bin/pcretest.exe 7 | contrib/pcre/7.0/ 8 | contrib/pcre/7.0/pcre-7.0-GnuWin32.README 9 | contrib/pcre/7.0/pcre-7.0-src/ 10 | contrib/pcre/7.0/pcre-7.0-src/AUTHORS 11 | contrib/pcre/7.0/pcre-7.0-src/ChangeLog 12 | contrib/pcre/7.0/pcre-7.0-src/COPYING 13 | contrib/pcre/7.0/pcre-7.0-src/INSTALL 14 | contrib/pcre/7.0/pcre-7.0-src/LICENCE 15 | contrib/pcre/7.0/pcre-7.0-src/NEWS 16 | contrib/pcre/7.0/pcre-7.0-src/README 17 | contrib/pcre/7.0/pcre-7.0/ 18 | contrib/pcre/7.0/pcre-7.0/check.log 19 | include/ 20 | lib/ 21 | lib/pkgconfig/ 22 | lib/pkgconfig/libpcre.pc 23 | man/cat1/ 24 | man/cat1/pcregrep.1.txt 25 | man/cat1/pcretest.1.txt 26 | man/cat3/ 27 | man/cat3/pcre.3.txt 28 | man/cat3/pcre_compile.3.txt 29 | man/cat3/pcre_compile2.3.txt 30 | man/cat3/pcre_config.3.txt 31 | man/cat3/pcre_copy_named_substring.3.txt 32 | man/cat3/pcre_copy_substring.3.txt 33 | man/cat3/pcre_dfa_exec.3.txt 34 | man/cat3/pcre_exec.3.txt 35 | man/cat3/pcre_free_substring.3.txt 36 | man/cat3/pcre_free_substring_list.3.txt 37 | man/cat3/pcre_fullinfo.3.txt 38 | man/cat3/pcre_get_named_substring.3.txt 39 | man/cat3/pcre_get_stringnumber.3.txt 40 | man/cat3/pcre_get_stringtable_entries.3.txt 41 | man/cat3/pcre_get_substring.3.txt 42 | man/cat3/pcre_get_substring_list.3.txt 43 | man/cat3/pcre_info.3.txt 44 | man/cat3/pcre_maketables.3.txt 45 | man/cat3/pcre_refcount.3.txt 46 | man/cat3/pcre_study.3.txt 47 | man/cat3/pcre_version.3.txt 48 | man/cat3/pcreapi.3.txt 49 | man/cat3/pcrebuild.3.txt 50 | man/cat3/pcrecallout.3.txt 51 | man/cat3/pcrecompat.3.txt 52 | man/cat3/pcrematching.3.txt 53 | man/cat3/pcrepartial.3.txt 54 | man/cat3/pcrepattern.3.txt 55 | man/cat3/pcreperform.3.txt 56 | man/cat3/pcreposix.3.txt 57 | man/cat3/pcreprecompile.3.txt 58 | man/cat3/pcresample.3.txt 59 | man/cat3/pcrestack.3.txt 60 | manifest/pcre-7.0-bin.mft 61 | manifest/pcre-7.0-bin.ver 62 | share/ 63 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/manifest/pcre-7.0-bin.ver: -------------------------------------------------------------------------------- 1 | Pcre-7.0: Binaries 2 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/manifest/pcre-7.0-lib.mft: -------------------------------------------------------------------------------- 1 | include/pcre.h 2 | include/pcreposix.h 3 | include/regex.h 4 | lib/libpcre.dll.a 5 | lib/libpcreposix.dll.a 6 | lib/pcre-bcc.lib 7 | lib/pcre.lib 8 | lib/pcre3.dll.def 9 | lib/pcreposix-bcc.lib 10 | lib/pcreposix.lib 11 | lib/pcreposix3.dll.def 12 | manifest/pcre-7.0-lib.mft 13 | manifest/pcre-7.0-lib.ver 14 | -------------------------------------------------------------------------------- /expack/pcre-7.0-win32/manifest/pcre-7.0-lib.ver: -------------------------------------------------------------------------------- 1 | Pcre-7.0: Developer files 2 | -------------------------------------------------------------------------------- /expack/zlib-1.2.3.win32/bin/minigzip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/zlib-1.2.3.win32/bin/minigzip.exe -------------------------------------------------------------------------------- /expack/zlib-1.2.3.win32/bin/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/zlib-1.2.3.win32/bin/zlib1.dll -------------------------------------------------------------------------------- /expack/zlib-1.2.3.win32/lib/zdll.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/zlib-1.2.3.win32/lib/zdll.lib -------------------------------------------------------------------------------- /expack/zlib-1.2.3.win32/lib/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/expack/zlib-1.2.3.win32/lib/zlib.lib -------------------------------------------------------------------------------- /git_clean.sh.old: -------------------------------------------------------------------------------- 1 | git filter-branch --force --index-filter 'git rm --cached setup.exe' --prune-empty --tag-name-filter cat HEAD -- --all 2 | git push origin master --force 3 | rm -rf .git/refs/original/ 4 | git reflog expire --expire=now --all 5 | git gc --prune=now 6 | git gc --aggressive --prune=now 7 | 8 | -------------------------------------------------------------------------------- /install.bat: -------------------------------------------------------------------------------- 1 | cd bin 2 | hetao ..\conf\hetao.conf --install-service 3 | minihetao --registe-folder-popupmenu 4 | cd .. 5 | pause 6 | -------------------------------------------------------------------------------- /log/access.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/log/access.log -------------------------------------------------------------------------------- /log/error.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/log/error.log -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/makefile -------------------------------------------------------------------------------- /makefile.Linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/makefile.Linux -------------------------------------------------------------------------------- /mkdir.bat: -------------------------------------------------------------------------------- 1 | mkdir "C:\Program Files\hetao" 2 | 3 | mkdir "C:\Program Files\hetao\bin" 4 | copy "install.bat" "C:\Program Files\hetao\bin\install.bat" /Y 5 | copy "uninstall.bat" "C:\Program Files\hetao\bin\uninstall.bat" /Y 6 | copy "bin\mfc90d.dll" "C:\Program Files\hetao\bin\mfc90d.dll" /Y 7 | copy "bin\msvcr90d.dll" "C:\Program Files\hetao\bin\msvcr90d.dll" /Y 8 | copy "expack\openssl-0.9.8a.win32\bin\libeay32.dll" "C:\Program Files\hetao\bin\libeay32.dll" /Y 9 | copy "expack\openssl-0.9.8a.win32\bin\ssleay32.dll" "C:\Program Files\hetao\bin\ssleay32.dll" /Y 10 | copy "expack\pcre-7.0-win32\bin\pcre3.dll" "C:\Program Files\hetao\bin\pcre3.dll" /Y 11 | copy "expack\pcre-7.0-win32\bin\pcreposix3.dll" "C:\Program Files\hetao\bin\pcreposix3.dll" /Y 12 | copy "expack\zlib-1.2.3.win32\bin\zlib1.dll" "C:\Program Files\hetao\bin\zlib1.dll" /Y 13 | 14 | mkdir "C:\Program Files\hetao\conf" 15 | if exist "C:\Program Files\hetao\conf\hetao.conf" goto skip_copy_hetao_conf 16 | copy "conf\hetao.conf.WINDOWS" "C:\Program Files\hetao\conf\hetao.conf" /Y 17 | :skip_copy_hetao_conf 18 | 19 | mkdir "C:\Program Files\hetao\www" 20 | if exist "C:\Program Files\hetao\www\index.html" goto skip_copy_index_html 21 | copy "www\index.html" "C:\Program Files\hetao\www\index.html" /Y 22 | :skip_copy_index_html 23 | if exist "C:\Program Files\hetao\www\error_pages" goto skip_copy_error_pages 24 | mkdir "C:\Program Files\hetao\www\error_pages" 25 | xcopy "www\error_pages" "C:\Program Files\hetao\www\error_pages" 26 | :skip_copy_error_pages 27 | 28 | mkdir "C:\Program Files\hetao\log" 29 | 30 | pause 31 | -------------------------------------------------------------------------------- /src/Config.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/Config.c -------------------------------------------------------------------------------- /src/Envirment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/Envirment.c -------------------------------------------------------------------------------- /src/HtmlCacheEventHander.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/HtmlCacheEventHander.c -------------------------------------------------------------------------------- /src/HtmlCachePathfilenameTree.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int AddHtmlCachePathfilenameTreeNode( struct HetaoEnv *p_env , struct HtmlCacheSession *p_htmlcache_session ) 12 | { 13 | struct rb_node **pp_new_node = NULL ; 14 | struct rb_node *p_parent = NULL ; 15 | struct HtmlCacheSession *p = NULL ; 16 | int result ; 17 | 18 | pp_new_node = & (p_env->htmlcache_pathfilename_rbtree.rb_node) ; 19 | while( *pp_new_node ) 20 | { 21 | p = container_of( *pp_new_node , struct HtmlCacheSession , htmlcache_pathfilename_rbnode ) ; 22 | 23 | p_parent = (*pp_new_node) ; 24 | 25 | result = strcmp( p_htmlcache_session->pathfilename , p->pathfilename ) ; 26 | if( result < 0 ) 27 | pp_new_node = &((*pp_new_node)->rb_left) ; 28 | else if( result > 0 ) 29 | pp_new_node = &((*pp_new_node)->rb_right) ; 30 | else 31 | return -1; 32 | } 33 | 34 | rb_link_node( & (p_htmlcache_session->htmlcache_pathfilename_rbnode) , p_parent , pp_new_node ); 35 | rb_insert_color( & (p_htmlcache_session->htmlcache_pathfilename_rbnode) , &(p_env->htmlcache_pathfilename_rbtree) ); 36 | 37 | return 0; 38 | } 39 | 40 | struct HtmlCacheSession *QueryHtmlCachePathfilenameTreeNode( struct HetaoEnv *p_env , char *pathfilename ) 41 | { 42 | struct rb_node *node = p_env->htmlcache_pathfilename_rbtree.rb_node ; 43 | struct HtmlCacheSession *p = NULL ; 44 | int result ; 45 | 46 | while( node ) 47 | { 48 | p = container_of( node , struct HtmlCacheSession , htmlcache_pathfilename_rbnode ) ; 49 | 50 | result = strcmp( pathfilename , p->pathfilename ) ; 51 | if( result < 0 ) 52 | node = node->rb_left ; 53 | else if( result > 0 ) 54 | node = node->rb_right ; 55 | else 56 | return p ; 57 | } 58 | 59 | return NULL; 60 | } 61 | 62 | void RemoveHtmlCachePathfilenameTreeNode( struct HetaoEnv *p_env , struct HtmlCacheSession *p_htmlcache_session ) 63 | { 64 | rb_erase( & (p_htmlcache_session->htmlcache_pathfilename_rbnode) , & (p_env->htmlcache_pathfilename_rbtree) ); 65 | return; 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/HtmlCacheSession.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | void FreeHtmlCacheSession( struct HtmlCacheSession *p_htmlcache_session , int free_flag ) 12 | { 13 | if( p_htmlcache_session ) 14 | { 15 | if( p_htmlcache_session->pathfilename ) 16 | free( p_htmlcache_session->pathfilename ); 17 | if( p_htmlcache_session->html_content ) 18 | free( p_htmlcache_session->html_content ); 19 | if( p_htmlcache_session->html_gzip_content ) 20 | free( p_htmlcache_session->html_gzip_content ); 21 | if( p_htmlcache_session->html_deflate_content ) 22 | free( p_htmlcache_session->html_deflate_content ); 23 | 24 | if( free_flag ) 25 | free( p_htmlcache_session ); 26 | } 27 | 28 | return; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/HtmlCacheWdTree.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int AddHtmlCacheWdTreeNode( struct HetaoEnv *p_env , struct HtmlCacheSession *p_htmlcache_session ) 12 | { 13 | struct rb_node **pp_new_node = NULL ; 14 | struct rb_node *p_parent = NULL ; 15 | struct HtmlCacheSession *p = NULL ; 16 | 17 | pp_new_node = & (p_env->htmlcache_wd_rbtree.rb_node) ; 18 | while( *pp_new_node ) 19 | { 20 | p = container_of( *pp_new_node , struct HtmlCacheSession , htmlcache_wd_rbnode ) ; 21 | 22 | p_parent = (*pp_new_node) ; 23 | 24 | if( p_htmlcache_session->wd < p->wd ) 25 | pp_new_node = &((*pp_new_node)->rb_left) ; 26 | else if( p_htmlcache_session->wd > p->wd ) 27 | pp_new_node = &((*pp_new_node)->rb_right) ; 28 | else 29 | pp_new_node = &((*pp_new_node)->rb_left) ; 30 | } 31 | 32 | rb_link_node( & (p_htmlcache_session->htmlcache_wd_rbnode) , p_parent , pp_new_node ); 33 | rb_insert_color( & (p_htmlcache_session->htmlcache_wd_rbnode) , &(p_env->htmlcache_wd_rbtree) ); 34 | 35 | return 0; 36 | } 37 | 38 | struct HtmlCacheSession *QueryHtmlCacheWdTreeNode( struct HetaoEnv *p_env , int wd ) 39 | { 40 | struct rb_node *node = p_env->htmlcache_wd_rbtree.rb_node ; 41 | struct HtmlCacheSession *p = NULL ; 42 | 43 | while( node ) 44 | { 45 | p = container_of( node , struct HtmlCacheSession , htmlcache_wd_rbnode ) ; 46 | if( wd < p->wd ) 47 | node = node->rb_left ; 48 | else if( wd > p->wd ) 49 | node = node->rb_right ; 50 | else 51 | return p ; 52 | } 53 | 54 | return NULL; 55 | } 56 | 57 | void RemoveHtmlCacheWdTreeNode( struct HetaoEnv *p_env , struct HtmlCacheSession *p_htmlcache_session ) 58 | { 59 | rb_erase( & (p_htmlcache_session->htmlcache_wd_rbnode) , & (p_env->htmlcache_wd_rbtree) ); 60 | return; 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/HttpSession.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/HttpSession.c -------------------------------------------------------------------------------- /src/HttpSessionElapseTree.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int AddHttpSessionElapseTreeNode( struct HetaoEnv *p_env , struct HttpSession *p_http_session ) 12 | { 13 | struct rb_node **pp_new_node = NULL ; 14 | struct rb_node *p_parent = NULL ; 15 | struct HttpSession *p = NULL ; 16 | 17 | pp_new_node = & (p_env->http_session_elapse_rbtree_used.rb_node) ; 18 | while( *pp_new_node ) 19 | { 20 | p = container_of( *pp_new_node , struct HttpSession , elapse_rbnode ) ; 21 | 22 | p_parent = (*pp_new_node) ; 23 | 24 | if( p_http_session->elapse_timestamp < p->elapse_timestamp ) 25 | pp_new_node = &((*pp_new_node)->rb_left) ; 26 | else if( p_http_session->elapse_timestamp > p->elapse_timestamp ) 27 | pp_new_node = &((*pp_new_node)->rb_right) ; 28 | else 29 | pp_new_node = &((*pp_new_node)->rb_left) ; 30 | } 31 | 32 | rb_link_node( & (p_http_session->elapse_rbnode) , p_parent , pp_new_node ); 33 | rb_insert_color( & (p_http_session->elapse_rbnode) , & (p_env->http_session_elapse_rbtree_used) ); 34 | 35 | return 0; 36 | } 37 | 38 | void RemoveHttpSessionElapseTreeNode( struct HetaoEnv *p_env , struct HttpSession *p_http_session ) 39 | { 40 | rb_erase( & (p_http_session->elapse_rbnode) , &(p_env->http_session_elapse_rbtree_used) ); 41 | return; 42 | } 43 | 44 | int UpdateHttpSessionElapseTreeNode( struct HetaoEnv *p_env , struct HttpSession *p_http_session , int elapse_timestamp ) 45 | { 46 | int nret = 0 ; 47 | 48 | RemoveHttpSessionElapseTreeNode( p_env , p_http_session ); 49 | 50 | p_http_session->elapse_timestamp = elapse_timestamp ; 51 | nret = AddHttpSessionElapseTreeNode( p_env , p_http_session ) ; 52 | 53 | return nret; 54 | } 55 | 56 | struct HttpSession *GetExpireHttpSessionElapseTreeNode( struct HetaoEnv *p_env ) 57 | { 58 | struct rb_node *p_curr = NULL ; 59 | struct HttpSession *p_http_session = NULL ; 60 | 61 | p_curr = rb_first( & (p_env->http_session_elapse_rbtree_used) ); 62 | if (p_curr == NULL) 63 | return NULL; 64 | 65 | p_http_session = rb_entry( p_curr , struct HttpSession , elapse_rbnode ); 66 | if( p_http_session->elapse_timestamp - GETSECONDSTAMP <= 0 ) 67 | return p_http_session; 68 | 69 | return NULL; 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/HttpSessionTimeoutTree.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int AddHttpSessionTimeoutTreeNode( struct HetaoEnv *p_env , struct HttpSession *p_http_session ) 12 | { 13 | struct rb_node **pp_new_node = NULL ; 14 | struct rb_node *p_parent = NULL ; 15 | struct HttpSession *p = NULL ; 16 | 17 | pp_new_node = & (p_env->http_session_timeout_rbtree_used.rb_node) ; 18 | while( *pp_new_node ) 19 | { 20 | p = container_of( *pp_new_node , struct HttpSession , timeout_rbnode ) ; 21 | 22 | p_parent = (*pp_new_node) ; 23 | 24 | if( p_http_session->timeout_timestamp < p->timeout_timestamp ) 25 | pp_new_node = &((*pp_new_node)->rb_left) ; 26 | else if( p_http_session->timeout_timestamp > p->timeout_timestamp ) 27 | pp_new_node = &((*pp_new_node)->rb_right) ; 28 | else 29 | pp_new_node = &((*pp_new_node)->rb_left) ; 30 | } 31 | 32 | rb_link_node( & (p_http_session->timeout_rbnode) , p_parent , pp_new_node ); 33 | rb_insert_color( & (p_http_session->timeout_rbnode) , &(p_env->http_session_timeout_rbtree_used) ); 34 | 35 | return 0; 36 | } 37 | 38 | void RemoveHttpSessionTimeoutTreeNode( struct HetaoEnv *p_env , struct HttpSession *p_http_session ) 39 | { 40 | rb_erase( & (p_http_session->timeout_rbnode) , & (p_env->http_session_timeout_rbtree_used) ); 41 | return; 42 | } 43 | 44 | int UpdateHttpSessionTimeoutTreeNode( struct HetaoEnv *p_env , struct HttpSession *p_http_session , int timeout_timestamp ) 45 | { 46 | int nret = 0 ; 47 | 48 | RemoveHttpSessionTimeoutTreeNode( p_env , p_http_session ); 49 | 50 | p_http_session->timeout_timestamp = timeout_timestamp ; 51 | nret = AddHttpSessionTimeoutTreeNode( p_env , p_http_session ) ; 52 | 53 | return nret; 54 | } 55 | 56 | struct HttpSession *GetExpireHttpSessionTimeoutTreeNode( struct HetaoEnv *p_env ) 57 | { 58 | struct rb_node *p_curr = NULL ; 59 | struct HttpSession *p_http_session = NULL ; 60 | 61 | p_curr = rb_first( & (p_env->http_session_timeout_rbtree_used) ); 62 | if (p_curr == NULL) 63 | return NULL; 64 | 65 | p_http_session = rb_entry( p_curr , struct HttpSession , timeout_rbnode ); 66 | if( p_http_session->timeout_timestamp - GETSECONDSTAMP <= 0 ) 67 | return p_http_session; 68 | 69 | return NULL; 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/IDL_hetao_conf.dsc: -------------------------------------------------------------------------------- 1 | STRUCT hetao_conf 2 | { 3 | INT 4 worker_processes 4 | INT 4 cpu_affinity 5 | INT 4 accept_mutex 6 | 7 | STRING 256 error_log 8 | STRING 6 log_level 9 | 10 | STRING 64 user 11 | 12 | STRUCT limits 13 | { 14 | INT 4 max_http_session_count 15 | INT 4 max_file_cache 16 | INT 4 max_connections_per_ip 17 | } 18 | 19 | STRUCT listen ARRAY 16 20 | { 21 | STRING 15 ip 22 | INT 4 port 23 | STRUCT ssl 24 | { 25 | STRING 256 certificate_file 26 | STRING 256 certificate_key_file 27 | } 28 | STRUCT website ARRAY 64 29 | { 30 | STRING 256 domain 31 | STRING 1024 wwwroot 32 | STRING 1024 index 33 | STRING 256 access_log 34 | STRUCT rewrite ARRAY 10 35 | { 36 | STRING 256 pattern 37 | STRING 256 new_uri 38 | } 39 | STRUCT redirect ARRAY 100 40 | { 41 | STRING 64 domain 42 | STRING 64 new_domain 43 | } 44 | STRUCT forward 45 | { 46 | STRING 16 forward_type 47 | STRING 1 forward_rule 48 | STRUCT ssl 49 | { 50 | STRING 256 certificate_file 51 | STRING 256 certificate_key_file 52 | } 53 | STRUCT forward_server ARRAY 1000 54 | { 55 | STRING 15 ip 56 | INT 4 port 57 | } 58 | } 59 | } 60 | } 61 | 62 | STRUCT tcp_options 63 | { 64 | INT 4 nodelay 65 | INT 4 nolinger 66 | } 67 | 68 | STRUCT http_options 69 | { 70 | INT 4 compress_on 71 | INT 4 timeout 72 | INT 4 elapse 73 | INT 4 forward_disable 74 | } 75 | 76 | STRUCT error_pages 77 | { 78 | STRING 1024 error_page_400 79 | STRING 1024 error_page_401 80 | STRING 1024 error_page_403 81 | STRING 1024 error_page_404 82 | STRING 1024 error_page_408 83 | STRING 1024 error_page_500 84 | STRING 1024 error_page_503 85 | STRING 1024 error_page_505 86 | } 87 | 88 | STRUCT mime_types 89 | { 90 | STRUCT mime_type ARRAY 256 91 | { 92 | STRING 50 type 93 | STRING 100 mime 94 | INT 1 compress_enable 95 | } 96 | } 97 | } 98 | 99 | -------------------------------------------------------------------------------- /src/IpLimitsHash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | #define IP_LIMITS_HASHSIZE (1<<16) 12 | 13 | int InitIpLimitsHash( struct HetaoEnv *p_env ) 14 | { 15 | int i ; 16 | struct hlist_head *p_hlist_head = NULL ; 17 | 18 | p_env->iplimits_hash = (struct hlist_head *)malloc( sizeof(struct hlist_head) * IP_LIMITS_HASHSIZE ) ; 19 | if( p_env->iplimits_hash == NULL ) 20 | { 21 | ErrorLog( __FILE__ , __LINE__ , "malloc failed , errno[%d]" , ERRNO ); 22 | return -1; 23 | } 24 | memset( p_env->iplimits_hash , 0x00 , sizeof(struct hlist_head) * IP_LIMITS_HASHSIZE ); 25 | 26 | for( i = 0 , p_hlist_head = p_env->iplimits_hash ; i < IP_LIMITS_HASHSIZE ; i++ , p_hlist_head++ ) 27 | { 28 | INIT_HLIST_HEAD( p_hlist_head ); 29 | } 30 | 31 | 32 | return 0; 33 | } 34 | 35 | void CleanIpLimitsHash( struct HetaoEnv *p_env ) 36 | { 37 | int i ; 38 | struct hlist_head *p_hlist_head = NULL ; 39 | struct hlist_node *curr = NULL , *next = NULL ; 40 | struct IpLimits *p_iplimits = NULL ; 41 | 42 | for( i = 0 , p_hlist_head = p_env->iplimits_hash ; i < IP_LIMITS_HASHSIZE ; i++ , p_hlist_head++ ) 43 | { 44 | hlist_for_each_safe( curr , next , p_hlist_head ) 45 | { 46 | hlist_del( curr ); 47 | p_iplimits = container_of(curr,struct IpLimits,iplimits_node) ; 48 | free( p_iplimits ); 49 | } 50 | } 51 | 52 | free( p_env->iplimits_hash ); 53 | p_env->iplimits_hash = NULL ; 54 | 55 | return; 56 | } 57 | 58 | int IncreaseIpLimitsHashNode( struct HetaoEnv *p_env , unsigned int ip ) 59 | { 60 | int index ; 61 | struct hlist_head *p_hlist_head = NULL ; 62 | struct IpLimits *p ; 63 | 64 | index = ip % IP_LIMITS_HASHSIZE ; 65 | DebugLog( __FILE__ , __LINE__ , "IpLimits[%d]=CalcHash[%u][%u]" , index , ip , IP_LIMITS_HASHSIZE ); 66 | p_hlist_head = p_env->iplimits_hash + index ; 67 | hlist_for_each_entry( p , p_hlist_head , struct IpLimits , iplimits_node ) 68 | { 69 | if( p->ip == ip ) 70 | { 71 | DebugLog( __FILE__ , __LINE__ , "limits ip[%u] count[%d]->[%d]" , ip , p->count , p->count+1 ); 72 | p->count++; 73 | if( p->count > p_env->limits__max_connections_per_ip ) 74 | { 75 | DebugLog( __FILE__ , __LINE__ , "limits ip[%u] count[%d]->[%d]" , ip , p->count , p->count-1 ); 76 | p->count--; 77 | return 1; 78 | } 79 | return 0; 80 | } 81 | } 82 | 83 | p = (struct IpLimits *)malloc( sizeof(struct IpLimits) ) ; 84 | if( p == NULL ) 85 | return -1; 86 | p->ip = ip ; 87 | p->count = 1 ; 88 | hlist_add_head( & (p->iplimits_node) , p_hlist_head ); 89 | DebugLog( __FILE__ , __LINE__ , "limits ip[%u] inserted" , ip ); 90 | 91 | return 0; 92 | } 93 | 94 | int DecreaseIpLimitsHashNode( struct HetaoEnv *p_env , unsigned int ip ) 95 | { 96 | int index ; 97 | struct hlist_head *p_hlist_head = NULL ; 98 | struct hlist_node *p_curr = NULL , *p_next = NULL ; 99 | struct IpLimits *p ; 100 | 101 | index = ip % IP_LIMITS_HASHSIZE ; 102 | DebugLog( __FILE__ , __LINE__ , "IpLimits[%d]=CalcHash[%u][%u]" , index , ip , IP_LIMITS_HASHSIZE ); 103 | p_hlist_head = p_env->iplimits_hash + index ; 104 | hlist_for_each_safe( p_curr , p_next , p_hlist_head ) 105 | { 106 | p = hlist_entry( p_curr , struct IpLimits , iplimits_node ) ; 107 | if( p->ip == ip ) 108 | { 109 | DebugLog( __FILE__ , __LINE__ , "limits ip[%u] count[%d]->[%d]" , ip , p->count , p->count-1 ); 110 | p->count--; 111 | if( p->count <= 0 ) 112 | { 113 | DebugLog( __FILE__ , __LINE__ , "limits ip[%u] deleted" , ip ); 114 | hlist_del( p_curr ); 115 | free( p ); 116 | } 117 | return 0; 118 | } 119 | } 120 | 121 | return 1; 122 | } 123 | 124 | -------------------------------------------------------------------------------- /src/LOGC.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/LOGC.c -------------------------------------------------------------------------------- /src/LOGC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/LOGC.h -------------------------------------------------------------------------------- /src/LeastConnectionCountTree.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int AddLeastConnectionCountTreeNode( struct VirtualHost *p_virtual_host , struct ForwardServer *p_forward_server ) 12 | { 13 | struct rb_node **pp_new_node = NULL ; 14 | struct rb_node *p_parent = NULL ; 15 | struct ForwardServer *p = NULL ; 16 | 17 | pp_new_node = & (p_virtual_host->leastconnection_rbtree.rb_node) ; 18 | while( *pp_new_node ) 19 | { 20 | p = container_of( *pp_new_node , struct ForwardServer , leastconnection_rbnode ) ; 21 | 22 | p_parent = (*pp_new_node) ; 23 | 24 | if( p_forward_server->connection_count < p->connection_count ) 25 | pp_new_node = &((*pp_new_node)->rb_left) ; 26 | else if( p_forward_server->connection_count > p->connection_count ) 27 | pp_new_node = &((*pp_new_node)->rb_right) ; 28 | else 29 | pp_new_node = &((*pp_new_node)->rb_left) ; 30 | } 31 | 32 | rb_link_node( & (p_forward_server->leastconnection_rbnode) , p_parent , pp_new_node ); 33 | rb_insert_color( & (p_forward_server->leastconnection_rbnode) , & (p_virtual_host->leastconnection_rbtree) ); 34 | 35 | return 0; 36 | } 37 | 38 | void RemoveLeastConnectionCountTreeNode( struct VirtualHost *p_virtual_host , struct ForwardServer *p_forward_server ) 39 | { 40 | rb_erase( & (p_forward_server->leastconnection_rbnode) , & (p_virtual_host->leastconnection_rbtree) ); 41 | return; 42 | } 43 | 44 | int UpdateLeastConnectionCountTreeNode( struct VirtualHost *p_virtual_host , struct ForwardServer *p_forward_server ) 45 | { 46 | int nret = 0 ; 47 | 48 | RemoveLeastConnectionCountTreeNode( p_virtual_host , p_forward_server ); 49 | 50 | nret = AddLeastConnectionCountTreeNode( p_virtual_host , p_forward_server ) ; 51 | 52 | return nret; 53 | } 54 | 55 | struct ForwardServer *TravelMinLeastConnectionCountTreeNode( struct VirtualHost *p_virtual_host , struct ForwardServer *p_forward_server ) 56 | { 57 | struct rb_node *p_curr = NULL ; 58 | 59 | if( p_forward_server == NULL ) 60 | { 61 | p_curr = rb_first( & (p_virtual_host->leastconnection_rbtree) ); 62 | if (p_curr == NULL) 63 | return NULL; 64 | } 65 | else 66 | { 67 | p_curr = rb_next( & (p_forward_server->leastconnection_rbnode) ) ; 68 | if (p_curr == NULL) 69 | return NULL; 70 | } 71 | 72 | return rb_entry( p_curr , struct ForwardServer , leastconnection_rbnode ); 73 | } 74 | 75 | -------------------------------------------------------------------------------- /src/ListenSession.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/ListenSession.c -------------------------------------------------------------------------------- /src/MimeTypeHash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int InitMimeTypeHash( struct HetaoEnv *p_env , hetao_conf *p_config ) 12 | { 13 | int i ; 14 | 15 | struct MimeType *p_mime_type = NULL ; 16 | char *p_type = NULL ; 17 | 18 | int nret = 0 ; 19 | 20 | p_env->mime_type_hashsize = p_config->mime_types._mime_type_count * 2 ; 21 | p_env->mime_type_hash = (struct hlist_head *)malloc( sizeof(struct hlist_head) * p_env->mime_type_hashsize ) ; 22 | if( p_env->mime_type_hash == NULL ) 23 | { 24 | ErrorLog( __FILE__ , __LINE__ , "malloc failed , errno[%d]" , ERRNO ); 25 | return -1; 26 | } 27 | memset( p_env->mime_type_hash , 0x00 , sizeof(struct hlist_head) * p_env->mime_type_hashsize ); 28 | 29 | for( i = 0 ; i < p_env->mime_type_hashsize ; i++ ) 30 | { 31 | INIT_HLIST_HEAD( p_env->mime_type_hash+i ); 32 | } 33 | 34 | for( i = 0 ; i < p_config->mime_types._mime_type_count ; i++ ) 35 | { 36 | p_type = strtok( p_config->mime_types.mime_type[i].type , " \r" ) ; 37 | while( p_type ) 38 | { 39 | p_mime_type = (struct MimeType *)malloc( sizeof(struct MimeType) ) ; 40 | if( p_mime_type == NULL ) 41 | { 42 | ErrorLog( __FILE__ , __LINE__ , "malloc failed , errno[%d]" , ERRNO ); 43 | return -1; 44 | } 45 | memset( p_mime_type , 0x00 , sizeof(struct MimeType) ); 46 | 47 | strncpy( p_mime_type->type , p_type , sizeof(p_mime_type->type)-1 ); 48 | p_mime_type->type_len = strlen(p_mime_type->type) ; 49 | strncpy( p_mime_type->mime , p_config->mime_types.mime_type[i].mime , sizeof(p_mime_type->mime)-1 ); 50 | p_mime_type->compress_enable = p_config->mime_types.mime_type[i].compress_enable ; 51 | 52 | nret = PushMimeTypeHashNode( p_env , p_mime_type ) ; 53 | if( nret ) 54 | { 55 | ErrorLog( __FILE__ , __LINE__ , "PushMimeTypeHashNode failed[%d]" , nret ); 56 | return -1; 57 | } 58 | else 59 | { 60 | DebugLog( __FILE__ , __LINE__ , "add type[%s] mime[%s] ok" , p_mime_type->type , p_mime_type->mime ); 61 | } 62 | 63 | p_type = strtok( NULL , " \t" ) ; 64 | } 65 | } 66 | 67 | return 0; 68 | } 69 | 70 | void CleanMimeTypeHash( struct HetaoEnv *p_env ) 71 | { 72 | int i ; 73 | struct hlist_head *p_hlist_head = NULL ; 74 | struct hlist_node *curr = NULL , *next = NULL ; 75 | struct MimeType *p_mime_type = NULL ; 76 | 77 | for( i = 0 , p_hlist_head = p_env->mime_type_hash ; i < p_env->mime_type_hashsize ; i++ , p_hlist_head++ ) 78 | { 79 | hlist_for_each_safe( curr , next , p_hlist_head ) 80 | { 81 | hlist_del( curr ); 82 | p_mime_type = container_of(curr,struct MimeType,mime_type_node) ; 83 | free( p_mime_type ); 84 | } 85 | } 86 | 87 | free( p_env->mime_type_hash ); 88 | 89 | return; 90 | } 91 | 92 | int PushMimeTypeHashNode( struct HetaoEnv *p_env , struct MimeType *p_mime_type ) 93 | { 94 | int index ; 95 | struct hlist_head *p_hlist_head = NULL ; 96 | struct MimeType *p ; 97 | 98 | index = CalcHash(p_mime_type->type,p_mime_type->type_len) % (p_env->mime_type_hashsize) ; 99 | p_hlist_head = p_env->mime_type_hash + index ; 100 | hlist_for_each_entry( p , p_hlist_head , struct MimeType , mime_type_node ) 101 | { 102 | if( STRCMP( p->type , == , p_mime_type->type ) ) 103 | return 1; 104 | } 105 | hlist_add_head( & (p_mime_type->mime_type_node) , p_hlist_head ); 106 | 107 | return 0; 108 | } 109 | 110 | struct MimeType *QueryMimeTypeHashNode( struct HetaoEnv *p_env , char *type , int type_len ) 111 | { 112 | int index ; 113 | struct hlist_head *p_hlist_head = NULL ; 114 | struct MimeType *p ; 115 | 116 | index = CalcHash(type,type_len) % (p_env->mime_type_hashsize) ; 117 | p_hlist_head = p_env->mime_type_hash + index ; 118 | hlist_for_each_entry( p , p_hlist_head , struct MimeType , mime_type_node ) 119 | { 120 | if( p->type_len == type_len && STRNCMP( p->type , == , type , type_len ) ) 121 | return p; 122 | } 123 | 124 | return NULL; 125 | } 126 | 127 | -------------------------------------------------------------------------------- /src/MonitorProcess.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/MonitorProcess.c -------------------------------------------------------------------------------- /src/OnAcceptingSocket.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnAcceptingSocket.c -------------------------------------------------------------------------------- /src/OnAcceptingSslSocket.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnAcceptingSslSocket.c -------------------------------------------------------------------------------- /src/OnConnectingForward.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnConnectingForward.c -------------------------------------------------------------------------------- /src/OnConnectingSslForward.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnConnectingSslForward.c -------------------------------------------------------------------------------- /src/OnReceivingForward.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnReceivingForward.c -------------------------------------------------------------------------------- /src/OnReceivingSocket.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnReceivingSocket.c -------------------------------------------------------------------------------- /src/OnSendingForward.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnSendingForward.c -------------------------------------------------------------------------------- /src/OnSendingSocket.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/OnSendingSocket.c -------------------------------------------------------------------------------- /src/ProcessHttpRequest.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/ProcessHttpRequest.c -------------------------------------------------------------------------------- /src/RedirectDomain.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int InitRedirectDomainHash( struct VirtualHost *p_virtual_host , int count ) 12 | { 13 | int i ; 14 | struct hlist_head *p_hlist_head = NULL ; 15 | 16 | p_virtual_host->redirect_domain_hashsize = count * 2 ; 17 | p_virtual_host->redirect_domain_hash = (struct hlist_head *)malloc( sizeof(struct hlist_head) * p_virtual_host->redirect_domain_hashsize ) ; 18 | if( p_virtual_host->redirect_domain_hash == NULL ) 19 | { 20 | ErrorLog( __FILE__ , __LINE__ , "malloc failed , errno[%d]" , ERRNO ); 21 | return -1; 22 | } 23 | memset( p_virtual_host->redirect_domain_hash , 0x00 , sizeof(struct hlist_head) * p_virtual_host->redirect_domain_hashsize ); 24 | 25 | for( i = 0 , p_hlist_head = p_virtual_host->redirect_domain_hash ; i < p_virtual_host->redirect_domain_hashsize ; i++ , p_hlist_head++ ) 26 | { 27 | INIT_HLIST_HEAD( p_hlist_head ); 28 | } 29 | 30 | return 0; 31 | } 32 | 33 | void CleanRedirectDomainHash( struct VirtualHost *p_virtual_host ) 34 | { 35 | int i ; 36 | struct hlist_head *p_hlist_head = NULL ; 37 | struct hlist_node *curr = NULL , *next = NULL ; 38 | struct RedirectDomain *p_redirect_domain = NULL ; 39 | 40 | for( i = 0 , p_hlist_head = p_virtual_host->redirect_domain_hash ; i < p_virtual_host->redirect_domain_hashsize ; i++ , p_hlist_head++ ) 41 | { 42 | hlist_for_each_safe( curr , next , p_hlist_head ) 43 | { 44 | hlist_del( curr ); 45 | p_redirect_domain = container_of(curr,struct RedirectDomain,redirect_domain_node) ; 46 | free( p_redirect_domain ); 47 | } 48 | } 49 | 50 | free( p_virtual_host->redirect_domain_hash ); 51 | p_virtual_host->redirect_domain_hash = NULL ; 52 | 53 | return; 54 | } 55 | 56 | int PushRedirectDomainHashNode( struct VirtualHost *p_virtual_host , struct RedirectDomain *p_redirect_domain ) 57 | { 58 | int index ; 59 | struct hlist_head *p_hlist_head = NULL ; 60 | struct RedirectDomain *p ; 61 | 62 | index = CalcHash(p_redirect_domain->domain,p_redirect_domain->domain_len) % (p_virtual_host->redirect_domain_hashsize) ; 63 | DebugLog( __FILE__ , __LINE__ , "RedirectDomain[%d]=CalcHash[%.*s][%d]" , index , p_redirect_domain->domain_len , p_redirect_domain->domain , p_virtual_host->redirect_domain_hashsize ); 64 | p_hlist_head = p_virtual_host->redirect_domain_hash + index ; 65 | hlist_for_each_entry( p , p_hlist_head , struct RedirectDomain , redirect_domain_node ) 66 | { 67 | if( STRCMP( p->domain , == , p_redirect_domain->domain ) ) 68 | return 1; 69 | } 70 | hlist_add_head( & (p_redirect_domain->redirect_domain_node) , p_hlist_head ); 71 | 72 | p_virtual_host->redirect_domain_count++; 73 | 74 | return 0; 75 | } 76 | 77 | struct RedirectDomain *QueryRedirectDomainHashNode( struct VirtualHost *p_virtual_host , char *domain , int domain_len ) 78 | { 79 | int index ; 80 | struct hlist_head *p_hlist_head = NULL ; 81 | struct RedirectDomain *p ; 82 | 83 | index = CalcHash(domain,domain_len) % (p_virtual_host->redirect_domain_hashsize) ; 84 | p_hlist_head = p_virtual_host->redirect_domain_hash + index ; 85 | hlist_for_each_entry( p , p_hlist_head , struct RedirectDomain , redirect_domain_node ) 86 | { 87 | if( p->domain_len == domain_len && STRNCMP( p->domain , == , domain , domain_len ) ) 88 | return p; 89 | } 90 | 91 | return NULL; 92 | } 93 | 94 | -------------------------------------------------------------------------------- /src/RewriteUri.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int RegexReplaceString( pcre *pattern_re , char *uri , int uri_len , pcre *template_re , char *new_uri , int *p_new_uri_len , int new_uri_size ) 12 | { 13 | int pattern_ovector[ PATTERN_OVECCOUNT ] ; 14 | int pattern_ovector_count ; 15 | 16 | memset( pattern_ovector , 0x00 , sizeof(pattern_ovector) ); 17 | DebugLog( __FILE__ , __LINE__ , "pcre_exec[%d][%.*s] ..." , uri_len , uri_len , uri ); 18 | pattern_ovector_count = pcre_exec( pattern_re , NULL , uri , uri_len , 0 , 0 , pattern_ovector , PATTERN_OVECCOUNT ) ; 19 | DebugLog( __FILE__ , __LINE__ , "pcre_exec[%d][%.*s] return[%d] pattern_ovector[%d][%d][%d][%d][%d][%d][...]" , uri_len , uri_len , uri , pattern_ovector_count , pattern_ovector[2] , pattern_ovector[3] , pattern_ovector[4] , pattern_ovector[5] , pattern_ovector[6] , pattern_ovector[7] ); 20 | if( pattern_ovector_count > 0 ) 21 | { 22 | char *p_new_uri = NULL ; 23 | int remain_len ; 24 | int new_uri_len ; 25 | 26 | int template_ovector[ PATTERN_OVECCOUNT ] ; 27 | int template_ovector_count ; 28 | 29 | p_new_uri = new_uri ; 30 | remain_len = (*p_new_uri_len) ; 31 | new_uri_len = (*p_new_uri_len) ; 32 | while(1) 33 | { 34 | memset( template_ovector , 0x00 , sizeof(template_ovector) ); 35 | DebugLog( __FILE__ , __LINE__ , "pcre_exec[%d][%.*s][%d][%.*s] ..." , new_uri_len , new_uri_len , new_uri , remain_len , remain_len , p_new_uri ); 36 | template_ovector_count = pcre_exec( template_re , NULL , p_new_uri , remain_len , 0 , 0 , template_ovector , TEMPLATE_OVECCOUNT ) ; 37 | DebugLog( __FILE__ , __LINE__ , "pcre_exec[%d][%.*s][%d][%.*s] return[%d] template_ovector[%d][%d]" , new_uri_len , new_uri_len , new_uri , remain_len , remain_len , p_new_uri , template_ovector_count , template_ovector[2] , template_ovector[3] ); 38 | if( template_ovector_count > 0 ) 39 | { 40 | int index ; 41 | char *p_index = NULL ; 42 | char *p_index_end = NULL ; 43 | 44 | int dd_template_ovector_len ; 45 | int dd_pattern_ovector_len ; 46 | int dd_len ; 47 | 48 | for( index = 0 , p_index = p_new_uri+template_ovector[2]+1 , p_index_end = p_new_uri+template_ovector[3]-1 ; p_index < p_index_end ; p_index++ ) 49 | { 50 | index = index * 10 + (*p_index)-'0' ; 51 | } 52 | if( index > pattern_ovector_count-1 ) 53 | { 54 | return -11; 55 | } 56 | 57 | dd_template_ovector_len = template_ovector[3] - template_ovector[2] ; 58 | dd_pattern_ovector_len = pattern_ovector[index*2+1] - pattern_ovector[index*2] ; 59 | dd_len = dd_pattern_ovector_len - dd_template_ovector_len ; 60 | new_uri_len += dd_len ; 61 | if( new_uri_len > new_uri_size-1 ) 62 | { 63 | return -12; 64 | } 65 | 66 | if( dd_len ) 67 | { 68 | memmove( p_new_uri+template_ovector[3]+dd_len , p_new_uri+template_ovector[3] , new_uri_len-template_ovector[3] ); 69 | } 70 | memcpy( p_new_uri+template_ovector[2] , uri+pattern_ovector[index*2] , pattern_ovector[index*2+1]-pattern_ovector[index*2] ); 71 | 72 | p_new_uri = p_new_uri + template_ovector[2] + dd_pattern_ovector_len + 1 ; 73 | remain_len = new_uri_len - dd_pattern_ovector_len ; 74 | } 75 | else if( template_ovector_count == 0 || template_ovector_count == PCRE_ERROR_NOMATCH ) 76 | { 77 | break; 78 | } 79 | else 80 | { 81 | return 1; 82 | } 83 | } 84 | 85 | (*p_new_uri_len) = new_uri_len ; 86 | return 0; 87 | } 88 | else if( pattern_ovector_count == 0 || pattern_ovector_count == PCRE_ERROR_NOMATCH ) 89 | { 90 | return 1; 91 | } 92 | else 93 | { 94 | return -1; 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /src/TimerThread.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/TimerThread.c -------------------------------------------------------------------------------- /src/Util.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/Util.c -------------------------------------------------------------------------------- /src/VirtualHostHash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hetao - High Performance Web Server 3 | * author : calvin 4 | * email : calvinwilliams@163.com 5 | * 6 | * Licensed under the LGPL v2.1, see the file LICENSE in base directory. 7 | */ 8 | 9 | #include "hetao_in.h" 10 | 11 | int InitVirtualHostHash( struct ListenSession *p_listen_session , int count ) 12 | { 13 | int i ; 14 | struct hlist_head *p_hlist_head = NULL ; 15 | 16 | p_listen_session->virtual_host_hashsize = count * 2 ; 17 | p_listen_session->virtual_host_hash = (struct hlist_head *)malloc( sizeof(struct hlist_head) * p_listen_session->virtual_host_hashsize ) ; 18 | if( p_listen_session->virtual_host_hash == NULL ) 19 | { 20 | ErrorLog( __FILE__ , __LINE__ , "malloc failed , errno[%d]" , ERRNO ); 21 | return -1; 22 | } 23 | memset( p_listen_session->virtual_host_hash , 0x00 , sizeof(struct hlist_head) * p_listen_session->virtual_host_hashsize ); 24 | 25 | for( i = 0 , p_hlist_head = p_listen_session->virtual_host_hash ; i < p_listen_session->virtual_host_hashsize ; i++ , p_hlist_head++ ) 26 | { 27 | INIT_HLIST_HEAD( p_hlist_head ); 28 | } 29 | 30 | return 0; 31 | } 32 | 33 | void CleanVirtualHostHash( struct ListenSession *p_listen_session ) 34 | { 35 | int i ; 36 | struct hlist_head *p_hlist_head = NULL ; 37 | struct hlist_node *curr = NULL , *next = NULL ; 38 | struct VirtualHost *p_virtual_host = NULL ; 39 | struct RewriteUri *p_rewrite_uri = NULL ; 40 | struct RewriteUri *p_next_rewrite_uri = NULL ; 41 | 42 | for( i = 0 , p_hlist_head = p_listen_session->virtual_host_hash ; i < p_listen_session->virtual_host_hashsize ; i++ , p_hlist_head++ ) 43 | { 44 | hlist_for_each_safe( curr , next , p_hlist_head ) 45 | { 46 | hlist_del( curr ); 47 | p_virtual_host = container_of(curr,struct VirtualHost,virtual_host_node) ; 48 | list_for_each_entry_safe( p_rewrite_uri , p_next_rewrite_uri , & (p_virtual_host->rewrite_uri_list.rewrite_uri_node) , struct RewriteUri , rewrite_uri_node ) 49 | { 50 | free( p_rewrite_uri->pattern_re ); 51 | } 52 | if( p_virtual_host->forward_ssl_ctx ) 53 | { 54 | SSL_CTX_free( p_virtual_host->forward_ssl_ctx ); 55 | p_virtual_host->forward_ssl_ctx = NULL ; 56 | } 57 | CleanRedirectDomainHash( p_virtual_host ); 58 | #if ( defined _WIN32 ) 59 | CloseHandle( p_virtual_host->directory_changes_handler ); 60 | #endif 61 | free( p_virtual_host ); 62 | } 63 | } 64 | 65 | free( p_listen_session->virtual_host_hash ); 66 | p_listen_session->virtual_host_hash = NULL ; 67 | 68 | return; 69 | } 70 | 71 | int PushVirtualHostHashNode( struct ListenSession *p_listen_session , struct VirtualHost *p_virtual_host ) 72 | { 73 | int index ; 74 | struct hlist_head *p_hlist_head = NULL ; 75 | struct VirtualHost *p ; 76 | 77 | index = CalcHash(p_virtual_host->domain,p_virtual_host->domain_len) % (p_listen_session->virtual_host_hashsize) ; 78 | /* DebugLog( __FILE__ , __LINE__ , "VirtualHost[%d]=CalcHash[%.*s][%d]" , index , p_virtual_host->domain_len , p_virtual_host->domain , p_listen_session->virtual_host_hashsize ); */ 79 | p_hlist_head = p_listen_session->virtual_host_hash + index ; 80 | hlist_for_each_entry( p , p_hlist_head , struct VirtualHost , virtual_host_node ) 81 | { 82 | if( STRCMP( p->domain , == , p_virtual_host->domain ) ) 83 | return 1; 84 | } 85 | hlist_add_head( & (p_virtual_host->virtual_host_node) , p_hlist_head ); 86 | 87 | return 0; 88 | } 89 | 90 | struct VirtualHost *QueryVirtualHostHashNode( struct ListenSession *p_listen_session , char *domain , int domain_len ) 91 | { 92 | int index ; 93 | struct hlist_head *p_hlist_head = NULL ; 94 | struct VirtualHost *p ; 95 | 96 | index = CalcHash(domain,domain_len) % (p_listen_session->virtual_host_hashsize) ; 97 | p_hlist_head = p_listen_session->virtual_host_hash + index ; 98 | hlist_for_each_entry( p , p_hlist_head , struct VirtualHost , virtual_host_node ) 99 | { 100 | if( p->domain_len == domain_len && STRNCMP( p->domain , == , domain , domain_len ) ) 101 | return p; 102 | } 103 | 104 | return NULL; 105 | } 106 | 107 | -------------------------------------------------------------------------------- /src/WindowsService.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/WindowsService.c -------------------------------------------------------------------------------- /src/WorkerProcess.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/WorkerProcess.c -------------------------------------------------------------------------------- /src/WorkerThread.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/WorkerThread.c -------------------------------------------------------------------------------- /src/fasterhttp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/fasterhttp.c -------------------------------------------------------------------------------- /src/fasterhttp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/fasterhttp.h -------------------------------------------------------------------------------- /src/hetao.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/hetao.c -------------------------------------------------------------------------------- /src/hetao_in.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/hetao_in.h -------------------------------------------------------------------------------- /src/hetaocheck.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/hetaocheck.c -------------------------------------------------------------------------------- /src/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/makefile -------------------------------------------------------------------------------- /src/makefile.Linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/makefile.Linux -------------------------------------------------------------------------------- /src/minihetao.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/minihetao.c -------------------------------------------------------------------------------- /src/pp.bat: -------------------------------------------------------------------------------- 1 | dsc -f IDL_hetao_conf.dsc -c-LOG -c-json 2 | pause 3 | 4 | -------------------------------------------------------------------------------- /src/rbtree.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_RBTREE_H 2 | #define _LINUX_RBTREE_H 3 | /* 4 | Red Black Trees 5 | (C) 1999 Andrea Arcangeli 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | linux/include/linux/rbtree.h 19 | To use rbtrees you'll have to implement your own insert and search cores. 20 | This will avoid us to use callbacks and to drop drammatically performances. 21 | I know it's not the cleaner way, but in C (not in C++) to get 22 | performances and genericity... 23 | Some example of insert and search follows here. The search is a plain 24 | normal search over an ordered tree. The insert instead must be implemented 25 | in two steps: First, the code must insert the element in order as a red leaf 26 | in the tree, and then the support library function rb_insert_color() must 27 | be called. Such function will do the not trivial work to rebalance the 28 | rbtree, if necessary. 29 | */ 30 | 31 | #ifndef container_of 32 | #define container_of(ptr, type, member) ((type *)( (char *)(ptr) - offsetof(type,member) )) 33 | #endif 34 | 35 | #ifndef offsetof 36 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 37 | #endif 38 | 39 | #undef NULL 40 | #if defined(__cplusplus) 41 | #define NULL 0 42 | #else 43 | #define NULL ((void *)0) 44 | #endif 45 | 46 | struct rb_node 47 | { 48 | unsigned long rb_parent_color; 49 | #define RB_RED 0 50 | #define RB_BLACK 1 51 | struct rb_node *rb_right; 52 | struct rb_node *rb_left; 53 | } ; 54 | 55 | struct rb_root 56 | { 57 | struct rb_node *rb_node; 58 | }; 59 | 60 | 61 | #define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3)) 62 | #define rb_color(r) ((r)->rb_parent_color & 1) 63 | #define rb_is_red(r) (!rb_color(r)) 64 | #define rb_is_black(r) rb_color(r) 65 | #define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0) 66 | #define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0) 67 | 68 | #define RB_ROOT (struct rb_root) { NULL, } 69 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) 70 | 71 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) 72 | #define RB_EMPTY_NODE(node) (rb_parent(node) == node) 73 | #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) 74 | 75 | extern void rb_insert_color(struct rb_node *, struct rb_root *); 76 | extern void rb_erase(struct rb_node *, struct rb_root *); 77 | 78 | typedef void (*rb_augment_f)(struct rb_node *node, void *data); 79 | 80 | extern void rb_augment_insert(struct rb_node *node, 81 | rb_augment_f func, void *data); 82 | extern struct rb_node *rb_augment_erase_begin(struct rb_node *node); 83 | extern void rb_augment_erase_end(struct rb_node *node, 84 | rb_augment_f func, void *data); 85 | 86 | /* Find logical next and previous nodes in a tree */ 87 | extern struct rb_node *rb_next(const struct rb_node *); 88 | extern struct rb_node *rb_prev(const struct rb_node *); 89 | extern struct rb_node *rb_first(const struct rb_root *); 90 | extern struct rb_node *rb_last(const struct rb_root *); 91 | 92 | /* Fast replacement of a single node without remove/rebalance/add/rebalance */ 93 | extern void rb_replace_node(struct rb_node *victim, struct rb_node *_new, 94 | struct rb_root *root); 95 | 96 | extern void rb_link_node(struct rb_node * node, struct rb_node * parent, struct rb_node ** rb_link); 97 | 98 | #endif /* _LINUX_RBTREE_H */ 99 | 100 | -------------------------------------------------------------------------------- /src/vc2008/clean.bat: -------------------------------------------------------------------------------- 1 | del vc2008.ncb 2 | rd /S /Q Debug 3 | -------------------------------------------------------------------------------- /src/vc2008/hetao/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/hetao/Debug/BuildLog.htm -------------------------------------------------------------------------------- /src/vc2008/hetao/hetao.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/hetao/hetao.vcproj -------------------------------------------------------------------------------- /src/vc2008/hetao/hetao.vcproj.WWW-0DA2CF5DB53.Calvin.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/vc2008/hetaocheck/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/hetaocheck/Debug/BuildLog.htm -------------------------------------------------------------------------------- /src/vc2008/hetaocheck/hetaocheck.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/hetaocheck/hetaocheck.vcproj -------------------------------------------------------------------------------- /src/vc2008/hetaocheck/hetaocheck.vcproj.WWW-0DA2CF5DB53.Calvin.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/vc2008/minihetao/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/vc2008/minihetao/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/Debug/BuildLog.htm -------------------------------------------------------------------------------- /src/vc2008/minihetao/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/ReadMe.txt -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetao.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/minihetao.aps -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetao.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/minihetao.cpp -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetao.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/minihetao.h -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetao.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/minihetao.rc -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetao.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/minihetao.vcproj -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetao.vcproj.WWW-0DA2CF5DB53.Calvin.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetaoDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/minihetaoDlg.cpp -------------------------------------------------------------------------------- /src/vc2008/minihetao/minihetaoDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/minihetaoDlg.h -------------------------------------------------------------------------------- /src/vc2008/minihetao/res/minihetao.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/res/minihetao.ico -------------------------------------------------------------------------------- /src/vc2008/minihetao/res/minihetao.ico.old: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/res/minihetao.ico.old -------------------------------------------------------------------------------- /src/vc2008/minihetao/res/minihetao.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/res/minihetao.rc2 -------------------------------------------------------------------------------- /src/vc2008/minihetao/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by minihetao.rc 4 | // 5 | #define IDM_ABOUTBOX 0x0010 6 | #define IDD_ABOUTBOX 100 7 | #define IDS_ABOUTBOX 101 8 | #define IDD_MINIHETAO_DIALOG 102 9 | #define IDR_MAINFRAME 128 10 | #define IDR_MENU_POPUP 129 11 | #define IDC_EDIT_WWWROOT 1000 12 | #define IDC_BUTTON_SELECTDIRECTORY 1001 13 | #define IDC_BUTTON_EXIT 1002 14 | #define IDC_BUTTON_MINIMIZE 1003 15 | #define IDC_BUTTON_HIDE 1003 16 | #define IDC_BUTTON_RUNNING 1004 17 | #define IDC_BUTTON_STOP 1005 18 | #define IDC_BUTTON_REGISTE 1007 19 | #define IDC_BUTTON_UNREGISTE 1008 20 | #define IDC_STATIC_REMARK 1009 21 | #define ID_32771 32771 22 | #define ID_32772 32772 23 | #define ID_32773 32773 24 | #define WM_SHOW_WINDOW 32774 25 | #define WM_CLICK_POPUPMENU 32775 26 | #define ID_POPUPMENU_A 32777 27 | #define ID_POPUPMENU_32778 32778 28 | 29 | // Next default values for new objects 30 | // 31 | #ifdef APSTUDIO_INVOKED 32 | #ifndef APSTUDIO_READONLY_SYMBOLS 33 | #define _APS_NEXT_RESOURCE_VALUE 130 34 | #define _APS_NEXT_COMMAND_VALUE 32779 35 | #define _APS_NEXT_CONTROL_VALUE 1010 36 | #define _APS_NEXT_SYMED_VALUE 101 37 | #endif 38 | #endif 39 | -------------------------------------------------------------------------------- /src/vc2008/minihetao/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/stdafx.cpp -------------------------------------------------------------------------------- /src/vc2008/minihetao/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/stdafx.h -------------------------------------------------------------------------------- /src/vc2008/minihetao/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/minihetao/targetver.h -------------------------------------------------------------------------------- /src/vc2008/vc2008.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hetaocheck", "hetaocheck\hetaocheck.vcproj", "{1578C59C-065C-4436-8E4F-2BA6551F184D}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hetao", "hetao\hetao.vcproj", "{9616DCE7-FAAF-46AB-B27F-CC0392456AB0}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minihetao", "minihetao\minihetao.vcproj", "{CE35C1D5-0D1B-4157-B306-F827D4ECA468}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {1578C59C-065C-4436-8E4F-2BA6551F184D}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {1578C59C-065C-4436-8E4F-2BA6551F184D}.Debug|Win32.Build.0 = Debug|Win32 18 | {1578C59C-065C-4436-8E4F-2BA6551F184D}.Release|Win32.ActiveCfg = Release|Win32 19 | {1578C59C-065C-4436-8E4F-2BA6551F184D}.Release|Win32.Build.0 = Release|Win32 20 | {9616DCE7-FAAF-46AB-B27F-CC0392456AB0}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {9616DCE7-FAAF-46AB-B27F-CC0392456AB0}.Debug|Win32.Build.0 = Debug|Win32 22 | {9616DCE7-FAAF-46AB-B27F-CC0392456AB0}.Release|Win32.ActiveCfg = Release|Win32 23 | {9616DCE7-FAAF-46AB-B27F-CC0392456AB0}.Release|Win32.Build.0 = Release|Win32 24 | {CE35C1D5-0D1B-4157-B306-F827D4ECA468}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {CE35C1D5-0D1B-4157-B306-F827D4ECA468}.Debug|Win32.Build.0 = Debug|Win32 26 | {CE35C1D5-0D1B-4157-B306-F827D4ECA468}.Release|Win32.ActiveCfg = Release|Win32 27 | {CE35C1D5-0D1B-4157-B306-F827D4ECA468}.Release|Win32.Build.0 = Release|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /src/vc2008/vc2008.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvinwilliams/hetao/7739afd6a6479b9542ca2870f0e580939a13e9df/src/vc2008/vc2008.suo -------------------------------------------------------------------------------- /uninstall.bat: -------------------------------------------------------------------------------- 1 | cd bin 2 | hetao ..\conf\hetao.conf --uninstall-service 3 | minihetao --unregiste-folder-popupmenu 4 | cd .. 5 | pause 6 | -------------------------------------------------------------------------------- /www/error_pages/error_page_400.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 400 Bad Request 4 | 5 |

Bad Request

6 |

Your browser (or proxy) sent a request that this server could not understand.

7 | 8 | -------------------------------------------------------------------------------- /www/error_pages/error_page_401.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 401 Unauthorized 4 | 5 |

Unauthorized

6 |

This server could not verify that you are authorized to access the URL, You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

7 | 8 | -------------------------------------------------------------------------------- /www/error_pages/error_page_403.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 |

Forbidden

6 |

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

7 | 8 | -------------------------------------------------------------------------------- /www/error_pages/error_page_404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 404 Not Found 4 | 5 |

Not Found

6 |

The requested URL was not found on this server.

7 | 8 | -------------------------------------------------------------------------------- /www/error_pages/error_page_408.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 408 Request Timeout 4 | 5 |

Request Timeout

6 |

The server closed the network connection because the browser didn't finish the request within the specified time.

7 | 8 | -------------------------------------------------------------------------------- /www/error_pages/error_page_500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 500 Internal Server Error 4 | 5 |

Internal Server Error

6 |

The server encountered an internal error and was unable to complete your request.

7 | 8 | -------------------------------------------------------------------------------- /www/error_pages/error_page_503.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 503 Service Unavailable 4 | 5 |

Service Unavailable

6 |

The server is temporarily unable to service your request due to maintenance downtime or capacity problems, Please try again later.

7 | 8 | -------------------------------------------------------------------------------- /www/error_pages/error_page_505.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 505 HTTP Version Not Supported 4 | 5 |

HTTP Version Not Supported

6 |

The server does not support the HTTP version requested by the browser.

7 | 8 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Welcome 6 | 7 | 8 | Hello HETAO 9 | 10 | 11 | 12 | 13 | --------------------------------------------------------------------------------