summaryrefslogtreecommitdiff
path: root/libproxy/extension_wpad.cpp
blob: 1f4d9b0e3057b1eec0ea5160685b4b3013057ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "extension_wpad.hpp"
using namespace libproxy;

#include <cstring>

static const char *DEFAULT_WPAD_ORDER[] = {
	"dhcp",
	"slp",
	"dns_srv",
	"dns_txt",
	"dns_alias",
	NULL
};

bool wpad_extension::operator<(const wpad_extension& other) const {
	for (int i=0 ; DEFAULT_WPAD_ORDER[i] ; i++) {
		if (strstr(other.get_base_type(), DEFAULT_WPAD_ORDER[i]))
			break;
		if (strstr(this->get_base_type(), DEFAULT_WPAD_ORDER[i]))
			return true;
	}
	return false;
}