tcpdump mailing list archives

Re: Disable address/name resolution in libpcap


From: Denis Ovsienko <denis () ovsienko info>
Date: Thu, 14 Apr 2016 08:05:38 +0100

---- On Wed, 13 Apr 2016 16:44:24 +0100 Ed Sealing  wrote ---- 
We're writing an application around libpcap. The app may or may not have 
DNS resolution available. We've noticed that when DNS resolution is not 
available, we experience long delays when pre-testing the filters (prior to 
applying them). 

Is there a way to programatically disable name resolution in libpcap 
(similar to tcpdump "-n" argument)? I haven't been able to find a variable 
to pass in that would accomplish this directly in the library. I'm sure it 
exists, but can't seem to find it. 

"-n" is an option to tcpdump only, libpcap works the same way with and without it. The only case where DNS may be 
involved in libpcap is if the filter contains hostnames, which would need to be translated to addresses first to 
compile the filter. Could you post an example of the delay you are seeing?

-- 
    Denis Ovsienko

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: