Data Structures | Defines | Typedefs | Enumerations | Functions | Variables

P_UnixNet.h File Reference

A brief file description. More...

#include "libts.h"
#include "P_UnixNetProcessor.h"
#include "P_UnixNetVConnection.h"
#include "P_NetAccept.h"
#include "P_DNSConnection.h"
#include "P_UnixUDPConnection.h"
#include "P_UnixPollDescriptor.h"
Include dependency graph for P_UnixNet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EventIO
struct  PollCont
class  NetHandler

Defines

#define USE_EDGE_TRIGGER_EPOLL   1
#define USE_EDGE_TRIGGER_KQUEUE   1
#define USE_EDGE_TRIGGER_PORT   1
#define EVENTIO_NETACCEPT   1
#define EVENTIO_READWRITE_VC   2
#define EVENTIO_DNS_CONNECTION   3
#define EVENTIO_UDP_CONNECTION   4
#define EVENTIO_ASYNC_SIGNAL   5
#define THROTTLE_FD_HEADROOM   (128 + 64)
#define TRANSIENT_ACCEPT_ERROR_MESSAGE_EVERY   HRTIME_HOURS(24)
#define NET_RETRY_DELAY   HRTIME_MSECONDS(10)
#define THROTTLE_AT_ONCE   5
#define EMERGENCY_THROTTLE   16
#define HYPER_EMERGENCY_THROTTLE   6
#define NET_THROTTLE_ACCEPT_HEADROOM   1.1
#define NET_THROTTLE_CONNECT_HEADROOM   1.0
#define NET_THROTTLE_MESSAGE_EVERY   HRTIME_MINUTES(10)
#define NET_PERIOD   -HRTIME_MSECONDS(5)
#define ACCEPT_PERIOD   -HRTIME_MSECONDS(4)
#define NET_THROTTLE_DELAY   50
#define PRINT_IP(x)   ((uint8_t*)&(x))[0],((uint8_t*)&(x))[1], ((uint8_t*)&(x))[2],((uint8_t*)&(x))[3]

Typedefs

typedef PollDescriptorEventLoop
typedef int(NetHandler::* NetContHandler )(int, void *)
typedef unsigned int uint32

Enumerations

enum  ThrottleType { ACCEPT, CONNECT }

Functions

unsigned int net_next_connection_number ()
static NetHandlerget_NetHandler (EThread *t)
static PollContget_PollCont (EThread *t)
static PollDescriptorget_PollDescriptor (EThread *t)
TS_INLINE int net_connections_to_throttle (ThrottleType t)
TS_INLINE void check_shedding_warning ()
TS_INLINE int emergency_throttle (ink_hrtime now)
TS_INLINE int check_net_throttle (ThrottleType t, ink_hrtime now)
TS_INLINE void check_throttle_warning ()
TS_INLINE int check_emergency_throttle (Connection &con)
TS_INLINE int change_net_connections_throttle (const char *token, RecDataT data_type, RecData value, void *data)
TS_INLINE int accept_error_seriousness (int res)
TS_INLINE void check_transient_accept_error (int res)
static void read_disable (NetHandler *nh, UnixNetVConnection *vc)
static void write_disable (NetHandler *nh, UnixNetVConnection *vc)

Variables

ink_hrtime last_throttle_warning
ink_hrtime last_shedding_warning
ink_hrtime emergency_throttle_time
int net_connections_throttle
int fds_throttle
int fds_limit
ink_hrtime last_transient_accept_error
int http_accept_port_number

Detailed Description

A brief file description.

License

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 P_UnixNet.h.


Define Documentation

#define ACCEPT_PERIOD   -HRTIME_MSECONDS(4)

Definition at line 156 of file P_UnixNet.h.

#define EMERGENCY_THROTTLE   16

Definition at line 149 of file P_UnixNet.h.

#define EVENTIO_ASYNC_SIGNAL   5

Definition at line 38 of file P_UnixNet.h.

Referenced by NetHandler::mainNetEvent().

#define EVENTIO_DNS_CONNECTION   3

Definition at line 36 of file P_UnixNet.h.

Referenced by EventIO::close(), and NetHandler::mainNetEvent().

#define EVENTIO_NETACCEPT   1

Definition at line 34 of file P_UnixNet.h.

Referenced by EventIO::close().

#define EVENTIO_READWRITE_VC   2

Definition at line 35 of file P_UnixNet.h.

Referenced by EventIO::close(), and NetHandler::mainNetEvent().

#define EVENTIO_UDP_CONNECTION   4

Definition at line 37 of file P_UnixNet.h.

#define HYPER_EMERGENCY_THROTTLE   6

Definition at line 150 of file P_UnixNet.h.

#define NET_PERIOD   -HRTIME_MSECONDS(5)

Definition at line 155 of file P_UnixNet.h.

Referenced by NetHandler::startNetEvent().

#define NET_RETRY_DELAY   HRTIME_MSECONDS(10)
#define NET_THROTTLE_ACCEPT_HEADROOM   1.1

Definition at line 152 of file P_UnixNet.h.

Referenced by net_connections_to_throttle().

#define NET_THROTTLE_CONNECT_HEADROOM   1.0

Definition at line 153 of file P_UnixNet.h.

#define NET_THROTTLE_DELAY   50

Definition at line 157 of file P_UnixNet.h.

Referenced by NetAccept::do_blocking_accept(), and send_throttle_message().

#define NET_THROTTLE_MESSAGE_EVERY   HRTIME_MINUTES(10)

Definition at line 154 of file P_UnixNet.h.

Referenced by check_shedding_warning(), and check_throttle_warning().

#define PRINT_IP (   x  )     ((uint8_t*)&(x))[0],((uint8_t*)&(x))[1], ((uint8_t*)&(x))[2],((uint8_t*)&(x))[3]

Definition at line 159 of file P_UnixNet.h.

Referenced by ShowHostDB::showLookupDone().

#define THROTTLE_AT_ONCE   5

Definition at line 148 of file P_UnixNet.h.

Referenced by send_throttle_message().

#define THROTTLE_FD_HEADROOM   (128 + 64)

Definition at line 142 of file P_UnixNet.h.

Referenced by adjust_sys_settings(), and check_fd_limit().

#define TRANSIENT_ACCEPT_ERROR_MESSAGE_EVERY   HRTIME_HOURS(24)

Definition at line 144 of file P_UnixNet.h.

Referenced by check_transient_accept_error().

#define USE_EDGE_TRIGGER_EPOLL   1

Definition at line 29 of file P_UnixNet.h.

#define USE_EDGE_TRIGGER_KQUEUE   1

Definition at line 30 of file P_UnixNet.h.

#define USE_EDGE_TRIGGER_PORT   1

Definition at line 31 of file P_UnixNet.h.


Typedef Documentation

Definition at line 72 of file P_UnixNet.h.

typedef int(NetHandler::* NetContHandler)(int, void *)

Definition at line 122 of file P_UnixNet.h.

typedef unsigned int uint32

Definition at line 123 of file P_UnixNet.h.


Enumeration Type Documentation

Enumerator:
ACCEPT 
CONNECT 

Definition at line 225 of file P_UnixNet.h.


Function Documentation

TS_INLINE int accept_error_seriousness ( int  res  ) 

Definition at line 336 of file P_UnixNet.h.

References ink_assert.

Referenced by NetAccept::acceptFastEvent(), and NetAccept::do_blocking_accept().

TS_INLINE int change_net_connections_throttle ( const char *  token,
RecDataT  data_type,
RecData  value,
void *  data 
)

Definition at line 314 of file P_UnixNet.h.

References fds_limit, fds_throttle, and net_connections_throttle.

Referenced by configure_net(), and UnixNetProcessor::start().

TS_INLINE int check_emergency_throttle ( Connection con  ) 
TS_INLINE int check_net_throttle ( ThrottleType  t,
ink_hrtime  now 
)
TS_INLINE void check_shedding_warning (  ) 
TS_INLINE void check_throttle_warning (  ) 
TS_INLINE void check_transient_accept_error ( int  res  ) 
TS_INLINE int emergency_throttle ( ink_hrtime  now  ) 

Definition at line 254 of file P_UnixNet.h.

References emergency_throttle_time.

Referenced by check_net_throttle().

static NetHandler* get_NetHandler ( EThread t  )  [inline, static]
static PollCont* get_PollCont ( EThread t  )  [inline, static]
static PollDescriptor* get_PollDescriptor ( EThread t  )  [inline, static]
TS_INLINE int net_connections_to_throttle ( ThrottleType  t  ) 
unsigned int net_next_connection_number (  ) 
static void read_disable ( NetHandler nh,
UnixNetVConnection vc 
) [inline, static]
static void write_disable ( NetHandler nh,
UnixNetVConnection vc 
) [inline, static]

Variable Documentation

Definition at line 28 of file UnixNet.cc.

Referenced by check_emergency_throttle(), and emergency_throttle().

int fds_limit

Definition at line 54 of file LogStandalone.cc.

Definition at line 27 of file UnixNet.cc.

Referenced by check_shedding_warning().

Definition at line 26 of file UnixNet.cc.

Referenced by check_throttle_warning().

Definition at line 32 of file UnixNet.cc.

Referenced by check_transient_accept_error().

Definition at line 29 of file UnixNet.cc.

Referenced by change_net_connections_throttle(), and check_net_throttle().