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

Congestion.h File Reference

A brief file description. More...

#include "libts.h"
#include "P_EventSystem.h"
#include "ControlBase.h"
#include "ControlMatcher.h"
#include "CongestionStats.h"
Include dependency graph for Congestion.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CongestionControlRule
class  CongestionControlRecord
struct  FailHistory
struct  CongestionEntry

Defines

#define CONGESTION_EVENT_CONGESTED_ON_M   (CONGESTION_EVENT_EVENTS_START + 1)
#define CONGESTION_EVENT_CONGESTED_ON_F   (CONGESTION_EVENT_EVENTS_START + 2)
#define CONGESTION_EVENT_CONGESTED_LIST_DONE   (CONGESTION_EVENT_EVENTS_START + 3)
#define CONGESTION_EVENT_CONTROL_LOOKUP_DONE   (CONGESTION_EVENT_EVENTS_START + 4)
#define CONG_HIST_ENTRIES   17

Typedefs

typedef unsigned short cong_hist_t

Enumerations

enum  { PER_IP, PER_HOST }

Functions

void initCongestionControl ()
CongestionControlRecordCongestionControlled (RequestData *rdata)
uint64_t make_key (char *hostname, int len, sockaddr const *ip, CongestionControlRecord *record)
uint64_t make_key (char *hostname, sockaddr const *ip, CongestionControlRecord *record)
uint64_t make_key (char *hostname, int len, sockaddr const *ip, char *prefix, int prelen, short port=0)
Actionget_congest_entry (Continuation *cont, HttpRequestData *data, CongestionEntry **ppEntry)
Actionget_congest_list (Continuation *cont, MIOBuffer *buffer, int format)
void remove_congested_entry (uint64_t key)
void remove_all_congested_entry (void)
void remove_congested_entry (char *buf, MIOBuffer *out_buffer)

Variables

InkRand CongestionRand
int congestionControlEnabled
int congestionControlLocalTime

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


Define Documentation

#define CONG_HIST_ENTRIES   17
#define CONGESTION_EVENT_CONGESTED_LIST_DONE   (CONGESTION_EVENT_EVENTS_START + 3)

Definition at line 42 of file Congestion.h.

Referenced by CongestionDBCont::get_congest_list().

#define CONGESTION_EVENT_CONGESTED_ON_F   (CONGESTION_EVENT_EVENTS_START + 2)
#define CONGESTION_EVENT_CONGESTED_ON_M   (CONGESTION_EVENT_EVENTS_START + 1)
#define CONGESTION_EVENT_CONTROL_LOOKUP_DONE   (CONGESTION_EVENT_EVENTS_START + 4)

Typedef Documentation

typedef unsigned short cong_hist_t

Definition at line 171 of file Congestion.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
PER_IP 
PER_HOST 

Definition at line 49 of file Congestion.h.


Function Documentation

CongestionControlRecord* CongestionControlled ( RequestData rdata  ) 
Action* get_congest_entry ( Continuation cont,
HttpRequestData data,
CongestionEntry **  ppEntry 
)

Definition at line 468 of file CongestionDB.cc.

Referenced by HttpSM::do_congestion_control_lookup().

Action* get_congest_list ( Continuation cont,
MIOBuffer buffer,
int  format 
)

Definition at line 521 of file CongestionDB.cc.

void initCongestionControl (  ) 
uint64_t make_key ( char *  hostname,
sockaddr const *  ip,
CongestionControlRecord record 
)
uint64_t make_key ( char *  hostname,
int  len,
sockaddr const *  ip,
char *  prefix,
int  prelen,
short  port = 0 
)
uint64_t make_key ( char *  hostname,
int  len,
sockaddr const *  ip,
CongestionControlRecord record 
)
void remove_all_congested_entry ( void   ) 

Definition at line 565 of file CongestionDB.cc.

Referenced by remove_congested_entry().

void remove_congested_entry ( char *  buf,
MIOBuffer out_buffer 
)

Definition at line 591 of file CongestionDB.cc.

void remove_congested_entry ( uint64_t  key  ) 

Definition at line 573 of file CongestionDB.cc.

Referenced by remove_congested_entry().


Variable Documentation

Definition at line 94 of file Congestion.cc.

Referenced by initCongestionControl(), and CongestionEntry::sprint().