|
|
| Programming Discussions about computer programming |
05-29-2012, 08:47 AM
|
#1
|
|
centurion
Join Date: Aug 2010
Location: Russia
Posts: 145
|
Writing DNS-server using C
I have this task for my exam in university : to write a DNS-server on C. I guess it is supposed to cache queries and redirect the unknown ones to google DNS, but I might be wrong.
Anyone could help me with that? Obv not for free.
My skype is goblet_tamer (I'm not a native speaker as you might have already noticed, so I guess it would be chat only).
|
|
|
05-30-2012, 10:39 AM
|
#2
|
|
King of the sidebar
Join Date: Sep 2004
Location: Northern Virginia
Posts: 15,950
|
Re: Writing DNS-server using C
Writing an Internet service that works heavily with strings, in a language that doesn't have any built-in support for strings? What could go wrong?
|
|
|
05-30-2012, 04:52 PM
|
#3
|
|
Pooh-Bah
Join Date: Dec 2003
Location: US
Posts: 3,609
|
Re: Writing DNS-server using C
I have one you can use, just download it here:
Attached file:
/usr/lib/libdns.so.64.1.0
I hope 64 bit is OK.
|
|
|
05-31-2012, 06:07 AM
|
#4
|
|
centurion
Join Date: Aug 2010
Location: Russia
Posts: 145
|
Re: Writing DNS-server using C
Quote:
Originally Posted by Neil S
Writing an Internet service that works heavily with strings, in a language that doesn't have any built-in support for strings? What could go wrong?
|
Unfortanutely, it wasn't me who came up with that task. I guess there'll be tons of char* and also some structs for packing/unpacking quiries.
Quote:
Originally Posted by jmark
I have one you can use, just download it here:
Attached file:
/usr/lib/libdns.so.64.1.0
I hope 64 bit is OK.
|
64bit is abs OK, but I need the sources, not the library itself.
|
|
|
05-31-2012, 09:54 AM
|
#5
|
|
King of the sidebar
Join Date: Sep 2004
Location: Northern Virginia
Posts: 15,950
|
Re: Writing DNS-server using C
Half your code is going to be string memory management, easily.
|
|
|
05-31-2012, 12:03 PM
|
#6
|
|
Carpal \'Tunnel
Join Date: Aug 2006
Location: NEVA!
Posts: 6,369
|
Re: Writing DNS-server using C
sounds like a decent challenge. good luck! xD
|
|
|
05-31-2012, 02:33 PM
|
#7
|
|
centurion
Join Date: Aug 2010
Location: Russia
Posts: 145
|
Re: Writing DNS-server using C
Quote:
Originally Posted by Neil S
Half your code is going to be string memory management, easily.
|
Just to make things clear, I ****ing hate this task already, and hate this teacher guy even more. I'd prefer to grind instead of writing that bs, so I'm looking for someone, who have enough knowledge to do this. Maybe I should ask some freelancer guys, but I posted first on poker forums b/c it's basically safer.
|
|
|
05-31-2012, 03:09 PM
|
#8
|
|
Carpal \'Tunnel
Join Date: Aug 2006
Location: NEVA!
Posts: 6,369
|
Re: Writing DNS-server using C
Quote:
Originally Posted by GobletTamer
Just to make things clear, I ****ing hate this task already, and hate this teacher guy even more. I'd prefer to grind instead of writing that bs, so I'm looking for someone, who have enough knowledge to do this. Maybe I should ask some freelancer guys, but I posted first on poker forums b/c it's basically safer.
|
when is the due date? and what level class is it? I would do it but I would have to learn C real quick but I know C++ already xD I would probably need a week.
|
|
|
06-01-2012, 11:57 AM
|
#9
|
|
centurion
Join Date: Aug 2010
Location: Russia
Posts: 145
|
Re: Writing DNS-server using C
So I talked to this teacher guy today and found out that I seriously misunderstood the task. I need to write a function that gives IP-address from domain name (basically, to form a DNS query and send it somewhere, then parse the answer).
There is formally no due date, but I need to have it done in about 2-3 days or so (the sooner I get it, the less problems I'll have afterwards). With my bachelor I don't have enough time to do this (and honestly, there's also lack of wish for doing that), so I'm asking for anyone's help in that question.
My skypename is in OP, the price is discussable.
|
|
|
06-01-2012, 12:54 PM
|
#10
|
|
bacon wannabe
Join Date: Sep 2004
Posts: 16,998
|
Re: Writing DNS-server using C
Quote:
Originally Posted by GobletTamer
So I talked to this teacher guy today and found out that I seriously misunderstood the task. I need to write a function that gives IP-address from domain name (basically, to form a DNS query and send it somewhere, then parse the answer).
There is formally no due date, but I need to have it done in about 2-3 days or so (the sooner I get it, the less problems I'll have afterwards). With my bachelor I don't have enough time to do this (and honestly, there's also lack of wish for doing that), so I'm asking for anyone's help in that question.
My skypename is in OP, the price is discussable. 
|
lol that is such a *huge* difference. Your job just got about a million times easier, and you can probably find some usable code snippets online
|
|
|
06-04-2012, 07:53 AM
|
#11
|
|
grinder
Join Date: Aug 2008
Posts: 604
|
Re: Writing DNS-server using C
Quote:
Originally Posted by Freakin
lol that is such a *huge* difference. Your job just got about a million times easier, and you can probably find some usable code snippets online
|
and yet he's clearly too lazy to even bother doing that. Good luck in your life OP. You will clearly need it.
|
|
|
06-04-2012, 08:43 AM
|
#12
|
|
centurion
Join Date: Aug 2010
Location: Russia
Posts: 145
|
Re: Writing DNS-server using C
ty, malloc.
I'm not that lazy, I'm just way too busy with my bachelor and some medical issues atm, so I don't even have enough time to play poker. Which would be more profitable, interesting, useful for me than doing this task. That's why I offer some guys, who know C and able to read this RFC 1035, then implement it, a chance to earn easy money. As I understood, it's less than 2hrs of work here, so I'd be happy to pay ~80$ for it. My skypename is in the 1st post, once again.
PS. I tried to google it, but yet I found only tips to use some standard functions like getaddrinfo etc, whilst I need to do it manually w/o this standard functions.
|
|
|
06-09-2012, 10:23 AM
|
#13
|
|
centurion
Join Date: Aug 2005
Location: from the grind of my divine hammer
Posts: 185
|
Re: Writing DNS-server using C
top tip: whenever you can't use the standard functions you can look at the source code for the standard functions to see how they work.
|
|
|
06-09-2012, 07:21 PM
|
#14
|
|
adept
Join Date: Aug 2010
Posts: 888
|
Re: Writing DNS-server using C
For a project I was working on a while ago, I needed a small DNS server that I could easily modify. I think it was because some device needed to access the internet, but wasn't able to deal with my company's proxy. Something of that sort...
Anyway, I found a very small python program that could do this. It was very restricted, but handled basic queries and met my needs. I think this is it: http://code.activestate.com/recipes/...ke-dns-server/
If you know python at all, this should be fairly straightforward to translate...
|
|
|
06-09-2012, 07:34 PM
|
#15
|
|
adept
Join Date: Aug 2010
Posts: 888
|
Re: Writing DNS-server using C
Haha, just saw what the real task is... That should be pretty easy. And there's plenty of code out there to do this. Like here:
http://www.beej.us/guide/bgnet/outpu...ml#getaddrinfo
or just go right to here:
http://beej.us/guide/bgnet/examples/showip.c
Now pay me $80.
EDIT: Oops, just saw that you can't use getaddrinfo, but it's still pretty straightforward. I mean, I wouldn't even worry about reading any RFCs. Just send your query, fill some string with the response, and figure out how to parse the string.
Last edited by pocketzeroes; 06-09-2012 at 07:44 PM.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 10:55 PM.
|