Internal SDK stuff. More...
#include "ts.h"
#include "I_EventSystem.h"
#include "I_Cache.h"
#include "I_Net.h"
Go to the source code of this file.
Internal SDK stuff.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file InkAPIPrivateIOCore.h.
#define FORCE_PLUGIN_MUTEX | ( | _c | ) |
MutexLock ml; \ LOCK_MONGO_MUTEX; \ if (( (INKContInternal*)_c)->mutex == NULL) { \ ( (INKContInternal*)_c)->mutex = new_ProxyMutex(); \ UNLOCK_MONGO_MUTEX; \ MUX_WARNING(_c); \ MUTEX_SET_AND_TAKE_LOCK(ml, ((INKContInternal*)_c)->mutex, this_ethread()); \ } else { \ UNLOCK_MONGO_MUTEX; \ MUTEX_SET_AND_TAKE_LOCK(ml, ((INKContInternal*)_c)->mutex, this_ethread()); \ }
Definition at line 136 of file InkAPIPrivateIOCore.h.
Referenced by INKUDPBind(), INKUDPRecvFrom(), INKUDPSendTo(), TSCacheRead(), TSCacheRemove(), TSCacheScan(), TSCacheWrite(), TSContSchedule(), TSContScheduleEvery(), TSHostLookup(), TSHttpSchedule(), TSNetAccept(), TSNetConnect(), TSNetConnectTransparent(), TSVConnRead(), and TSVConnWrite().
#define LOCK_MONGO_MUTEX |
Definition at line 123 of file InkAPIPrivateIOCore.h.
#define MUX_WARNING | ( | p | ) |
TSDebug ("sdk","(SDK) null mutex detected in critical region (mutex created)"); \ TSDebug ("sdk","(SDK) please create continuation [%p] with mutex", (p));
Definition at line 125 of file InkAPIPrivateIOCore.h.
#define UNLOCK_MONGO_MUTEX |
Definition at line 124 of file InkAPIPrivateIOCore.h.
#define UNSAFE_FORCE_MUTEX |
Definition at line 120 of file InkAPIPrivateIOCore.h.
typedef void* INKUDPacketQueue |
Definition at line 173 of file InkAPIPrivateIOCore.h.
typedef void* INKUDPConn |
Definition at line 174 of file InkAPIPrivateIOCore.h.
typedef void* INKUDPPacket |
Definition at line 172 of file InkAPIPrivateIOCore.h.
Definition at line 37 of file InkAPIPrivateIOCore.h.
Definition at line 356 of file InkIOCoreAPI.cc.
References ats_ip4_set(), ats_ip_sa_cast(), FORCE_PLUGIN_MUTEX, INK_ETHERNET_MTU_SIZE, sdk_assert, sdk_sanity_check_continuation(), TS_SUCCESS, UDPNetProcessor::UDPBind(), and udpNet.
Referenced by UDPClientTestInit(), and UDPTestInit().
tsapi int INKUDPConnFdGet | ( | INKUDPConn | udp | ) |
Definition at line 410 of file InkIOCoreAPI.cc.
References UDPConnection::getFd().
tsapi TSIOBufferBlock INKUDPPacketBufferBlockGet | ( | INKUDPPacket | packet | ) |
Definition at line 425 of file InkIOCoreAPI.cc.
References UDPPacket::getIOBlockChain(), sdk_assert, sdk_sanity_check_null_ptr(), and TS_SUCCESS.
Referenced by handle_callbacks(), and UDPClient_handle_callbacks().
tsapi INKUDPConn INKUDPPacketConnGet | ( | INKUDPPacket | packet | ) |
Definition at line 452 of file InkIOCoreAPI.cc.
References UDPPacket::getConnection(), sdk_assert, sdk_sanity_check_null_ptr(), and TS_SUCCESS.
Referenced by handle_callbacks().
tsapi INKUDPPacket INKUDPPacketCreate | ( | ) |
Definition at line 418 of file InkIOCoreAPI.cc.
References new_UDPPacket().
tsapi void INKUDPPacketDestroy | ( | INKUDPPacket | packet | ) |
Definition at line 461 of file InkIOCoreAPI.cc.
References UDPPacket::free(), sdk_assert, sdk_sanity_check_null_ptr(), and TS_SUCCESS.
Referenced by handle_callbacks(), and UDPClient_handle_callbacks().
tsapi unsigned int INKUDPPacketFromAddressGet | ( | INKUDPPacket | packet | ) |
Definition at line 434 of file InkIOCoreAPI.cc.
References ats_ip4_addr_cast(), UDPPacket::from, sdk_assert, sdk_sanity_check_null_ptr(), and TS_SUCCESS.
Referenced by handle_callbacks().
tsapi int INKUDPPacketFromPortGet | ( | INKUDPPacket | packet | ) |
Definition at line 443 of file InkIOCoreAPI.cc.
References ats_ip_port_host_order(), UDPPacket::from, sdk_assert, sdk_sanity_check_null_ptr(), and TS_SUCCESS.
Referenced by handle_callbacks().
tsapi INKUDPPacket INKUDPPacketGet | ( | INKUDPacketQueue | queuep | ) |
Definition at line 472 of file InkIOCoreAPI.cc.
References Queue< C, L >::pop().
Referenced by handle_callbacks(), and UDPClient_handle_callbacks().
tsapi TSAction INKUDPRecvFrom | ( | TSCont | contp, | |
INKUDPConn | udp | |||
) |
Definition at line 400 of file InkIOCoreAPI.cc.
References FORCE_PLUGIN_MUTEX, UDPConnection::recv(), sdk_assert, sdk_sanity_check_continuation(), and TS_SUCCESS.
Referenced by handle_callbacks(), and UDPClient_handle_callbacks().
tsapi TSAction INKUDPSendTo | ( | TSCont | contp, | |
INKUDPConn | udp, | |||
unsigned int | ip, | |||
int | port, | |||
char * | buf, | |||
int | len | |||
) |
Referenced by handle_callbacks(), and UDPClient_handle_callbacks().
TSReturnCode sdk_sanity_check_hostlookup_structure | ( | TSHostLookupResult | ) |
Definition at line 69 of file InkIOCoreAPI.cc.
Referenced by TSHostLookupResultAddrGet().
TSReturnCode sdk_sanity_check_iocore_structure | ( | void * | ) |
Definition at line 78 of file InkIOCoreAPI.cc.
Referenced by TSAIORead(), TSAIOWrite(), TSCacheKeyDigestSet(), TSCacheRead(), TSCacheRemove(), TSCacheScan(), TSCacheWrite(), TSContDataGet(), TSContDataSet(), TSContDestroy(), TSContMutexGet(), TSContSchedule(), TSContScheduleEvery(), TSHttpHdrPrint(), TSHttpSchedule(), TSIOBufferBlockDataSizeGet(), TSIOBufferBlockDestroy(), TSIOBufferBlockNext(), TSIOBufferBlockReadAvail(), TSIOBufferBlockReadStart(), TSIOBufferBlockWriteAvail(), TSIOBufferBlockWriteStart(), TSIOBufferCopy(), TSIOBufferCreate(), TSIOBufferDestroy(), TSIOBufferProduce(), TSIOBufferReaderAlloc(), TSIOBufferReaderAvail(), TSIOBufferReaderClone(), TSIOBufferReaderConsume(), TSIOBufferReaderFree(), TSIOBufferReaderStart(), TSIOBufferSizedCreate(), TSIOBufferStart(), TSIOBufferWaterMarkGet(), TSIOBufferWaterMarkSet(), TSIOBufferWrite(), TSMgmtUpdateRegister(), TSMimeHdrPrint(), TSNetVConnLocalAddrGet(), TSNetVConnRemoteAddrGet(), TSTextLogObjectDestroy(), TSTextLogObjectFlush(), TSTextLogObjectHeaderSet(), TSTextLogObjectRollingEnabledSet(), TSTextLogObjectRollingIntervalSecSet(), TSTextLogObjectRollingOffsetHrSet(), TSTextLogObjectWrite(), TSThreadDestroy(), TSTransformOutputVConnGet(), TSUrlPrint(), TSVConnAbort(), TSVConnActiveTimeoutCancel(), TSVConnActiveTimeoutSet(), TSVConnCacheHttpInfoSet(), TSVConnCacheObjectSizeGet(), TSVConnClose(), TSVConnClosedGet(), TSVConnInactivityTimeoutCancel(), TSVConnInactivityTimeoutSet(), TSVConnRead(), TSVConnReadVIOGet(), TSVConnShutdown(), TSVConnWrite(), TSVConnWriteVIOGet(), TSVIOBufferGet(), TSVIOContGet(), TSVIOMutexGet(), TSVIONBytesGet(), TSVIONBytesSet(), TSVIONDoneGet(), TSVIONDoneSet(), TSVIONTodoGet(), TSVIOReaderGet(), TSVIOReenable(), and TSVIOVConnGet().
TSReturnCode sdk_sanity_check_mutex | ( | TSMutex | ) |
Definition at line 52 of file InkIOCoreAPI.cc.
References RefCountObj::m_refcount, and ProxyMutex::nthread_holding.
Referenced by TSContCreate(), TSMutexCreate(), TSMutexCreateInternal(), TSMutexLock(), TSMutexLockTry(), TSMutexUnlock(), and TSVConnCreate().
tsapi int64_t TSIOBufferBlockDataSizeGet | ( | TSIOBufferBlock | blockp | ) |
Definition at line 598 of file InkIOCoreAPI.cc.
References IOBufferBlock::read_avail(), sdk_assert, sdk_sanity_check_iocore_structure(), and TS_SUCCESS.
tsapi void TSIOBufferBlockDestroy | ( | TSIOBufferBlock | blockp | ) |
Definition at line 579 of file InkIOCoreAPI.cc.
References IOBufferBlock::free(), sdk_assert, sdk_sanity_check_iocore_structure(), and TS_SUCCESS.
tsapi void TSIOBufferReaderCopy | ( | TSIOBufferReader | readerp, | |
const void * | buf, | |||
int64_t | length | |||
) |
Definition at line 561 of file InkIOCoreAPI.cc.
References IOBufferReader::memcpy().
Referenced by SDK_API_TSIOBufferCopy().
tsapi int TSMutexCheck | ( | TSMutex | mutex | ) |
Definition at line 209 of file InkIOCoreAPI.cc.
References RefCountObj::m_refcount, and ProxyMutex::nthread_holding.
tsapi TSMutex TSMutexCreateInternal | ( | void | ) |
Definition at line 197 of file InkIOCoreAPI.cc.
References new_ProxyMutex(), sdk_assert, sdk_sanity_check_mutex(), and TS_SUCCESS.