]>
Commit | Line | Data |
---|---|---|
575cb927 AJ |
1 | #include "squid.h" |
2 | ||
3 | #if USE_ZPH_QOS | |
4 | ||
3470fc91 | 5 | #include "ip/QosConfig.h" |
575cb927 AJ |
6 | #include "Store.h" |
7 | ||
3470fc91 | 8 | Ip::QosConfig::QosConfig() : |
af6a12ee AJ |
9 | tos_local_hit(0), |
10 | tos_sibling_hit(0), | |
11 | tos_parent_hit(0), | |
12 | preserve_miss_tos(1), | |
13 | preserve_miss_tos_mask(255) | |
575cb927 AJ |
14 | { |
15 | ; | |
16 | } | |
17 | ||
18 | void | |
3470fc91 | 19 | Ip::QosConfig::parseConfigLine() |
575cb927 AJ |
20 | { |
21 | // %i honors 0 and 0x prefixes, which are important for things like umask | |
22 | /* parse options ... */ | |
23 | char *token; | |
af6a12ee | 24 | while ( (token = strtok(NULL, w_space)) ) { |
575cb927 | 25 | |
af6a12ee | 26 | if (strncmp(token, "local-hit=",10) == 0) { |
575cb927 | 27 | sscanf(&token[10], "%i", &tos_local_hit); |
af6a12ee | 28 | } else if (strncmp(token, "sibling-hit=",12) == 0) { |
575cb927 | 29 | sscanf(&token[12], "%i", &tos_sibling_hit); |
af6a12ee | 30 | } else if (strncmp(token, "parent-hit=",11) == 0) { |
575cb927 | 31 | sscanf(&token[11], "%i", &tos_parent_hit); |
af6a12ee | 32 | } else if (strcmp(token, "disable-preserve-miss") == 0) { |
575cb927 AJ |
33 | preserve_miss_tos = 0; |
34 | preserve_miss_tos_mask = 0; | |
af6a12ee | 35 | } else if (preserve_miss_tos && strncmp(token, "miss-mask=",10) == 0) { |
575cb927 AJ |
36 | sscanf(&token[10], "%i", &preserve_miss_tos_mask); |
37 | } | |
38 | } | |
39 | } | |
40 | ||
41 | void | |
3470fc91 | 42 | Ip::QosConfig::dumpConfigLine(char *entry, const char *name) const |
575cb927 AJ |
43 | { |
44 | ; /* Not needed in stub */ | |
45 | } | |
46 | ||
47 | #endif /* USE_ZPH_QOS */ |