------------------------------------------------------------ revno: 10937 revision-id: squidadm@squid-cache.org-20101013001442-bwa898i37k7d3ter parent: amosjeffries@squid-cache.org-20101012222740-5b5kfxao2z1a1a3p committer: Automatic source maintenance branch nick: trunk timestamp: Tue 2010-10-12 18:14:42 -0600 message: SourceFormat Enforcement ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squidadm@squid-cache.org-20101013001442-\ # bwa898i37k7d3ter # target_branch: http://www.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: ac2deb1ac3953dcdb834f5b42b69311b40d8476b # timestamp: 2010-10-13 00:54:00 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: amosjeffries@squid-cache.org-20101012222740-\ # 5b5kfxao2z1a1a3p # # Begin patch === modified file 'compat/eui64_aton.h' --- compat/eui64_aton.h 2010-10-03 14:42:04 +0000 +++ compat/eui64_aton.h 2010-10-13 00:14:42 +0000 @@ -50,24 +50,24 @@ extern "C" { #endif -/** - * Size of the ASCII representation of an EUI-64. - */ + /** + * Size of the ASCII representation of an EUI-64. + */ #define EUI64_SIZ 24 -/** - * The number of bytes in an EUI-64. - */ + /** + * The number of bytes in an EUI-64. + */ #define EUI64_LEN 8 -/** - * Structure of an IEEE EUI-64. - */ -struct eui64 { - u_char octet[EUI64_LEN]; -}; + /** + * Structure of an IEEE EUI-64. + */ + struct eui64 { + u_char octet[EUI64_LEN]; + }; -int eui64_aton(const char *a, struct eui64 *e); + int eui64_aton(const char *a, struct eui64 *e); #ifdef __cplusplus } #endif === modified file 'helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.c' --- helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.c 2010-10-12 22:27:40 +0000 +++ helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.c 2010-10-13 00:14:42 +0000 @@ -299,10 +299,10 @@ if ((msg == NULL) || (strlen(prog) > 256)) { /* FAIL */ -/* - snprintf(dbuf, sizeof(dbuf), "%s: local_printfx() EPIC FAILURE.\n", prog); - fputs(dbuf, stderr); -*/ + /* + snprintf(dbuf, sizeof(dbuf), "%s: local_printfx() EPIC FAILURE.\n", prog); + fputs(dbuf, stderr); + */ debug("local_printfx() EPIC FAIL.\n"); return; } @@ -317,10 +317,10 @@ memset(dbuf, '\0', strlen(dbuf)); } else { /* FAIL */ -/* - snprintf(bbuf, sz, "%s: local_printfx(%s) FAILURE: %zd\n", prog, dbuf, x); - fputs(bbuf, stderr); -*/ + /* + snprintf(bbuf, sz, "%s: local_printfx(%s) FAILURE: %zd\n", prog, dbuf, x); + fputs(bbuf, stderr); + */ debug("local_printfx() FAILURE: %zd\n", x); } @@ -1834,7 +1834,7 @@ case 'u': i++; /* Set Search Attribute */ if (argv[i] != NULL) { - xstrncpy(edui_conf.attrib, argv[i], sizeof(edui_conf.attrib)); + xstrncpy(edui_conf.attrib, argv[i], sizeof(edui_conf.attrib)); } else { local_printfx("No parameters given for 'u'.\n"); DisplayUsage(); @@ -1980,8 +1980,8 @@ if (x != LDAP_ERR_SUCCESS) { /* Unable to bind */ debug("BindLDAP() -> %s (LDAP: %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); - local_printfx("ERR (BindLDAP: %s - %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); - continue; + local_printfx("ERR (BindLDAP: %s - %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); + continue; } else debug("BindLDAP(-, %s, %s, (LDAP_AUTH_TLS)) -> %s\n", edui_conf.dn, edui_conf.passwd, ErrLDAP(x)); } else if (!(edui_ldap.status & LDAP_BIND_S)) { @@ -1991,8 +1991,8 @@ if (x != LDAP_ERR_SUCCESS) { /* Unable to bind */ debug("BindLDAP() -> %s (LDAP: %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); - local_printfx("ERR (BindLDAP: %s - %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); - continue; + local_printfx("ERR (BindLDAP: %s - %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); + continue; } else debug("BindLDAP(-, %s, %s, (LDAP_AUTH_SIMPLE)) -> %s\n", edui_conf.dn, edui_conf.passwd, ErrLDAP(x)); } else { @@ -2001,8 +2001,8 @@ if (x != LDAP_ERR_SUCCESS) { /* Unable to bind */ debug("BindLDAP() -> %s (LDAP: %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); - local_printfx("ERR (BindLDAP: %s - %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); - continue; + local_printfx("ERR (BindLDAP: %s - %s)\n", ErrLDAP(x), ldap_err2string(edui_ldap.err)); + continue; } else debug("BindLDAP(-, -, -, (LDAP_AUTH_NONE)) -> %s\n", ErrLDAP(x)); } === modified file 'lib/xstrto.cc' --- lib/xstrto.cc 2010-10-06 03:50:45 +0000 +++ lib/xstrto.cc 2010-10-13 00:14:42 +0000 @@ -31,8 +31,8 @@ #include "config.h" #include "xstrto.h" -/* - * (C) 2000-2006 by the netfilter coreteam : +/* + * (C) 2000-2006 by the netfilter coreteam : * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,7 +46,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #if HAVE_ERRNO_H @@ -58,7 +58,7 @@ unsigned long min, unsigned long max) { unsigned long v; - char *my_end; + char *my_end; errno = 0; v = strtoul(s, &my_end, 0); @@ -71,7 +71,7 @@ if (errno != ERANGE && min <= v && (max == 0 || v <= max)) { if (value != NULL) *value = v; - if (end == NULL) + if (end == NULL) return *my_end == '\0'; return true; } === modified file 'src/adaptation/icap/Options.cc' --- src/adaptation/icap/Options.cc 2010-10-04 14:37:32 +0000 +++ src/adaptation/icap/Options.cc 2010-10-13 00:14:42 +0000 @@ -93,7 +93,7 @@ if (h->getByName("Opt-body-type").size()) { // TODO: add a class to rate-limit such warnings using FadingCounter debugs(93,DBG_IMPORTANT, "WARNING: Ignoring unsupported ICAP " << - "OPTIONS body; type: " << h->getByName("Opt-body-type")); + "OPTIONS body; type: " << h->getByName("Opt-body-type")); // Do not set error, assuming the response headers are valid. } === modified file 'src/base/InstanceId.h' --- src/base/InstanceId.h 2010-10-04 14:49:57 +0000 +++ src/base/InstanceId.h 2010-10-13 00:14:42 +0000 @@ -52,7 +52,8 @@ /// print the id template inline -std::ostream &operator <<(std::ostream &os, const InstanceId &id) { +std::ostream &operator <<(std::ostream &os, const InstanceId &id) +{ return id.print(os); } === modified file 'src/forward.cc' --- src/forward.cc 2010-10-06 03:50:45 +0000 +++ src/forward.cc 2010-10-13 00:14:42 +0000 @@ -910,7 +910,7 @@ #if SO_MARK nfmark_t mark = GetNfmarkToServer(request); debugs(17, 3, "fwdConnectStart: got outgoing addr " << outgoing << ", tos " << int(tos) - << ", netfilter mark " << mark); + << ", netfilter mark " << mark); #else nfmark_t mark = 0; debugs(17, 3, "fwdConnectStart: got outgoing addr " << outgoing << ", tos " << int(tos)); === modified file 'src/http.cc' --- src/http.cc 2010-10-04 15:44:32 +0000 +++ src/http.cc 2010-10-13 00:14:42 +0000 @@ -373,8 +373,8 @@ // RFC 2616: do not cache replies to responses with no-store CC directive if (request && request->cache_control && - EBIT_TEST(request->cache_control->mask, CC_NO_STORE) && - !REFRESH_OVERRIDE(ignore_no_store)) + EBIT_TEST(request->cache_control->mask, CC_NO_STORE) && + !REFRESH_OVERRIDE(ignore_no_store)) return 0; if (!ignoreCacheControl) { === modified file 'src/ip/Qos.cci' --- src/ip/Qos.cci 2010-10-06 03:50:45 +0000 +++ src/ip/Qos.cci 2010-10-13 00:14:42 +0000 @@ -44,12 +44,12 @@ Ip::Qos::Config::isAclNfmarkActive() const { acl_nfmark * nfmarkAcls [] = { nfmarkToServer, nfmarkToClient }; - + for (int i=0; i<2; i++) { while (nfmarkAcls[i]) { acl_nfmark *l = nfmarkAcls[i]; if (l->nfmark > 0) - return true; + return true; nfmarkAcls[i] = l->next; } } === modified file 'src/ip/QosConfig.cc' --- src/ip/QosConfig.cc 2010-10-06 13:03:11 +0000 +++ src/ip/QosConfig.cc 2010-10-13 00:14:42 +0000 @@ -16,7 +16,7 @@ #if USE_QOS_TOS && _SQUID_LINUX_ /* Bug 2537: This part of ZPH only applies to patched Linux kernels. */ tos_t tos = 1; - int tos_len = sizeof(tos); + int tos_len = sizeof(tos); clientFde->tosFromServer = 0; if (setsockopt(server_fd,SOL_IP,IP_RECVTOS,&tos,tos_len)==0) { unsigned char buf[512]; @@ -76,12 +76,12 @@ struct in6_addr serv_fde_remote_ip6; inet_pton(AF_INET6,servFde->ipaddr,(struct in6_addr*)&serv_fde_remote_ip6); nfct_set_attr(ct, ATTR_IPV6_DST, serv_fde_remote_ip6.s6_addr); - nfct_set_attr(ct, ATTR_IPV6_SRC, serv_fde_local_ip6.s6_addr); + nfct_set_attr(ct, ATTR_IPV6_SRC, serv_fde_local_ip6.s6_addr); } else { serv_fde_local_ip = ((struct sockaddr_in*)addr->ai_addr)->sin_addr; nfct_set_attr_u8(ct, ATTR_L3PROTO, AF_INET); nfct_set_attr_u32(ct, ATTR_IPV4_DST, inet_addr(servFde->ipaddr)); - nfct_set_attr_u32(ct, ATTR_IPV4_SRC, serv_fde_local_ip.s_addr); + nfct_set_attr_u32(ct, ATTR_IPV4_SRC, serv_fde_local_ip.s_addr); } nfct_set_attr_u8(ct, ATTR_L4PROTO, IPPROTO_TCP); @@ -91,15 +91,15 @@ /* Open a handle to the conntrack */ if (struct nfct_handle *h = nfct_open(CONNTRACK, 0)) { /* Register the callback. The callback function will record the mark value. */ - nfct_callback_register(h, NFCT_T_ALL, getNfMarkCallback, (void *)clientFde); + nfct_callback_register(h, NFCT_T_ALL, getNfMarkCallback, (void *)clientFde); /* Query the conntrack table using the data previously set */ int x = nfct_query(h, NFCT_Q_GET, ct); if (x == -1) { debugs(17, 2, "QOS: Failed to retrieve connection mark: (" << x << ") " << strerror(errno) - << " (Destination " << servFde->ipaddr << ":" << servFde->remote_port - << ", source " << serv_fde_local_conn << ")" ); + << " (Destination " << servFde->ipaddr << ":" << servFde->remote_port + << ", source " << serv_fde_local_conn << ")" ); } - + nfct_close(h); } else { debugs(17, 2, "QOS: Failed to open conntrack handle for upstream netfilter mark retrieval."); @@ -116,14 +116,14 @@ #if USE_LIBNETFILTERCONNTRACK int Ip::Qos::getNfMarkCallback(enum nf_conntrack_msg_type type, - struct nf_conntrack *ct, - void *data) + struct nf_conntrack *ct, + void *data) { - fde *clientFde = (fde *)data; - clientFde->nfmarkFromServer = nfct_get_attr_u32(ct, ATTR_MARK); - debugs(17, 3, "QOS: Retrieved connection mark value: " << clientFde->nfmarkFromServer); + fde *clientFde = (fde *)data; + clientFde->nfmarkFromServer = nfct_get_attr_u32(ct, ATTR_MARK); + debugs(17, 3, "QOS: Retrieved connection mark value: " << clientFde->nfmarkFromServer); - return NFCT_CB_CONTINUE; + return NFCT_CB_CONTINUE; } #endif @@ -229,11 +229,11 @@ # else // USE_LIBNETFILTERCONNTRACK preserveMissMark = false; debugs(3, DBG_IMPORTANT, "WARNING: Squid not compiled with Netfilter conntrack library. " - << "Netfilter mark preservation not available."); + << "Netfilter mark preservation not available."); #endif // USE_LIBNETFILTERCONNTRACK #else // SO_MARK debugs(3, DBG_CRITICAL, "ERROR: Invalid parameter 'mark' in qos_flows option. " - << "Linux Netfilter marking not available."); + << "Linux Netfilter marking not available."); self_destruct(); #endif // SO_MARK } else if (strncmp(token, "tos",3) == 0) { @@ -249,14 +249,14 @@ if (mark) { if (!xstrtoui(&token[10], NULL, &markLocalHit, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad mark local-hit value " << &token[10]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad mark local-hit value " << &token[10]); + self_destruct(); } } else { unsigned int v = 0; if (!xstrtoui(&token[10], NULL, &v, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad TOS local-hit value " << &token[10]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad TOS local-hit value " << &token[10]); + self_destruct(); } tosLocalHit = (tos_t)v; } @@ -265,14 +265,14 @@ if (mark) { if (!xstrtoui(&token[12], NULL, &markSiblingHit, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad mark sibling-hit value " << &token[12]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad mark sibling-hit value " << &token[12]); + self_destruct(); } } else { unsigned int v = 0; if (!xstrtoui(&token[12], NULL, &v, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad TOS sibling-hit value " << &token[12]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad TOS sibling-hit value " << &token[12]); + self_destruct(); } tosSiblingHit = (tos_t)v; } @@ -281,14 +281,14 @@ if (mark) { if (!xstrtoui(&token[11], NULL, &markParentHit, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad mark parent-hit value " << &token[11]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad mark parent-hit value " << &token[11]); + self_destruct(); } } else { unsigned int v = 0; if (!xstrtoui(&token[11], NULL, &v, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad TOS parent-hit value " << &token[11]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad TOS parent-hit value " << &token[11]); + self_destruct(); } tosParentHit = (tos_t)v; } @@ -297,14 +297,14 @@ if (mark) { if (!xstrtoui(&token[5], NULL, &markMiss, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad mark miss value " << &token[5]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad mark miss value " << &token[5]); + self_destruct(); } } else { unsigned int v = 0; if (!xstrtoui(&token[5], NULL, &v, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad TOS miss value " << &token[5]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad TOS miss value " << &token[5]); + self_destruct(); } tosMiss = (tos_t)v; } @@ -327,14 +327,14 @@ if (mark && preserveMissMark) { if (!xstrtoui(&token[10], NULL, &preserveMissMarkMask, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad mark miss-mark value " << &token[10]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad mark miss-mark value " << &token[10]); + self_destruct(); } } else if (preserveMissTos) { unsigned int v = 0; if (!xstrtoui(&token[10], NULL, &v, 0, std::numeric_limits::max())) { - debugs(3, DBG_CRITICAL, "ERROR: Bad TOS miss-mark value " << &token[10]); - self_destruct(); + debugs(3, DBG_CRITICAL, "ERROR: Bad TOS miss-mark value " << &token[10]); + self_destruct(); } preserveMissTosMask = (tos_t)v; } else { @@ -380,7 +380,7 @@ } p += snprintf(p, 2, "\n"); } - + if (isHitNfmarkActive()) { p += snprintf(p, 11, "%s", name); // strlen("qos_flows "); p += snprintf(p, 5, "%s", "mark"); === modified file 'src/ip/QosConfig.h' --- src/ip/QosConfig.h 2010-10-06 13:03:11 +0000 +++ src/ip/QosConfig.h 2010-10-13 00:14:42 +0000 @@ -29,89 +29,89 @@ namespace Qos { - /** - * Function to retrieve the TOS value of the inbound packet. - * Called by FwdState::dispatch if QOS options are enabled. - * Bug 2537: This part of ZPH only applies to patched Linux kernels - * @param server_fd Server side descriptor of connection to get TOS for - * @param clientFde Pointer to client side fde instance to set tosFromServer in - */ - void getTosFromServer(const int server_fd, fde *clientFde); - - /** - * Function to retrieve the netfilter mark value of the connection - * to the upstream server. Called by FwdState::dispatch if QOS - * options are enabled. - * @param server_fd Server side descriptor of connection to get mark for - * @param servFde Pointer to server side fde instance to get mark for - * @param clientFde Pointer to client side fde instance to set nfmarkFromServer in - */ - void getNfmarkFromServer(const int server_fd, const fde *servFde, const fde *clientFde); +/** +* Function to retrieve the TOS value of the inbound packet. +* Called by FwdState::dispatch if QOS options are enabled. +* Bug 2537: This part of ZPH only applies to patched Linux kernels +* @param server_fd Server side descriptor of connection to get TOS for +* @param clientFde Pointer to client side fde instance to set tosFromServer in +*/ +void getTosFromServer(const int server_fd, fde *clientFde); + +/** +* Function to retrieve the netfilter mark value of the connection +* to the upstream server. Called by FwdState::dispatch if QOS +* options are enabled. +* @param server_fd Server side descriptor of connection to get mark for +* @param servFde Pointer to server side fde instance to get mark for +* @param clientFde Pointer to client side fde instance to set nfmarkFromServer in +*/ +void getNfmarkFromServer(const int server_fd, const fde *servFde, const fde *clientFde); #if USE_LIBNETFILTERCONNTRACK - /** - * Callback function to mark connection once it's been found. - * This function is called by the libnetfilter_conntrack - * libraries, during nfct_query in Ip::Qos::getNfmarkFromServer. - * nfct_callback_register is used to register this function. - * @param nf_conntrack_msg_type Type of conntrack message - * @param nf_conntrack Pointer to the conntrack structure - * @param clientFde Pointer to client side fde instance to set nfmarkFromServer in - */ - int getNfMarkCallback(enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *clientFde); +/** +* Callback function to mark connection once it's been found. +* This function is called by the libnetfilter_conntrack +* libraries, during nfct_query in Ip::Qos::getNfmarkFromServer. +* nfct_callback_register is used to register this function. +* @param nf_conntrack_msg_type Type of conntrack message +* @param nf_conntrack Pointer to the conntrack structure +* @param clientFde Pointer to client side fde instance to set nfmarkFromServer in +*/ +int getNfMarkCallback(enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *clientFde); #endif - /** - * Function to work out and then apply to the socket the appropriate - * TOS value to set on packets when items have not been retrieved from - * local cache. Called by clientReplyContext::sendMoreData if QOS is - * enabled for TOS. - * @param fd Descriptor of socket to set the TOS for - * @param hierCode Hier code of request - */ - int doTosLocalMiss(const int fd, const hier_code hierCode); - - /** - * Function to work out and then apply to the socket the appropriate - * netfilter mark value to set on packets when items have not been - * retrieved from local cache. Called by clientReplyContext::sendMoreData - * if QOS is enabled for TOS. - * @param fd Descriptor of socket to set the mark for - * @param hierCode Hier code of request - */ - int doNfmarkLocalMiss(const int fd, const hier_code hierCode); - - /** - * Function to work out and then apply to the socket the appropriate - * TOS value to set on packets when items *have* been retrieved from - * local cache. Called by clientReplyContext::doGetMoreData if QOS is - * enabled for TOS. - * @param fd Descriptor of socket to set the TOS for - */ - int doTosLocalHit(const int fd); - - /** - * Function to work out and then apply to the socket the appropriate - * netfilter mark value to set on packets when items *have* been - * retrieved from local cache. Called by clientReplyContext::doGetMoreData - * if QOS is enabled for TOS. - * @param fd Descriptor of socket to set the mark for - */ - int doNfmarkLocalHit(const int fd); - - /** - * Function to set the TOS value of packets. Sets the value on the socket - * which then gets copied to the packets. - * @param fd Descriptor of socket to set the TOS for - */ - _SQUID_INLINE_ int setSockTos(int fd, tos_t tos); - - /** - * Function to set the netfilter mark value of packets. Sets the value on the - * socket which then gets copied to the packets. Called from Ip::Qos::doNfmarkLocalMiss - * @param fd Descriptor of socket to set the mark for - */ - _SQUID_INLINE_ int setSockNfmark(int fd, nfmark_t mark); +/** +* Function to work out and then apply to the socket the appropriate +* TOS value to set on packets when items have not been retrieved from +* local cache. Called by clientReplyContext::sendMoreData if QOS is +* enabled for TOS. +* @param fd Descriptor of socket to set the TOS for +* @param hierCode Hier code of request +*/ +int doTosLocalMiss(const int fd, const hier_code hierCode); + +/** +* Function to work out and then apply to the socket the appropriate +* netfilter mark value to set on packets when items have not been +* retrieved from local cache. Called by clientReplyContext::sendMoreData +* if QOS is enabled for TOS. +* @param fd Descriptor of socket to set the mark for +* @param hierCode Hier code of request +*/ +int doNfmarkLocalMiss(const int fd, const hier_code hierCode); + +/** +* Function to work out and then apply to the socket the appropriate +* TOS value to set on packets when items *have* been retrieved from +* local cache. Called by clientReplyContext::doGetMoreData if QOS is +* enabled for TOS. +* @param fd Descriptor of socket to set the TOS for +*/ +int doTosLocalHit(const int fd); + +/** +* Function to work out and then apply to the socket the appropriate +* netfilter mark value to set on packets when items *have* been +* retrieved from local cache. Called by clientReplyContext::doGetMoreData +* if QOS is enabled for TOS. +* @param fd Descriptor of socket to set the mark for +*/ +int doNfmarkLocalHit(const int fd); + +/** +* Function to set the TOS value of packets. Sets the value on the socket +* which then gets copied to the packets. +* @param fd Descriptor of socket to set the TOS for +*/ +_SQUID_INLINE_ int setSockTos(int fd, tos_t tos); + +/** +* Function to set the netfilter mark value of packets. Sets the value on the +* socket which then gets copied to the packets. Called from Ip::Qos::doNfmarkLocalMiss +* @param fd Descriptor of socket to set the mark for +*/ +_SQUID_INLINE_ int setSockNfmark(int fd, nfmark_t mark); /** * QOS configuration class. Contains all the parameters for QOS functions as well @@ -137,7 +137,7 @@ /// Whether we should modify TOS flags based on cache hits and misses. _SQUID_INLINE_ bool isHitTosActive() const; - + /// Whether we should modify netfilter marks based on cache hits and misses. _SQUID_INLINE_ bool isHitNfmarkActive() const; @@ -146,7 +146,7 @@ * to find out if any Netfilter marking is required. * This function is used on initialisation to define capabilities required (Netfilter * marking requires CAP_NET_ADMIN). - */ + */ _SQUID_INLINE_ bool isAclNfmarkActive() const; /** === modified file 'src/ip/stubQosConfig.cc' --- src/ip/stubQosConfig.cc 2010-10-06 03:50:45 +0000 +++ src/ip/stubQosConfig.cc 2010-10-13 00:14:42 +0000 @@ -22,8 +22,8 @@ #if USE_QOS_NFMARK int Ip::Qos::GetNfMarkCallback(enum nf_conntrack_msg_type type, - struct nf_conntrack *ct, - void *data) + struct nf_conntrack *ct, + void *data) { fatal ("Not implemented"); } @@ -46,7 +46,7 @@ { fatal ("Not implemented"); } - + int Ip::Qos::doNfmarkLocalHit(const int fd) const {