#include "squid.h"#include "base/RunnersRegistry.h"#include "comm.h"#include "comm/Connection.h"#include "comm/Loops.h"#include "compat/socket.h"#include "event.h"#include "fatal.h"#include "SquidConfig.h"#include "tools.h"
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 | 
| class | WccpRr | 
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) | 
| static void | wccpInit (void) | 
| static void | wccpConnectionOpen (void) | 
| static void | wccpConnectionClose (void) | 
| DefineRunnerRegistrator (WccpRr) | |
| 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
◆ WCCP_ASSIGN_BUCKET
◆ WCCP_BUCKETS
◆ WCCP_CACHE_LEN
◆ WCCP_HASH_SIZE
◆ WCCP_HERE_I_AM
◆ WCCP_I_SEE_YOU
◆ WCCP_PORT
◆ WCCP_REVISION
Function Documentation
◆ DefineRunnerRegistrator()
| DefineRunnerRegistrator | ( | WccpRr | ) | 
◆ wccpAssignBuckets()
      
  | 
  static | 
Definition at line 308 of file wccp.cc.
References assert, buckets, comm_udp_send(), debugs, wccp_i_see_you_t::id, wccp_assign_bucket_t::id, wccp_cache_entry_t::ip_addr, last_change, wccp_i_see_you_t::number, wccp_assign_bucket_t::number, number_caches, theWccpConnection, wccp_assign_bucket_t::type, WCCP_ACTIVE_CACHES, WCCP_ASSIGN_BUCKET, WCCP_BUCKETS, wccp_i_see_you_t::wccp_cache_entry, WCCP_CACHE_LEN, wccp_i_see_you, xfree, and xmalloc.
Referenced by wccpHandleUdp().
◆ wccpConnectionClose()
      
  | 
  static | 
Definition at line 161 of file wccp.cc.
References comm_close, DBG_IMPORTANT, debugs, IamPrimaryProcess(), and theWccpConnection.
Referenced by WccpRr::startReconfigure(), and WccpRr::startShutdown().
◆ wccpConnectionOpen()
      
  | 
  static | 
Definition at line 106 of file wccp.cc.
References SquidConfig::address, COMM_NONBLOCKING, comm_open_listener(), COMM_SELECT_READ, Config, DBG_CRITICAL, DBG_IMPORTANT, debugs, fatal(), Ip::Address::getSockAddr(), IamPrimaryProcess(), Ip::Address::isAnyAddr(), local_ip, Ip::Address::port(), SquidConfig::router, Ip::Address::setIPv4(), Comm::SetSelect(), theWccpConnection, SquidConfig::Wccp, WCCP_PORT, wccpHandleUdp, xconnect(), and xgetsockname().
Referenced by WccpRr::syncConfig(), and WccpRr::useConfig().
◆ wccpHandleUdp()
      
  | 
  static | 
Definition at line 191 of file wccp.cc.
References wccp_i_see_you_t::change, COMM_SELECT_READ, comm_udp_recvfrom(), Config, DBG_IMPORTANT, debugs, wccp_i_see_you_t::id, last_assign_buckets_change, last_change, last_id, wccp_i_see_you_t::number, number_caches, SquidConfig::router, Comm::SetSelect(), wccp_i_see_you_t::type, wccp_i_see_you_t::version, SquidConfig::version, SquidConfig::Wccp, WCCP_ACTIVE_CACHES, WCCP_I_SEE_YOU, wccp_i_see_you, wccpAssignBuckets(), wccpHandleUdp, and wccpLowestIP().
◆ wccpHereIam()
      
  | 
  static | 
Definition at line 288 of file wccp.cc.
References comm_udp_send(), debugs, eventAdd(), eventFind(), wccp_here_i_am_t::id, last_id, theWccpConnection, wccp_here_i_am, wccpHereIam, and xstrerr().
◆ wccpInit()
      
  | 
  static | 
Definition at line 85 of file wccp.cc.
References Config, debugs, eventAdd(), eventFind(), IamPrimaryProcess(), Ip::Address::isAnyAddr(), last_assign_buckets_change, last_change, last_id, number_caches, wccp_here_i_am_t::revision, SquidConfig::router, wccp_here_i_am_t::type, wccp_here_i_am_t::version, SquidConfig::version, SquidConfig::Wccp, WCCP_HERE_I_AM, wccp_here_i_am, WCCP_REVISION, and wccpHereIam.
Referenced by WccpRr::useConfig().
◆ wccpLowestIP()
      
  | 
  static | 
Definition at line 265 of file wccp.cc.
References assert, wccp_cache_entry_t::ip_addr, local_ip, wccp_i_see_you_t::number, WCCP_ACTIVE_CACHES, wccp_i_see_you_t::wccp_cache_entry, and wccp_i_see_you.
Referenced by wccpHandleUdp().
Variable Documentation
◆ last_assign_buckets_change
      
  | 
  static | 
Definition at line 74 of file wccp.cc.
Referenced by wccpHandleUdp(), and wccpInit().
◆ last_change
      
  | 
  static | 
Definition at line 72 of file wccp.cc.
Referenced by wccpAssignBuckets(), wccpHandleUdp(), and wccpInit().
◆ last_id
      
  | 
  static | 
Definition at line 73 of file wccp.cc.
Referenced by wccpHandleUdp(), wccpHereIam(), and wccpInit().
◆ local_ip
      
  | 
  static | 
Definition at line 77 of file wccp.cc.
Referenced by wccpConnectionOpen(), and wccpLowestIP().
◆ number_caches
      
  | 
  static | 
Definition at line 75 of file wccp.cc.
Referenced by wccpAssignBuckets(), wccpHandleUdp(), and wccpInit().
◆ theWccpConnection
      
  | 
  static | 
Definition at line 67 of file wccp.cc.
Referenced by wccpAssignBuckets(), wccpConnectionClose(), wccpConnectionOpen(), and wccpHereIam().
◆ wccp_here_i_am
      
  | 
  static | 
Definition at line 69 of file wccp.cc.
Referenced by wccpHereIam(), and wccpInit().
◆ wccp_i_see_you
      
  | 
  static | 
Definition at line 71 of file wccp.cc.
Referenced by wccpAssignBuckets(), wccpHandleUdp(), and wccpLowestIP().
◆ wccpHandleUdp
      
  | 
  static | 
Definition at line 79 of file wccp.cc.
Referenced by wccpConnectionOpen(), and wccpHandleUdp().
◆ wccpHereIam
      
  | 
  static | 
Definition at line 81 of file wccp.cc.
Referenced by wccpHereIam(), and wccpInit().
Introduction
- About Squid
 - Why Squid?
 - Squid Developers
 - How to Donate
 - How to Help Out
 - Getting Squid
 - Squid Source Packages
 - Squid Deployment Case-Studies
 - Squid Software Foundation
 
Documentation
- Quick Setup
 - Configuration:
 - FAQ and Wiki
 - Guide Books:
 - Non-English
 - More...
 
Support
- Security Advisories
 - Bugzilla Database
 - Mailing lists
 - Contacting us
 - Commercial services
 - Project Sponsors
 - Squid-based products
 
