Results 1 to 2 of 2
  1. #1
    jammin is offline Member
    Join Date
    Nov 2008
    Posts
    1
    Rep Power
    0

    Default Send Datagram packet to root server

    Hello programmers,
    I'm new here. I want to build a java program to get the IP of the given website without using gethostbyname(). I want build a dns resolver using java programs that work as dig command in linux. That is i want get the ip of the TLD from the given root server and then continuing the process get the IP of the given website.
    I have to use datagrampacket and the UDP connection between user and the root server.
    I have seen such procedure in C++, building the DNS_HEADER PACKET and do the sendto() function to get the IP address.
    I want build the exactly dns packet and then send this to root server and also want the response.
    Please help me :
    1. How to build DNS_Header packet in java?
    2. How to send the this packet to root server?
    3. How to extract the response packet to get the IP?
    4. Any link or any sample code would be helpful?


    Please help me... any sample code would be really helpful.
    Jammin
    Last edited by jammin; 11-14-2008 at 06:32 AM.

  2. #2
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    dig is open source, and a good example. It's probably in C, but as an example of what to do, that won't be a problem

Similar Threads

  1. Replies: 2
    Last Post: 12-22-2008, 03:05 AM
  2. Replies: 1
    Last Post: 10-05-2008, 03:12 PM
  3. how can server send messages every 5 min?
    By dim_ath in forum Networking
    Replies: 7
    Last Post: 01-10-2008, 03:59 PM
  4. send/read int in a client/server app
    By dim_ath in forum New To Java
    Replies: 2
    Last Post: 01-03-2008, 01:03 PM
  5. how to send .jar files client to server
    By gobinathm in forum Networking
    Replies: 1
    Last Post: 12-25-2007, 04:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •