• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

P_Net.h

Go to the documentation of this file.
00001 /** @file
00002 
00003   A brief file description
00004 
00005   @section license License
00006 
00007   Licensed to the Apache Software Foundation (ASF) under one
00008   or more contributor license agreements.  See the NOTICE file
00009   distributed with this work for additional information
00010   regarding copyright ownership.  The ASF licenses this file
00011   to you under the Apache License, Version 2.0 (the
00012   "License"); you may not use this file except in compliance
00013   with the License.  You may obtain a copy of the License at
00014 
00015       http://www.apache.org/licenses/LICENSE-2.0
00016 
00017   Unless required by applicable law or agreed to in writing, software
00018   distributed under the License is distributed on an "AS IS" BASIS,
00019   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00020   See the License for the specific language governing permissions and
00021   limitations under the License.
00022  */
00023 
00024 /****************************************************************************
00025 
00026   Net Subsystem
00027 
00028 
00029 **************************************************************************/
00030 #ifndef __P_NET_H__
00031 #define __P_NET_H__
00032 
00033 // Net Stats
00034 
00035 enum Net_Stats
00036 {
00037   net_handler_run_stat,
00038   net_read_bytes_stat,
00039   net_write_bytes_stat,
00040   net_connections_currently_open_stat,
00041   net_accepts_currently_open_stat,
00042   net_calls_to_readfromnet_stat,
00043   net_calls_to_readfromnet_afterpoll_stat,
00044   net_calls_to_read_stat,
00045   net_calls_to_read_nodata_stat,
00046   net_calls_to_writetonet_stat,
00047   net_calls_to_writetonet_afterpoll_stat,
00048   net_calls_to_write_stat,
00049   net_calls_to_write_nodata_stat,
00050   socks_connections_successful_stat,
00051   socks_connections_unsuccessful_stat,
00052   socks_connections_currently_open_stat,
00053   inactivity_cop_lock_acquire_failure_stat,
00054   Net_Stat_Count
00055 };
00056 
00057 struct RecRawStatBlock;
00058 extern RecRawStatBlock *net_rsb;
00059 #define SSL_HANDSHAKE_WANT_READ   6
00060 #define SSL_HANDSHAKE_WANT_WRITE  7
00061 #define SSL_HANDSHAKE_WANT_ACCEPT 8
00062 #define SSL_HANDSHAKE_WANT_CONNECT 9
00063 
00064 #define NET_DEBUG_COUNT_DYN_STAT(_x, _y) \
00065 RecIncrRawStatCount(net_rsb, mutex->thread_holding, (int)_x, _y)
00066 
00067 #define NET_INCREMENT_DYN_STAT(_x)  \
00068 RecIncrRawStatSum(net_rsb, mutex->thread_holding, (int)_x, 1)
00069 
00070 #define NET_DECREMENT_DYN_STAT(_x) \
00071 RecIncrRawStatSum(net_rsb, mutex->thread_holding, (int)_x, -1)
00072 
00073 #define NET_SUM_DYN_STAT(_x, _r) \
00074 RecIncrRawStatSum(net_rsb, mutex->thread_holding, (int)_x, _r)
00075 
00076 #define NET_READ_DYN_SUM(_x, _sum)  RecGetRawStatSum(net_rsb, (int)_x, &_sum)
00077 
00078 #define NET_READ_DYN_STAT(_x, _count, _sum) do {\
00079 RecGetRawStatSum(net_rsb, (int)_x, &_sum);          \
00080 RecGetRawStatCount(net_rsb, (int)_x, &_count);         \
00081 } while (0)
00082 
00083 #define NET_CLEAR_DYN_STAT(x) \
00084 do { \
00085         RecSetRawStatSum(net_rsb, x, 0); \
00086         RecSetRawStatCount(net_rsb, x, 0); \
00087 } while (0);
00088 
00089 // For global access
00090 #define NET_SUM_GLOBAL_DYN_STAT(_x, _r) RecIncrGlobalRawStatSum(net_rsb, (_x), (_r))
00091 #define NET_READ_GLOBAL_DYN_SUM(_x, _sum) RecGetGlobalRawStatSum(net_rsb, _x, &_sum)
00092 
00093 #include "libts.h"
00094 #include "P_EventSystem.h"
00095 #include "I_Net.h"
00096 #include "P_NetVConnection.h"
00097 #include "P_UnixNet.h"
00098 #include "P_UnixNetProcessor.h"
00099 #include "P_NetAccept.h"
00100 #include "P_UnixNetVConnection.h"
00101 #include "P_UnixPollDescriptor.h"
00102 #include "P_Socks.h"
00103 #include "P_CompletionUtil.h"
00104 #include "P_NetVCTest.h"
00105 #include "P_LibBulkIO.h"
00106 
00107 #include "P_SSLNetVConnection.h"
00108 #include "P_SSLNetProcessor.h"
00109 #include "P_SSLNetAccept.h"
00110 #include "P_SSLCertLookup.h"
00111 
00112 #undef  NET_SYSTEM_MODULE_VERSION
00113 #define NET_SYSTEM_MODULE_VERSION makeModuleVersion(                    \
00114                                        NET_SYSTEM_MODULE_MAJOR_VERSION, \
00115                                        NET_SYSTEM_MODULE_MINOR_VERSION, \
00116                                        PRIVATE_MODULE_HEADER)
00117 
00118 // For very verbose iocore debugging.
00119 #ifndef DEBUG
00120 #define NetDebug if (0) dummy_debug
00121 #else
00122 #define NetDebug Debug
00123 #endif
00124 
00125 /// Default amount of buffer space to use for the initial read on an incoming connection.
00126 /// This is an IOBufferBlock index, not the size in bytes.
00127 static size_t const CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX = BUFFER_SIZE_INDEX_4K;
00128 
00129 #endif

Generated by  doxygen 1.7.1