#include "squid.h"
#include "base/RunnersRegistry.h"
#include "cache_cf.h"
#include "comm.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "ConfigParser.h"
#include "event.h"
#include "ip/Address.h"
#include "md5.h"
#include "Parsing.h"
#include "SquidConfig.h"
#include "Store.h"
#include "tools.h"
#include "wccp2.h"

Go to the source code of this file.
Classes | |
struct | wccp2_item_header_t |
struct | wccp2_message_header_t |
struct | wccp2_security_none_t |
struct | wccp2_security_md5_t |
struct | wccp2_service_info_t |
struct | wccp2_cache_identity_info_t |
struct | wccp2_identity_info_t |
struct | wccp2_mask_element_t |
struct | wccp2_cache_mask_identity_info_t |
struct | wccp2_mask_identity_info_t |
struct | wccp2_cache_view_header_t |
struct | wccp2_cache_view_info_t |
struct | wccp2_router_id_element_t |
struct | wccp2_capability_info_header_t |
struct | wccp2_capability_element_t |
struct | wccp2_value_element_t |
struct | wccp2_i_see_you_t |
struct | wccp2_router_assign_element_t |
struct | router_identity_info_t |
struct | cache_mask_info_t |
struct | assignment_key_t |
struct | router_view_t |
struct | wccp2_cache_list_t |
struct | wccp2_router_list_t |
struct | wccp2_service_list_t |
class | Wccp2Rr |
Functions | |
static void | wccp2_add_service_list (int service, int service_id, int service_priority, int service_proto, int service_flags, int ports[], int security_type, char *password) |
static void | wccp2SortCacheList (struct wccp2_cache_list_t *head) |
static void | wccp2InitServices (void) |
static void | wccp2_update_service (struct wccp2_service_list_t *srv, int service, int service_id, int service_priority, int service_proto, int service_flags, int ports[]) |
static struct wccp2_service_list_t * | wccp2_get_service_by_id (int service, int service_id) |
static char | wccp2_update_md5_security (char *password, char *ptr, char *packet, int len) |
static char | wccp2_check_security (struct wccp2_service_list_t *srv, char *security, char *packet, int len) |
static void | wccp2Init (void) |
static void | wccp2ConnectionOpen (void) |
static void | wccp2ConnectionClose (void) |
DefineRunnerRegistrator (Wccp2Rr) | |
static void | CheckSectionLength (const void *sectionStart, const size_t sectionLength, const void *wholeStart, const size_t wholeSize, const char *error) |
template<class FieldHeader > | |
static size_t | CheckFieldDataLength (const FieldHeader *header, const size_t dataLength, const void *areaStart, const size_t areaSize, const char *error) |
template<class Field > | |
static void | SetField (Field *&field, const void *fieldStart, const void *areaStart, const size_t areaSize, const char *error) |
static void | wccp2HandleUdp (int sock, void *) |
static void | wccp2HereIam (void *) |
static void | wccp2AssignBuckets (void *) |
void | parse_wccp2_method (int *method) |
void | dump_wccp2_method (StoreEntry *e, const char *label, int v) |
void | free_wccp2_method (int *) |
void | parse_wccp2_amethod (int *method) |
void | dump_wccp2_amethod (StoreEntry *e, const char *label, int v) |
void | free_wccp2_amethod (int *) |
void | parse_wccp2_service (void *) |
void | dump_wccp2_service (StoreEntry *e, const char *label, void *) |
void | free_wccp2_service (void *) |
int | check_null_wccp2_service (void *) |
static int | parse_wccp2_service_flags (char *flags) |
static void | parse_wccp2_service_ports (char *options, int portlist[]) |
void | parse_wccp2_service_info (void *) |
void | dump_wccp2_service_info (StoreEntry *e, const char *label, void *) |
void | free_wccp2_service_info (void *) |
Variables | |
static int | theWccp2Connection = -1 |
static int | wccp2_connected = 0 |
static PF | wccp2HandleUdp |
static EVH | wccp2HereIam |
static EVH | wccp2AssignBuckets |
static struct wccp2_message_header_t | wccp2_here_i_am_header |
static struct wccp2_identity_info_t | wccp2_identity_info |
static struct wccp2_mask_identity_info_t | wccp2_mask_identity_info |
static struct wccp2_cache_view_header_t | wccp2_cache_view_header |
static struct wccp2_cache_view_info_t | wccp2_cache_view_info |
static struct wccp2_capability_info_header_t | wccp2_capability_info_header |
static struct wccp2_capability_element_t | wccp2_capability_element |
static struct wccp2_i_see_you_t | wccp2_i_see_you |
static int | wccp2_numrouters |
static struct wccp2_service_list_t * | wccp2_service_list_head = nullptr |
int | empty_portlist [WCCP2_NUMPORTS] = {0, 0, 0, 0, 0, 0, 0, 0} |
Macro Definition Documentation
◆ WCCP2_ALT_ASSIGNMENT
◆ WCCP2_ASSIGN_MAP
◆ WCCP2_ASSIGNMENT_METHOD_HASH
◆ WCCP2_ASSIGNMENT_METHOD_MASK
◆ WCCP2_CAPABILITY_ASSIGNMENT_METHOD
◆ WCCP2_CAPABILITY_FORWARDING_METHOD
◆ WCCP2_CAPABILITY_INFO
◆ WCCP2_CAPABILITY_RETURN_METHOD
◆ WCCP2_COMMAND_EXTENSION
◆ WCCP2_FORWARDING_METHOD_GRE
#define WCCP2_FORWARDING_METHOD_GRE WCCP2_METHOD_GRE |
◆ WCCP2_FORWARDING_METHOD_L2
#define WCCP2_FORWARDING_METHOD_L2 WCCP2_METHOD_L2 |
◆ WCCP2_HASH_ASSIGNMENT
◆ WCCP2_HERE_I_AM
◆ WCCP2_I_SEE_YOU
◆ WCCP2_MASK_ASSIGNMENT
◆ WCCP2_MASK_ASSIGNMENT_DATA
◆ WCCP2_MD5_SECURITY
◆ WCCP2_MD5_SECURITY_LEN
#define WCCP2_MD5_SECURITY_LEN SQUID_MD5_DIGEST_LENGTH |
◆ WCCP2_METHOD_GRE
◆ WCCP2_METHOD_L2
◆ WCCP2_NO_SECURITY
◆ WCCP2_NONE_SECURITY_LEN
◆ WCCP2_NUMPORTS
◆ WCCP2_PACKET_RETURN_METHOD_GRE
#define WCCP2_PACKET_RETURN_METHOD_GRE WCCP2_METHOD_GRE |
◆ WCCP2_PACKET_RETURN_METHOD_L2
#define WCCP2_PACKET_RETURN_METHOD_L2 WCCP2_METHOD_L2 |
◆ WCCP2_PASSWORD_LEN
◆ WCCP2_QUERY_INFO
◆ WCCP2_REDIRECT_ASSIGN
◆ WCCP2_REDIRECT_ASSIGNMENT
◆ WCCP2_REMOVAL_QUERY
◆ WCCP2_ROUTER_ID_INFO
◆ WCCP2_RTR_VIEW_INFO
◆ WCCP2_SECURITY_INFO
◆ WCCP2_SERVICE_DST_IP_ALT_HASH
◆ WCCP2_SERVICE_DST_IP_HASH
◆ WCCP2_SERVICE_DST_PORT_ALT_HASH
◆ WCCP2_SERVICE_DST_PORT_HASH
◆ WCCP2_SERVICE_DYNAMIC
◆ WCCP2_SERVICE_ID_HTTP
◆ WCCP2_SERVICE_INFO
◆ WCCP2_SERVICE_PORTS_DEFINED
◆ WCCP2_SERVICE_PORTS_SOURCE
◆ WCCP2_SERVICE_SRC_IP_ALT_HASH
◆ WCCP2_SERVICE_SRC_IP_HASH
◆ WCCP2_SERVICE_SRC_PORT_ALT_HASH
◆ WCCP2_SERVICE_SRC_PORT_HASH
◆ WCCP2_SERVICE_STANDARD
◆ WCCP2_VERSION
◆ WCCP2_WC_ID_INFO
◆ WCCP2_WC_VIEW_INFO
◆ WCCP_BUCKETS
◆ WCCP_PORT
◆ WCCP_RESPONSE_SIZE
Function Documentation
◆ check_null_wccp2_service()
int check_null_wccp2_service | ( | void * | ) |
Definition at line 2246 of file wccp2.cc.
References wccp2_service_list_head.
◆ CheckFieldDataLength()
|
static |
Checks that the area contains at least dataLength bytes after the header. The size of the field header itself is not included in dataLength.
- Returns
- the total field size – the field header and field data combined
Definition at line 1161 of file wccp2.cc.
References assert, CheckSectionLength(), and error().
Referenced by wccp2HandleUdp().
◆ CheckSectionLength()
|
static |
Checks that the given area section ends inside the given (whole) area.
- Parameters
-
error the message to throw when the section does not fit
Definition at line 1134 of file wccp2.cc.
References assert, error(), and Here.
Referenced by CheckFieldDataLength(), SetField(), and wccp2HandleUdp().
◆ DefineRunnerRegistrator()
DefineRunnerRegistrator | ( | Wccp2Rr | ) |
◆ dump_wccp2_amethod()
void dump_wccp2_amethod | ( | StoreEntry * | e, |
const char * | label, | ||
int | v | ||
) |
Definition at line 2141 of file wccp2.cc.
References DBG_CRITICAL, debugs, self_destruct(), storeAppendPrintf(), WCCP2_ASSIGNMENT_METHOD_HASH, and WCCP2_ASSIGNMENT_METHOD_MASK.
◆ dump_wccp2_method()
void dump_wccp2_method | ( | StoreEntry * | e, |
const char * | label, | ||
int | v | ||
) |
Definition at line 2093 of file wccp2.cc.
References DBG_CRITICAL, debugs, self_destruct(), storeAppendPrintf(), WCCP2_METHOD_GRE, and WCCP2_METHOD_L2.
◆ dump_wccp2_service()
void dump_wccp2_service | ( | StoreEntry * | e, |
const char * | label, | ||
void * | |||
) |
Definition at line 2220 of file wccp2.cc.
References debugs, wccp2_service_list_t::info, wccp2_service_list_t::next, wccp2_service_info_t::service, wccp2_service_info_t::service_id, storeAppendPrintf(), WCCP2_MD5_SECURITY, wccp2_service_list_t::wccp2_security_type, WCCP2_SERVICE_DYNAMIC, wccp2_service_list_head, and wccp2_service_list_t::wccp_password.
◆ dump_wccp2_service_info()
void dump_wccp2_service_info | ( | StoreEntry * | e, |
const char * | label, | ||
void * | |||
) |
Definition at line 2426 of file wccp2.cc.
References debugs, wccp2_service_list_t::info, wccp2_service_list_t::next, wccp2_service_info_t::port0, wccp2_service_info_t::port1, wccp2_service_info_t::port2, wccp2_service_info_t::port3, wccp2_service_info_t::port4, wccp2_service_info_t::port5, wccp2_service_info_t::port6, wccp2_service_info_t::port7, wccp2_service_info_t::service, wccp2_service_info_t::service_flags, wccp2_service_info_t::service_id, wccp2_service_info_t::service_priority, wccp2_service_info_t::service_protocol, storeAppendPrintf(), WCCP2_SERVICE_DST_IP_ALT_HASH, WCCP2_SERVICE_DST_IP_HASH, WCCP2_SERVICE_DST_PORT_ALT_HASH, WCCP2_SERVICE_DST_PORT_HASH, wccp2_service_list_head, WCCP2_SERVICE_PORTS_DEFINED, WCCP2_SERVICE_PORTS_SOURCE, WCCP2_SERVICE_SRC_IP_ALT_HASH, WCCP2_SERVICE_SRC_IP_HASH, WCCP2_SERVICE_SRC_PORT_ALT_HASH, WCCP2_SERVICE_SRC_PORT_HASH, and WCCP2_SERVICE_STANDARD.
◆ free_wccp2_amethod()
◆ free_wccp2_method()
◆ free_wccp2_service()
◆ free_wccp2_service_info()
◆ parse_wccp2_amethod()
void parse_wccp2_amethod | ( | int * | method | ) |
Parse wccp2_assignment_method option they can be '1' aka 'hash' or '2' aka 'mask' representing the integer numeric of the same.
Definition at line 2118 of file wccp2.cc.
References DBG_CRITICAL, debugs, ConfigParser::NextToken(), self_destruct(), WCCP2_ASSIGNMENT_METHOD_HASH, and WCCP2_ASSIGNMENT_METHOD_MASK.
◆ parse_wccp2_method()
void parse_wccp2_method | ( | int * | method | ) |
Parse wccp2_return_method and wccp2_forwarding_method options they can be '1' aka 'gre' or '2' aka 'l2' representing the integer numeric of the same.
Definition at line 2070 of file wccp2.cc.
References DBG_CRITICAL, debugs, ConfigParser::NextToken(), self_destruct(), WCCP2_METHOD_GRE, and WCCP2_METHOD_L2.
◆ parse_wccp2_service()
void parse_wccp2_service | ( | void * | ) |
Definition at line 2166 of file wccp2.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, empty_portlist, GetInteger(), ConfigParser::NextToken(), self_destruct(), wccp2_add_service_list(), wccp2_connected, WCCP2_MD5_SECURITY, WCCP2_NO_SECURITY, WCCP2_PASSWORD_LEN, WCCP2_SERVICE_DYNAMIC, WCCP2_SERVICE_STANDARD, and xstrncpy().
◆ parse_wccp2_service_flags()
|
static |
Definition at line 2268 of file wccp2.cc.
References fatalf(), WCCP2_SERVICE_DST_IP_ALT_HASH, WCCP2_SERVICE_DST_IP_HASH, WCCP2_SERVICE_DST_PORT_ALT_HASH, WCCP2_SERVICE_DST_PORT_HASH, WCCP2_SERVICE_PORTS_SOURCE, WCCP2_SERVICE_SRC_IP_ALT_HASH, WCCP2_SERVICE_SRC_IP_HASH, WCCP2_SERVICE_SRC_PORT_ALT_HASH, and WCCP2_SERVICE_SRC_PORT_HASH.
Referenced by parse_wccp2_service_info().
◆ parse_wccp2_service_info()
void parse_wccp2_service_info | ( | void * | ) |
Definition at line 2346 of file wccp2.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, fatalf(), GetInteger(), ConfigParser::NextToken(), parse_wccp2_service_flags(), parse_wccp2_service_ports(), self_destruct(), wccp2_connected, wccp2_get_service_by_id(), WCCP2_NUMPORTS, WCCP2_SERVICE_DYNAMIC, WCCP2_SERVICE_PORTS_DEFINED, and wccp2_update_service().
◆ parse_wccp2_service_ports()
|
static |
Definition at line 2311 of file wccp2.cc.
References fatalf(), WCCP2_NUMPORTS, and xatoi().
Referenced by parse_wccp2_service_info().
◆ SetField()
|
static |
Positions the given field at a given start within a given packet area. The Field type determines the correct field size (used for bounds checking).
- Parameters
-
field the field pointer the function should set areaStart the start of a packet (sub)structure containing the field areaSize the size of the packet (sub)structure starting at areaStart fieldStart the start of a field within the given area error the message to throw when the field does not fit the area
Definition at line 1178 of file wccp2.cc.
References CheckSectionLength(), and error().
Referenced by wccp2HandleUdp().
◆ wccp2_add_service_list()
|
static |
Definition at line 505 of file wccp2.cc.
References wccp2_service_list_t::change_num, debugs, wccp2_service_list_t::info, wccp2_service_list_t::next, wccp2_service_info_t::service_length, wccp2_service_info_t::service_type, WCCP2_PASSWORD_LEN, wccp2_service_list_t::wccp2_security_type, WCCP2_SERVICE_INFO, wccp2_service_list_head, wccp2_update_service(), wccp2_service_list_t::wccp_password, xcalloc(), and xstrncpy().
Referenced by parse_wccp2_service().
◆ wccp2_check_security()
|
static |
Definition at line 608 of file wccp2.cc.
References DBG_IMPORTANT, debugs, wccp2_security_md5_t::security_implementation, wccp2_security_md5_t::security_option, SQUID_MD5_DIGEST_LENGTH, SquidMD5Final(), SquidMD5Init(), SquidMD5Update(), WCCP2_MD5_SECURITY, WCCP2_NO_SECURITY, WCCP2_PASSWORD_LEN, wccp2_service_list_t::wccp2_security_type, wccp2_service_list_t::wccp_password, and xstrncpy().
Referenced by wccp2HandleUdp().
◆ wccp2_get_service_by_id()
|
static |
Definition at line 532 of file wccp2.cc.
References wccp2_service_list_t::info, wccp2_service_list_t::next, wccp2_service_info_t::service, wccp2_service_info_t::service_id, and wccp2_service_list_head.
Referenced by parse_wccp2_service_info().
◆ wccp2_update_md5_security()
|
static |
Definition at line 555 of file wccp2.cc.
References assert, debugs, wccp2_security_md5_t::security_implementation, wccp2_security_md5_t::security_option, wccp2_security_md5_t::security_type, SQUID_MD5_DIGEST_LENGTH, SquidMD5Final(), SquidMD5Init(), SquidMD5Update(), WCCP2_MD5_SECURITY, WCCP2_PASSWORD_LEN, WCCP2_SECURITY_INFO, and xstrncpy().
Referenced by wccp2AssignBuckets(), and wccp2HereIam().
◆ wccp2_update_service()
|
static |
Definition at line 484 of file wccp2.cc.
References wccp2_service_list_t::info, wccp2_service_info_t::port0, wccp2_service_info_t::port1, wccp2_service_info_t::port2, wccp2_service_info_t::port3, wccp2_service_info_t::port4, wccp2_service_info_t::port5, wccp2_service_info_t::port6, wccp2_service_info_t::port7, wccp2_service_info_t::service, wccp2_service_info_t::service_flags, wccp2_service_info_t::service_id, wccp2_service_info_t::service_priority, and wccp2_service_info_t::service_protocol.
Referenced by parse_wccp2_service_info(), and wccp2_add_service_list().
◆ wccp2AssignBuckets()
|
static |
Definition at line 1677 of file wccp2.cc.
References assert, SquidConfig::assignment_method, buckets, wccp2_value_element_t::cache_ip, wccp2_cache_list_t::cache_ip, wccp2_router_list_t::cache_list_head, wccp2_service_list_t::change_num, wccp2_router_assign_element_t::change_number, comm_udp_sendto(), Config, debugs, wccp2_mask_element_t::dest_ip_mask, wccp2_value_element_t::dest_ip_value, wccp2_mask_element_t::dest_port_mask, wccp2_value_element_t::dest_port_value, fatalf(), wccp2_router_list_t::info, wccp2_service_list_t::info, int, wccp2_item_header_t::length, wccp2_message_header_t::length, wccp2_router_list_t::local_ip, wccp2_service_list_t::lowest_ip, assignment_key_t::master_ip, assignment_key_t::master_number, wccp2_router_list_t::member_change, wccp2_cache_list_t::next, wccp2_router_list_t::next, wccp2_service_list_t::next, wccp2_router_list_t::num_caches, wccp2_service_list_t::num_routers, wccp2_mask_element_t::number_values, wccp2_router_id_element_t::received_id, wccp2_router_assign_element_t::received_id, wccp2_router_id_element_t::router_address, wccp2_router_assign_element_t::router_address, wccp2_service_list_t::router_list_head, wccp2_router_list_t::router_sendto_address, safe_free, wccp2_service_list_t::security_info, wccp2_service_info_t::service, wccp2_service_info_t::service_flags, wccp2_service_list_t::service_info, wccp2_mask_element_t::source_ip_mask, wccp2_value_element_t::source_ip_value, wccp2_mask_element_t::source_port_mask, wccp2_value_element_t::source_port_value, theWccp2Connection, wccp2_item_header_t::type, wccp2_message_header_t::type, wccp2_message_header_t::version, SquidConfig::Wccp2, WCCP2_ALT_ASSIGNMENT, WCCP2_ASSIGNMENT_METHOD_HASH, WCCP2_ASSIGNMENT_METHOD_MASK, WCCP2_MASK_ASSIGNMENT, WCCP2_MD5_SECURITY, WCCP2_NO_SECURITY, wccp2_numrouters, WCCP2_REDIRECT_ASSIGN, WCCP2_REDIRECT_ASSIGNMENT, wccp2_service_list_t::wccp2_security_type, WCCP2_SERVICE_DST_IP_ALT_HASH, WCCP2_SERVICE_DST_IP_HASH, WCCP2_SERVICE_DST_PORT_ALT_HASH, WCCP2_SERVICE_DST_PORT_HASH, wccp2_service_list_head, WCCP2_SERVICE_SRC_IP_ALT_HASH, WCCP2_SERVICE_SRC_IP_HASH, WCCP2_SERVICE_SRC_PORT_ALT_HASH, WCCP2_SERVICE_SRC_PORT_HASH, WCCP2_SERVICE_STANDARD, wccp2_update_md5_security(), WCCP2_VERSION, WCCP_BUCKETS, wccp2_service_list_t::wccp_password, WCCP_PORT, WCCP_RESPONSE_SIZE, wccp2_cache_list_t::weight, xcalloc(), and xstrerr().
◆ wccp2ConnectionClose()
|
static |
Definition at line 1047 of file wccp2.cc.
References wccp2_router_list_t::cache_list_head, comm_close, DBG_IMPORTANT, debugs, eventDelete(), IamPrimaryProcess(), wccp2_cache_list_t::next, wccp2_router_list_t::next, wccp2_service_list_t::next, wccp2_service_list_t::router_list_head, theWccp2Connection, wccp2_connected, wccp2_service_list_head, wccp2AssignBuckets, wccp2HereIam, and xfree.
Referenced by Wccp2Rr::startReconfigure(), Wccp2Rr::startShutdown(), and wccp2HandleUdp().
◆ wccp2ConnectionOpen()
|
static |
Definition at line 956 of file wccp2.cc.
References SquidConfig::address, COMM_NONBLOCKING, comm_open_listener(), COMM_SELECT_READ, Config, DBG_CRITICAL, DBG_IMPORTANT, debugs, fatal(), IamPrimaryProcess(), wccp2_router_list_t::local_ip, wccp2_router_list_t::next, wccp2_service_list_t::next, Ip::Address::port(), wccp2_service_list_t::router_list_head, wccp2_router_list_t::router_sendto_address, Ip::Address::setIPv4(), Comm::SetSelect(), theWccp2Connection, SquidConfig::Wccp2, wccp2_connected, wccp2_numrouters, wccp2_service_list_head, wccp2HandleUdp, WCCP_PORT, and xstrerr().
Referenced by Wccp2Rr::syncConfig(), and Wccp2Rr::useConfig().
◆ wccp2HandleUdp()
|
static |
Definition at line 1188 of file wccp2.cc.
References wccp2_cache_identity_info_t::addr, wccp2_cache_mask_identity_info_t::addr, cache_mask_info_t::addr, assert, SquidConfig::assignment_method, wccp2_cache_list_t::cache_ip, wccp2_router_list_t::cache_list_head, wccp2_capability_info_header_t::capability_info_length, wccp2_capability_element_t::capability_length, wccp2_capability_element_t::capability_type, wccp2_capability_element_t::capability_value, router_view_t::change_number, CheckFieldDataLength(), CheckSectionLength(), COMM_SELECT_READ, comm_udp_recvfrom(), Config, CurrentException(), wccp2_i_see_you_t::data, DBG_IMPORTANT, debugs, eventAdd(), eventDelete(), fatalf(), SquidConfig::forwarding_method, Ip::Address::getSockAddr(), router_view_t::header, Here, wccp2_router_list_t::info, int, wccp2_i_see_you_t::length, wccp2_router_list_t::local_ip, wccp2_service_list_t::lowest_ip, wccp2_router_list_t::member_change, Must3, wccp2_cache_list_t::next, wccp2_router_list_t::next, wccp2_service_list_t::next, cache_mask_info_t::num1, wccp2_router_list_t::num_caches, wccp2_router_id_element_t::received_id, SquidConfig::return_method, wccp2_router_id_element_t::router_address, router_identity_info_t::router_id_element, wccp2_service_list_t::router_list_head, wccp2_router_list_t::router_sendto_address, wccp2_service_list_t::security_info, wccp2_security_none_t::security_option, wccp2_security_md5_t::security_option, wccp2_service_info_t::service_id, wccp2_service_list_t::service_info, SetField(), Ip::Address::setIPv4(), Comm::SetSelect(), wccp2_i_see_you_t::type, wccp2_i_see_you_t::version, SquidConfig::Wccp2, WCCP2_ASSIGN_MAP, WCCP2_ASSIGNMENT_METHOD_HASH, WCCP2_ASSIGNMENT_METHOD_MASK, WCCP2_CAPABILITY_ASSIGNMENT_METHOD, WCCP2_CAPABILITY_FORWARDING_METHOD, WCCP2_CAPABILITY_INFO, WCCP2_CAPABILITY_RETURN_METHOD, wccp2_check_security(), WCCP2_FORWARDING_METHOD_GRE, wccp2_i_see_you, WCCP2_I_SEE_YOU, WCCP2_PACKET_RETURN_METHOD_GRE, WCCP2_REDIRECT_ASSIGNMENT, WCCP2_ROUTER_ID_INFO, WCCP2_RTR_VIEW_INFO, WCCP2_SECURITY_INFO, WCCP2_SERVICE_INFO, wccp2_service_list_head, WCCP2_VERSION, wccp2AssignBuckets, wccp2ConnectionClose(), wccp2HandleUdp, wccp2SortCacheList(), WCCP_RESPONSE_SIZE, wccp2_cache_identity_info_t::weight, wccp2_cache_list_t::weight, xcalloc(), and xfree.
◆ wccp2HereIam()
|
static |
Definition at line 1592 of file wccp2.cc.
References wccp2_cache_identity_info_t::addr, wccp2_cache_mask_identity_info_t::addr, SquidConfig::assignment_method, wccp2_identity_info_t::cache_identity, wccp2_mask_identity_info_t::cache_identity, comm_udp_sendto(), Config, DBG_IMPORTANT, debugs, eventAdd(), fatalf(), wccp2_service_list_t::info, wccp2_router_list_t::local_ip, wccp2_router_list_t::next, wccp2_service_list_t::next, Ip::Address::port(), SquidConfig::rebuildwait, wccp2_service_list_t::router_list_head, wccp2_router_list_t::router_sendto_address, wccp2_service_list_t::security_info, wccp2_service_info_t::service_id, Store::Controller::store_dirs_rebuilding, theWccp2Connection, SquidConfig::Wccp2, WCCP2_ASSIGNMENT_METHOD_HASH, WCCP2_ASSIGNMENT_METHOD_MASK, wccp2_connected, wccp2_service_list_t::wccp2_identity_info_ptr, WCCP2_MD5_SECURITY, wccp2_numrouters, wccp2_service_list_t::wccp2_security_type, wccp2_service_list_head, wccp2_update_md5_security(), wccp2HereIam, wccp2_service_list_t::wccp_packet, wccp2_service_list_t::wccp_packet_size, wccp2_service_list_t::wccp_password, WCCP_PORT, and xstrerr().
◆ wccp2Init()
|
static |
Definition at line 657 of file wccp2.cc.
References wccp2_cache_identity_info_t::addr, wccp2_cache_mask_identity_info_t::addr, assert, SquidConfig::assignment_method, wccp2_cache_identity_info_t::bits, wccp2_cache_mask_identity_info_t::bits, wccp2_cache_identity_info_t::buckets, wccp2_identity_info_t::cache_identity, wccp2_mask_identity_info_t::cache_identity, wccp2_identity_info_t::cache_identity_length, wccp2_mask_identity_info_t::cache_identity_length, wccp2_identity_info_t::cache_identity_type, wccp2_mask_identity_info_t::cache_identity_type, wccp2_cache_view_header_t::cache_view_length, wccp2_cache_view_header_t::cache_view_type, wccp2_cache_view_header_t::cache_view_version, wccp2_capability_info_header_t::capability_info_length, wccp2_capability_info_header_t::capability_info_type, wccp2_capability_element_t::capability_length, wccp2_capability_element_t::capability_type, wccp2_capability_element_t::capability_value, Config, debugs, wccp2_mask_element_t::dest_ip_mask, wccp2_mask_element_t::dest_port_mask, eventAdd(), eventFind(), fatalf(), SquidConfig::forwarding_method, Ip::Address::getInAddr(), wccp2_cache_identity_info_t::hash_revision, IamPrimaryProcess(), wccp2_router_list_t::info, wccp2_service_list_t::info, Ip::Address::isAnyAddr(), wccp2_message_header_t::length, wccp2_cache_mask_identity_info_t::mask, wccp2_cache_mask_identity_info_t::mask_element_count, wccp2_router_list_t::member_change, Ip::Address_list::next, wccp2_router_list_t::next, wccp2_service_list_t::next, wccp2_cache_view_info_t::num_caches, wccp2_service_list_t::num_routers, wccp2_router_id_element_t::received_id, SquidConfig::return_method, SquidConfig::router, wccp2_router_id_element_t::router_address, wccp2_service_list_t::router_list_head, wccp2_router_list_t::router_sendto_address, Ip::Address_list::s, wccp2_service_list_t::security_info, wccp2_security_md5_t::security_length, wccp2_security_md5_t::security_option, wccp2_security_md5_t::security_type, wccp2_service_info_t::service, wccp2_service_info_t::service_flags, wccp2_service_list_t::service_info, wccp2_mask_element_t::source_ip_mask, wccp2_mask_element_t::source_port_mask, wccp2_cache_identity_info_t::status, wccp2_cache_mask_identity_info_t::status, wccp2_message_header_t::type, wccp2_message_header_t::version, SquidConfig::Wccp2, WCCP2_ASSIGNMENT_METHOD_HASH, WCCP2_ASSIGNMENT_METHOD_MASK, wccp2_cache_view_header, wccp2_cache_view_info, WCCP2_CAPABILITY_ASSIGNMENT_METHOD, wccp2_capability_element, WCCP2_CAPABILITY_FORWARDING_METHOD, WCCP2_CAPABILITY_INFO, wccp2_capability_info_header, WCCP2_CAPABILITY_RETURN_METHOD, wccp2_connected, WCCP2_HERE_I_AM, wccp2_here_i_am_header, wccp2_identity_info, wccp2_service_list_t::wccp2_identity_info_ptr, WCCP2_MASK_ASSIGNMENT_DATA, wccp2_mask_identity_info, WCCP2_MD5_SECURITY, WCCP2_NO_SECURITY, wccp2_numrouters, WCCP2_SECURITY_INFO, wccp2_service_list_t::wccp2_security_type, WCCP2_SERVICE_DST_IP_ALT_HASH, WCCP2_SERVICE_DST_IP_HASH, WCCP2_SERVICE_DST_PORT_ALT_HASH, WCCP2_SERVICE_DST_PORT_HASH, wccp2_service_list_head, WCCP2_SERVICE_SRC_IP_ALT_HASH, WCCP2_SERVICE_SRC_IP_HASH, WCCP2_SERVICE_SRC_PORT_ALT_HASH, WCCP2_SERVICE_SRC_PORT_HASH, WCCP2_SERVICE_STANDARD, WCCP2_VERSION, WCCP2_WC_ID_INFO, WCCP2_WC_VIEW_INFO, wccp2HereIam, wccp2InitServices(), wccp2_service_list_t::wccp_packet, wccp2_service_list_t::wccp_packet_size, WCCP_RESPONSE_SIZE, SquidConfig::weight, wccp2_cache_identity_info_t::weight, wccp2_cache_mask_identity_info_t::weight, and xcalloc().
Referenced by Wccp2Rr::useConfig().
◆ wccp2InitServices()
|
static |
◆ wccp2SortCacheList()
|
static |
Definition at line 2562 of file wccp2.cc.
References wccp2_cache_list_t::cache_ip, head, and wccp2_cache_list_t::next.
Referenced by wccp2HandleUdp().
Variable Documentation
◆ empty_portlist
int empty_portlist[WCCP2_NUMPORTS] = {0, 0, 0, 0, 0, 0, 0, 0} |
Definition at line 462 of file wccp2.cc.
Referenced by parse_wccp2_service().
◆ theWccp2Connection
|
static |
Definition at line 37 of file wccp2.cc.
Referenced by wccp2AssignBuckets(), wccp2ConnectionClose(), wccp2ConnectionOpen(), and wccp2HereIam().
◆ wccp2_cache_view_header
|
static |
Definition at line 262 of file wccp2.cc.
Referenced by wccp2Init().
◆ wccp2_cache_view_info
|
static |
Definition at line 271 of file wccp2.cc.
Referenced by wccp2Init().
◆ wccp2_capability_element
|
static |
Definition at line 303 of file wccp2.cc.
Referenced by wccp2Init().
◆ wccp2_capability_info_header
|
static |
Definition at line 293 of file wccp2.cc.
Referenced by wccp2Init().
◆ wccp2_connected
|
static |
Definition at line 38 of file wccp2.cc.
Referenced by parse_wccp2_service(), parse_wccp2_service_info(), wccp2ConnectionClose(), wccp2ConnectionOpen(), wccp2HereIam(), and wccp2Init().
◆ wccp2_here_i_am_header
|
static |
Definition at line 91 of file wccp2.cc.
Referenced by wccp2Init().
◆ wccp2_i_see_you
|
static |
Definition at line 349 of file wccp2.cc.
Referenced by wccp2HandleUdp().
◆ wccp2_identity_info
|
static |
Definition at line 200 of file wccp2.cc.
Referenced by wccp2Init().
◆ wccp2_mask_identity_info
|
static |
Definition at line 248 of file wccp2.cc.
Referenced by wccp2Init().
◆ wccp2_numrouters
|
static |
Definition at line 435 of file wccp2.cc.
Referenced by wccp2AssignBuckets(), wccp2ConnectionOpen(), wccp2HereIam(), and wccp2Init().
◆ wccp2_service_list_head
|
static |
Definition at line 460 of file wccp2.cc.
Referenced by check_null_wccp2_service(), dump_wccp2_service(), dump_wccp2_service_info(), wccp2_add_service_list(), wccp2_get_service_by_id(), wccp2AssignBuckets(), wccp2ConnectionClose(), wccp2ConnectionOpen(), wccp2HandleUdp(), wccp2HereIam(), and wccp2Init().
◆ wccp2AssignBuckets
|
static |
Definition at line 42 of file wccp2.cc.
Referenced by wccp2ConnectionClose(), and wccp2HandleUdp().
◆ wccp2HandleUdp
|
static |
Definition at line 40 of file wccp2.cc.
Referenced by wccp2ConnectionOpen(), and wccp2HandleUdp().
◆ wccp2HereIam
|
static |
Definition at line 41 of file wccp2.cc.
Referenced by wccp2ConnectionClose(), wccp2HereIam(), and wccp2Init().
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