wccp.cc File Reference
#include "squid.h"
#include "comm.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "event.h"
#include "fatal.h"
#include "SquidConfig.h"
#include "wccp.h"
Include dependency graph for wccp.cc:

Go to the source code of this file.

Classes

struct  wccp_here_i_am_t
 
struct  wccp_cache_entry_t
 
struct  wccp_i_see_you_t
 
struct  wccp_assign_bucket_t
 

Macros

#define WCCP_PORT   2048
 
#define WCCP_REVISION   0
 
#define WCCP_ACTIVE_CACHES   32
 
#define WCCP_HASH_SIZE   32
 
#define WCCP_BUCKETS   256
 
#define WCCP_CACHE_LEN   4
 
#define WCCP_HERE_I_AM   7
 
#define WCCP_I_SEE_YOU   8
 
#define WCCP_ASSIGN_BUCKET   9
 

Functions

static int wccpLowestIP (void)
 
static void wccpAssignBuckets (void)
 
void wccpInit (void)
 
void wccpConnectionOpen (void)
 
void wccpConnectionClose (void)
 
static void wccpHandleUdp (int sock, void *)
 
static void wccpHereIam (void *)
 

Variables

static int theWccpConnection = -1
 
static struct wccp_here_i_am_t wccp_here_i_am
 
static struct wccp_i_see_you_t wccp_i_see_you
 
static int last_change
 
static int last_id
 
static int last_assign_buckets_change
 
static unsigned int number_caches
 
static Ip::Address local_ip
 
static PF wccpHandleUdp
 
static EVH wccpHereIam
 

Macro Definition Documentation

◆ WCCP_ACTIVE_CACHES

#define WCCP_ACTIVE_CACHES   32

Definition at line 24 of file wccp.cc.

◆ WCCP_ASSIGN_BUCKET

#define WCCP_ASSIGN_BUCKET   9

Definition at line 31 of file wccp.cc.

◆ WCCP_BUCKETS

#define WCCP_BUCKETS   256

Definition at line 26 of file wccp.cc.

◆ WCCP_CACHE_LEN

#define WCCP_CACHE_LEN   4

Definition at line 27 of file wccp.cc.

◆ WCCP_HASH_SIZE

#define WCCP_HASH_SIZE   32

Definition at line 25 of file wccp.cc.

◆ WCCP_HERE_I_AM

#define WCCP_HERE_I_AM   7

Definition at line 29 of file wccp.cc.

◆ WCCP_I_SEE_YOU

#define WCCP_I_SEE_YOU   8

Definition at line 30 of file wccp.cc.

◆ WCCP_PORT

#define WCCP_PORT   2048

Definition at line 22 of file wccp.cc.

◆ WCCP_REVISION

#define WCCP_REVISION   0

Definition at line 23 of file wccp.cc.

Function Documentation

◆ wccpAssignBuckets()

◆ wccpConnectionClose()

void wccpConnectionClose ( void  )

Definition at line 161 of file wccp.cc.

References comm_close, DBG_IMPORTANT, debugs, and theWccpConnection.

Referenced by serverConnectionsClose(), and SquidShutdown().

◆ wccpConnectionOpen()

◆ wccpHandleUdp()

◆ wccpHereIam()

static void wccpHereIam ( void *  )
static

◆ wccpInit()

◆ wccpLowestIP()

static int wccpLowestIP ( void  )
static

Variable Documentation

◆ last_assign_buckets_change

int last_assign_buckets_change
static

Definition at line 72 of file wccp.cc.

Referenced by wccpHandleUdp(), and wccpInit().

◆ last_change

int last_change
static

Definition at line 70 of file wccp.cc.

Referenced by wccpAssignBuckets(), wccpHandleUdp(), and wccpInit().

◆ last_id

int last_id
static

Definition at line 71 of file wccp.cc.

Referenced by wccpHandleUdp(), wccpHereIam(), and wccpInit().

◆ local_ip

Ip::Address local_ip
static

Definition at line 75 of file wccp.cc.

Referenced by wccpConnectionOpen(), and wccpLowestIP().

◆ number_caches

unsigned int number_caches
static

Definition at line 73 of file wccp.cc.

Referenced by wccpAssignBuckets(), wccpHandleUdp(), and wccpInit().

◆ theWccpConnection

int theWccpConnection = -1
static

Definition at line 65 of file wccp.cc.

Referenced by wccpAssignBuckets(), wccpConnectionClose(), wccpConnectionOpen(), and wccpHereIam().

◆ wccp_here_i_am

struct wccp_here_i_am_t wccp_here_i_am
static

Definition at line 67 of file wccp.cc.

Referenced by wccpHereIam(), and wccpInit().

◆ wccp_i_see_you

struct wccp_i_see_you_t wccp_i_see_you
static

Definition at line 69 of file wccp.cc.

Referenced by wccpAssignBuckets(), wccpHandleUdp(), and wccpLowestIP().

◆ wccpHandleUdp

PF wccpHandleUdp
static

Definition at line 77 of file wccp.cc.

Referenced by wccpConnectionOpen(), and wccpHandleUdp().

◆ wccpHereIam

EVH wccpHereIam
static

Definition at line 79 of file wccp.cc.

Referenced by wccpHereIam(), and wccpInit().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors