This question probably looks stupid, but it seems like I have to ask it anyway. How will some one distinguish between the case when on call to res_nsearch() which takes a set of param and one of them is domain name (which is deliberately unreal , so res_search() failing ), and res_search() failure on any other reason. Thank you very mach.