开发者

Develop a basic DNS server (in C#) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

Improve this question 开发者_JAVA百科

I am developing a very basic DNS server for my own purpose. The way I understand it, the DNS server receives UDP packets containing the requested domain name and returns the corresponding IP under some kind of standard form.

There is a standard library for reading/writing UDP packets from/to binary format. But where can I find a C# library for serialising/deserialising DNS requests/responses?


The open source ARSoft.Tools.Net library contains a DNS Server component (see documentation).

You could use this library directly, or just use the source as a starting point for building your own DNS request serializer.


As far as I can tell, I couldn't find a library for C# which handles DNS packet serialization/deserialization, which means it's likely you'll have to roll your own.

Edit: I came across this network packet sniffer project on Code Project which might have what you need. Claims to be able to to parse TCP/UDP/DNS

I did find this very helpful site for TCP/IP which has a pretty comprehensive set of pages describing DNS packet types including the general message format.

There might be some additional help from this previous SO question though.


If you look at wikipedia you find a list over all RFC's for the dns protocol, i find rfc's to be the best way to implement a network protocol!

now the dns protocol has rather many rfc's so i dont know if this is the best way to read up on the protocol but you get all the information you need atleast.

http://en.wikipedia.org/wiki/Domain_Name_System#Internet_standards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜