smtp_relayserver
Class DNSPackageCreater

java.lang.Object
  |
  +--smtp_relayserver.DNSPackageCreater

public class DNSPackageCreater
extends java.lang.Object

This class allows you to convert a DNS package in form of a byte array. Also you can create a DNS query with a userfriendly notation.

Copyright (C) 1998 Valentin Koch

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Constructor Summary
DNSPackageCreater()
           
 
Method Summary
 byte[] createQuery(short qID, java.lang.String qName, byte qType)
          Returns a simple DNS query in a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNSPackageCreater

public DNSPackageCreater()
Method Detail

createQuery

public byte[] createQuery(short qID,
                          java.lang.String qName,
                          byte qType)
Returns a simple DNS query in a byte array. This array can be used to place into a datagramm for sending it to a name server.
Parameters:
qID - The identifier of this query
qName - The domain name for the requested resource
qType - The type of the requested resource (i.e. MX, NS, A)