147 |
class TestDns : public ThreadIf, public DnsStub |
class TestDns : public ThreadIf, public DnsStub |
148 |
{ |
{ |
149 |
public: |
public: |
150 |
TestDns() |
TestDns(const DnsStub::NameserverList& additional) : DnsStub(additional) |
151 |
{ |
{ |
152 |
} |
} |
153 |
|
|
182 |
return 0; |
return 0; |
183 |
} |
} |
184 |
|
|
185 |
|
DnsStub::NameserverList nameServerList = DnsStub::EmptyNameserverList; |
186 |
|
if(argc == 4) |
187 |
|
{ |
188 |
|
Tuple tuple(Data(argv[3]), 0, V4); |
189 |
|
nameServerList.push_back(tuple.toGenericIPAddress()); |
190 |
|
} |
191 |
|
|
192 |
char* logType = "cout"; |
char* logType = "cout"; |
193 |
//char* logLevel = "STACK"; |
//char* logLevel = "STACK"; |
194 |
char* logLevel = "INFO"; |
char* logLevel = "DEBUG"; |
195 |
|
|
196 |
#if defined(HAVE_POPT_H) |
#if defined(HAVE_POPT_H) |
197 |
struct poptOption table[] = { |
struct poptOption table[] = { |
207 |
|
|
208 |
Log::initialize(logType, logLevel, argv[0]); |
Log::initialize(logType, logLevel, argv[0]); |
209 |
initNetwork(); |
initNetwork(); |
210 |
TestDns dns; |
TestDns dns(nameServerList); |
211 |
dns.run(); |
dns.run(); |
212 |
cerr << "Starting" << endl; |
cerr << "Starting" << endl; |
213 |
#if defined(HAVE_POPT_H) |
#if defined(HAVE_POPT_H) |