473,395 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to identify DNS server?

Hi all,

How can I identify whether my local computer is a DNS server(using windows
API + vc 2005)?
Regards,
Su
Mar 7 '07 #1
4 6418
"su haiqing" <ha******@qualsolutions.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
How can I identify whether my local computer is a DNS server
(using windows API + vc 2005)?
It's not exactly what you asked, but calling GetNetworkParams() wll get you
the IP addresses of the DNS servers, and assuming that you know the IP
address of the local computer, you could do the compares.

Regards,
Will
www.ivrforbeginners.com
Mar 7 '07 #2
Thanks for your help. But if the program is running on the dns server then
we will get the top level DNS servers from GetNetworkParams(),and do
compares won't make right decision, am I right?

"William DePalo [MVP VC++]" <wi***********@mvps.orgдÈëÏûÏ¢ÐÂÎÅ:eu************ *@TK2MSFTNGP03.phx.gbl...
"su haiqing" <ha******@qualsolutions.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>How can I identify whether my local computer is a DNS server
(using windows API + vc 2005)?

It's not exactly what you asked, but calling GetNetworkParams() wll get
you the IP addresses of the DNS servers, and assuming that you know the IP
address of the local computer, you could do the compares.

Regards,
Will
www.ivrforbeginners.com


Mar 7 '07 #3
"su haiqing" <ha******@qualsolutions.comwrote in message
news:eu*************@TK2MSFTNGP06.phx.gbl...
Thanks for your help. But if the program is running on the dns server then
we will get the top level DNS servers from GetNetworkParams(),and do
compares won't make right decision, am I right?
What I proposed won't tell you whether a particular machine can act as a DNS
server or not. It can only tell you if the IP address of a particular
machine is among those used for name resolution.

I suggest you repost in a group focusing on networking.

Regards,
Will

Mar 7 '07 #4

"su haiqing" <ha******@qualsolutions.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi all,

How can I identify whether my local computer is a DNS server(using windows
API + vc 2005)?
Send something to your own computer's port 53. UDP is used for most DNS
traffic, but DNS servers generally also listen on TCP port 53 in order to
support (authenticated) zone transfers.

API functions such as socket and connect will be helpful.
>

Regards,
Su

Mar 7 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kamesh | last post by:
Hi Folks, how to identify 2 different session on same machine, same/nearly same logon time that is running on a oracle server. We have different sid,serial# but how to identify they both are...
1
by: xo55ox | last post by:
Hi, I want to find out what is a good way to identify indexes that need rebuilding. I tried to run DBCC showcontig and identify them based on the scan density %. And according to a Microsoft...
1
by: Brad H McCollum | last post by:
I'm writing an application using VB 6.0 as the front-end GUI, and the MSDE version of SQL Server as the back-end (it's a program for a really small # of users --- less then 3-4). I'm trying to...
8
by: DraguVaso | last post by:
Hi, I want my application do different actions depending on the exception it gets. For exemple: I have an SQL-table with a unique index. In case I try to Insert a record that's alreaddy in it I...
3
by: John | last post by:
I am not sure if it is the right forum for Regex topic. If not, please point me the right forum. For a given HTML, I need to identify each asp.net server control. I am not an expert in regex, can...
4
by: Goh | last post by:
Hi, I would like to know how can we implement a web page that intelligent enough to unique identify that pc have been visit before without any cookies and login user require. I have try...
7
by: phal | last post by:
Hi I think there are many different browsers to browse to the Internet, how can I write the javascript to identify different browser and display according to the users. Some browser disable the...
16
by: Alan Jones | last post by:
Hello everyone, any help would be greatly appreciated. :) What I'm trying to do may not be advisable, but here goes... I want a page named signature.php to appear conditionally as an include...
6
by: Ryan Liu | last post by:
Hi, If I want to uniquely identify a computer. I can read CPU ID or Mac Address. I heard, but is this true: some BIOS can block CPU ID from being read? (In this case, will I get an exception,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.