Net subsystem. More...
#include "I_Version.h"
#include "I_EventSystem.h"
#include <netinet/in.h>
#include "I_NetVConnection.h"
#include "I_NetProcessor.h"
#include "I_SessionAccept.h"
Go to the source code of this file.
Defines | |
#define | NET_SYSTEM_MODULE_MAJOR_VERSION 1 |
#define | NET_SYSTEM_MODULE_MINOR_VERSION 0 |
#define | NET_SYSTEM_MODULE_VERSION |
#define | NET_EVENT_OPEN (NET_EVENT_EVENTS_START) |
#define | NET_EVENT_OPEN_FAILED (NET_EVENT_EVENTS_START+1) |
#define | NET_EVENT_ACCEPT (NET_EVENT_EVENTS_START+2) |
#define | NET_EVENT_ACCEPT_SUCCEED (NET_EVENT_EVENTS_START+3) |
#define | NET_EVENT_ACCEPT_FAILED (NET_EVENT_EVENTS_START+4) |
#define | NET_EVENT_CANCEL (NET_EVENT_EVENTS_START+5) |
#define | NET_EVENT_DATAGRAM_READ_COMPLETE (NET_EVENT_EVENTS_START+6) |
#define | NET_EVENT_DATAGRAM_READ_ERROR (NET_EVENT_EVENTS_START+7) |
#define | NET_EVENT_DATAGRAM_WRITE_COMPLETE (NET_EVENT_EVENTS_START+8) |
#define | NET_EVENT_DATAGRAM_WRITE_ERROR (NET_EVENT_EVENTS_START+9) |
#define | NET_EVENT_DATAGRAM_READ_READY (NET_EVENT_EVENTS_START+10) |
#define | NET_EVENT_DATAGRAM_OPEN (NET_EVENT_EVENTS_START+11) |
#define | NET_EVENT_DATAGRAM_ERROR (NET_EVENT_EVENTS_START+12) |
#define | NET_EVENT_ACCEPT_INTERNAL (NET_EVENT_EVENTS_START+22) |
#define | NET_EVENT_CONNECT_INTERNAL (NET_EVENT_EVENTS_START+23) |
#define | MAIN_ACCEPT_PORT -1 |
#define | ET_NET ET_CALL |
Functions | |
void | ink_net_init (ModuleVersion version) |
Variables | |
static int const | NO_FD = -1 |
int | net_config_poll_timeout |
Net subsystem.
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.
Net subsystem is a layer on top the operations sytem network apis. It provides an interface for accepting/creating new connection oriented (TCP) and connection less (UDP) connetions and for reading/writing data through these. The net system can manage 1000s of connections very efficiently. Another advantage of using the net system is that the SMs dont have be concerned about differences in the net apis of various operations systems.
SMs use the netProcessor global object of the Net System to create new connections or to accept incoming connections. When a new connection is created the SM gets a NetVConnection which is a handle for the underlying connections. The SM can then use the NetVConnection to get properties of the connection, read and write data. Net system also has socks and ssl support.
Definition in file I_Net.h.
#define ET_NET ET_CALL |
Definition at line 82 of file I_Net.h.
Referenced by UnixNetProcessor::accept_internal(), TransformTerminus::do_io_close(), INKVConnInternal::do_io_close(), TransformTerminus::do_io_read(), INKVConnInternal::do_io_read(), INKVConnInternal::do_io_shutdown(), TransformTerminus::do_io_write(), INKVConnInternal::do_io_write(), get_congest_entry(), get_congest_list(), Http2ConnectionState::main_event_handler(), TransformTerminus::reenable(), INKVConnInternal::reenable(), TransformTest::run(), ShowNet::showConnectionsOnThread(), ShowNet::showSingleThread(), spdy_cs_create(), UnixNetProcessor::start(), SSLNetProcessor::start(), ClusterHandler::startClusterEvent(), TSHttpSchedule(), TSHttpSsnReenable(), TSHttpTxnReenable(), and SSLNetProcessor::upgradeEtype().
#define NET_EVENT_ACCEPT (NET_EVENT_EVENTS_START+2) |
Definition at line 61 of file I_Net.h.
Referenced by LogCollationAccept::accept_event(), UnixNetVConnection::acceptEvent(), NetAccept::acceptFastEvent(), ClusterAccept::ClusterAcceptEvent(), event_int_to_string(), HttpDebugNames::get_event_name(), SocksProxy::init(), SSLNextProtocolTrampoline::ioCompletionEvent(), NetVCTest::main_handler(), SocksAccepter::mainEvent(), SocksProxy::mainEvent(), HttpSessionAccept::mainEvent(), Http2SessionAccept::mainEvent(), ssl_netvc_cast(), TestAccept::startEvent(), and PluginVCCore::state_send_accept().
#define NET_EVENT_ACCEPT_FAILED (NET_EVENT_EVENTS_START+4) |
Definition at line 63 of file I_Net.h.
Referenced by NetAccept::do_listen(), event_int_to_string(), and PluginVCCore::state_send_accept_failed().
#define NET_EVENT_ACCEPT_INTERNAL (NET_EVENT_EVENTS_START+22) |
#define NET_EVENT_ACCEPT_SUCCEED (NET_EVENT_EVENTS_START+3) |
Definition at line 62 of file I_Net.h.
Referenced by NetAccept::do_listen(), and event_int_to_string().
#define NET_EVENT_CONNECT_INTERNAL (NET_EVENT_EVENTS_START+23) |
#define NET_EVENT_DATAGRAM_ERROR (NET_EVENT_EVENTS_START+12) |
Definition at line 71 of file I_Net.h.
Referenced by UnixUDPConnection::callbackHandler(), and UDPNetProcessor::UDPBind().
#define NET_EVENT_DATAGRAM_OPEN (NET_EVENT_EVENTS_START+11) |
Definition at line 70 of file I_Net.h.
Referenced by UDPNetProcessor::UDPBind().
#define NET_EVENT_DATAGRAM_READ_COMPLETE (NET_EVENT_EVENTS_START+6) |
Definition at line 65 of file I_Net.h.
Referenced by ICPPeerReadCont::ICPPeerReadEvent(), UDPReadContinuation::readPollEvent(), and UDPNetProcessor::recvfrom_re().
#define NET_EVENT_DATAGRAM_READ_ERROR (NET_EVENT_EVENTS_START+7) |
Definition at line 66 of file I_Net.h.
Referenced by ICPPeerReadCont::ICPPeerReadEvent(), UDPReadContinuation::readPollEvent(), and UDPNetProcessor::recvfrom_re().
#define NET_EVENT_DATAGRAM_READ_READY (NET_EVENT_EVENTS_START+10) |
Definition at line 69 of file I_Net.h.
Referenced by UnixUDPConnection::callbackHandler().
#define NET_EVENT_DATAGRAM_WRITE_COMPLETE (NET_EVENT_EVENTS_START+8) |
Definition at line 67 of file I_Net.h.
Referenced by PrefetchBlaster::blastObject(), ICPPeerReadCont::ICPPeerReadEvent(), ICPRequestCont::ICPRequestEvent(), UDPNetProcessor::sendmsg_re(), and PrefetchUrlBlaster::udpUrlBlaster().
#define NET_EVENT_DATAGRAM_WRITE_ERROR (NET_EVENT_EVENTS_START+9) |
Definition at line 68 of file I_Net.h.
Referenced by PrefetchBlaster::blastObject(), ICPPeerReadCont::ICPPeerReadEvent(), ICPRequestCont::ICPRequestEvent(), UDPNetProcessor::sendmsg_re(), and PrefetchUrlBlaster::udpUrlBlaster().
#define NET_EVENT_OPEN (NET_EVENT_EVENTS_START) |
Definition at line 59 of file I_Net.h.
Referenced by TestProxy::cacheSendGetEvent(), PluginVCCore::connect_re(), ClusterHandler::connectClusterEvent(), TestProxy::connectEvent(), UnixNetVConnection::connectUp(), event_int_to_string(), SocksEntry::free(), HttpDebugNames::get_event_name(), CheckConnect::handle_connect(), KeepAliveConn::handleEvent(), PrefetchBlaster::httpClient(), SocksProxy::mainEvent(), SocksEntry::mainEvent(), ObjectReloadCont::ObjectReloadEvent(), SocksEntry::startEvent(), HttpSM::state_http_server_open(), and HttpSM::state_raw_http_server_open().
#define NET_EVENT_OPEN_FAILED (NET_EVENT_EVENTS_START+1) |
Definition at line 60 of file I_Net.h.
Referenced by CheckConnect::connect_s(), UnixNetVConnection::connectUp(), event_int_to_string(), SocksEntry::free(), HttpDebugNames::get_event_name(), CheckConnect::handle_connect(), KeepAliveConn::handleEvent(), PrefetchBlaster::httpClient(), SocksProxy::mainEvent(), SocksEntry::mainEvent(), RecursiveHttpGet::RecursiveHttpGetEvent(), HttpSM::state_http_server_open(), and HttpSM::state_raw_http_server_open().
#define NET_SYSTEM_MODULE_VERSION |
makeModuleVersion( \ NET_SYSTEM_MODULE_MAJOR_VERSION, \ NET_SYSTEM_MODULE_MINOR_VERSION, \ PUBLIC_MODULE_HEADER)
Definition at line 50 of file I_Net.h.
Referenced by ink_net_init().
void ink_net_init | ( | ModuleVersion | version | ) |
Definition at line 117 of file Net.cc.
References checkModuleVersion(), configure_net(), ink_release_assert, Net_Stat_Count, NET_SYSTEM_MODULE_VERSION, RecAllocateRawStatBlock(), and register_net_stats().
Referenced by main().
int const NO_FD = -1 [static] |
Definition at line 55 of file I_Net.h.
Referenced by NetProcessor::accept(), DNSConnection::close(), Connection::close(), ClusterAccept::ClusterAcceptEvent(), Connection::connect(), DNSConnection::connect(), UnixNetProcessor::connect_re_internal(), UnixNetVConnection::connectUp(), NetAccept::do_listen(), UnixNetVConnection::free(), SSLNetVConnection::free(), Log::init(), Server::listen(), main(), net_accept(), Connection::open(), DNSHandler::open_con(), HttpProxyPort::print(), Server::setup_fd_for_listen(), Connection::setup_mc_receive(), Connection::setup_mc_send(), start_HttpProxyServerBackDoor(), start_SocksProxy(), UnixNetVConnection::startEvent(), TSVConnFdCreate(), UDPNetProcessor::UDPBind(), LogCollationAccept::~LogCollationAccept(), and UnixUDPConnection::~UnixUDPConnection().