m�n 2003-02-24 klockan 18.35 skrev atit_ldce: > when squid forward http request to the peer cache which address is used as outoging > address. > > does it one defined in tcp_outgoing_address..
Yes, as selected by the call to getOutgoingAddr() from fwdConnectStart() in forward.cc > i also need explanation about fields within structure _peer and > ps_state Which specific fields do you need to have explained? Most of the fields of the peer type is explained by the cache_peer directive and it's documentation in squid.conf. the ps_state is used while selecting which peers to use, and contain references to the information used while selecting suitable peers for a given reqest. > working of peerSelectFoo(ps_state) is not clear. > specially logic related to const DIRECT_XXX The different "direct" states are: DIRECT_UNKNOWN -> sufficient data is not yet available (starts here). DIRECT_NO -> MUST not be sent directly (never_direct true) DIRECT_YES -> MUST be sent directly (always_direct true) DIRECT_MAYBE -> May be sent via a peer or directly (normal case) When peer selection starts "direct" starts out as DIRECT_UNKNOWN. When always_direct and never_direct have been evaluated sufficient information is available and the true value of "direct" is evaluated. The first "if (direct == DIRECT_UNKNOWN)" deals with the case that never_direct and/or always_direct have not yet been evaluated and the "directness" of the request is not yet known. In such case the acl code is called for evaluating always_direct and/or never_direct and when completed peerSelectFoo() is called again. While the request is waiting for always_direct/never_direct/ICP lookups to complete, the ps_state keeps track of the needed state information for peer selection. > what is HTCP? An alternative to ICP. Ignore this for now unless you are specifically interested in HTCP. Some documentation on what HTCP is and it's packet format can be found in the doc/ directory of Squid. > what is the outgoing address used for dsn lookup? udp_outgoing_address. -- Henrik Nordstrom <[EMAIL PROTECTED]> MARA Systems AB, Sweden
