├── .gitignore ├── .indent.pro ├── .vimrc ├── CHANGES ├── INSTALL ├── LAYOUT ├── LICENSE ├── Makefile.am ├── NOTICE ├── README ├── README-EC2 ├── REVIEWERS ├── STATUS ├── build ├── ax_lib_readline.m4 ├── common.m4 ├── crypto.m4 ├── jemalloc.m4 ├── lzma.m4 ├── network.m4 ├── pcre.m4 ├── tcl.m4 ├── tcmalloc.m4 ├── xml.m4 └── zlib.m4 ├── ci ├── README └── rat-excludes.txt ├── config.layout ├── configure.ac ├── contrib ├── install_trafficserver.sh ├── perl │ ├── AdminClient │ │ ├── Changes │ │ ├── MANIFEST │ │ ├── Makefile.PL │ │ ├── README │ │ ├── lib │ │ │ └── Apache │ │ │ │ └── TS │ │ │ │ └── AdminClient.pm │ │ └── t │ │ │ └── Apache-TS-AdminClient.t │ └── ConfigMgmt │ │ ├── examples │ │ └── forward_proxy.pl │ │ └── lib │ │ └── Apache │ │ └── TS │ │ ├── Config.pm │ │ └── Config │ │ └── Records.pm ├── set_trafficserver.sh ├── trafficserver.spec └── tstop │ ├── README │ ├── src │ ├── Makefile │ ├── stats.h │ └── tstop.cc │ └── tstop ├── cop ├── Makefile.am └── TrafficCop.cc ├── doc ├── Doxyfile.in ├── Makefile.am ├── doap.rdf ├── dot │ ├── ResponseDiag.dot │ ├── SimpleStateDiag.dot │ └── SimpleStateDiagAPI.dot ├── mainpage.doc └── man │ ├── config_alarms.1 │ ├── config_cache.1 │ ├── config_clock.1 │ ├── config_dns.1 │ ├── config_get.1 │ ├── config_hard-restart.1 │ ├── config_hostdb.1 │ ├── config_http.1 │ ├── config_icp.1 │ ├── config_logging.1 │ ├── config_name.1 │ ├── config_network.1 │ ├── config_parent.1 │ ├── config_port-tunnels.1 │ ├── config_remap.1 │ ├── config_reset-stats.1 │ ├── config_restart.1 │ ├── config_root.1 │ ├── config_scheduled-update.1 │ ├── config_security.1 │ ├── config_set.1 │ ├── config_socks.1 │ ├── config_ssl.1 │ ├── config_start.1 │ ├── config_stop.1 │ ├── config_upgrade.1 │ ├── config_virtual-ip.1 │ ├── disable.1 │ ├── enable.1 │ ├── exit.1 │ ├── man_page_template.txt │ ├── show_alarms.1 │ ├── show_cache-stats.1 │ ├── show_cache.1 │ ├── show_cluster.1 │ ├── show_dns-resolver.1 │ ├── show_dns-stats.1 │ ├── show_hostdb-stats.1 │ ├── show_hostdb.1 │ ├── show_http-stats.1 │ ├── show_http-trans-stats.1 │ ├── show_http.1 │ ├── show_icp-stats.1 │ ├── show_icp.1 │ ├── show_logging-stats.1 │ ├── show_logging.1 │ ├── show_network.1 │ ├── show_parent.1 │ ├── show_port-tunnels.1 │ ├── show_proxy-stats.1 │ ├── show_proxy.1 │ ├── show_remap.1 │ ├── show_scheduled-update.1 │ ├── show_security.1 │ ├── show_socks.1 │ ├── show_ssl.1 │ ├── show_status.1 │ ├── show_version.1 │ ├── show_virtual-ip.1 │ └── traffic_shell.1 ├── emacs-style ├── example ├── Makefile.am ├── add-header │ ├── Makefile.am │ ├── add-header.c │ └── readme.txt ├── app-template │ ├── Makefile.am │ ├── app-template.cc │ ├── app-template.h │ └── records.config.in ├── append-transform │ ├── Makefile.am │ ├── append-transform.c │ └── readme.txt ├── basic-auth │ ├── Makefile.am │ ├── basic-auth.c │ └── readme.txt ├── blacklist-0 │ ├── Makefile.am │ └── blacklist-0.c ├── blacklist-1 │ ├── Makefile.am │ ├── blacklist-1.c │ ├── blacklist.txt │ └── readme.txt ├── bnull-transform │ ├── Makefile.am │ └── bnull-transform.c ├── cache_scan │ ├── Makefile.am │ └── cache_scan.cc ├── file-1 │ ├── Makefile.am │ ├── file-1.c │ └── readme.txt ├── hello │ ├── Makefile.am │ └── hello.c ├── include_other │ └── macro.h ├── null-transform │ ├── Makefile.am │ ├── null-transform.c │ └── readme.txt ├── output-header │ ├── Makefile.am │ ├── output-header.c │ └── readme ├── prefetch │ ├── Makefile.am │ ├── prefetch-plugin-eg1.c │ ├── readme.txt │ └── test-hns-plugin.c ├── protocol │ ├── Makefile.am │ ├── Protocol.c │ ├── Protocol.h │ ├── README.txt │ ├── TxnSM.c │ ├── TxnSM.h │ └── test │ │ ├── ProtocolClientTest.java │ │ ├── ProtocolServerTest.java │ │ └── file_gen.sh ├── query_remap │ ├── Makefile.am │ └── query_remap.c ├── redirect-1 │ ├── Makefile.am │ ├── readme.txt │ └── redirect-1.c ├── remap │ ├── Makefile.am │ ├── build.txt │ └── remap.cc ├── replace-header │ ├── Makefile.am │ └── replace-header.c ├── response-header-1 │ ├── Makefile.am │ └── response-header-1.c ├── server-transform │ ├── Makefile.am │ └── server-transform.c ├── session-1 │ ├── Makefile.am │ └── session-1.c ├── thread-1 │ ├── Makefile.am │ ├── readme.txt │ └── thread-1.c └── thread-pool │ ├── Makefile.am │ ├── README.txt │ ├── TESTPLAN.txt │ ├── include │ ├── Makefile.am │ ├── gen.c │ └── gen_inc.sh │ ├── psi.c │ ├── test │ ├── SDKTest │ │ ├── SDKtest_server.config │ │ └── psi_server.c │ └── SynTest │ │ ├── Tests │ │ └── Psi │ │ │ ├── 1.cfg │ │ │ ├── 10.cfg │ │ │ ├── 11.cfg │ │ │ ├── 12.cfg │ │ │ ├── 13.cfg │ │ │ ├── 2.cfg │ │ │ ├── 3.cfg │ │ │ ├── 4.cfg │ │ │ ├── 5.cfg │ │ │ ├── 6.cfg │ │ │ ├── 7.cfg │ │ │ ├── 8.cfg │ │ │ ├── 9.cfg │ │ │ └── psi_files │ │ │ ├── tc10_file.txt │ │ │ ├── tc11_file.txt │ │ │ ├── tc12_file.txt │ │ │ ├── tc13_file.txt │ │ │ ├── tc1_file.txt │ │ │ ├── tc2_file.txt │ │ │ ├── tc3_file.txt │ │ │ ├── tc4_file.txt │ │ │ ├── tc5_file.txt │ │ │ ├── tc6_file.txt │ │ │ ├── tc7_file.txt │ │ │ ├── tc8_file.txt │ │ │ └── tc9_file.txt │ │ ├── system.cfg │ │ └── tests_psi.cfg │ ├── thread.c │ └── thread.h ├── iocore ├── Makefile.am ├── aio │ ├── AIO.cc │ ├── I_AIO.h │ ├── Inline.cc │ ├── Makefile.am │ ├── NTAIO.cc │ ├── P_AIO.h │ ├── sample.cfg │ ├── test_AIO.i │ ├── test_I_AIO.cc │ └── test_P_AIO.cc ├── cache │ ├── Cache.cc │ ├── CacheDir.cc │ ├── CacheDisk.cc │ ├── CacheHosting.cc │ ├── CacheHttp.cc │ ├── CacheLink.cc │ ├── CachePages.cc │ ├── CachePagesInternal.cc │ ├── CacheRead.cc │ ├── CacheTest.cc │ ├── CacheVol.cc │ ├── CacheWrite.cc │ ├── I_Cache.h │ ├── I_CacheDefs.h │ ├── I_Store.h │ ├── Inline.cc │ ├── Makefile.am │ ├── Notes │ ├── P_Cache.h │ ├── P_CacheArray.h │ ├── P_CacheDir.h │ ├── P_CacheDisk.h │ ├── P_CacheHosting.h │ ├── P_CacheHttp.h │ ├── P_CacheInternal.h │ ├── P_CacheTest.h │ ├── P_CacheVol.h │ ├── P_RamCache.h │ ├── RamCacheCLFUS.cc │ ├── RamCacheLRU.cc │ └── Store.cc ├── cluster │ ├── ClusterAPI.cc │ ├── ClusterCache.cc │ ├── ClusterConfig.cc │ ├── ClusterHandler.cc │ ├── ClusterHandlerBase.cc │ ├── ClusterHash.cc │ ├── ClusterLib.cc │ ├── ClusterLoadMonitor.cc │ ├── ClusterMachine.cc │ ├── ClusterProcessor.cc │ ├── ClusterRPC.cc │ ├── ClusterVConnection.cc │ ├── Inline.cc │ ├── Makefile.am │ ├── P_Cluster.h │ ├── P_ClusterCache.h │ ├── P_ClusterCacheInternal.h │ ├── P_ClusterHandler.h │ ├── P_ClusterInline.h │ ├── P_ClusterInternal.h │ ├── P_ClusterLib.h │ ├── P_ClusterLoadMonitor.h │ ├── P_ClusterMachine.h │ ├── P_TimeTrace.h │ ├── _os_bits.h │ ├── clusterinterface.h │ ├── common_define.h │ ├── connection.cc │ ├── connection.h │ ├── global.cc │ ├── global.h │ ├── machine.cc │ ├── machine.h │ ├── message.cc │ ├── message.h │ ├── nio.cc │ ├── nio.h │ ├── pthread_func.cc │ ├── pthread_func.h │ ├── session.cc │ ├── session.h │ ├── shared_func.cc │ ├── shared_func.h │ ├── sockopt.cc │ ├── sockopt.h │ ├── test_I_Cluster.cc │ ├── test_P_Cluster.cc │ └── types.h ├── dns │ ├── DNS.cc │ ├── DNSConnection.cc │ ├── I_DNS.h │ ├── I_DNSProcessor.h │ ├── I_SplitDNS.h │ ├── I_SplitDNSProcessor.h │ ├── Inline.cc │ ├── Makefile.am │ ├── P_DNS.h │ ├── P_DNSConnection.h │ ├── P_DNSProcessor.h │ ├── P_SplitDNS.h │ ├── P_SplitDNSProcessor.h │ ├── SRV.cc │ ├── SRV.h │ ├── SplitDNS.cc │ ├── test_I_DNS.cc │ └── test_P_DNS.cc ├── eventsystem │ ├── EventSystem.cc │ ├── IOBuffer.cc │ ├── I_Action.h │ ├── I_Continuation.h │ ├── I_EThread.h │ ├── I_Event.h │ ├── I_EventProcessor.h │ ├── I_EventSystem.h │ ├── I_IOBuffer.h │ ├── I_Lock.h │ ├── I_PriorityEventQueue.h │ ├── I_Processor.h │ ├── I_ProtectedQueue.h │ ├── I_ProxyAllocator.h │ ├── I_SocketManager.h │ ├── I_Tasks.h │ ├── I_Thread.h │ ├── I_VConnection.h │ ├── I_VIO.h │ ├── Inline.cc │ ├── Lock.cc │ ├── Makefile.am │ ├── PQ-List.cc │ ├── P_EventSystem.h │ ├── P_Freer.h │ ├── P_IOBuffer.h │ ├── P_ProtectedQueue.h │ ├── P_Thread.h │ ├── P_UnixEThread.h │ ├── P_UnixEvent.h │ ├── P_UnixEventProcessor.h │ ├── P_UnixSocketManager.h │ ├── P_VConnection.h │ ├── P_VIO.h │ ├── Processor.cc │ ├── ProtectedQueue.cc │ ├── SocketManager.cc │ ├── Tasks.cc │ ├── Thread.cc │ ├── UnixEThread.cc │ ├── UnixEvent.cc │ ├── UnixEventProcessor.cc │ ├── test_Buffer.cc │ ├── test_Event.i │ ├── test_I_Buffer.cc │ ├── test_I_Event.cc │ ├── test_P_Buffer.cc │ └── test_P_Event.cc ├── hostdb │ ├── HostDB.cc │ ├── I_HostDB.h │ ├── I_HostDBProcessor.h │ ├── Inline.cc │ ├── Makefile.am │ ├── MultiCache.cc │ ├── P_HostDB.h │ ├── P_HostDBProcessor.h │ ├── P_MultiCache.h │ ├── include │ │ └── Machine.h │ ├── test_I_HostDB.cc │ └── test_P_HostDB.cc ├── net │ ├── AcceptCont.cc │ ├── Connection.cc │ ├── I_AcceptCont.h │ ├── I_Net.h │ ├── I_NetProcessor.h │ ├── I_NetVConnection.h │ ├── I_Socks.h │ ├── I_UDPConnection.h │ ├── I_UDPNet.h │ ├── I_UDPPacket.h │ ├── Inline.cc │ ├── Makefile.am │ ├── Net.cc │ ├── NetTest-http-server.c │ ├── NetVCTest.cc │ ├── NetVConnection.cc │ ├── P_CompletionUtil.h │ ├── P_Connection.h │ ├── P_InkBulkIO.h │ ├── P_LibBulkIO.h │ ├── P_Net.h │ ├── P_NetAccept.h │ ├── P_NetVCTest.h │ ├── P_NetVConnection.h │ ├── P_ProtocolAcceptCont.h │ ├── P_ProtocolNetAccept.h │ ├── P_SSLCertLookup.h │ ├── P_SSLConfig.h │ ├── P_SSLNetAccept.h │ ├── P_SSLNetProcessor.h │ ├── P_SSLNetVConnection.h │ ├── P_SSLNextProtocolAccept.h │ ├── P_SSLNextProtocolSet.h │ ├── P_SSLUtils.h │ ├── P_Socks.h │ ├── P_SpdyAcceptCont.h │ ├── P_SpdyCallbacks.h │ ├── P_SpdyCommon.h │ ├── P_SpdySM.h │ ├── P_UDPConnection.h │ ├── P_UDPIOEvent.h │ ├── P_UDPNet.h │ ├── P_UDPPacket.h │ ├── P_UnixCompletionUtil.h │ ├── P_UnixNet.h │ ├── P_UnixNetProcessor.h │ ├── P_UnixNetState.h │ ├── P_UnixNetVConnection.h │ ├── P_UnixPollDescriptor.h │ ├── P_UnixUDPConnection.h │ ├── ProtocolAcceptCont.cc │ ├── ProtocolNetAccept.cc │ ├── SSLCertLookup.cc │ ├── SSLConfig.cc │ ├── SSLNetAccept.cc │ ├── SSLNetProcessor.cc │ ├── SSLNetVConnection.cc │ ├── SSLNextProtocolAccept.cc │ ├── SSLNextProtocolSet.cc │ ├── SSLUtils.cc │ ├── Socks.cc │ ├── SpdyAcceptCont.cc │ ├── SpdyCallbacks.cc │ ├── SpdyCommon.cc │ ├── SpdySM.cc │ ├── UDPIOEvent.cc │ ├── UnixConnection.cc │ ├── UnixNet.cc │ ├── UnixNetAccept.cc │ ├── UnixNetPages.cc │ ├── UnixNetProcessor.cc │ ├── UnixNetVConnection.cc │ ├── UnixUDPConnection.cc │ ├── UnixUDPNet.cc │ ├── test_I_Net.cc │ ├── test_I_UDPNet.cc │ ├── test_P_Net.cc │ ├── test_P_UDPNet.cc │ └── test_certlookup.cc └── utils │ ├── I_Machine.h │ ├── I_OneWayMultiTunnel.h │ ├── I_OneWayTunnel.h │ ├── Machine.cc │ ├── Makefile.am │ ├── OneWayMultiTunnel.cc │ ├── OneWayTunnel.cc │ └── diags.i ├── lib ├── Makefile.am ├── records │ ├── I_RecAlarms.h │ ├── I_RecCore.h │ ├── I_RecDefs.h │ ├── I_RecEvents.h │ ├── I_RecHttp.h │ ├── I_RecLocal.h │ ├── I_RecMutex.h │ ├── I_RecProcess.h │ ├── I_RecSignals.h │ ├── Makefile.am │ ├── P_RecCompatibility.h │ ├── P_RecCore.cc │ ├── P_RecCore.h │ ├── P_RecDefs.h │ ├── P_RecLocal.h │ ├── P_RecMessage.h │ ├── P_RecProcess.h │ ├── P_RecTree.h │ ├── P_RecUtils.h │ ├── RecCompatibility.cc │ ├── RecCore.cc │ ├── RecHttp.cc │ ├── RecLocal.cc │ ├── RecMessage.cc │ ├── RecMutex.cc │ ├── RecProcess.cc │ ├── RecTree.cc │ ├── RecUtils.cc │ ├── test_I_RecLocal.cc │ ├── test_I_RecProcess.cc │ ├── test_P_RecProcess.cc │ ├── test_RecProcess.i │ ├── test_RecTree.cc │ ├── test_RecordsConfig.cc │ ├── test_RecordsConfig.h │ └── test_records.config ├── ts │ ├── Allocator.h │ ├── Arena.cc │ ├── Arena.h │ ├── Bitops.cc │ ├── Bitops.h │ ├── Compatability.h │ ├── CompileParseRules.cc │ ├── Diags.cc │ ├── Diags.h │ ├── DynArray.h │ ├── EventNotify.cc │ ├── EventNotify.h │ ├── HostLookup.cc │ ├── HostLookup.h │ ├── INK_MD5.h │ ├── I_Layout.h │ ├── I_Version.h │ ├── InkErrno.h │ ├── InkPool.h │ ├── IntrusiveDList.h │ ├── IntrusivePtrTest.cc │ ├── IpMap.cc │ ├── IpMap.h │ ├── IpMapConf.cc │ ├── IpMapConf.h │ ├── IpMapTest.cc │ ├── Layout.cc │ ├── List.h │ ├── MMH.cc │ ├── MMH.h │ ├── Makefile.am │ ├── Map.h │ ├── MatcherUtils.cc │ ├── MatcherUtils.h │ ├── MimeTable.cc │ ├── MimeTable.h │ ├── ParseRules.cc │ ├── ParseRules.h │ ├── Ptr.h │ ├── RawHashTable.cc │ ├── RawHashTable.h │ ├── Regex.cc │ ├── Regex.h │ ├── Regression.cc │ ├── Regression.h │ ├── Resource.cc │ ├── Resource.h │ ├── SimpleTokenizer.h │ ├── TestBox.h │ ├── TestHttpHeader.cc │ ├── TextBuffer.cc │ ├── TextBuffer.h │ ├── Tokenizer.cc │ ├── Tokenizer.h │ ├── Trie.h │ ├── TsBuffer.h │ ├── Vec.cc │ ├── Vec.h │ ├── Version.cc │ ├── defalloc.h │ ├── fastlz.c │ ├── fastlz.h │ ├── ink_aiocb.h │ ├── ink_align.h │ ├── ink_apidefs.h │ ├── ink_args.cc │ ├── ink_args.h │ ├── ink_assert.cc │ ├── ink_assert.h │ ├── ink_atomic.h │ ├── ink_auth_api.cc │ ├── ink_auth_api.h │ ├── ink_base64.cc │ ├── ink_base64.h │ ├── ink_bool.h │ ├── ink_cap.cc │ ├── ink_cap.h │ ├── ink_code.cc │ ├── ink_code.h │ ├── ink_config.h.in │ ├── ink_defs.cc │ ├── ink_defs.h │ ├── ink_error.cc │ ├── ink_error.h │ ├── ink_exception.h │ ├── ink_file.cc │ ├── ink_file.h │ ├── ink_hash_table.cc │ ├── ink_hash_table.h │ ├── ink_hrtime.cc │ ├── ink_hrtime.h │ ├── ink_inet.cc │ ├── ink_inet.h │ ├── ink_inout.h │ ├── ink_killall.cc │ ├── ink_killall.h │ ├── ink_list.h │ ├── ink_llqueue.h │ ├── ink_lockfile.h │ ├── ink_memory.cc │ ├── ink_memory.h │ ├── ink_memory_pool.cc │ ├── ink_memory_pool.h │ ├── ink_mutex.h │ ├── ink_platform.h │ ├── ink_port.h │ ├── ink_queue.cc │ ├── ink_queue.h │ ├── ink_queue_ext.cc │ ├── ink_queue_ext.h │ ├── ink_queue_utils.cc │ ├── ink_rand.cc │ ├── ink_rand.h │ ├── ink_rbtree.cc │ ├── ink_rbtree.h │ ├── ink_res_init.cc │ ├── ink_res_mkquery.cc │ ├── ink_resolver.h │ ├── ink_resource.cc │ ├── ink_resource.h │ ├── ink_rwlock.h │ ├── ink_sock.cc │ ├── ink_sock.h │ ├── ink_spinlock.h │ ├── ink_sprintf.cc │ ├── ink_sprintf.h │ ├── ink_stack_trace.cc │ ├── ink_stack_trace.h │ ├── ink_string++.cc │ ├── ink_string++.h │ ├── ink_string.cc │ ├── ink_string.h │ ├── ink_sys_control.cc │ ├── ink_sys_control.h │ ├── ink_syslog.cc │ ├── ink_syslog.h │ ├── ink_thread.cc │ ├── ink_thread.h │ ├── ink_time.cc │ ├── ink_time.h │ ├── ink_unused.h │ ├── libts.h │ ├── llqueue.cc │ ├── load_http_hdr.cc │ ├── lockfile.cc │ ├── mkdfa.c │ ├── test_List.cc │ ├── test_Map.cc │ ├── test_Vec.cc │ ├── test_arena.cc │ ├── test_atomic.cc │ ├── test_freelist.cc │ ├── test_mem_pool.cc │ ├── test_memchr.cc │ └── test_strings.cc ├── tsconfig │ ├── BisonHeaderToC++.sed │ ├── Errata.cc │ ├── Errata.h │ ├── IntrusivePtr.h │ ├── Makefile.am │ ├── NumericType.h │ ├── TsBuilder.cc │ ├── TsBuilder.h │ ├── TsConfigGrammar.y │ ├── TsConfigLexer.h │ ├── TsConfigParseEvents.h │ ├── TsConfigSyntax.l │ ├── TsConfigTypes.h │ ├── TsErrataUtil.cc │ ├── TsErrataUtil.h │ ├── TsValue.cc │ ├── TsValue.h │ ├── test-1.tsconfig │ └── test-tsconfig.cc └── wccp │ ├── Makefile.am │ ├── Wccp.h │ ├── WccpConfig.cc │ ├── WccpEndPoint.cc │ ├── WccpLocal.h │ ├── WccpMeta.h │ ├── WccpMsg.cc │ ├── WccpStatic.cc │ ├── WccpUtil.h │ ├── wccp-test-cache.cc │ └── wccp-test-router.cc ├── mgmt ├── AddConfigFilesHere.cc ├── Alarms.cc ├── Alarms.h ├── BaseManager.cc ├── BaseManager.h ├── FileManager.cc ├── FileManager.h ├── LocalManager.cc ├── LocalManager.h ├── Main.cc ├── Main.h ├── Makefile.am ├── MgmtDefs.h ├── MultiFile.cc ├── MultiFile.h ├── ProcessManager.cc ├── ProcessManager.h ├── RecordsConfig.cc ├── RecordsConfig.h ├── Rollback.cc ├── Rollback.h ├── api │ ├── CfgContextDefs.h │ ├── CfgContextImpl.cc │ ├── CfgContextImpl.h │ ├── CfgContextManager.cc │ ├── CfgContextManager.h │ ├── CfgContextUtils.cc │ ├── CfgContextUtils.h │ ├── CoreAPI.cc │ ├── CoreAPI.h │ ├── CoreAPIShared.cc │ ├── CoreAPIShared.h │ ├── EventCallback.cc │ ├── EventCallback.h │ ├── EventControlMain.cc │ ├── EventControlMain.h │ ├── GenericParser.cc │ ├── GenericParser.h │ ├── INKMgmtAPI.cc │ ├── INKMgmtAPIStub.cc │ ├── Makefile.am │ ├── NetworkUtilsDefs.h │ ├── NetworkUtilsLocal.cc │ ├── NetworkUtilsLocal.h │ ├── TSControlMain.cc │ ├── TSControlMain.h │ ├── include │ │ ├── Makefile.am │ │ └── mgmtapi.h │ └── remote │ │ ├── APITestCliRemote.cc │ │ ├── CoreAPIRemote.cc │ │ ├── EventRegistration.cc │ │ ├── EventRegistration.h │ │ ├── Makefile.am │ │ ├── NetworkUtilsRemote.cc │ │ └── NetworkUtilsRemote.h ├── cli │ ├── CliCreateCommands.cc │ ├── CliCreateCommands.h │ ├── CliDisplay.cc │ ├── CliDisplay.h │ ├── CliMgmtUtils.cc │ ├── CliMgmtUtils.h │ ├── ConfigCmd.cc │ ├── ConfigCmd.h │ ├── ConfigUpgradeCmd.cc │ ├── ConfigUpgradeCmd.h │ ├── ConfigUpgradeReadCmd.cc │ ├── ConfigUpgradeWriteCmd.cc │ ├── Makefile.am │ ├── ShowCmd.cc │ ├── ShowCmd.h │ ├── TrafficLine.cc │ ├── UtilCmds.cc │ ├── UtilCmds.h │ ├── cliAppInit.cc │ ├── cliMain.cc │ ├── cliParseArg.cc │ ├── cli_detailed_command_list.txt │ ├── cli_feature_spec.txt │ ├── commandOptions.h │ ├── createArgument.cc │ ├── createArgument.h │ ├── createCommand.cc │ ├── createCommand.h │ ├── definitions.h │ ├── hashtable.cc │ ├── hashtable.h │ └── processArgument.cc ├── cluster │ ├── ClusterCom.cc │ ├── ClusterCom.h │ ├── Makefile.am │ ├── VMap.cc │ └── VMap.h ├── preparse │ ├── IPRange.cc │ ├── IPRange.h │ ├── Makefile.am │ ├── RemapReadConfig.cc │ ├── SocksParser.cc │ └── StoreReadConfig.cc ├── stats │ ├── Makefile.am │ ├── StatProcessor.cc │ ├── StatProcessor.h │ ├── StatType.cc │ ├── StatType.h │ ├── StatXML.cc │ ├── StatXML.h │ └── spec ├── tools │ ├── ConfigAPI.cc │ ├── ConfigAPI.h │ ├── Makefile.am │ ├── SysAPI.cc │ └── SysAPI.h ├── utils │ ├── EnvBlock.cc │ ├── EnvBlock.h │ ├── ExpandingArray.cc │ ├── ExpandingArray.h │ ├── Makefile.am │ ├── MgmtHashTable.h │ ├── MgmtSchema.cc │ ├── MgmtSchema.h │ ├── MgmtSocket.h │ ├── MgmtUtils.cc │ ├── MgmtUtils.h │ ├── WebMgmtUtils.cc │ ├── WebMgmtUtils.h │ ├── XmlUtils.cc │ └── XmlUtils.h └── web2 │ ├── Makefile.am │ ├── WebCompatibility.cc │ ├── WebCompatibility.h │ ├── WebGlobals.h │ ├── WebHttp.cc │ ├── WebHttp.h │ ├── WebHttpContext.cc │ ├── WebHttpContext.h │ ├── WebHttpMessage.cc │ ├── WebHttpMessage.h │ ├── WebHttpSession.cc │ ├── WebHttpSession.h │ ├── WebIntrMain.cc │ ├── WebIntrMain.h │ ├── WebOverview.cc │ ├── WebOverview.h │ ├── WebUtils.cc │ └── WebUtils.h ├── plugins ├── Makefile.am ├── conf_remap │ ├── Makefile.am │ └── conf_remap.cc ├── header_filter │ ├── Makefile.am │ ├── README │ ├── example.conf │ ├── header_filter.cc │ ├── lulu.h │ ├── rules.cc │ └── rules.h ├── regex_remap │ ├── Makefile.am │ ├── README │ └── regex_remap.cc └── stats_over_http │ ├── Makefile.am │ ├── README │ └── stats_over_http.c ├── proxy ├── AbstractBuffer.cc ├── AbstractBuffer.h ├── CacheControl.cc ├── CacheControl.h ├── ClassH.txt ├── CompletionUtil.h ├── ConfigParse.h ├── ControlBase.cc ├── ControlBase.h ├── ControlMatcher.cc ├── ControlMatcher.h ├── CoreUtils.cc ├── CoreUtils.h ├── DebugStreamLevels.txt ├── DiagsConfig.cc ├── DiagsConfig.h ├── DynamicStats.h ├── Error.cc ├── Error.h ├── EventName.cc ├── EventName.h ├── FetchSM.cc ├── FetchSM.h ├── Freer.h ├── HttpTransStats.h ├── ICP.cc ├── ICP.h ├── ICPConfig.cc ├── ICPProcessor.cc ├── ICPProcessor.h ├── ICPStats.cc ├── ICPevents.h ├── ICPlog.h ├── IPAllow.cc ├── IPAllow.h ├── Initialize.cc ├── Initialize.h ├── InkAPI-ensure-funcs-present.pl ├── InkAPI.cc ├── InkAPIInternal.h ├── InkAPITest.cc ├── InkAPITestTool.cc ├── InkIOCoreAPI.cc ├── InkPool_r.h ├── InkXml.cc ├── InkXml.h ├── Main.cc ├── Main.h ├── Makefile.am ├── MuxVC.cc ├── MuxVC.h ├── ParentSelection.cc ├── ParentSelection.h ├── Plugin.cc ├── Plugin.h ├── PluginDB.cc ├── PluginDB.h ├── PluginVC.cc ├── PluginVC.h ├── Prefetch.cc ├── Prefetch.h ├── ProtoSM.h ├── ProxyConfig.cc ├── ProxyConfig.h ├── README-stats.otl ├── RegressionSM.cc ├── RegressionSM.h ├── ReverseProxy.cc ├── ReverseProxy.h ├── Show.h ├── SocksProxy.cc ├── StatPages.cc ├── StatPages.h ├── StatSystem.cc ├── StatSystem.h ├── StufferUdpReceiver.cc ├── TestClock.cc ├── TestClusterHash.cc ├── TestDNS.cc ├── TestHook.cc ├── TestPreProc.cc ├── TestPreProc.h ├── TestProxy.cc ├── TestRegex.cc ├── TestSimpleProxy.cc ├── TimeTrace.h ├── Transform.cc ├── Transform.h ├── TransformInternal.h ├── UDPAPIClientTest.cc ├── UDPAPIClientTest.h ├── UDPAPITest.cc ├── UDPAPITest.h ├── UglyLogStubs.cc ├── UnixCompletionUtil.h ├── Update.cc ├── Update.h ├── UserNameCacheTest.h ├── api │ └── ts │ │ ├── InkAPIHughes.h │ │ ├── InkAPIPrivateIOCore.h │ │ ├── Makefile.am │ │ ├── TsException.h │ │ ├── experimental.h │ │ ├── remap.h │ │ └── ts.h.in ├── config │ ├── Makefile.am │ ├── ae_ua.config.default │ ├── body_factory │ │ ├── Makefile.am │ │ └── default │ │ │ ├── .body_factory_info │ │ │ ├── Makefile.am │ │ │ ├── README │ │ │ ├── access#denied │ │ │ ├── access#proxy_auth_required │ │ │ ├── access#redirect_url │ │ │ ├── access#ssl_forbidden │ │ │ ├── cache#not_in_cache │ │ │ ├── cache#read_error │ │ │ ├── congestion#retryAfter │ │ │ ├── connect#dns_failed │ │ │ ├── connect#failed_connect │ │ │ ├── connect#hangup │ │ │ ├── default │ │ │ ├── interception#no_host │ │ │ ├── redirect#moved_temporarily │ │ │ ├── request#cycle_detected │ │ │ ├── request#no_content_length │ │ │ ├── request#no_host │ │ │ ├── request#scheme_unsupported │ │ │ ├── request#syntax_error │ │ │ ├── response#bad_response │ │ │ ├── response#bad_version │ │ │ ├── timeout#activity │ │ │ ├── timeout#inactivity │ │ │ ├── transcoding#unsupported │ │ │ └── urlrouting#no_mapping │ ├── cache.config.default │ ├── cluster.config.default │ ├── congestion.config.default │ ├── default_cluster.config.default │ ├── health_check.config.default │ ├── hosting.config.default │ ├── icp.config.default │ ├── ip_allow.config.default │ ├── log_hosts.config.default │ ├── logs_xml.config.default │ ├── mgr.cnf.default │ ├── parent.config.default │ ├── plugin.config.default │ ├── plugin.db.default │ ├── prefetch.config.default │ ├── public_key.der │ ├── records.config.default.in │ ├── remap.config.default │ ├── remap.config.example │ ├── remap.config.rules │ ├── socks.config.default │ ├── splitdns.config.default │ ├── ssl_multicert.config.default │ ├── stats.config.dtd │ ├── stats.config.xml.default │ ├── storage.config.default.in │ ├── throttle_error.html.example │ ├── update.config.default │ ├── vaddrs.config.default │ └── volume.config.default ├── congest │ ├── Congestion.cc │ ├── Congestion.h │ ├── CongestionDB.cc │ ├── CongestionDB.h │ ├── CongestionStats.cc │ ├── CongestionStats.h │ ├── CongestionTest.cc │ ├── FeatureSpec.txt │ ├── MT_hashtable.h │ └── Makefile.am ├── example_alarm_bin.sh ├── example_prep.sh ├── hdrs │ ├── HTTP.cc │ ├── HTTP.h │ ├── HdrHeap.cc │ ├── HdrHeap.h │ ├── HdrTSOnly.cc │ ├── HdrTest.cc │ ├── HdrTest.h │ ├── HdrToken.cc │ ├── HdrToken.h │ ├── HdrUtils.cc │ ├── HdrUtils.h │ ├── HttpCompat.cc │ ├── HttpCompat.h │ ├── MIME.cc │ ├── MIME.h │ ├── Makefile.am │ ├── URL.cc │ ├── URL.h │ ├── load_http_hdr.cc │ ├── test_header.cc │ └── test_urlhash.cc ├── http │ ├── HttpAcceptCont.cc │ ├── HttpAcceptCont.h │ ├── HttpBodyFactory.cc │ ├── HttpBodyFactory.h │ ├── HttpCacheSM.cc │ ├── HttpCacheSM.h │ ├── HttpClientSession.cc │ ├── HttpClientSession.h │ ├── HttpConfig.cc │ ├── HttpConfig.h │ ├── HttpConnectionCount.cc │ ├── HttpConnectionCount.h │ ├── HttpDebugNames.cc │ ├── HttpDebugNames.h │ ├── HttpMessageBody.cc │ ├── HttpMessageBody.h │ ├── HttpPages.cc │ ├── HttpPages.h │ ├── HttpProxyServerMain.cc │ ├── HttpProxyServerMain.h │ ├── HttpSM.cc │ ├── HttpSM.h │ ├── HttpServerSession.cc │ ├── HttpServerSession.h │ ├── HttpSessionManager.cc │ ├── HttpSessionManager.h │ ├── HttpTransact.cc │ ├── HttpTransact.h │ ├── HttpTransactCache.cc │ ├── HttpTransactCache.h │ ├── HttpTransactHeaders.cc │ ├── HttpTransactHeaders.h │ ├── HttpTunnel.cc │ ├── HttpTunnel.h │ ├── HttpUpdateSM.cc │ ├── HttpUpdateSM.h │ ├── HttpUpdateTester.cc │ ├── Makefile.am │ ├── README.via │ ├── TestHttpTransact.cc │ ├── TestUrl.cc │ ├── healthcheck │ │ ├── HCHandler.cc │ │ ├── HCHandler.h │ │ ├── HCProcessor.cc │ │ ├── HCProcessor.h │ │ ├── HCSM.cc │ │ ├── HCSM.h │ │ ├── HCUtil.cc │ │ ├── HCUtil.h │ │ ├── I_HC.h │ │ └── Makefile.am │ ├── hoturls │ │ ├── HotUrlHistory.cc │ │ ├── HotUrlHistory.h │ │ ├── HotUrlManager.cc │ │ ├── HotUrlManager.h │ │ ├── HotUrlMap.cc │ │ ├── HotUrlMap.h │ │ ├── HotUrlProcessor.cc │ │ ├── HotUrlProcessor.h │ │ ├── HotUrlStats.cc │ │ ├── HotUrlStats.h │ │ ├── I_HotUrls.h │ │ └── Makefile.am │ ├── remap │ │ ├── HostnameTrie.cc │ │ ├── HostnameTrie.h │ │ ├── Makefile.am │ │ ├── MappingTypes.h │ │ ├── RemapPluginInfo.cc │ │ ├── RemapPluginInfo.h │ │ ├── RemapPlugins.cc │ │ ├── RemapPlugins.h │ │ ├── RemapProcessor.cc │ │ ├── RemapProcessor.h │ │ ├── UrlMapping.cc │ │ ├── UrlMapping.h │ │ ├── UrlMappingPathContainer.cc │ │ ├── UrlMappingPathContainer.h │ │ ├── UrlMappingPathIndex.cc │ │ ├── UrlMappingPathIndex.h │ │ ├── UrlMappingRegexMatcher.cc │ │ ├── UrlMappingRegexMatcher.h │ │ ├── UrlRewrite.cc │ │ ├── UrlRewrite.h │ │ ├── acl │ │ │ ├── ACLCheckList.cc │ │ │ ├── ACLCheckList.h │ │ │ ├── ACLChecker.cc │ │ │ ├── ACLChecker.h │ │ │ ├── ACLDefineChecker.cc │ │ │ ├── ACLDefineChecker.h │ │ │ ├── ACLDefineManager.cc │ │ │ ├── ACLDefineManager.h │ │ │ ├── ACLMethodIpCheckList.cc │ │ │ ├── ACLMethodIpCheckList.h │ │ │ ├── ACLRefererCheckList.cc │ │ │ └── ACLRefererCheckList.h │ │ ├── parser │ │ │ ├── ACLDirective.cc │ │ │ ├── ACLDirective.h │ │ │ ├── ACLParams.cc │ │ │ ├── ACLParams.h │ │ │ ├── ConfigDirective.cc │ │ │ ├── ConfigDirective.h │ │ │ ├── ConfigParams.cc │ │ │ ├── ConfigParams.h │ │ │ ├── DirectiveParams.cc │ │ │ ├── DirectiveParams.h │ │ │ ├── IncludeDirective.cc │ │ │ ├── IncludeDirective.h │ │ │ ├── IncludeParams.cc │ │ │ ├── IncludeParams.h │ │ │ ├── MappingDirective.cc │ │ │ ├── MappingDirective.h │ │ │ ├── MappingEntry.cc │ │ │ ├── MappingEntry.h │ │ │ ├── MappingManager.cc │ │ │ ├── MappingManager.h │ │ │ ├── MappingParams.cc │ │ │ ├── MappingParams.h │ │ │ ├── PluginDirective.cc │ │ │ ├── PluginDirective.h │ │ │ ├── PluginParams.cc │ │ │ ├── PluginParams.h │ │ │ ├── RemapDirective.cc │ │ │ ├── RemapDirective.h │ │ │ ├── RemapParser.cc │ │ │ ├── RemapParser.h │ │ │ ├── SchemeDirective.cc │ │ │ ├── SchemeDirective.h │ │ │ ├── SchemeParams.cc │ │ │ ├── SchemeParams.h │ │ │ ├── ScriptDirective.cc │ │ │ ├── ScriptDirective.h │ │ │ ├── ScriptParams.cc │ │ │ └── ScriptParams.h │ │ └── ts_remap_check.cc │ ├── stats.memo │ ├── test_http_client.pl │ ├── test_proxy.pl │ ├── test_socket_close.cc │ └── testheaders.cc ├── ink_icon.ico ├── issues.txt ├── logcat.cc ├── logging │ ├── Log.cc │ ├── Log.h │ ├── LogAccess.cc │ ├── LogAccess.h │ ├── LogAccessHttp.cc │ ├── LogAccessHttp.h │ ├── LogAccessICP.cc │ ├── LogAccessICP.h │ ├── LogAccessTest.cc │ ├── LogAccessTest.h │ ├── LogBuffer.cc │ ├── LogBuffer.h │ ├── LogBufferSink.h │ ├── LogCollationAccept.cc │ ├── LogCollationAccept.h │ ├── LogCollationBase.h │ ├── LogCollationClientSM.cc │ ├── LogCollationClientSM.h │ ├── LogCollationHostSM.cc │ ├── LogCollationHostSM.h │ ├── LogConfig.cc │ ├── LogConfig.h │ ├── LogField.cc │ ├── LogField.h │ ├── LogFieldAliasMap.cc │ ├── LogFieldAliasMap.h │ ├── LogFile.cc │ ├── LogFile.h │ ├── LogFilter.cc │ ├── LogFilter.h │ ├── LogFormat.cc │ ├── LogFormat.h │ ├── LogFormatType.h │ ├── LogHost.cc │ ├── LogHost.h │ ├── LogLimits.h │ ├── LogObject.cc │ ├── LogObject.h │ ├── LogSock.cc │ ├── LogSock.h │ ├── LogStandalone.cc │ ├── LogUtils.cc │ ├── LogUtils.h │ └── Makefile.am ├── logstats.cc ├── mime.types ├── msgs │ ├── TSMessages.mc │ └── TSMsgs.rc ├── regression.pl ├── sac.cc ├── signals.cc ├── signals.h ├── stats │ ├── CoupledStats.cc │ ├── CoupledStats.h │ ├── Makefile.am │ ├── Stats.cc │ └── Stats.h ├── test_xml_parser.cc └── ts_resource.h ├── rc ├── Makefile.am ├── solaris.txt ├── start_traffic_shell ├── trafficrecovery.sh ├── trafficserver.conf.in ├── trafficserver.in ├── trafficserver.service.in └── trafficserver.xml.in ├── rpm ├── trafficserver-build.sh ├── trafficserver-buildpe.sh ├── trafficserver-buildqa.sh ├── trafficserver.spec └── trafficserver.sysconf ├── tb_changelog └── tools ├── Makefile.am ├── apichecker.pl ├── http_load ├── Makefile ├── README ├── http_load.c ├── merge_stats.pl ├── port.h ├── timers.c ├── timers.h └── version.h ├── jtest ├── Makefile └── jtest.cc ├── push.pl └── tsxs.in /.indent.pro: -------------------------------------------------------------------------------- 1 | -nut 2 | -nbad 3 | -bap 4 | -nbbo 5 | -nbc 6 | -br 7 | -bls 8 | -ce 9 | -ci2 10 | -cli0 11 | -cs 12 | -d0 13 | -di2 14 | -nfc1 15 | -nfca 16 | -hnl 17 | -i2 18 | -ip0 19 | -l120 20 | -lp 21 | -npcs 22 | -nprs 23 | -psl 24 | -saf 25 | -sai 26 | -saw 27 | -nsc 28 | -nsob 29 | -nss 30 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | " Basic whitespace rules. If you use vim, set exrc and set secure 2 | " to have it automatically source this file. 3 | set tabstop=2 4 | set softtabstop=2 5 | set shiftwidth=2 6 | set expandtab 7 | set textwidth=120 8 | -------------------------------------------------------------------------------- /LAYOUT: -------------------------------------------------------------------------------- 1 | The Traffic Server 2.1 Default LAYOUT 2 | -------------------------------- 3 | 4 | ` ........................... Top-Level Traffic Server Directory 5 | | 6 | | 7 | |-- bin ..................... Binaries 8 | |-- etc ..................... Configuration files 9 | | `-- trafficserver 10 | | |-- body_factory 11 | | | `-- default 12 | | |-- internal 13 | | `-- snapshots 14 | |-- include 15 | | `-- ts 16 | |-- lib 17 | | `-- trafficserver 18 | |-- libexec 19 | | `-- trafficserver 20 | |-- share 21 | | `-- trafficserver 22 | | |-- configure 23 | | | `-- helper 24 | | |-- images 25 | | |-- include 26 | | |-- monitor 27 | | `-- mrtg 28 | `-- var 29 | |-- log 30 | | `-- trafficserver ... Log files 31 | `-- trafficserver ....... Runtime data 32 | 33 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache Traffic Server 2 | Copyright 2010 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | Network Geographics (http://network-geographics.com) 7 | ~~~ 8 | 9 | Codebase originally donated by Yahoo: 10 | 11 | Copyright (C) 2009 Yahoo! Inc. 12 | 13 | Licensed under the Apache License, Version 2.0 (the "License"); 14 | you may not use this file except in compliance with the License. 15 | You may obtain a copy of the License at 16 | 17 | http://www.apache.org/licenses/LICENSE-2.0 18 | 19 | ~~~ 20 | 21 | lib/wccp and lib/tsconfig developed by Network Geographics. 22 | Copyright (C) 2010 Network Geographics, Inc. 23 | -------------------------------------------------------------------------------- /ci/README: -------------------------------------------------------------------------------- 1 | This directory is used by Apache Build Services (Buildbot) 2 | 3 | Any file listed in the rat-excludes.txt file won't figure in the rat reports 4 | since some files don't need license headers, and can be excluded 5 | Every build by buildbot also produces a rat report and publishes it on the 6 | Build Services website 7 | -------------------------------------------------------------------------------- /contrib/perl/AdminClient/Changes: -------------------------------------------------------------------------------- 1 | Revision history for Perl extension Apache::TS::AdminClient. 2 | 3 | 0.01 Thu Aug 12 21:25:52 2010 4 | - version 0.01; created by h2xs 1.23 with options '-AX Apache::TS::AdminClient' 5 | Jira ticket: https://issues.apache.org/jira/browse/TS-418 6 | Changes: This includes some minor code refactoring. Major changes are the addition of pod 7 | and package files, like Makefile.pl, so this module will go to the proper location upon install. 8 | 9 | 10 | 0.00 Feb 23 2007 11 | - original version 12 | 13 | -------------------------------------------------------------------------------- /contrib/perl/AdminClient/MANIFEST: -------------------------------------------------------------------------------- 1 | Changes 2 | Makefile.PL 3 | MANIFEST 4 | README 5 | t/Apache-TS-AdminClient.t 6 | lib/Apache/TS/AdminClient.pm 7 | -------------------------------------------------------------------------------- /contrib/perl/ConfigMgmt/lib/Apache/TS/Config.pm: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | package Apache::TS::Config; 18 | 19 | use warnings; 20 | use strict; 21 | 22 | require 5.006; 23 | 24 | use Carp; 25 | require Exporter; 26 | 27 | our @ISA = qw( Exporter ); 28 | our @EXPORT = qw(TS_CONF_UNMODIFIED TS_CONF_MODIFIED TS_CONF_REMOVED); 29 | 30 | our $VERSION = "1.0"; 31 | 32 | # Constants 33 | use constant { 34 | TS_CONF_UNMODIFIED => 0, 35 | TS_CONF_MODIFIED => 1, 36 | TS_CONF_REMOVED => 2 37 | }; 38 | -------------------------------------------------------------------------------- /contrib/tstop/README: -------------------------------------------------------------------------------- 1 | Top type program for Apache Traffic Server that displays common 2 | statistical information about the server. Requires the server to be 3 | running the stats_over_http plugin. 4 | 5 | -------------------------------------------------------------------------------- /contrib/tstop/src/Makefile: -------------------------------------------------------------------------------- 1 | all: tstop.cc 2 | $(CXX) $^ -o tstop -lcurl -lcurses -g -ltsutil -ltsmgmt -ltsutil -lpthread -Wl,-rpath,/usr/local/lib 3 | 4 | clean: 5 | rm -f tstop 6 | -------------------------------------------------------------------------------- /doc/mainpage.doc: -------------------------------------------------------------------------------- 1 | /* 2 | This file is for the documentation that appears on the main page of 3 | the Doxygen output. Description of the code structure and layout 4 | should go here. 5 | */ 6 | 7 | /** @mainpage 8 | 9 | @section intro Introduction 10 | 11 | Traffic Server is an efficient caching proxy. Traffic Server provides 12 | an extensible plug-in architecture, allowing properties to modify 13 | its behavior when necessary. 14 | 15 | */ 16 | 17 | -------------------------------------------------------------------------------- /doc/man/config_start.1: -------------------------------------------------------------------------------- 1 | .\" Licensed to the Apache Software Foundation (ASF) under one .\" 2 | .\" or more contributor license agreements. See the NOTICE file .\" 3 | .\" distributed with this work for additional information .\" 4 | .\" regarding copyright ownership. The ASF licenses this file .\" 5 | .\" to you under the Apache License, Version 2.0 (the .\" 6 | .\" "License"); you may not use this file except in compliance .\" 7 | .\" with the License. You may obtain a copy of the License at .\" 8 | .\" .\" 9 | .\" http://www.apache.org/licenses/LICENSE-2.0 .\" 10 | .\" .\" 11 | .\" Unless required by applicable law or agreed to in writing, software .\" 12 | .\" distributed under the License is distributed on an "AS IS" BASIS, .\" 13 | .\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\" 14 | .\" See the License for the specific language governing permissions and .\" 15 | .\" limitations under the License. .\" 16 | .TH "config:start" 17 | .SH NAME 18 | config:start \- Starts the proxy software. 19 | .SH SYNOPSIS 20 | config:start 21 | .SH DESCRIPTION 22 | The config:start command starts your proxy software. The config:start command 23 | takes no options. 24 | .SH EXAMPLES 25 | When you execute the config:start command, you see results in the following 26 | format: 27 | .PP 28 | .nf 29 | traffic_shell> config:start 30 | traffic_shell> 31 | .SH "SEE ALSO" 32 | config:stop, config:restart, config:hard-restart 33 | -------------------------------------------------------------------------------- /doc/man/config_stop.1: -------------------------------------------------------------------------------- 1 | .\" Licensed to the Apache Software Foundation (ASF) under one .\" 2 | .\" or more contributor license agreements. See the NOTICE file .\" 3 | .\" distributed with this work for additional information .\" 4 | .\" regarding copyright ownership. The ASF licenses this file .\" 5 | .\" to you under the Apache License, Version 2.0 (the .\" 6 | .\" "License"); you may not use this file except in compliance .\" 7 | .\" with the License. You may obtain a copy of the License at .\" 8 | .\" .\" 9 | .\" http://www.apache.org/licenses/LICENSE-2.0 .\" 10 | .\" .\" 11 | .\" Unless required by applicable law or agreed to in writing, software .\" 12 | .\" distributed under the License is distributed on an "AS IS" BASIS, .\" 13 | .\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\" 14 | .\" See the License for the specific language governing permissions and .\" 15 | .\" limitations under the License. .\" 16 | .TH "config:stop" 17 | .SH NAME 18 | config:stop \- Stops the proxy software. 19 | .SH SYNOPSIS 20 | config:stop 21 | .SH DESCRIPTION 22 | The config:stop command stops your proxy software. The config:stop command takes 23 | no options. 24 | .SH EXAMPLES 25 | When you execute the config:stop command, you see results in the following format. 26 | .PP 27 | .nf 28 | traffic_shell> config:stop 29 | traffic_shell> 30 | .SH "SEE ALSO" 31 | config:start, config:restart, config:hard-restart 32 | -------------------------------------------------------------------------------- /doc/man/disable.1: -------------------------------------------------------------------------------- 1 | .\" Licensed to the Apache Software Foundation (ASF) under one .\" 2 | .\" or more contributor license agreements. See the NOTICE file .\" 3 | .\" distributed with this work for additional information .\" 4 | .\" regarding copyright ownership. The ASF licenses this file .\" 5 | .\" to you under the Apache License, Version 2.0 (the .\" 6 | .\" "License"); you may not use this file except in compliance .\" 7 | .\" with the License. You may obtain a copy of the License at .\" 8 | .\" .\" 9 | .\" http://www.apache.org/licenses/LICENSE-2.0 .\" 10 | .\" .\" 11 | .\" Unless required by applicable law or agreed to in writing, software .\" 12 | .\" distributed under the License is distributed on an "AS IS" BASIS, .\" 13 | .\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\" 14 | .\" See the License for the specific language governing permissions and .\" 15 | .\" limitations under the License. .\" 16 | .TH "disable" 17 | .SH NAME 18 | disable \- Disable privileged commands. 19 | .SH SYNOPSIS 20 | disable 21 | .SH DESCRIPTION 22 | If you are in Configure mode and want to return to Monitor mode, type 23 | the disable command. The disable command has no options. 24 | .SH EXAMPLE 25 | .TP 26 | .fi 27 | When you execute the disable command, you see the following: 28 | .PP 29 | .nf 30 | traffic_shell> disable 31 | traffic_shell> 32 | .SH "SEE ALSO" 33 | enable, config:root, exit 34 | -------------------------------------------------------------------------------- /doc/man/show_proxy.1: -------------------------------------------------------------------------------- 1 | .\" Licensed to the Apache Software Foundation (ASF) under one .\" 2 | .\" or more contributor license agreements. See the NOTICE file .\" 3 | .\" distributed with this work for additional information .\" 4 | .\" regarding copyright ownership. The ASF licenses this file .\" 5 | .\" to you under the Apache License, Version 2.0 (the .\" 6 | .\" "License"); you may not use this file except in compliance .\" 7 | .\" with the License. You may obtain a copy of the License at .\" 8 | .\" .\" 9 | .\" http://www.apache.org/licenses/LICENSE-2.0 .\" 10 | .\" .\" 11 | .\" Unless required by applicable law or agreed to in writing, software .\" 12 | .\" distributed under the License is distributed on an "AS IS" BASIS, .\" 13 | .\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\" 14 | .\" See the License for the specific language governing permissions and .\" 15 | .\" limitations under the License. .\" 16 | .TH "show:proxy" 17 | .SH NAME 18 | show:proxy \- This command displays the proxy name. 19 | .SH SYNOPSIS 20 | show:proxy 21 | .SH DESCRIPTION 22 | Execute the show:proxy command to see the name of the proxy. The show:proxy 23 | command takes no options. 24 | .SH EXAMPLE 25 | When you execute the show:proxy command, you see results in the following format: 26 | .PP 27 | .nf 28 | traffic_shell> show:proxy 29 | Name -- rubicon 30 | traffic_shell> 31 | .SH "SEE ALSO" 32 | show:proxy-stats 33 | -------------------------------------------------------------------------------- /emacs-style: -------------------------------------------------------------------------------- 1 | ;; M-x load-file 2 | ;; or emacs -l 3 | ;; to use this style: C-c . apache 4 | ;; Licensed to the Apache Software Foundation (ASF) under one 5 | ;; or more contributor license agreements. See the NOTICE file 6 | ;; distributed with this work for additional information 7 | ;; regarding copyright ownership. The ASF licenses this file 8 | ;; to you under the Apache License, Version 2.0 (the 9 | ;; "License"); you may not use this file except in compliance 10 | ;; with the License. You may obtain a copy of the License at 11 | ;; 12 | ;; http://www.apache.org/licenses/LICENSE-2.0 13 | ;; 14 | ;; Unless required by applicable law or agreed to in writing, software 15 | ;; distributed under the License is distributed on an "AS IS" BASIS, 16 | ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | ;; See the License for the specific language governing permissions and 18 | ;; limitations under the License. 19 | ;; 20 | (c-add-style "trafficserver" 21 | '((inclass . ++) 22 | (defun-block-intro . ++) 23 | (statement-block-intro . ++) 24 | (substatement . ++) 25 | (brace-list-intro . ++) 26 | (statement-case-intro . ++) 27 | (inextern-lang . 0) 28 | )) 29 | (setq-default indent-tabs-mode nil) 30 | ;; if you forgot to do this at startup, then M-x eval-expression 31 | ;; (setq indent-tabs-mode nil) on each buffer 32 | -------------------------------------------------------------------------------- /example/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if STANDALONE_IOCORE 18 | SUBDIRS = app-template 19 | else 20 | SUBDIRS = . add-header append-transform basic-auth blacklist-0 blacklist-1 bnull-transform cache_scan file-1 hello null-transform output-header protocol query_remap redirect-1 remap replace-header response-header-1 server-transform session-1 thread-1 thread-pool 21 | endif 22 | -------------------------------------------------------------------------------- /example/add-header/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = add-header.la 21 | add_header_la_SOURCES = add-header.c 22 | add_header_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/add-header.so 26 | -------------------------------------------------------------------------------- /example/append-transform/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = append-transform.la 21 | append_transform_la_SOURCES = append-transform.c 22 | append_transform_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/append-transform.so 26 | -------------------------------------------------------------------------------- /example/basic-auth/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = basic-auth.la 21 | basic_auth_la_SOURCES = basic-auth.c 22 | basic_auth_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/basic-auth.so 26 | -------------------------------------------------------------------------------- /example/blacklist-0/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = blacklist-0.la 21 | blacklist_0_la_SOURCES = blacklist-0.c 22 | blacklist_0_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/blacklist-0.so 26 | -------------------------------------------------------------------------------- /example/blacklist-1/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = blacklist-1.la 21 | blacklist_1_la_SOURCES = blacklist-1.c 22 | blacklist_1_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/blacklist-1.so 26 | -------------------------------------------------------------------------------- /example/blacklist-1/blacklist.txt: -------------------------------------------------------------------------------- 1 | www.example.com 2 | 3 | -------------------------------------------------------------------------------- /example/blacklist-1/readme.txt: -------------------------------------------------------------------------------- 1 | How to run the blacklist plugin 2 | =============================== 3 | 4 | 1. Modify blacklist.cgi to specify the location of perl and traffic server. 5 | 2. Copy blacklist.cgi, blacklist-1.so, PoweredByInktomi.gif to the directory 6 | specified by the variable proxy.config.plugin.plugin_dir. 7 | 3. Modify plugin.config to load the blacklist plugin. 8 | 9 | 10 | 11 | About the blacklist plugin 12 | ========================== 13 | 14 | The blacklist plugin allows Traffic Server to compare all incoming request 15 | origin servers with a blacklisted set of web servers. If the requested origin 16 | server is blacklisted, Traffic Server sends the client a message saying that 17 | access is denied. 18 | -------------------------------------------------------------------------------- /example/bnull-transform/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = bnull-transform.la 21 | bnull_transform_la_SOURCES = bnull-transform.c 22 | bnull_transform_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/bnull-transform.so 26 | -------------------------------------------------------------------------------- /example/cache_scan/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = cache_scan.la 21 | cache_scan_la_SOURCES = cache_scan.cc 22 | cache_scan_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/cache_scan.so 26 | -------------------------------------------------------------------------------- /example/file-1/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = file-1.la 21 | file_1_la_SOURCES = file-1.c 22 | file_1_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/file-1.so 26 | -------------------------------------------------------------------------------- /example/file-1/readme.txt: -------------------------------------------------------------------------------- 1 | About file-plugin.c 2 | 3 | This plugin simply reads a file and writes its contents to 4 | a buffer. 5 | 6 | In a typical Traffic Server installation, this buffer is 7 | written to traffic.out. 8 | 9 | A similar function is used in the append-transform plugin 10 | which reads in text from a file, and appends the text to the 11 | bodies of html response documents. (See the load function in 12 | append-transform.c). 13 | 14 | To use this plugin, you would need a line like this in 15 | plugin.config: 16 | 17 | file-1.so path/to/file.text 18 | 19 | Enter either an absolute or a relative pathname for the file. 20 | If you use a relative pathname, the path must be specified with 21 | respect to the Traffic Server install directory. (That is, the path 22 | contained in /etc/traffic_server.) 23 | 24 | The only function defined is TSPluginInit. 25 | 26 | It does the following: 27 | 28 | - opens the file specified in plugin.config, using 29 | TSfopen 30 | 31 | - reads the content of the file into a buffer using 32 | TSfgets 33 | 34 | - closes the file using 35 | TSfclose 36 | -------------------------------------------------------------------------------- /example/hello/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = hello.la 21 | hello_la_SOURCES = hello.c 22 | hello_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/hello.so 26 | -------------------------------------------------------------------------------- /example/null-transform/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = null-transform.la 21 | null_transform_la_SOURCES = null-transform.c 22 | null_transform_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/null-transform.so 26 | -------------------------------------------------------------------------------- /example/output-header/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = output-header.la 21 | output_header_la_SOURCES = output-header.c 22 | output_header_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/output-header.so 26 | -------------------------------------------------------------------------------- /example/output-header/readme: -------------------------------------------------------------------------------- 1 | A sample internal plugin to use the HdrPrint functions and the TSIOBuffers 2 | that the functions untilize. 3 | 4 | The plugin simply prints all the incoming request headers 5 | 6 | -------------------------------------------------------------------------------- /example/prefetch/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = prefetch.la 21 | prefetch_la_SOURCES = prefetch.c 22 | prefetch_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/prefetch.so 26 | -------------------------------------------------------------------------------- /example/prefetch/readme.txt: -------------------------------------------------------------------------------- 1 | The test-hns-plugin tests the Parent Traffic Server handling of parse/prefetch 2 | rules. It prints information to 'stdout' at various stages to verify the 3 | correctness of the parse/prefetch module. It has the following options: 4 | 5 | -p. If 0, the plugin returns INK_PREFETCH_DISCONTINUE when called at the 6 | INK_PREFETCH_PRE_PARSE_HOOK. If 1, the plugin returns 7 | INK_PREFETCH_CONTINUE. 8 | 9 | -u. If 0, the plugin returns INK_PREFETCH_DISCONTINUE when called at the 10 | INK_PREFETCH_EMBEDDED_URL_HOOK. If 1, the plugin returns 11 | INK_PREFETCH_CONTINUE. 12 | 13 | -o. If 1, the plugin sets 'object_buf_status' field in the INKPrefetchInfo to 14 | INK_PREFETCH_OBJ_BUF_NEEDED and expects to be called back with the object. 15 | 16 | -i. If 0, the plugin sets the 'url_response_proto' field in the 17 | INKPrefetchInfo to INK_PREFETCH_PROTO_UDP. If 1, it sets the 18 | 'url_response_proto' field to INK_PREFETCH_PROTO_TCP. 19 | 20 | -d. Specifies the directory where the plugin will store all the prefetched 21 | objects. All prefetched objects are stored in the PkgPreload format in 22 | the 'prefetched.objects' file in this directory. 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/protocol/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = protocol.la 21 | protocol_la_SOURCES = Protocol.c TxnSM.c 22 | protocol_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/protocol.so 26 | -------------------------------------------------------------------------------- /example/protocol/test/file_gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ksh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | 20 | # 21 | # build source list remove "non-source" file types. 22 | # 23 | find ../../../../../proxy -depth -type f -print | egrep "Makefile$|\.cpp$|\.cc$|\.c$|\.H$|\.h$|\.java$|\.config$|\.y$" > $1 24 | 25 | echo "list created: " $1 26 | -------------------------------------------------------------------------------- /example/query_remap/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = query_remap.la 21 | query_remap_la_SOURCES = query_remap.c 22 | query_remap_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/query_remap.so 26 | -------------------------------------------------------------------------------- /example/redirect-1/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = redirect-1.la 21 | redirect_1_la_SOURCES = redirect-1.c 22 | redirect_1_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/redirect-1.so 26 | -------------------------------------------------------------------------------- /example/redirect-1/readme.txt: -------------------------------------------------------------------------------- 1 | About redirect-1.c 2 | 3 | This plugin redirects requests from a specified IP address ("block_ip") 4 | to a specified URL ("url_redirect"). 5 | 6 | Specify block_ip and url_redirect int the plugin.config file; for 7 | example, enter the following line in plugin.config 8 | 9 | redirect-1.so block_ip url_redirect 10 | -------------------------------------------------------------------------------- /example/remap/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = remap.la 21 | remap_la_SOURCES = remap.cc 22 | remap_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/remap.so 26 | -------------------------------------------------------------------------------- /example/remap/build.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | g++ -D_FILE_OFFSET_BITS=64 -shared -I../../include -I../../.. -I./ -o remap.so remap.cc 18 | -------------------------------------------------------------------------------- /example/replace-header/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = replace-header.la 21 | replace_header_la_SOURCES = replace-header.c 22 | replace_header_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/replace-header.so 26 | -------------------------------------------------------------------------------- /example/response-header-1/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = response-header-1.la 21 | response_header_1_la_SOURCES = response-header-1.c 22 | response_header_1_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/response-header-1.so 26 | -------------------------------------------------------------------------------- /example/server-transform/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = server-transform.la 21 | server_transform_la_SOURCES = server-transform.c 22 | server_transform_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/server-transform.so 26 | -------------------------------------------------------------------------------- /example/session-1/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = session-1.la 21 | session_1_la_SOURCES = session-1.c 22 | session_1_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/session-1.so 26 | -------------------------------------------------------------------------------- /example/thread-1/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = thread-1.la 21 | thread_1_la_SOURCES = thread-1.c 22 | thread_1_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/thread-1.so 26 | -------------------------------------------------------------------------------- /example/thread-1/readme.txt: -------------------------------------------------------------------------------- 1 | About thread-plugin.c 2 | 3 | This plugin sets up a callback to a continuation whose 4 | handler function creates a thread. 5 | 6 | TSPluginInit uses TSHttpHookAdd to create a 7 | continuation that is called back after the HTTP 8 | origin server DNS lookup (the hook is 9 | TS_HTTP_OS_DNS_HOOK). The handler function 10 | for the continuation is thread_plugin. 11 | 12 | The thread_plugin function creates a thread using 13 | TSThreadCreate(), passing it the reenable_txn function 14 | as follows: 15 | TSThreadCreate(reenable_txn, edta); 16 | 17 | The thread runs the reenable_txn function, which simply 18 | reenables the HTTP transaction using TSHttpTxnReenable(). 19 | The thread is automatically destroyed when the function 20 | returns. 21 | -------------------------------------------------------------------------------- /example/thread-pool/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = psi.la 21 | psi_la_SOURCES = psi.c thread.c 22 | psi_la_LDFLAGS = -module -avoid-version -shared 23 | 24 | all: 25 | ln -sf .libs/psi.so 26 | -------------------------------------------------------------------------------- /example/thread-pool/include/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | all: gen 18 | 19 | gen: gen.c 20 | $(CC) -o gen gen.c 21 | 22 | clean-local: 23 | rm -f gen gen.o 24 | -------------------------------------------------------------------------------- /example/thread-pool/include/gen.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include 25 | 26 | int 27 | main(int argc, char *argv[]) 28 | { 29 | int i; 30 | 31 | if (argc != 2) { 32 | fprintf(stderr, "Syntax: gen N (with N number of bytes to generate).\n"); 33 | exit(-1); 34 | } 35 | 36 | for (i = 0; i < atoi(argv[1]); i++) { 37 | printf("%d", i % 10); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /example/thread-pool/include/gen_inc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | 20 | GEN=./gen 21 | 22 | # Generate docs for SynTest test cases 23 | 24 | $GEN 0 > incfile0.txt 25 | $GEN 100 > incfile1.txt 26 | $GEN 50000 > incfile2.txt 27 | 28 | # Generate docs for SDKTest test cases 29 | 30 | # docs of size 0, 10k, 20k, 30k, ... 90k 31 | for i in 0 1 2 3 4 5 6 7 8 9 32 | do 33 | $GEN ${i}0000 > file${i}.txt 34 | done 35 | 36 | # docs of size 1.1k, 1.2k, ...,2.0k, ..., 9.9k 37 | for i in 1 2 3 4 5 6 7 8 9 38 | do 39 | for j in 0 1 2 3 4 5 6 7 8 9 40 | do 41 | $GEN ${i}${j}00 > file${i}${j}.txt 42 | done 43 | done 44 | -------------------------------------------------------------------------------- /example/thread-pool/test/SDKTest/SDKtest_server.config: -------------------------------------------------------------------------------- 1 | # SDKtest_client configuration file 2 | # 3 | # 4 | # If you provide plugin for SDKtest_server, specify the name of 5 | # the plugin file in 'plugin' option. And put the .so file for 6 | # the plugin under the same directory as SDKtest_server.config 7 | # (plugin = hello_world.so) 8 | 9 | # load the psi plugin 10 | plugin = psi_server.so 11 | 12 | # ratio of responses with a X-Psi header and an include tag in the body 13 | psi_ratio = 10 14 | 15 | 16 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/1.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Include tag at the beginning of doc 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc1_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/10.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: huge file to include 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc10_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | # huge file. do not print body 31 | print-body: false 32 | 33 | [proxy-request] 34 | verify-header-valid: true 35 | 36 | [server-response] 37 | Must-have: { 38 | Status == 200 39 | Version == HTTP/1.1 40 | } 41 | verify-header-valid: true 42 | 43 | [proxy-response] 44 | Must-have: { 45 | Status == 200 46 | Server: HTTP Protocol Tester 1.0 47 | Content-Type: text/html 48 | } 49 | verify-header-valid: true 50 | 51 | 52 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/11.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: no X-Psi header 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | } 23 | content-file: ./Tests/Psi/psi_files/tc11_file.txt 24 | 25 | ### verification 26 | [output] 27 | # As syntest can't do this, we need to visually inspect bodies... :-( 28 | print-headers: false 29 | print-body: true 30 | 31 | [proxy-request] 32 | verify-header-valid: true 33 | 34 | [server-response] 35 | Must-have: { 36 | Status == 200 37 | Version == HTTP/1.1 38 | } 39 | verify-header-valid: true 40 | 41 | [proxy-response] 42 | Must-have: { 43 | Status == 200 44 | Server: HTTP Protocol Tester 1.0 45 | Content-Type: text/html 46 | } 47 | verify-header-valid: true 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/12.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: Server Aborts in middle of header 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | socket-response: SendPartialHeaderAndCloseConnection 18 | http-response: { 19 | HTTP/1.1 200 OK 20 | Date: +0 21 | Server: HTTP Protocol Tester 1.0 22 | Content-Type: text/html 23 | X-Psi: true 24 | } 25 | content-file: ./Tests/Psi/psi_files/tc12_file.txt 26 | 27 | ### verification 28 | [output] 29 | # As syntest can't do this, we need to visually inspect bodies... :-( 30 | print-headers: false 31 | print-body: true 32 | 33 | [proxy-request] 34 | verify-header-valid: true 35 | 36 | [server-response] 37 | 38 | [proxy-response] 39 | # proxy returns 502 Server Hangup 40 | Must-have: { 41 | Status ==502 42 | } 43 | verify-header-valid: true 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/13.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: Server Aborts in middle of body 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | socket-response: SendPartialBodyAndCloseConnection 18 | http-response: { 19 | HTTP/1.1 200 OK 20 | Date: +0 21 | Server: HTTP Protocol Tester 1.0 22 | Content-Type: text/html 23 | X-Psi: true 24 | } 25 | content-file: ./Tests/Psi/psi_files/tc13_file.txt 26 | 27 | ### verification 28 | [output] 29 | # As syntest can't do this, we need to visually inspect bodies... :-( 30 | print-headers: false 31 | print-body: true 32 | 33 | [proxy-request] 34 | verify-header-valid: true 35 | 36 | [server-response] 37 | Must-have: { 38 | Status == 200 39 | Version == HTTP/1.1 40 | } 41 | verify-header-valid: true 42 | 43 | [proxy-response] 44 | Must-have: { 45 | Status == 200 46 | Server: HTTP Protocol Tester 1.0 47 | Content-Type: text/html 48 | } 49 | verify-header-valid: true 50 | 51 | 52 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/2.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - include tag middle of body doc 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc2_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/3.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - include tag end of body doc 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc3_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/4.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - 2 include tags in the same body 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc4_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/5.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: no filename in include 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc5_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/6.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: include tag doesn't end 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc6_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/7.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: include file doesn't exist 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc7_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/8.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: tag similar to include but slightly different 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc8_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/9.cfg: -------------------------------------------------------------------------------- 1 | [test] 2 | Description: PSI Plugin - Boundary case: include file is empty 3 | 4 | ### request 5 | 6 | [client-request] 7 | request: { 8 | GET http://$(SVR_HOST):$(SVR_PORT)/ http/1.0 9 | Host: http://$(SVR_HOST):$(SVR_PORT)/ 10 | User-Agent: HTTP Protocol Tester Client 1.0 11 | Content-Length: 0 12 | } 13 | 14 | ### response 15 | 16 | [server-response] 17 | http-response: { 18 | HTTP/1.1 200 OK 19 | Date: +0 20 | Server: HTTP Protocol Tester 1.0 21 | Content-Type: text/html 22 | X-Psi: true 23 | } 24 | content-file: ./Tests/Psi/psi_files/tc9_file.txt 25 | 26 | ### verification 27 | [output] 28 | # As syntest can't do this, we need to visually inspect bodies... :-( 29 | print-headers: false 30 | print-body: true 31 | 32 | [proxy-request] 33 | verify-header-valid: true 34 | 35 | [server-response] 36 | Must-have: { 37 | Status == 200 38 | Version == HTTP/1.1 39 | } 40 | verify-header-valid: true 41 | 42 | [proxy-response] 43 | Must-have: { 44 | Status == 200 45 | Server: HTTP Protocol Tester 1.0 46 | Content-Type: text/html 47 | } 48 | verify-header-valid: true 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc10_file.txt: -------------------------------------------------------------------------------- 1 | include a big file. 2 | 3 | include should be up there. 4 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc11_file.txt: -------------------------------------------------------------------------------- 1 | This body should not be transformed. 2 | include should still be between bars || is it ok ? 3 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc12_file.txt: -------------------------------------------------------------------------------- 1 | Server should abort before body is sent 2 | 3 | include should be up there. 4 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc13_file.txt: -------------------------------------------------------------------------------- 1 | Server should abort in middle of body 2 | 3 | include should be up there. 4 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc1_file.txt: -------------------------------------------------------------------------------- 1 | 2 | include should be up there. 3 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc2_file.txt: -------------------------------------------------------------------------------- 1 | include should be between bars || is it ok ? 2 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc3_file.txt: -------------------------------------------------------------------------------- 1 | include should be down there: 2 | 3 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc4_file.txt: -------------------------------------------------------------------------------- 1 | 2 includes in the body. One starting down there: 2 | 3 | One other down there: 4 | 5 | that's all folks ! 6 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc5_file.txt: -------------------------------------------------------------------------------- 1 | this is a doc with an include that has no filename 2 | 3 | should remove the tag and include nothing 4 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc6_file.txt: -------------------------------------------------------------------------------- 1 | should keep the uncomplete tag and include nothing 3 | should remove the tag and include nothing 4 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc8_file.txt: -------------------------------------------------------------------------------- 1 | tag similar to include but slightly different. 2 | 3 | should not remove the tag and include nothing 4 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/Tests/Psi/psi_files/tc9_file.txt: -------------------------------------------------------------------------------- 1 | include an empty file: should be no chars betwwen bars: || 2 | OK ? 3 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/system.cfg: -------------------------------------------------------------------------------- 1 | # system.cfg 2 | # 3 | # This file consists of key-value pairs in MIME format. Keys must be unique 4 | # otherwise the last value seen is what's stored. 5 | # 6 | # Comments start with '#'s and whitespace is ignored. 7 | # 8 | # "on" and "off" are reserved words. The corresponding keys are treated 9 | # as test group names. 10 | 11 | $SVR_HOST = cachedev.example.com 12 | $SVR_PORT = 1973 13 | 14 | $PROXY_HOST = cachedev.example.com 15 | $PROXY_PORT = 8280 16 | 17 | $LOG_HOST = cachedev.example.com 18 | 19 | 20 | [config] 21 | proxy-host: $(PROXY_HOST) 22 | proxy-port: $(PROXY_PORT) 23 | server-host: $(SVR_HOST) 24 | server-port: $(SVR_PORT) 25 | log-host: $(LOG_HOST) 26 | log-dir: /export/workareas/franckc/traffic_tomcat/sun_opt/logs 27 | # log-format: cqts ttms chi crc/pssc pscl ... 28 | # log-flush-delay: 15 29 | 30 | # System-level output control. 31 | # These settings can be overridden at the test-group and at the test levels. 32 | [output] 33 | print-headers: true 34 | print-body: false 35 | print-verifications: false 36 | print-echo: false 37 | verbose-mode: false 38 | 39 | # Reference to the test-group config file. 40 | [tests] 41 | #file: ims_tests.cfg 42 | #file: test_f.cfg 43 | file: tests_psi.cfg 44 | 45 | -------------------------------------------------------------------------------- /example/thread-pool/test/SynTest/tests_psi.cfg: -------------------------------------------------------------------------------- 1 | # The "test-groups" section is required. It lists the test groups under the 2 | # "list" header. The test groups listed will each have their own sections. 3 | # 4 | 5 | 6 | [test-groups] 7 | list: { 8 | Psi 9 | } 10 | 11 | 12 | 13 | #define default values for commonly used variables 14 | #these should be redefined where appropriate in individual tests 15 | $EXPIRES = 200 16 | $LM = 0 17 | $STAMP = $(now) 18 | 19 | verbose-mode:false 20 | print-headers: false 21 | print-body: false 22 | print-verifications: true 23 | 24 | 25 | # Each test group has "run" and "list" fields. 26 | # The valid values for "run" are "true" and "false". 27 | # The list blob lists the filenames of the test configuration files. 28 | # 29 | 30 | [Psi] 31 | run: true 32 | list: { 33 | generate-resource 34 | Tests/Psi/1.cfg 35 | generate-resource 36 | Tests/Psi/2.cfg 37 | generate-resource 38 | Tests/Psi/3.cfg 39 | generate-resource 40 | Tests/Psi/4.cfg 41 | generate-resource 42 | Tests/Psi/5.cfg 43 | generate-resource 44 | Tests/Psi/6.cfg 45 | generate-resource 46 | Tests/Psi/7.cfg 47 | generate-resource 48 | Tests/Psi/8.cfg 49 | generate-resource 50 | Tests/Psi/9.cfg 51 | generate-resource 52 | Tests/Psi/10.cfg 53 | generate-resource 54 | Tests/Psi/11.cfg 55 | generate-resource 56 | Tests/Psi/12.cfg 57 | generate-resource 58 | Tests/Psi/13.cfg 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /iocore/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am for traffic/iocore 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | if STANDALONE_IOCORE 20 | SUBDIRS = eventsystem net aio dns hostdb utils cache 21 | else 22 | SUBDIRS = eventsystem net aio dns hostdb utils cache cluster 23 | endif 24 | 25 | -------------------------------------------------------------------------------- /iocore/aio/Inline.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /* 25 | * Inline Functions as globals for users using the public interface 26 | * 27 | */ 28 | #define TS_INLINE 29 | #define INLINE_CC 30 | 31 | #include "P_AIO.h" 32 | -------------------------------------------------------------------------------- /iocore/aio/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am for the traffic/iocore/aio hierarchy 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | AM_CPPFLAGS = \ 20 | -I$(top_srcdir)/iocore/eventsystem \ 21 | -I$(top_srcdir)/lib \ 22 | -I$(top_srcdir)/lib/records \ 23 | -I$(top_srcdir)/lib/ts 24 | 25 | DEFS += @IOCORE_MODULARIZED_DEFS@ 26 | 27 | noinst_LIBRARIES = libinkaio.a 28 | 29 | libinkaio_a_SOURCES = AIO.cc I_AIO.h P_AIO.h Inline.cc 30 | 31 | -------------------------------------------------------------------------------- /iocore/aio/sample.cfg: -------------------------------------------------------------------------------- 1 | disk_size 1 2 | hotset_size 1 3 | hotset_frequency 0.5 4 | run_time 30 5 | threads_per_disk 1 6 | touch_data 1 7 | seq_read_percent 0.5 8 | seq_write_percent 0.30 9 | rand_read_percent 0.20 10 | seq_read_size 131072 11 | seq_write_size 4093 12 | rand_read_size 4096 13 | write_skip 5 14 | chains 1 15 | delete_disks 1 16 | disk_path ./aio.tst 17 | 18 | -------------------------------------------------------------------------------- /iocore/aio/test_I_AIO.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "I_AIO.h" 25 | #include "test_AIO.i" 26 | -------------------------------------------------------------------------------- /iocore/aio/test_P_AIO.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "P_AIO.h" 25 | #include "test_AIO.i" 26 | -------------------------------------------------------------------------------- /iocore/cache/Inline.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /* 25 | * Inline Functions as globals for users using the public interface 26 | * 27 | */ 28 | #define TS_INLINE 29 | #define INLINE_CC 30 | 31 | #include "P_Cache.h" 32 | 33 | 34 | -------------------------------------------------------------------------------- /iocore/cache/Notes: -------------------------------------------------------------------------------- 1 | proxy/cluster/Cluster.h is now iocore/cluster/P_ClusterCache.h 2 | Clustering compiles but only works if this module is compiled with the entire 3 | TS because there are a lot of stuff required for clustering in proxy/http. 4 | 5 | 6 | cache ifdefs 7 | FIXME_NONMODULAR -> this flaf needs to be turned on when compiling along 8 | with the entire TS. Turning this flag on should automatically turn the 9 | HTTP cache flag on. 10 | FIXME_HOSTDB -> Store ifdef to be turned off when HostDB stops using Store 11 | FIXME_MGMT -> Interface for warnings on the manager 12 | FIXME_CLUSTER_ARGUMENTS -> runtime arguments for clustering etc. Needs 13 | to be added by Eric 14 | 15 | cluster ifdefs 16 | FIXME_WIRELESS_API -> RPC API's for wireless which is probably not going to 17 | be used in the future 18 | -------------------------------------------------------------------------------- /iocore/cluster/Inline.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /* 25 | * Inline Functions as globals for users using the public interface 26 | * 27 | */ 28 | #define TS_INLINE 29 | #define INLINE_CC 30 | 31 | #include "P_Cluster.h" 32 | -------------------------------------------------------------------------------- /iocore/cluster/_os_bits.h: -------------------------------------------------------------------------------- 1 | #ifndef _OS_BITS_H 2 | #define _OS_BITS_H 3 | 4 | #define OS_BITS 64 5 | #define OFF_BITS 64 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /iocore/cluster/global.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "ink_config.h" 6 | #include "P_Cluster.h" 7 | #include "global.h" 8 | 9 | bool g_continue_flag = true; 10 | int g_accept_threads = 1; 11 | int g_work_threads = 2; 12 | int g_connections_per_machine = 2; 13 | int g_connect_timeout = 1; 14 | int g_server_port = 8086; 15 | int g_thread_stack_size = 1 * 1024 * 1024; 16 | int g_socket_recv_bufsize = 1 * 1024 * 1024; 17 | int g_socket_send_bufsize = 1 * 1024 * 1024; 18 | 19 | //cluster flow control 20 | int64_t cluster_flow_ctrl_min_bps = 0; //bit 21 | int64_t cluster_flow_ctrl_max_bps = 0; //bit 22 | int cluster_send_min_wait_time = 1000; //us 23 | int cluster_send_max_wait_time = 5000; //us 24 | int cluster_min_loop_interval = 0; //us 25 | int cluster_max_loop_interval = 1000; //us 26 | int64_t cluster_ping_send_interval= 0; 27 | int64_t cluster_ping_latency_threshold = 0; 28 | int cluster_ping_retries = 3; 29 | int max_session_count_per_machine = 1000000; 30 | int session_lock_count_per_machine = 10949; 31 | 32 | -------------------------------------------------------------------------------- /iocore/cluster/global.h: -------------------------------------------------------------------------------- 1 | //global.h 2 | 3 | #ifndef _GLOBAL_H 4 | #define _GLOBAL_H 5 | 6 | #include "common_define.h" 7 | #include "types.h" 8 | #include "machine.h" 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern bool g_continue_flag; 15 | extern int g_accept_threads; 16 | extern int g_work_threads; 17 | extern int g_connections_per_machine; //must be an even number 18 | extern int g_connect_timeout; 19 | extern int g_server_port; 20 | extern int g_thread_stack_size; 21 | extern int g_socket_recv_bufsize; 22 | extern int g_socket_send_bufsize; 23 | 24 | //cluster flow control 25 | extern int64_t cluster_flow_ctrl_min_bps; //bit 26 | extern int64_t cluster_flow_ctrl_max_bps; //bit 27 | extern int cluster_send_min_wait_time; //us 28 | extern int cluster_send_max_wait_time; //us 29 | extern int cluster_min_loop_interval; //us 30 | extern int cluster_max_loop_interval; //us 31 | extern int64_t cluster_ping_send_interval; 32 | extern int64_t cluster_ping_latency_threshold; 33 | extern int cluster_ping_retries; 34 | extern int max_session_count_per_machine; 35 | extern int session_lock_count_per_machine; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /iocore/cluster/machine.h: -------------------------------------------------------------------------------- 1 | //machine.h 2 | 3 | #ifndef _MACHINE_H 4 | #define _MACHINE_H 5 | 6 | #include "common_define.h" 7 | #include "types.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | extern unsigned int g_my_machine_index; 14 | extern unsigned int g_my_machine_ip; 15 | extern int g_my_machine_id; 16 | extern int g_machine_count; 17 | extern struct ClusterMachine *g_machines; 18 | 19 | int init_machines(); 20 | ClusterMachine *add_machine(const unsigned int ip, const int port); 21 | 22 | ClusterMachine *get_machine(const unsigned int ip, const int port); 23 | 24 | int machine_up_notify(ClusterMachine *machine); 25 | int machine_add_connection(SocketContext *pSockContext); 26 | int machine_remove_connection(SocketContext *pSockContext); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /iocore/cluster/message.h: -------------------------------------------------------------------------------- 1 | //message.h 2 | 3 | #ifndef _MESSAGE_H_ 4 | #define _MESSAGE_H_ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "types.h" 11 | 12 | struct HelloMessage 13 | { 14 | uint32_t major; 15 | uint32_t minor; 16 | uint32_t min_major; 17 | uint32_t min_minor; 18 | }; 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | #ifndef USE_MULTI_ALLOCATOR 25 | extern Allocator g_out_message_allocator; 26 | #endif 27 | 28 | typedef int (*push_to_send_queue_func)(SocketContext *pSockContext, OutMessage *pMessage, 29 | const MessagePriority priority); 30 | 31 | int cluster_send_msg_internal_ex(const ClusterSession *session, 32 | SocketContext *pSockContext, const int func_id, 33 | void *data, const int data_len, const MessagePriority priority, 34 | push_to_send_queue_func push_to_queue_func); 35 | 36 | inline void release_out_message(SocketContext *pSockContext, 37 | OutMessage *msg) 38 | { 39 | if (msg->data_type == DATA_TYPE_OBJECT && msg->blocks != NULL) { 40 | msg->blocks = NULL; 41 | } 42 | #ifdef USE_MULTI_ALLOCATOR 43 | pSockContext->out_msg_allocator->free_void(msg); 44 | #else 45 | g_out_message_allocator.free_void(msg); 46 | #endif 47 | } 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /iocore/cluster/nio.h: -------------------------------------------------------------------------------- 1 | //nio.h 2 | 3 | #ifndef _NIO_H_ 4 | #define _NIO_H_ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "types.h" 11 | #include "clusterinterface.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | extern struct worker_thread_context *g_worker_thread_contexts; 18 | extern int g_worker_thread_count; 19 | 20 | extern message_deal_func g_msg_deal_func; 21 | extern machine_change_notify_func g_machine_change_notify; 22 | 23 | int nio_init(); 24 | int nio_destroy(); 25 | 26 | int nio_add_to_epoll(SocketContext *pSockContext); 27 | int push_to_send_queue(SocketContext *pSockContext, OutMessage *pMessage, 28 | const MessagePriority priority, const uint32_t sessionVersion); 29 | 30 | int insert_into_send_queue_head(SocketContext *pSockContext, OutMessage *pMessage, 31 | const MessagePriority priority); 32 | 33 | void log_nio_stats(); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /iocore/cluster/pthread_func.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2008 Happy Fish / YuQing 3 | * 4 | * FastDFS may be copied only under the terms of the GNU General 5 | * Public License V3, which may be found in the FastDFS source kit. 6 | * Please visit the FastDFS Home Page http://www.csource.org/ for more detail. 7 | **/ 8 | 9 | #ifndef PTHREAD_FUNC_H 10 | #define PTHREAD_FUNC_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include "common_define.h" 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | int init_pthread_lock(pthread_mutex_t *pthread_lock); 25 | int init_pthread_attr(pthread_attr_t *pattr, const int stack_size); 26 | 27 | int create_work_threads(int *count, void *(*start_func)(void *), \ 28 | void *arg, pthread_t *tids, const int stack_size); 29 | int kill_work_threads(pthread_t *tids, const int count); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /iocore/dns/I_DNS.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /**************************************************************************** 25 | 26 | DNS.h 27 | 28 | 29 | ****************************************************************************/ 30 | 31 | 32 | #ifndef _I_DNS_h_ 33 | #define _I_DNS_h_ 34 | 35 | #ifndef TS_INLINE 36 | #define TS_INLINE 37 | #endif 38 | 39 | #include "I_EventSystem.h" 40 | #include "I_HostDB.h" 41 | #include "I_Net.h" 42 | #include "I_DNSProcessor.h" 43 | 44 | #endif //_I_DNS_h_ 45 | -------------------------------------------------------------------------------- /iocore/dns/Inline.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /* 25 | * Inline Functions as globals for users using the public interface 26 | * 27 | */ 28 | #define TS_INLINE 29 | #define INLINE_CC 30 | 31 | #include "P_DNS.h" 32 | 33 | 34 | -------------------------------------------------------------------------------- /iocore/eventsystem/I_Tasks.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | 23 | */ 24 | 25 | #if !defined (I_Tasks_h) 26 | #define I_Tasks_h 27 | 28 | #include "I_EventSystem.h" 29 | 30 | extern EventType ET_TASK; 31 | 32 | class TasksProcessor: public Processor 33 | { 34 | public: 35 | int start(int task_threads = 0); 36 | }; 37 | 38 | extern TasksProcessor tasksProcessor; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /iocore/eventsystem/Inline.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /* 25 | * Inline Functions as globals for users using the public interface 26 | * 27 | */ 28 | #define TS_INLINE 29 | #define INLINE_CC 30 | 31 | #include "P_EventSystem.h" 32 | 33 | -------------------------------------------------------------------------------- /iocore/eventsystem/Tasks.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "I_Tasks.h" 25 | 26 | // Globals 27 | EventType ET_TASK = ET_CALL; 28 | TasksProcessor tasksProcessor; 29 | 30 | int 31 | TasksProcessor::start(int task_threads) 32 | { 33 | if (task_threads > 0) 34 | ET_TASK = eventProcessor.spawn_event_threads(task_threads, "ET_TASK"); 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /iocore/eventsystem/test_I_Buffer.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "I_EventSystem.h" 25 | #include "test_Buffer.cc" 26 | -------------------------------------------------------------------------------- /iocore/eventsystem/test_I_Event.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "P_EventSystem.h" 25 | #include "test_Event.i" 26 | -------------------------------------------------------------------------------- /iocore/eventsystem/test_P_Buffer.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "P_EventSystem.h" 25 | #include "test_Buffer.cc" 26 | -------------------------------------------------------------------------------- /iocore/eventsystem/test_P_Event.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "P_EventSystem.h" 25 | #include "test_Event.i" 26 | -------------------------------------------------------------------------------- /iocore/hostdb/Inline.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /* 25 | * Inline Functions as globals for users using only the interface 26 | * 27 | */ 28 | #define TS_INLINE 29 | #define INLINE_CC 30 | 31 | #include "P_HostDB.h" 32 | 33 | 34 | -------------------------------------------------------------------------------- /iocore/net/AcceptCont.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | AcceptCont 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "I_AcceptCont.h" 25 | #include "P_Net.h" 26 | 27 | AcceptCont::AcceptCont() 28 | : Continuation(new_ProxyMutex()) 29 | { 30 | SET_HANDLER(&AcceptCont::mainEvent); 31 | } 32 | 33 | AcceptCont::~AcceptCont() 34 | { 35 | } 36 | 37 | void * 38 | AcceptCont::createNetAccept() 39 | { 40 | return (NEW(new NetAccept)); 41 | } 42 | -------------------------------------------------------------------------------- /iocore/net/Inline.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /* 25 | * Inline Functions as globals for users using the public interface 26 | * 27 | */ 28 | #define TS_INLINE 29 | #define INLINE_CC 30 | 31 | #include "P_Net.h" 32 | 33 | -------------------------------------------------------------------------------- /iocore/net/SpdyAcceptCont.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | SpdyNetAccept 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "P_SpdyAcceptCont.h" 25 | #if TS_HAS_SPDY 26 | #include "P_SpdySM.h" 27 | #endif 28 | 29 | SpdyAcceptCont::SpdyAcceptCont(Continuation *ep) 30 | : AcceptCont(), endpoint(ep) 31 | { 32 | #if TS_HAS_SPDY 33 | spdy_config_load(); 34 | #endif 35 | SET_HANDLER(&SpdyAcceptCont::mainEvent); 36 | } 37 | 38 | int 39 | SpdyAcceptCont::mainEvent(int event, void *netvc) 40 | { 41 | #if TS_HAS_SPDY 42 | spdy_sm_create((TSCont)netvc); 43 | #endif 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /iocore/net/UDPIOEvent.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "P_Net.h" 25 | ClassAllocator UDPIOEventAllocator("UDPIOEventAllocator"); 26 | -------------------------------------------------------------------------------- /iocore/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am for the traffic/iocore/utils hierarchy 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | AM_CPPFLAGS = \ 20 | -I$(top_srcdir)/lib \ 21 | -I$(top_srcdir)/lib/records \ 22 | -I$(top_srcdir)/lib/ts \ 23 | -I$(top_srcdir)/iocore/eventsystem 24 | 25 | DEFS += @IOCORE_MODULARIZED_DEFS@ 26 | 27 | noinst_LIBRARIES = libinkutils.a 28 | 29 | libinkutils_a_SOURCES = \ 30 | I_Machine.h \ 31 | I_OneWayMultiTunnel.h \ 32 | I_OneWayTunnel.h \ 33 | Machine.cc \ 34 | OneWayMultiTunnel.cc \ 35 | OneWayTunnel.cc 36 | 37 | -------------------------------------------------------------------------------- /lib/Makefile.am: -------------------------------------------------------------------------------- 1 | # lib Makefile.am 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | SUBDIRS = ts records 20 | 21 | # TsConfig is only built for WCCP until the bugs are worked out. 22 | if BUILD_WCCP 23 | SUBDIRS += tsconfig wccp 24 | endif 25 | -------------------------------------------------------------------------------- /lib/records/I_RecLocal.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Public RecLocal declarations 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef _I_REC_LOCAL_H_ 25 | #define _I_REC_LOCAL_H_ 26 | 27 | #include "I_RecCore.h" 28 | 29 | //------------------------------------------------------------------------- 30 | // Initialization 31 | //------------------------------------------------------------------------- 32 | 33 | int RecLocalInit(Diags * diags = NULL); 34 | int RecLocalInitMessage(); 35 | int RecLocalStart(); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /lib/records/P_RecLocal.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Nothing much 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef _P_REC_LOCAL_H_ 25 | #define _P_REC_LOCAL_H_ 26 | 27 | #include "I_RecLocal.h" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /lib/records/test_I_RecProcess.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "I_RecProcess.h" 25 | #include "test_RecProcess.i" 26 | -------------------------------------------------------------------------------- /lib/records/test_P_RecProcess.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "P_RecProcess.h" 25 | #include "test_RecProcess.i" 26 | -------------------------------------------------------------------------------- /lib/records/test_RecordsConfig.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef _TEST_RECORDS_CONFIG_H_ 25 | 26 | void RecordsConfigRegister(); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /lib/records/test_records.config: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # Test records.config 3 | ########################################################################### 4 | # parse tests 5 | CONFIG proxy.config.parse_test_0a STRING 6 | CONFIG proxy.config.parse_test_1a STRING 7 | CONFIG proxy.config.parse_test_1b STRING 8 | CONFIG proxy.config.parse_test_2a STRING X 9 | CONFIG proxy.config.parse_test_2b STRING X 10 | CONFIG proxy.config.parse_test_3a STRING XXX 11 | CONFIG proxy.config.parse_test_3b STRING XXX 12 | CONFIG proxy.config.parse_test_4a STRING XXX XXX XXX 13 | CONFIG proxy.config.parse_test_4b STRING XXX XXX XXX 14 | ########################################################################## 15 | # User Overridden Configs Below 16 | ########################################################################## 17 | CONFIG proxy.config.cb_test_1 STRING cb_test_1__original 18 | CONFIG proxy.config.link_test_1 INT 1 19 | CONFIG proxy.config.link_test_2 FLOAT 100.000000 20 | CONFIG proxy.config.link_test_3 COUNTER 5 21 | -------------------------------------------------------------------------------- /lib/ts/IpMapConf.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Loading @c IpMap from a configuration file. 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | // Copied from IPRange.cc for backwards compatibility. 25 | 26 | class IpMap; // declare in name only. 27 | 28 | // Returns 0 if successful, error string otherwise 29 | char* Load_IpMap_From_File(IpMap* map, int fd, char const* key_str); 30 | // Returns 0 if successful, error string otherwise 31 | char* Load_IpMap_From_File(IpMap* map, FILE* f, char const* key_str); 32 | -------------------------------------------------------------------------------- /lib/ts/RawHashTable.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | C++ wrapper around libts hash tables 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | 23 | @section details Details 24 | 25 | These C++ RawHashTables are a C++ wrapper around libts hash tables. 26 | They expose an interface very analogous to ink_hash_table, for better 27 | or for worse. See HashTable for a more C++-oriented hash table. 28 | 29 | */ 30 | 31 | #include "RawHashTable.h" 32 | #include "ink_unused.h" 33 | 34 | -------------------------------------------------------------------------------- /lib/ts/defalloc.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Default allocator: malloc/free 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | #ifndef _defalloc_H_ 24 | #define _defalloc_H_ 25 | 26 | #include "ink_memory.h" 27 | 28 | class DefaultAlloc { public: 29 | static void *alloc(int s) { return ats_malloc(s); } 30 | static void free(void *p) { ats_free(p); } 31 | }; 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /lib/ts/ink_apidefs.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef _ink_apidefs_h_ 25 | #define _ink_apidefs_h_ 26 | 27 | #define inkliapi 28 | #define inkcoreapi 29 | #define ink_undoc_liapi 30 | #define ink_undoc_coreapi inkcoreapi 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /lib/ts/ink_stack_trace.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef ink_stack_trace_h 25 | #define ink_stack_trace_h 26 | 27 | // The max number of levels in the stack trace 28 | #define INK_STACK_TRACE_MAX_LEVELS 100 29 | 30 | #ifdef __cplusplus 31 | extern "C" 32 | { 33 | #endif 34 | /* dumps the current back trace to stderr */ 35 | void ink_stack_trace_dump(int sighandler_frame = 0); 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif /* ink_stack_trace_h */ 41 | -------------------------------------------------------------------------------- /lib/ts/ink_sys_control.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | This file produces Unicorns and Rainbows for the ATS community 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef _INK_SYS_CONTROL_H 25 | #define _INK_SYS_CONTROL_H 26 | 27 | #include 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif /* __cplusplus */ 33 | 34 | rlim_t ink_max_out_rlimit(int which, bool max_it=true, bool unlim_it=true); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif /* __cplusplus */ 39 | 40 | #endif /*_INK_SYS_CONTROL_H*/ 41 | -------------------------------------------------------------------------------- /lib/ts/ink_syslog.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /***************************************/ 25 | /**************************************************************************** 26 | * 27 | * ink_syslog.h 28 | * 29 | * 30 | ****************************************************************************/ 31 | 32 | #ifndef _INK_SYSLOG_H_ 33 | #define _INK_SYSLOG_H_ 34 | 35 | int facility_string_to_int(const char *str); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /lib/tsconfig/BisonHeaderToC++.sed: -------------------------------------------------------------------------------- 1 | 1a\ 2 | namespace ts { namespace config {\ 3 | enum TokenType { 4 | 1,/^ *enum/d 5 | /^ *};/a\ 6 | }} // namespace ts::config 7 | /^#endif/,$d 8 | -------------------------------------------------------------------------------- /lib/tsconfig/test-1.tsconfig: -------------------------------------------------------------------------------- 1 | thing-1 = { 2 | name = "0\12\\\345678\9"; 3 | } 4 | 5 | list = ( 6 | { 7 | prop1 = "Bob"; 8 | prop2 = "Dave"; 9 | }, 10 | { 11 | prop1 = "Bobby"; 12 | prop2 = "Davy"; 13 | }, 14 | { 15 | prop1 = "Robert"; 16 | prop2 = "David"; 17 | } 18 | ) -------------------------------------------------------------------------------- /lib/wccp/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am for WCCP module. 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | AM_CPPFLAGS = \ 21 | -I$(top_srcdir)/lib \ 22 | -I$(top_srcdir)/proxy/api/ts 23 | 24 | #WCCP_DEFS = @WCCP_DEFS@ 25 | #DEFS += $(WCCP_DEFS) 26 | 27 | noinst_LIBRARIES = libwccp.a 28 | #noinst_PROGRAMS = test-cache 29 | 30 | libwccp_a_SOURCES = \ 31 | Wccp.h \ 32 | WccpLocal.h \ 33 | WccpStatic.cc \ 34 | WccpMsg.cc \ 35 | WccpEndPoint.cc \ 36 | WccpConfig.cc 37 | 38 | #test_cache_SOURCES = \ 39 | # wccp-test-cache.cc 40 | -------------------------------------------------------------------------------- /mgmt/api/include/Makefile.am: -------------------------------------------------------------------------------- 1 | # mgmt/api/include Makefile.am 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | includedir=$(prefix)/include/ts 20 | 21 | include_HEADERS = \ 22 | mgmtapi.h 23 | -------------------------------------------------------------------------------- /mgmt/cluster/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am for the Enterprise Management module. 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | AM_CPPFLAGS = \ 21 | -I$(top_srcdir)/lib/records \ 22 | -I$(top_srcdir)/lib/ts \ 23 | -I$(top_srcdir)/mgmt \ 24 | -I$(top_srcdir)/mgmt/api/include \ 25 | -I$(top_srcdir)/mgmt/utils \ 26 | -I$(top_srcdir)/mgmt/web2 \ 27 | -I$(top_srcdir)/lib 28 | 29 | MGMT_DEFS = @MGMT_DEFS@ 30 | DEFS += $(MGMT_DEFS) 31 | 32 | noinst_LIBRARIES = libcluster.a 33 | 34 | libcluster_a_SOURCES = \ 35 | ClusterCom.cc \ 36 | ClusterCom.h \ 37 | VMap.cc \ 38 | VMap.h 39 | -------------------------------------------------------------------------------- /mgmt/preparse/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = \ 18 | -I$(top_srcdir)/lib \ 19 | -I$(top_srcdir)/lib/ts \ 20 | -I$(top_srcdir)/proxy/hdrs 21 | 22 | MGMT_DEFS = @MGMT_DEFS@ 23 | DEFS += $(MGMT_DEFS) 24 | 25 | noinst_LIBRARIES = libpreparse.a 26 | 27 | libpreparse_a_SOURCES = \ 28 | RemapReadConfig.cc \ 29 | SocksParser.cc \ 30 | StoreReadConfig.cc 31 | -------------------------------------------------------------------------------- /mgmt/preparse/SocksParser.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Veriy syntax of socks.config 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "ink_unused.h" /* MAGIC_EDITING_TAG */ 25 | #include "IPRange.h" 26 | -------------------------------------------------------------------------------- /mgmt/web2/WebIntrMain.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef _WEB_INTR_MAIN_H_ 25 | #define _WEB_INTR_MAIN_H_ 26 | 27 | /**************************************************************************** 28 | * 29 | * WebIntrMain.h - main loop for the Web Interface 30 | * 31 | ****************************************************************************/ 32 | 33 | struct WebContext; 34 | 35 | #include "P_RecCore.h" 36 | 37 | void *webIntr_main(void *); 38 | void *serviceThrMain(void *info); 39 | 40 | extern int aconf_port_arg; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /plugins/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | SUBDIRS = conf_remap regex_remap header_filter stats_over_http 18 | -------------------------------------------------------------------------------- /plugins/conf_remap/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_builddir)/proxy/api -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = conf_remap.la 21 | conf_remap_la_SOURCES = conf_remap.cc 22 | conf_remap_la_LDFLAGS = -module -avoid-version -shared 23 | -------------------------------------------------------------------------------- /plugins/header_filter/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_builddir)/proxy/api -I$(top_srcdir)/proxy/api \ 18 | -I$(top_srcdir)/lib/ts -I$(top_builddir)/lib/ts 19 | 20 | pkglibdir = ${pkglibexecdir} 21 | pkglib_LTLIBRARIES = header_filter.la 22 | header_filter_la_SOURCES = header_filter.cc rules.cc 23 | header_filter_la_LDFLAGS = -module -avoid-version -shared 24 | -------------------------------------------------------------------------------- /plugins/regex_remap/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_builddir)/proxy/api -I$(top_srcdir)/proxy/api \ 18 | -I$(top_srcdir)/lib/ts -I$(top_builddir)/lib/ts 19 | 20 | pkglibdir = ${pkglibexecdir} 21 | pkglib_LTLIBRARIES = regex_remap.la 22 | regex_remap_la_SOURCES = regex_remap.cc 23 | regex_remap_la_LDFLAGS = -module -avoid-version -shared 24 | -------------------------------------------------------------------------------- /plugins/stats_over_http/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CPPFLAGS = -I$(top_builddir)/proxy/api -I$(top_srcdir)/proxy/api 18 | 19 | pkglibdir = ${pkglibexecdir} 20 | pkglib_LTLIBRARIES = stats_over_http.la 21 | stats_over_http_la_SOURCES = stats_over_http.c 22 | stats_over_http_la_LDFLAGS = -module -avoid-version -shared 23 | -------------------------------------------------------------------------------- /plugins/stats_over_http/README: -------------------------------------------------------------------------------- 1 | Compile: 2 | tsxs -c stats_over_http.c -o stats_over_http.so 3 | Install: 4 | sudo tsxs -o stats_over_http.so -i 5 | 6 | Add to the plugin.conf: 7 | 8 | stats_over_http.so 9 | 10 | start traffic server and visit http://IP:port/_stats 11 | -------------------------------------------------------------------------------- /proxy/DebugStreamLevels.txt: -------------------------------------------------------------------------------- 1 | HTTP_STATE_MACHINE_GET 2 | HTTP_NET_PROCESSOR 3 | NET_CONNECTION_SERVER 4 | NET_CONNECTION_USER_AGENT -------------------------------------------------------------------------------- /proxy/EventName.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | /**************************************************************************** 25 | 26 | EventName.h 27 | 28 | Description: Stringifying Events 29 | ****************************************************************************/ 30 | 31 | #ifndef _EVENT_NAME_H_ 32 | #define _EVENT_NAME_H_ 33 | 34 | #include 35 | 36 | const char *event_int_to_string(int event, int blen = 0, char *buffer = NULL); 37 | 38 | #endif /* _event_name_h_ */ 39 | -------------------------------------------------------------------------------- /proxy/HttpTransStats.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | _HEADER 25 | // 26 | _FOOTER 27 | -------------------------------------------------------------------------------- /proxy/TestRegex.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "ink_unused.h" /* MAGIC_EDITING_TAG */ 25 | #include "Main.h" 26 | #include "Regex.h" 27 | 28 | void 29 | test() 30 | { 31 | } 32 | -------------------------------------------------------------------------------- /proxy/UDPAPIClientTest.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "api/include/experimental.h" 25 | 26 | void UDPClientTestInit(); 27 | int UDPClient_handle_callbacks(INKCont cont, INKEvent event, void *e); 28 | //int send_callbacks (INKCont cont, INKEvent event, void *e); 29 | -------------------------------------------------------------------------------- /proxy/UDPAPITest.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include "api/include/experimental.h" 25 | 26 | void UDPTestInit(); 27 | int handle_callbacks(INKCont cont, INKEvent event, void *e); 28 | //int send_callbacks (INKCont cont, INKEvent event, void *e); 29 | -------------------------------------------------------------------------------- /proxy/UserNameCacheTest.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | int UserNameHandleCallbacks(INKCont cont, INKEvent event, void *e); 25 | void userNameCacheTestInit(); 26 | -------------------------------------------------------------------------------- /proxy/api/ts/Makefile.am: -------------------------------------------------------------------------------- 1 | # api/ts Makefile.am 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | includedir=$(prefix)/include/ts 20 | 21 | include_HEADERS = \ 22 | ts.h \ 23 | remap.h \ 24 | experimental.h 25 | 26 | noinst_HEADERS = \ 27 | InkAPIHughes.h \ 28 | InkAPIPrivateIOCore.h 29 | -------------------------------------------------------------------------------- /proxy/config/ae_ua.config.default: -------------------------------------------------------------------------------- 1 | # --------------------------------------------------------------------------------------- 2 | # Accept-Encoding/User-Agent filtering Configuration file. 3 | # This file can include an unlimited number of regular expressions or simple strings for 4 | # User-Agents headers filtering. 5 | # If the request User-Agent header matches the regular expression, Accep-Encoding header 6 | # will be verified/changed/removed in order to disable the acceptance of any compressed data. 7 | # Please keep in mind that Traffic Server has some predefined regular expressions 8 | # for well-known "bad" clients. 9 | # Traffic Server supports the following format for this file: 10 | # 11 | # where can be: 12 | # .substring - check only lead substring in User-Agent header (case sensitive) 13 | # .string - the same as .substring 14 | # .substring_ncase - check only lead substring in User-Agent header (case insensitive) 15 | # .string_ncase - the same as .substring_ncase 16 | # .regexp - POSIX regular expression 17 | # 18 | # - valid POSIX regular expression if ".regexp" string type was specified 19 | # or arbitrary ascii string for other string types 20 | # --------------------------------------------------------------------------------------- 21 | # For example: 22 | # .regexp Mozilla/4.[0-9].* 23 | # .string Mozilla/4.0 24 | -------------------------------------------------------------------------------- /proxy/config/body_factory/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am for config/body_factory. 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | SUBDIRS = default 21 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/.body_factory_info: -------------------------------------------------------------------------------- 1 | # .body_factory_info 2 | # 3 | # The .body_factory_info file contains descriptive information 4 | # about the error pages in this directory. 5 | # 6 | # Currently, .body_factory_info contains information which 7 | # indicates the character set and natural language of the error 8 | # pages in this directory. For example, to describe Korean 9 | # web pages encoded in the iso-2022-kr character set, you might 10 | # add these lines to .body_factory_info file: 11 | # 12 | # Content-Language: kr 13 | # Content-Charset: iso-2022-kr 14 | # 15 | # If this file is empty, or only contains comments, the default is 16 | # assumed: English text in the standard iso-8859-1 character set. 17 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/README: -------------------------------------------------------------------------------- 1 | This directory contains customizable error page templates for the 2 | Apache Traffic Server. 3 | 4 | You can edit the files in this directory to customized HTML error 5 | response pages. The HTML bodies can include ATS logging format 6 | fields, which will be replaced by the current values before the pages 7 | are served to the user. 8 | 9 | You can also include sets of directories, each in a different language, 10 | for serving multi-lingual error pages. 11 | 12 | Each directory of error pages include a .body_factory_info file, which 13 | contains optional information about the language and character set of 14 | the error page contents. 15 | 16 | See the Traffic Server Administrator's Guide and Release Notes for more 17 | information. 18 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/access#denied: -------------------------------------------------------------------------------- 1 | 2 | 3 | Access Denied 4 | 5 | 6 | 7 |

Access Denied

8 |
9 | 10 | 11 | Description: You are not allowed to access the document you requested. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/access#proxy_auth_required: -------------------------------------------------------------------------------- 1 | 2 | 3 | Proxy Authentication Required 4 | 5 | 6 | 7 |

Proxy Authentication Required

8 |
9 | 10 | 11 | Description: Please login with username and password. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/access#redirect_url: -------------------------------------------------------------------------------- 1 | 2 | 3 | Authentication Failed 4 | 5 | 6 | 7 |

Authentication Failed.

8 | 9 | 10 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/access#ssl_forbidden: -------------------------------------------------------------------------------- 1 | 2 | 3 | SSL Port Forbidden 4 | 5 | 6 | 7 |

SSL Port Forbidden

8 |
9 | 10 | 11 | Description: You have made a request for a secure SSL connection to a 12 | forbidden port number. 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/cache#not_in_cache: -------------------------------------------------------------------------------- 1 | 2 | 3 | Not In Cache 4 | 5 | 6 | 7 |

Not In Cache

8 |
9 | 10 | 11 | Description: Your request mandated that the document come from cache, but 12 | the document is not present in cache. As requested, the transaction 13 | is being terminated. 14 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/cache#read_error: -------------------------------------------------------------------------------- 1 | 2 | 3 | Temporary Error 4 | 5 | 6 | 7 |

Temporary Error

8 |
9 | 10 | 11 | Description: Temporary error. Please try again later. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/congestion#retryAfter: -------------------------------------------------------------------------------- 1 | 2 | 3 | Service Unavailable 4 | 5 | 6 | 7 |

Service Unavailable

8 |
9 | 10 | 11 | Description: Service Unavailable
12 | Retry After: % seconds 13 |
14 |
15 | 16 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/connect#dns_failed: -------------------------------------------------------------------------------- 1 | 2 | 3 | Unknown Host 4 | 5 | 6 | 7 |

Unknown Host

8 |
9 | 10 | 11 | Description: Unable to locate the server named --- 12 | the server does not have a DNS entry. Perhaps there is a misspelling 13 | in the server name, or the server no longer exists. Double-check the 14 | name and try again. 15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/connect#failed_connect: -------------------------------------------------------------------------------- 1 | 2 | 3 | Could Not Connect 4 | 5 | 6 | 7 |

Could Not Connect

8 |
9 | 10 | 11 | Description: Could not connect to the server. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/connect#hangup: -------------------------------------------------------------------------------- 1 | 2 | 3 | Server Connection Closed 4 | 5 | 6 | 7 |

Server Connection Closed

8 |
9 | 10 | 11 | Description: The server closed the connection before 12 | the transaction was completed. 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/default: -------------------------------------------------------------------------------- 1 | 2 | 3 | Error 4 | 5 | 6 | 7 |

Error

8 |
9 | 10 | 11 | Description: Could not process this request. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/interception#no_host: -------------------------------------------------------------------------------- 1 | 2 | 3 | Host Header Required 4 | 5 | 6 | 7 |

Host Header Required

8 |
9 | 10 | 11 | Description: An attempt was made to transparently proxy your request, 12 | but this attempt failed because your browser did not send an HTTP "Host" 13 | header. To access this web site correctly, you will need to upgrade to 14 | a browser that supports the HTTP "Host" header field. 15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/redirect#moved_temporarily: -------------------------------------------------------------------------------- 1 | 2 | 3 | Document Has Moved 4 | 5 | 6 | 7 |

Document Has Moved

8 |
9 | 10 | 11 | Description: The document you requested has moved to a new location. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/request#cycle_detected: -------------------------------------------------------------------------------- 1 | 2 | 3 | Cycle Prohibited 4 | 5 | 6 | 7 |

Cycle Prohibited

8 |
9 | 10 | 11 | Description: Could not process your request for the document 12 | because it would cause an HTTP proxy cycle. Please check the URL and your 13 | browser's proxy settings. 14 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/request#no_content_length: -------------------------------------------------------------------------------- 1 | 2 | 3 | No Content Length 4 | 5 | 6 | 7 |

No Content Length

8 |
9 | 10 | 11 | Description: Could not process this request because 12 | there was no Content-Length specified. 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/request#no_host: -------------------------------------------------------------------------------- 1 | 2 | 3 | Host Header Required 4 | 5 | 6 | 7 |

Host Header Required

8 |
9 | 10 | 11 | Description: Your browser did not send a "Host" HTTP header field 12 | and therefore the virtual host being requested could not be determined. 13 | To access this web site correctly, you will need to upgrade to a browser 14 | that supports the HTTP "Host" header field. 15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/request#scheme_unsupported: -------------------------------------------------------------------------------- 1 | 2 | 3 | Unsupported Protocol 4 | 5 | 6 | 7 |

Unsupported Protocol

8 |
9 | 10 | 11 | Description: Can't perform your request for the document because 12 | the protocol scheme is unknown. 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/request#syntax_error: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bad Request 4 | 5 | 6 | 7 |

Bad Request

8 |
9 | 10 | 11 | Description: Could not process this request. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/response#bad_response: -------------------------------------------------------------------------------- 1 | 2 | 3 | Web Server Error 4 | 5 | 6 | 7 |

Web Server Error

8 |
9 | 10 | 11 | Description: The host did not return the document correctly. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/response#bad_version: -------------------------------------------------------------------------------- 1 | 2 | 3 | HTTP Version Not Supported 4 | 5 | 6 | 7 |

HTTP Version Not Supported

8 |
9 | 10 | 11 | Description: The web server is using an unsupported 12 | version of the HTTP protocol. 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/timeout#activity: -------------------------------------------------------------------------------- 1 | 2 | 3 | Activity Timeout 4 | 5 | 6 | 7 |

Activity Timeout

8 |
9 | 10 | 11 | Description: Too much time has passed transmitting document. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/timeout#inactivity: -------------------------------------------------------------------------------- 1 | 2 | 3 | Inactivity Timeout 4 | 5 | 6 | 7 |

Inactivity Timeout

8 |
9 | 10 | 11 | Description: Too much time has passed without sending any data for document. 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/transcoding#unsupported: -------------------------------------------------------------------------------- 1 | 2 | 3 | Transcoding Not Available 4 | 5 | 6 | 7 |

Transcoding Not Available

8 |
9 | 10 | 11 | 12 | Description: Unable to provide the document in the 13 | format requested by your browser. 14 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /proxy/config/body_factory/default/urlrouting#no_mapping: -------------------------------------------------------------------------------- 1 | 2 | 3 | Not Found on Accelerator 4 | 5 | 6 | 7 |

Not Found on Accelerator

8 |
9 | 10 | 11 | Description: Your request was not found. 12 | Check the location and try again. 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /proxy/config/cluster.config.default: -------------------------------------------------------------------------------- 1 | # Cluster Configuration file 2 | # 3 | # This file is machine generated and machine parsed. 4 | # Please do not change this file by hand. 5 | # 6 | # This file designates the machines which make up the cluster 7 | # proper. Data and load are distributed among these machines. 8 | # 9 | ############################################################################ 10 | # Number 11 | # IP:Port 12 | # ... 13 | ############################################################################ 14 | # Number = { 0, 1 ... } where 0 is a stand-alone proxy 15 | # IP:Port = IP address: cluster accept port number 16 | # 17 | # Example 1: stand-alone proxy 18 | # 0 19 | # 20 | # Example 2: 3 machines 21 | # 3 22 | # 127.1.2.3:83 23 | # 127.1.2.4:83 24 | # 127.1.2.5:83 25 | # 26 | 0 27 | -------------------------------------------------------------------------------- /proxy/config/default_cluster.config.default: -------------------------------------------------------------------------------- 1 | # Default Cluster Configuration file 2 | # 3 | # This file should be filled manually. 4 | # 5 | # This file designates the machines which make up the *DEFAULT* cluster 6 | # proper. Data and load are distributed among these machines. 7 | # 8 | ############################################################################ 9 | # Number 10 | # IP:Port 11 | # ... 12 | ############################################################################ 13 | # Number = { 0, 1 ... } where 0 is a stand-alone proxy 14 | # IP:Port = IP address: cluster accept port number 15 | # 16 | # Example 1: stand-alone proxy 17 | # 0 18 | # 19 | # Example 2: 3 machines 20 | # 3 21 | # 127.1.2.3:83 22 | # 127.1.2.4:83 23 | # 127.1.2.5:83 24 | # 25 | 0 26 | -------------------------------------------------------------------------------- /proxy/config/health_check.config.default: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # The purpose of this file is to specify the layer 7 health check 4 | # setting for each origin host. 5 | # 6 | # Each line consists of a set of tag value pairs. The pairs are 7 | # in the format = 8 | # 9 | # Multiple tags in one line must be separated by ";". 10 | # 11 | # Each directive may have the following tags: 12 | # hostname: hostname to set health check, use Origin Server name here 13 | # port: checking tcp port, default to http port 80 14 | # interval: check interval in seconds, default to 5s 15 | # request_method: http method for url query, default to GET 16 | # request_path: the http request path to send to the origin server, default to /status.html 17 | # request_host: the http request HOST: header, default to hostname 18 | # 19 | # The "hostname" tag indicate the start of one config directive. 20 | # 21 | # For example: 22 | # 23 | # hostname=trafficserver.apache.org;request_path=/status.html 24 | # 25 | # hostname=trafficserver.apache.org;port=80 26 | # request_path=/status.html 27 | # 28 | # hostname=trafficserver.apache.org 29 | # port=80 30 | # interval=200 31 | # request_path=/status.html;request_host=trafficserver.apache.org 32 | # 33 | -------------------------------------------------------------------------------- /proxy/config/hosting.config.default: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # The purpose of this file is to specify the volumes that 4 | # specific hostnames or domains should be stored in. 5 | # 6 | # Each line consists of a set of tag value pairs. The pairs 7 | # are in the format = 8 | # 9 | # Each line must include exactly one primary specifier 10 | # 11 | # Primiary destination specifiers are 12 | # domain= 13 | # hostname= 14 | # 15 | # 16 | # Available directives are: 17 | # volume= (comma separated list of volumes) 18 | # 19 | # All requests that 20 | # don't belong to the list of hostnames in this file go to the 21 | # volumes specified with the hostname or domain name = '*' 22 | # 23 | # For example: to store all inktomi objects in volume 2 24 | # hostname=www.example.com volume=2 25 | # To direct all other requests to volumes 3 and 4 26 | # hostname=* volume=3,4 27 | # 28 | -------------------------------------------------------------------------------- /proxy/config/ip_allow.config.default: -------------------------------------------------------------------------------- 1 | # ip_allow.config 2 | # 3 | # Rules: 4 | # src_ip= action= [] 5 | # 6 | # Actions: ip_allow, ip_deny 7 | # 8 | # Multiple method keywords can be specified (method=GET method=HEAD), or 9 | # multiple methods can be separated by an '|' (method=GET|HEAD). The method 10 | # keyword is optional and it is defaulted to ALL. 11 | # Available methods: ALL, GET, CONNECT, DELETE, HEAD, ICP_QUERY, OPTIONS, 12 | # POST, PURGE, PUT, TRACE, PUSH 13 | # 14 | # Rules are applied in the order listed starting from the top. 15 | # 16 | # Allow anything on localhost (this is the default configuration based on the 17 | # depricated CONFIG proxy.config.http.quick_filter.mask INT 0x482) 18 | src_ip=127.0.0.1 action=ip_allow method=ALL 19 | src_ip=::1 action=ip_allow method=ALL 20 | # Deny PURGE, DELETE, and PUSH for all (this implies allow other methods for all) 21 | src_ip=0.0.0.0-255.255.255.255 action=ip_deny method=PUSH|PURGE|DELETE 22 | src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny method=PUSH|PURGE|DELETE 23 | -------------------------------------------------------------------------------- /proxy/config/log_hosts.config.default: -------------------------------------------------------------------------------- 1 | # log_hosts.config 2 | # 3 | # 4 | # 5 | # This configuration file is used when the Traffic Server is configured in 6 | # reverse-proxy mode and access logs are to be separated by server host 7 | # name. This file lists the host names that are to generate separate 8 | # access log files. 9 | # 10 | # The format of this file is to have one host name per line. 11 | # 12 | -------------------------------------------------------------------------------- /proxy/config/mgr.cnf.default: -------------------------------------------------------------------------------- 1 | #Entry type: usmUserEntry 2 | #Format: usmUserEngineID (octetString) 3 | # usmUserName (text) 4 | # usmUserAuthProtocol (OID) 5 | # usmUserPrivProtocol (OID) 6 | # usmUserStorageType (nonVolatile, permanent, readOnly) 7 | # usmTargetTag (text) 8 | usmUserEntry localSnmpID rootNoAuthTemplate usmNoAuthProtocol \ 9 | usmNoPrivProtocol readOnly - 10 | -------------------------------------------------------------------------------- /proxy/config/plugin.config.default: -------------------------------------------------------------------------------- 1 | # Comments start with a '#' and continue to the end of the line 2 | # Blank lines are ignored 3 | # 4 | # test-plugin.so arg1 arg2 arg3 5 | # 6 | # Example: 7 | #inktomi/iwx/iwx.so 8 | #inktomi/abuse/abuse.so etc/trafficserver/abuse.config 9 | #inktomi/icx/icx.so etc/trafficserver/icx.config 10 | -------------------------------------------------------------------------------- /proxy/config/plugin.db.default: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # Plugin Database File 3 | # 4 | # DO NOT EDIT, FILE IS MACHINE GENERATED 5 | # 6 | # Comments start with a '#' and continue to the end of the line 7 | # Blank lines are ignored 8 | # 9 | ############################################################################## 10 | -------------------------------------------------------------------------------- /proxy/config/public_key.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-archive/TrafficServer/7d517c7ab3f21b812bc0969244386480a94df467/proxy/config/public_key.der -------------------------------------------------------------------------------- /proxy/config/remap.config.example: -------------------------------------------------------------------------------- 1 | 2 | acl define debug deny { 3 | src_ip 0.0.0.1-127.0.0.0 4 | src_ip 128.0.0.0-192.167.255.255 5 | src_ip 192.168.1.1-254.254.254.254 6 | method GET|POST 7 | } 8 | 9 | acl define whitelist allow { 10 | redirect_url http://www.example.com/forbidden.jpg 11 | referer empty 12 | referer domain example.com|mydomain.com|foo.com 13 | } 14 | 15 | http localhost:8080 { 16 | acl check debug 17 | map /cache-internal/ http://{cache-internal} 18 | map /cache/ http://{cache} 19 | map /stat/ http://{stat} 20 | map /test/ http://{test} 21 | map /hostdb/ http://{hostdb} 22 | map /net/ http://{net} 23 | map /http/ http://{http} 24 | map /migrate/ http://{migrate} 25 | } 26 | 27 | map http://(.*):8080/ http://$1.example.com/ 28 | 29 | map http://(.*)/ http://$1.example.com/ { 30 | acl check whitelist 31 | acl deny all 32 | 33 | config records { 34 | set proxy.config.http.cache.cache_responses_to_cookies=0 35 | set "proxy.config.http.response_server_str=my cache server" 36 | set proxy.config.http.keep_alive_enabled_in=1 37 | set proxy.config.http.transaction_active_timeout_out=300 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /proxy/config/stats.config.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /proxy/config/throttle_error.html.example: -------------------------------------------------------------------------------- 1 | 5 | 6 | 23 | 24 | 25 | 26 | Server Overloaded 27 | 28 | 29 |

Server Overloaded

30 | The server is temporarily overloaded. Please try again later. 31 | 32 | 33 | -------------------------------------------------------------------------------- /proxy/config/vaddrs.config.default: -------------------------------------------------------------------------------- 1 | # Virtual IP Address Configuration 2 | # 3 | # The purpose of this file is to specify virtual IP addresses 4 | # for Traffic Server. 5 | # 6 | # UNIX 7 | # Format: 8 | # 9 | # 10 | # Example: 11 | # 209.1.33.10 hme0 10 12 | # 209.1.33.11 hme0 11 13 | # 14 | -------------------------------------------------------------------------------- /proxy/config/volume.config.default: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # This file specifies the various volumes, their sizes and the 4 | # protocol they belong to. Use this file in conjunction with the 5 | # hosting.config file. 6 | # 7 | # Each line consists of a tag value pair. 8 | # volume= scheme= size= 9 | # 10 | # volume_number can be any value between 1 and 255. 11 | # This limits the maximum number of volumes to 255. 12 | # Volume number 0 is reserved for the special free volume. 13 | # Each line MUST have a distinct volume number. 14 | # 15 | # The only scheme currently supported is 'http. 16 | # 17 | # volume_size can either be specified in percentage of the total 18 | # cache space or absolute value. It must be a multiple of 128 Megabytes, 19 | # with 128 Megabytes being the smallest size possible. If specified in 20 | # percentage, the size is rounded down to the closest multiple of 21 | # 128 Megabytes. A volume can be as big as the whole cache. 22 | # Each volume is striped across several disks to 23 | # achieve parallel I/O. For example, if there are 4 disks, 24 | # a 1 Gigabyte volume will have 256 Megabytes on each 25 | # disk (assuming each disk has enough free space available). 26 | # 27 | # To create one volume of size 10% of the total cache space and 28 | # another 1 Gig volume, 29 | # volume=1 scheme=http size=10% 30 | # volume=2 scheme=http size=1024 31 | -------------------------------------------------------------------------------- /proxy/example_prep.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | # 20 | 21 | echo "[example_prep.sh] Checking/Moving old cores..."; 22 | 23 | HOST=`uname -n` 24 | export HOST 25 | NOW=`date | tr ' ' '-'` 26 | 27 | WHERE="$ROOT" 28 | [ -z "$WHERE" ] && WHERE="$INST_ROOT" 29 | [ -z "$WHERE" ] && WHERE=`head -1 /etc/traffic_server 2>/dev/null` 30 | [ -z "$WHERE" ] && WHERE="/home/trafficserver" 31 | 32 | [ -f core ] && mv core ${WHERE}/logs/traffic_server.core.$HOST.$NOW 33 | -------------------------------------------------------------------------------- /proxy/http/HttpProxyServerMain.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Main function to start the HTTP Proxy Server 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | void init_HttpProxyServer(void); 25 | 26 | /** Start the proxy server. 27 | The ports are contained in the HttpProxyPort global data. 28 | */ 29 | void start_HttpProxyServer(int accept_threads = 0); 30 | 31 | void start_HttpProxyServerBackDoor(int port, int accept_threads = 0); 32 | -------------------------------------------------------------------------------- /proxy/http/healthcheck/HCProcessor.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #ifndef _HEALTHCHECK_PROCESSOR_H_ 25 | #define _HEALTHCHECK_PROCESSOR_H_ 26 | 27 | #include "I_HC.h" 28 | #include "HCUtil.h" 29 | 30 | class HCProcessor; 31 | extern HCProcessor hcProcessor; 32 | 33 | class HCProcessor: public Processor 34 | { 35 | public: 36 | HCProcessor() {} 37 | ~HCProcessor() {} 38 | 39 | int start(int n_healthcheck_threads = 0); 40 | private: 41 | HCProcessor(const HCProcessor &); 42 | HCProcessor& operator=(const HCProcessor &); 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /proxy/http/hoturls/HotUrlProcessor.h: -------------------------------------------------------------------------------- 1 | #ifndef _HOT_URL_PROCESSOR_H 2 | #define _HOT_URL_PROCESSOR_H 3 | 4 | #include "I_HotUrls.h" 5 | 6 | class HotUrlsHandler: public Continuation 7 | { 8 | public: 9 | HotUrlsHandler(); 10 | ~HotUrlsHandler() {} 11 | int main_event(int event, void *data); 12 | protected: 13 | time_t getLastReloadTime(const int interval); 14 | }; 15 | 16 | class HotUrlProcessor : public Processor 17 | { 18 | public: 19 | HotUrlProcessor() : _action(NULL) {} 20 | ~HotUrlProcessor() {} 21 | 22 | int init(); 23 | 24 | int start(int number_of_threads = 0); 25 | 26 | void shutdown(); 27 | 28 | private: 29 | // prevent unauthorized copies (Not implemented) 30 | HotUrlProcessor(const HotUrlProcessor &); 31 | HotUrlProcessor& operator=(const HotUrlProcessor &); 32 | 33 | HotUrlsHandler _handler; 34 | Action *_action; 35 | }; 36 | 37 | extern HotUrlProcessor hotUrlProcessor; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /proxy/http/remap/HostnameTrie.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "HostnameTrie.h" 6 | 7 | -------------------------------------------------------------------------------- /proxy/http/remap/UrlMappingPathContainer.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _URL_MAPPING_PATH_CONTAINER_ 3 | #define _URL_MAPPING_PATH_CONTAINER_ 4 | 5 | #include "UrlMapping.h" 6 | #include "UrlMappingRegexMatcher.h" 7 | #include "UrlMappingPathIndex.h" 8 | 9 | class UrlMappingPathContainer 10 | { 11 | public: 12 | UrlMappingPathContainer(); 13 | 14 | virtual ~UrlMappingPathContainer(); 15 | 16 | bool Insert(url_mapping *mapping); 17 | 18 | url_mapping *Search(URL *request_url, UrlMappingContainer &mapping_container); 19 | 20 | void Print(); 21 | private: 22 | bool processPathRegexMapping(UrlMappingRegexMatcher *reg_map); 23 | 24 | UrlMappingPathIndex _path_tries; 25 | UrlMappingRegexList _path_regex_list; 26 | int _path_trie_min_rank; 27 | int _regex_min_rank; 28 | }; 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /proxy/http/remap/acl/ACLCheckList.cc: -------------------------------------------------------------------------------- 1 | #include "ACLDefineManager.h" 2 | #include "ACLCheckList.h" 3 | 4 | ACLCheckList::ACLCheckList() : _checkerCount(0) 5 | { 6 | } 7 | 8 | ACLCheckList::~ACLCheckList() 9 | { 10 | for (int i=0; i<_checkerCount; i++) { 11 | if (_checkers[i].head == NULL) { 12 | continue; 13 | } 14 | 15 | this->destroyChain(_checkers + i); 16 | } 17 | } 18 | 19 | void ACLCheckList::destroyChain(ACLCheckerChain *checkersChain) 20 | { 21 | ACLChecker *forDelete; 22 | ACLChecker *checkers; 23 | 24 | checkers = checkersChain->head; 25 | while (checkers != NULL) { 26 | forDelete = checkers; 27 | checkers = checkers->_next; 28 | 29 | if (dynamic_cast(forDelete) == NULL) { 30 | delete forDelete; 31 | } 32 | } 33 | 34 | checkersChain->head = NULL; 35 | checkersChain->tail = NULL; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /proxy/http/remap/acl/ACLMethodIpCheckList.h: -------------------------------------------------------------------------------- 1 | #ifndef _ACL_METHOD_IP_CHECK_LIST_H 2 | #define _ACL_METHOD_IP_CHECK_LIST_H 3 | 4 | #include "ACLChecker.h" 5 | #include "DirectiveParams.h" 6 | #include "ACLCheckList.h" 7 | 8 | #define ACL_FILED_INDEX_METHOD 0 9 | #define ACL_FILED_INDEX_SRC_IP 1 10 | #define ACL_FILED_INDEX_WHOLE_METHOD_IP 2 //such as: acl allow all, acl check xxx 11 | 12 | class ACLMethodIpCheckList : public ACLCheckList { 13 | public: 14 | ACLMethodIpCheckList(); 15 | ~ACLMethodIpCheckList() {} 16 | 17 | int load(const DirectiveParams *parentParams); 18 | int check(const ACLContext & context); 19 | }; 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/ConfigDirective.cc: -------------------------------------------------------------------------------- 1 | #include "ConfigDirective.h" 2 | #include "ConfigParams.h" 3 | 4 | ConfigDirective::ConfigDirective() : 5 | RemapDirective(DIRECTVIE_NAME_CONFIG, DIRECTIVE_TYPE_BOTH, 1, 2) 6 | { 7 | this->_children[0] = new ConfigSetDirective(); 8 | this->_childrenCount = 1; 9 | } 10 | 11 | ConfigDirective::~ConfigDirective() 12 | { 13 | } 14 | 15 | 16 | DirectiveParams *ConfigDirective::newDirectiveParams(const int rank, const char *filename, 17 | const int lineNo, const char *lineStr, const int lineLen, 18 | DirectiveParams *parent, const char *paramStr, const int paramLen, 19 | const bool bBlock) 20 | { 21 | return new ConfigParams(rank, filename, lineNo, lineStr, lineLen, parent, this, 22 | paramStr, paramLen, bBlock); 23 | } 24 | 25 | 26 | ConfigSetDirective::ConfigSetDirective() : 27 | RemapDirective(DIRECTVIE_NAME_CONFIG_SET, DIRECTIVE_TYPE_STATEMENT, 1, 1) 28 | { 29 | } 30 | 31 | ConfigSetDirective::~ConfigSetDirective() 32 | { 33 | } 34 | 35 | DirectiveParams *ConfigSetDirective::newDirectiveParams(const int rank, const char *filename, 36 | const int lineNo, const char *lineStr, const int lineLen, 37 | DirectiveParams *parent, const char *paramStr, const int paramLen, 38 | const bool bBlock) 39 | { 40 | return new ConfigSetParams(rank, filename, lineNo, lineStr, lineLen, parent, 41 | this, paramStr, paramLen, bBlock); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/ConfigDirective.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONFIG_DIRECTIVE_H 2 | #define _CONFIG_DIRECTIVE_H 3 | 4 | #include 5 | #include "RemapDirective.h" 6 | 7 | class ConfigDirective : public RemapDirective { 8 | public: 9 | ConfigDirective(); 10 | ~ConfigDirective(); 11 | 12 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 13 | const int lineNo, const char *lineStr, const int lineLen, 14 | DirectiveParams *parent, const char *paramStr, const int paramLen, 15 | const bool bBlock); 16 | }; 17 | 18 | 19 | class ConfigSetDirective : public RemapDirective { 20 | public: 21 | ConfigSetDirective(); 22 | ~ConfigSetDirective(); 23 | 24 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 25 | const int lineNo, const char *lineStr, const int lineLen, 26 | DirectiveParams *parent, const char *paramStr, const int paramLen, 27 | const bool bBlock); 28 | }; 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/IncludeDirective.cc: -------------------------------------------------------------------------------- 1 | #include "IncludeDirective.h" 2 | #include "IncludeParams.h" 3 | 4 | IncludeDirective::IncludeDirective() : 5 | RemapDirective(DIRECTVIE_NAME_INCLUDE, DIRECTIVE_TYPE_STATEMENT, 1, 1) 6 | { 7 | } 8 | 9 | IncludeDirective::~IncludeDirective() 10 | { 11 | } 12 | 13 | DirectiveParams *IncludeDirective::newDirectiveParams(const int rank, const char *filename, 14 | const int lineNo, const char *lineStr, const int lineLen, 15 | DirectiveParams *parent, const char *paramStr, const int paramLen, 16 | const bool bBlock) 17 | { 18 | return new IncludeParams(rank, filename, lineNo, lineStr, lineLen, parent, 19 | this, paramStr, paramLen, bBlock); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/IncludeDirective.h: -------------------------------------------------------------------------------- 1 | #ifndef _INCLUDE_DIRECTIVE_H 2 | #define _INCLUDE_DIRECTIVE_H 3 | 4 | #include 5 | #include "RemapDirective.h" 6 | 7 | class IncludeDirective : public RemapDirective { 8 | public: 9 | IncludeDirective(); 10 | ~IncludeDirective(); 11 | 12 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 13 | const int lineNo, const char *lineStr, const int lineLen, 14 | DirectiveParams *parent, const char *paramStr, const int paramLen, 15 | const bool bBlock); 16 | }; 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/IncludeParams.h: -------------------------------------------------------------------------------- 1 | #ifndef _INCLUDE_PARAMS_H 2 | #define _INCLUDE_PARAMS_H 3 | 4 | #include 5 | #include "MappingTypes.h" 6 | #include "RemapDirective.h" 7 | #include "DirectiveParams.h" 8 | 9 | class IncludeParams : public DirectiveParams { 10 | public: 11 | IncludeParams(const int rank, const char *filename, const int lineNo, 12 | const char *lineStr, const int lineLen, 13 | DirectiveParams *parent, RemapDirective *directive, 14 | const char *paramStr, const int paramLen, const bool bBlock); 15 | ~IncludeParams(); 16 | int parse(const char *blockStart, const char *blockEnd); 17 | 18 | const DynamicArray *getFilenames() const { 19 | return &_filenames; 20 | } 21 | 22 | protected: 23 | int expandFilenames(); 24 | int listFile(const char *filepath, const char *filename); 25 | 26 | const char *toString(char *buff, int *len); 27 | char _rawFilename[1024]; 28 | DynamicArray _filenames; //expand filenames 29 | }; 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/MappingDirective.h: -------------------------------------------------------------------------------- 1 | #ifndef _MAPPING_DIRECTIVE_H 2 | #define _MAPPING_DIRECTIVE_H 3 | 4 | #include 5 | #include "RemapDirective.h" 6 | 7 | class MappingDirective : public RemapDirective { 8 | protected: 9 | MappingDirective(const char *name); 10 | 11 | public: 12 | virtual ~MappingDirective() {} 13 | }; 14 | 15 | 16 | class MapDirective : public MappingDirective { 17 | public: 18 | MapDirective(); 19 | MapDirective(const char *name); 20 | ~MapDirective() {} 21 | 22 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 23 | const int lineNo, const char *lineStr, const int lineLen, 24 | DirectiveParams *parent, const char *paramStr, 25 | const int paramLen, const bool bBlock); 26 | }; 27 | 28 | 29 | class RedirectDirective : public MappingDirective { 30 | public: 31 | RedirectDirective(); 32 | ~RedirectDirective() {} 33 | 34 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 35 | const int lineNo, const char *lineStr, const int lineLen, 36 | DirectiveParams *parent, const char *paramStr, 37 | const int paramLen, const bool bBlock); 38 | }; 39 | 40 | //for backward compatibility 41 | class RegexMapDirective : public MapDirective { 42 | public: 43 | RegexMapDirective(); 44 | ~RegexMapDirective() {} 45 | }; 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/PluginDirective.cc: -------------------------------------------------------------------------------- 1 | #include "PluginDirective.h" 2 | #include "PluginParams.h" 3 | 4 | PluginDirective::PluginDirective() : 5 | RemapDirective(DIRECTVIE_NAME_PLUGIN, DIRECTIVE_TYPE_BOTH, 1, 0) 6 | { 7 | this->_children[0] = new PluginParamDirective(); 8 | this->_childrenCount = 1; 9 | } 10 | 11 | PluginDirective::~PluginDirective() 12 | { 13 | } 14 | 15 | DirectiveParams *PluginDirective::newDirectiveParams(const int rank, const char *filename, 16 | const int lineNo, const char *lineStr, const int lineLen, 17 | DirectiveParams *parent, const char *paramStr, const int paramLen, 18 | const bool bBlock) 19 | { 20 | return new PluginParams(rank, filename, lineNo, lineStr, lineLen, parent, this, 21 | paramStr, paramLen, bBlock); 22 | } 23 | 24 | PluginParamDirective::PluginParamDirective() : 25 | RemapDirective(DIRECTVIE_NAME_PLUGIN_PARAM, DIRECTIVE_TYPE_BOTH, 0, 2) 26 | { 27 | } 28 | 29 | PluginParamDirective::~PluginParamDirective() 30 | { 31 | } 32 | 33 | DirectiveParams *PluginParamDirective::newDirectiveParams(const int rank, const char *filename, 34 | const int lineNo, const char *lineStr, const int lineLen, 35 | DirectiveParams *parent, const char *paramStr, const int paramLen, 36 | const bool bBlock) 37 | { 38 | return new PluginParamParams(rank, filename, lineNo, lineStr, lineLen, parent, 39 | this, paramStr, paramLen, bBlock); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/PluginDirective.h: -------------------------------------------------------------------------------- 1 | #ifndef _PLUGIN_DIRECTIVE_H 2 | #define _PLUGIN_DIRECTIVE_H 3 | 4 | #include 5 | #include "RemapDirective.h" 6 | 7 | class PluginDirective : public RemapDirective { 8 | public: 9 | PluginDirective(); 10 | ~PluginDirective(); 11 | 12 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 13 | const int lineNo, const char *lineStr, const int lineLen, 14 | DirectiveParams *parent, const char *paramStr, const int paramLen, 15 | const bool bBlock); 16 | }; 17 | 18 | class PluginParamDirective : public RemapDirective { 19 | public: 20 | PluginParamDirective(); 21 | ~PluginParamDirective(); 22 | 23 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 24 | const int lineNo, const char *lineStr, const int lineLen, 25 | DirectiveParams *parent, const char *paramStr, const int paramLen, 26 | const bool bBlock); 27 | }; 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/SchemeDirective.cc: -------------------------------------------------------------------------------- 1 | #include "SchemeDirective.h" 2 | #include "ACLDirective.h" 3 | #include "MappingDirective.h" 4 | #include "SchemeParams.h" 5 | 6 | SchemeDirective::SchemeDirective(const char *name) : 7 | RemapDirective(name, DIRECTIVE_TYPE_BLOCK, 1, 1) 8 | { 9 | int index = 0; 10 | this->_children[index++] = new ACLDirective(); 11 | this->_children[index++] = new MapDirective(); 12 | this->_children[index++] = new RedirectDirective(); 13 | this->_childrenCount = index; 14 | } 15 | 16 | SchemeDirective::~SchemeDirective() 17 | { 18 | } 19 | 20 | DirectiveParams *SchemeDirective::newDirectiveParams(const int rank, const char *filename, 21 | const int lineNo, const char *lineStr, const int lineLen, 22 | DirectiveParams *parent, const char *paramStr, const int paramLen, 23 | const bool bBlock) 24 | { 25 | return new SchemeParams(rank, filename, lineNo, lineStr, lineLen, parent, 26 | this, paramStr, paramLen, bBlock); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/SchemeDirective.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCHEME_DIRECTIVE_H 2 | #define _SCHEME_DIRECTIVE_H 3 | 4 | #include 5 | #include "RemapDirective.h" 6 | 7 | class SchemeDirective : public RemapDirective { 8 | public: 9 | SchemeDirective(const char *name); 10 | ~SchemeDirective(); 11 | 12 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 13 | const int lineNo, const char *lineStr, const int lineLen, 14 | DirectiveParams *parent, const char *paramStr, const int paramLen, 15 | const bool bBlock); 16 | }; 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/SchemeParams.cc: -------------------------------------------------------------------------------- 1 | #include "SchemeParams.h" 2 | 3 | SchemeParams::SchemeParams(const int rank, const char *filename, const int lineNo, 4 | const char *lineStr, const int lineLen, DirectiveParams *parent, 5 | RemapDirective *directive, const char *paramStr, 6 | const int paramLen, const bool bBlock) : 7 | DirectiveParams(rank, filename, lineNo, lineStr, lineLen, parent, directive, 8 | paramStr, paramLen, bBlock) 9 | { 10 | } 11 | 12 | int SchemeParams::parse(const char * /*blockStart*/, const char * /*blockEnd*/) 13 | { 14 | _host = _params[0]; 15 | return 0; 16 | } 17 | 18 | const char *SchemeParams::toString(char *buff, int *len) 19 | { 20 | *len = sprintf(buff, "%s %.*s", _directive->getName(), 21 | _host.length, _host.str); 22 | 23 | return (const char *)buff; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/SchemeParams.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCHEME_PARAMS_H 2 | #define _SCHEME_PARAMS_H 3 | 4 | #include 5 | #include "MappingTypes.h" 6 | #include "DirectiveParams.h" 7 | 8 | class SchemeParams : public DirectiveParams { 9 | public: 10 | SchemeParams(const int rank, const char *filename, const int lineNo, 11 | const char *lineStr, const int lineLen, DirectiveParams *parent, 12 | RemapDirective *directive, const char *paramStr, 13 | const int paramLen, const bool bBlock); 14 | ~SchemeParams() {} 15 | int parse(const char *blockStart, const char *blockEnd); 16 | 17 | const char *getScheme() const { 18 | return _directive->getName(); 19 | } 20 | 21 | const StringValue *getHost() const { 22 | return &_host; 23 | } 24 | 25 | protected: 26 | const char *toString(char *buff, int *len); 27 | StringValue _host; 28 | }; 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/ScriptDirective.cc: -------------------------------------------------------------------------------- 1 | #include "ScriptDirective.h" 2 | #include "ScriptParams.h" 3 | 4 | ScriptDirective::ScriptDirective() : 5 | RemapDirective(DIRECTVIE_NAME_SCRIPT, DIRECTIVE_TYPE_BLOCK, 0, 2) 6 | { 7 | } 8 | 9 | ScriptDirective::~ScriptDirective() 10 | { 11 | } 12 | 13 | DirectiveParams *ScriptDirective::newDirectiveParams(const int rank, const char *filename, 14 | const int lineNo, const char *lineStr, const int lineLen, 15 | DirectiveParams *parent, const char *paramStr, const int paramLen, 16 | const bool bBlock) 17 | { 18 | return new ScriptParams(rank, filename, lineNo, lineStr, lineLen, parent, this, 19 | paramStr, paramLen, bBlock); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /proxy/http/remap/parser/ScriptDirective.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCRIPT_DIRECTIVE_H 2 | #define _SCRIPT_DIRECTIVE_H 3 | 4 | #include 5 | #include "RemapDirective.h" 6 | 7 | class ScriptDirective : public RemapDirective { 8 | public: 9 | ScriptDirective(); 10 | ~ScriptDirective(); 11 | 12 | DirectiveParams *newDirectiveParams(const int rank, const char *filename, 13 | const int lineNo, const char *lineStr, const int lineLen, 14 | DirectiveParams *parent, const char *paramStr, const int paramLen, 15 | const bool bBlock); 16 | }; 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /proxy/http/remap/ts_remap_check.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "RemapParser.h" 5 | 6 | int main(int argc, char **argv) 7 | { 8 | int result; 9 | const char *config_file_path; 10 | RemapParser parser; 11 | 12 | if (argc < 2) { 13 | fprintf(stderr, "Usage: %s \n", argv[0]); 14 | return EINVAL; 15 | } 16 | 17 | config_file_path = argv[1]; 18 | DirectiveParams rootParams(0, config_file_path, 0, NULL, 0, NULL, 19 | NULL, NULL, 0, true); 20 | 21 | if ((result=parser.loadFromFile(config_file_path, &rootParams)) == 0) { 22 | printf("OK\n"); 23 | } 24 | else { 25 | fprintf(stderr, "Can't load remap config file: %s\n", config_file_path); 26 | } 27 | 28 | return result; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /proxy/ink_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-archive/TrafficServer/7d517c7ab3f21b812bc0969244386480a94df467/proxy/ink_icon.ico -------------------------------------------------------------------------------- /proxy/logging/LogFormatType.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | 25 | 26 | #ifndef LOG_FORMAT_TYPE_H 27 | #define LOG_FORMAT_TYPE_H 28 | 29 | enum LogFormatType 30 | { 31 | SQUID_LOG, 32 | COMMON_LOG, 33 | EXTENDED_LOG, 34 | EXTENDED2_LOG, 35 | CUSTOM_LOG, 36 | TEXT_LOG, 37 | N_LOG_TYPES 38 | }; 39 | 40 | enum LogFileFormat 41 | { 42 | BINARY_LOG, 43 | ASCII_LOG, 44 | ASCII_PIPE, 45 | N_LOGFILE_TYPES 46 | }; 47 | 48 | #if defined(linux) || defined(solaris) 49 | #define ASCII_PIPE_FORMAT_SUPPORTED 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /proxy/msgs/TSMsgs.rc: -------------------------------------------------------------------------------- 1 | 1 VERSIONINFO 2 | FILEVERSION 0,0,0,1 3 | PRODUCTVERSION 0,0,0,1 4 | FILEFLAGSMASK 0x3fL 5 | #ifdef _DEBUG 6 | FILEFLAGS 0xbL 7 | #else 8 | FILEFLAGS 0xaL 9 | #endif 10 | FILEOS 0x40004L 11 | FILETYPE 0x2L 12 | FILESUBTYPE 0x0L 13 | BEGIN 14 | BLOCK "StringFileInfo" 15 | BEGIN 16 | BLOCK "040904b0" 17 | BEGIN 18 | VALUE "Comments", "\0" 19 | VALUE "CompanyName", "\0" 20 | VALUE "FileDescription", "Message File\0" 21 | VALUE "FileVersion", "0, 0, 0, 1\0" 22 | VALUE "InternalName", "TSMsgs.dll\0" 23 | VALUE "LegalCopyright", "\0" 24 | VALUE "LegalTrademarks", "Traffic Server (TM)\0" 25 | VALUE "OriginalFilename", "TSMsgs.dll\0" 26 | VALUE "PrivateBuild", "\0" 27 | VALUE "ProductName", "Traffic Server Message File\0" 28 | VALUE "ProductVersion", "0, 0, 0, 1\0" 29 | VALUE "SpecialBuild", "\0" 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | VALUE "Translation", 0x409, 1200 35 | END 36 | END 37 | 38 | #include "TSMessages.rc" 39 | 40 | -------------------------------------------------------------------------------- /proxy/stats/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am for Stats 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | AM_CPPFLAGS = \ 20 | $(iocore_include_dirs) \ 21 | -I$(top_srcdir)/lib \ 22 | -I$(top_srcdir)/lib/records \ 23 | -I$(top_srcdir)/lib/ts \ 24 | -I$(top_srcdir)/proxy \ 25 | -I$(top_srcdir)/mgmt \ 26 | -I$(top_srcdir)/mgmt/utils 27 | 28 | noinst_LIBRARIES = libstats.a 29 | 30 | libstats_a_SOURCES = \ 31 | CoupledStats.cc \ 32 | CoupledStats.h \ 33 | Stats.cc \ 34 | Stats.h 35 | -------------------------------------------------------------------------------- /proxy/test_xml_parser.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | #include 25 | #include "InkXml.h" 26 | 27 | int 28 | main() 29 | { 30 | InkXmlAttr a1("Name", "Matt"); 31 | InkXmlAttr a2("Title", "Engineer"); 32 | InkXmlAttr a3("Company", "Inktomi"); 33 | InkXmlObject o1("Employee"); 34 | o1.add_attr(&a1); 35 | o1.add_attr(&a2); 36 | o1.add_attr(&a3); 37 | o1.add_tag("Email", ""); 38 | InkXmlConfigFile f1("logs.config"); 39 | f1.add_object(&o1); 40 | f1.display(); 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /proxy/ts_resource.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | A brief file description 4 | 5 | @section license License 6 | 7 | Licensed to the Apache Software Foundation (ASF) under one 8 | or more contributor license agreements. See the NOTICE file 9 | distributed with this work for additional information 10 | regarding copyright ownership. The ASF licenses this file 11 | to you under the Apache License, Version 2.0 (the 12 | "License"); you may not use this file except in compliance 13 | with the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | */ 23 | 24 | //{{NO_DEPENDENCIES}} 25 | // Microsoft Developer Studio generated include file. 26 | // Used by ts_icon.rc 27 | // 28 | #define IDI_ICON1 101 29 | 30 | // Next default values for new objects 31 | // 32 | #ifdef APSTUDIO_INVOKED 33 | #ifndef APSTUDIO_READONLY_SYMBOLS 34 | #define _APS_NEXT_RESOURCE_VALUE 107 35 | #define _APS_NEXT_COMMAND_VALUE 40001 36 | #define _APS_NEXT_CONTROL_VALUE 1000 37 | #define _APS_NEXT_SYMED_VALUE 101 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /rc/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am for install 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | AM_CPPFLAGS = \ 20 | -I$(top_srcdir)/lib/records \ 21 | -I$(top_srcdir)/proxy \ 22 | -I$(top_srcdir)/mgmt \ 23 | -I$(top_srcdir)/mgmt/utils \ 24 | -I$(top_srcdir)/proxy/cache \ 25 | -I$(top_srcdir)/proxy/logging 26 | 27 | dist_bin_SCRIPTS = \ 28 | trafficserver trafficrecovery.sh 29 | -------------------------------------------------------------------------------- /rc/solaris.txt: -------------------------------------------------------------------------------- 1 | To setup Solaris 10+ traffic server service, import the traffic server service 2 | manifest XML file 3 | 4 | # svccfg import trafficserver.xml 5 | 6 | To start the service, issue the following command: 7 | 8 | # svcadm enable application/apache/trafficserver 9 | 10 | To stop the service, use this command: 11 | 12 | # svcadm disable application/apache/trafficserver 13 | -------------------------------------------------------------------------------- /rc/trafficrecovery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | NOTIFY_FILENAME='/var/run/trafficserver/trafficserver.notify' 4 | run_prefix='/etc/init.d' 5 | bin_prefix='/usr/bin' 6 | 7 | echo "traffic recovery start ..." 8 | $run_prefix/trafficserver deactivate 9 | 10 | while [ 1 -eq 1 ]; do 11 | sleep 1 12 | if [ ! -f $NOTIFY_FILENAME ]; then 13 | break 14 | fi 15 | 16 | content=$(/bin/cat $NOTIFY_FILENAME) 17 | if [ "x$content" = 'x1' ]; then 18 | break 19 | fi 20 | done 21 | 22 | $run_prefix/trafficserver activate 23 | 24 | echo "traffic recovery done" 25 | 26 | -------------------------------------------------------------------------------- /rc/trafficserver.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Apache Traffic Server is a fast, scalable and extensible caching proxy server. 3 | After=syslog.target network.target 4 | 5 | [Service] 6 | Type=simple 7 | EnvironmentFile=-/etc/sysconfig/trafficserver 8 | PIDFile=@exp_runtimedir@/cop.pid 9 | ExecStart=@exp_bindir@/traffic_cop $TC_DAEMON_ARGS 10 | ExecReload=@exp_bindir@/traffic_line -x 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /rpm/trafficserver-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $1 4 | autoreconf -i 5 | ./configure --with-openssl=/home/a 6 | make asf-dist 7 | cd rpm 8 | rpm_create $2.spec -v $3 -r $4 -p /usr 9 | 10 | for mypk in `ls *.rpm` 11 | do 12 | t_pk_l=${mypk//-/ } 13 | t_pk_array=($t_pk_l) 14 | ac=${#t_pk_array[*]} 15 | buildnumber=${t_pk_array[$ac-1]} 16 | sf=`echo $buildnumber|awk -F'.' '{print "."$(NF-2)"."$(NF-1)"."$NF}'` 17 | buildnumber=${buildnumber/$sf/} 18 | echo $buildnumber > $1/rpm/BUILDNO.txt 19 | break 20 | done 21 | -------------------------------------------------------------------------------- /rpm/trafficserver-buildpe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd $1/rpm 3 | if [ `uname -i` == "x86_64" ] 4 | then 5 | plat="x86_64" 6 | else 7 | plat="i386" 8 | fi 9 | for name in `ls *.rpm` 10 | do 11 | name=${name/.rpm/} 12 | yum-setbranch $name $ABS_OS ${plat} current 13 | done 14 | -------------------------------------------------------------------------------- /rpm/trafficserver-buildqa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd $1/rpm 3 | if [ `uname -i` == "x86_64" ] 4 | then 5 | plat="x86_64" 6 | else 7 | plat="i386" 8 | fi 9 | for name in `ls *.rpm` 10 | do 11 | yum-upload $name --osver $ABS_OS --arch ${plat} --group yum --batch 12 | done 13 | -------------------------------------------------------------------------------- /rpm/trafficserver.sysconf: -------------------------------------------------------------------------------- 1 | # Config file for /etc/init.d/trafficserver 2 | # 3 | # Traffic Cop args: 4 | # default is empty 5 | #TC_DAEMON_ARGS='' 6 | # 7 | # Traffic Manager args: 8 | # default is empty 9 | #TM_DAEMON_ARGS='' 10 | # 11 | # Traffic Server args: 12 | # default is empty 13 | #TS_DAEMON_ARGS='' 14 | -------------------------------------------------------------------------------- /tb_changelog: -------------------------------------------------------------------------------- 1 | *) [TS-1006] cut down memory waste 2 | *) [TS-654] support Layer7 http health checking for Origin Servers 3 | *) [TS-1280] cache control rule matching performance tweak 4 | *) [TS-1270] cache control force local cache in clustering mode 5 | *) [TS-621] allow 0 byte files to be cached 6 | -------------------------------------------------------------------------------- /tools/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Top-level Makefile.am for Traffic Server. 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | # Local Macros 21 | # http://www.gnu.org/software/automake/manual/automake.html#Local-Macros 22 | ACLOCAL_AMFLAGS = -I build 23 | 24 | bin_SCRIPTS = tsxs 25 | -------------------------------------------------------------------------------- /tools/http_load/README: -------------------------------------------------------------------------------- 1 | A ATS version of http_load with added features and now using epoll(). 2 | 3 | Version 1.0.1 (6/28/11) 4 | - Added rpath to LDFLAGS 5 | 6 | Version 1.0.0 (2/22/09) 7 | - First version of http_load. 8 | -------------------------------------------------------------------------------- /tools/http_load/http_load.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-archive/TrafficServer/7d517c7ab3f21b812bc0969244386480a94df467/tools/http_load/http_load.c -------------------------------------------------------------------------------- /tools/http_load/timers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-archive/TrafficServer/7d517c7ab3f21b812bc0969244386480a94df467/tools/http_load/timers.c -------------------------------------------------------------------------------- /tools/http_load/timers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-archive/TrafficServer/7d517c7ab3f21b812bc0969244386480a94df467/tools/http_load/timers.h -------------------------------------------------------------------------------- /tools/http_load/version.h: -------------------------------------------------------------------------------- 1 | /* version.h - version define for http_load */ 2 | 3 | #ifndef _VERSION_H_ 4 | #define _VERSION_H_ 5 | 6 | #define VERSION "http_load 29jun2005" 7 | 8 | #endif /* _VERSION_H_ */ 9 | -------------------------------------------------------------------------------- /tools/jtest/Makefile: -------------------------------------------------------------------------------- 1 | all: jtest 2 | 3 | jtest: jtest.cc 4 | $(CXX) $^ -o $@ -Wno-write-strings 5 | 6 | clean: 7 | rm -f jtest 8 | --------------------------------------------------------------------------------