net/dns.h

gehe zur Dokumentation dieser Datei
00001 
00002 //***************************************************************************
00003 //*            dns.h
00004 //*
00005 //*  Mon Aug 21 21:34:26 2006
00006 //*  Copyright  2006  User
00007 //*  Email
00008 //****************************************************************************/
00009 //****************************************************************************/
00011 /*
00012  *  This program is free software; you can redistribute it and/or modify
00013  *  it under the terms of the GNU General Public License as published by
00014  *  the Free Software Foundation; either version 2 of the License, or
00015  *  (at your option) any later version.
00016  *
00017  *  This program is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *  GNU General Public License for more details.
00021  *
00022  *  You should have received a copy of the GNU General Public License
00023  *  along with this program; if not, write to the Free Software
00024  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00025  */
00027 #ifndef _DNS_H
00028         #define _DNS_H
00029 
00030         #define DNS_BUFFER_LENGHT       210
00031         #define DNS_SERVER_PORT         53
00032         #define DNS_NO_ANSWER           0xffffffff
00033         #define DNS_REQUEST_TIMEOUT 200                 // in 1/100 sekunden
00034         
00038         //@[
00039         #define CNAME                           0x0005
00040         #define A_HOSTNAME                      0x0001
00041 
00042         unsigned long DNS_ResolveName( unsigned char * HOSTNAME );
00043         unsigned int DNS_convertHostName( unsigned char * HOSTNAME , unsigned char * Destbuffer );
00044         
00045         #define DNS_HEADER_LENGHT   12
00046         
00050         struct DNS {
00051                 unsigned int TransactionID;
00052                 unsigned int Flags;
00053                 unsigned int Questions;
00054                 unsigned int Answer_RRs;
00055                 unsigned int Authority_RRs;
00056                 unsigned int Additional_RRs;
00057                 unsigned char Queries[];
00058         };
00059         
00060         #define DNS_ANSWER_HEADER_LENGHT        12
00061         
00065         struct DNS_answer {
00066                 unsigned int Name;
00067                 unsigned int Type;                      
00068                 unsigned int IN;
00069                 unsigned long TTL;
00070                 unsigned int Datalenght;
00071                 unsigned long Adress;
00072         };
00073         
00074 #endif /* _DNS_H */
00075 

Erzeugt am Fri Sep 8 10:59:05 2006 für MikroEthernetBoard von  doxygen 1.4.6