/*+********************************************************************** * File name : dns.h * Title : Main Header file for httpd * Project : SW INFRASTRUCTURE * Date created : 15 OCT 1997 * Revision : Rev 1.0 * Author : Nir Ben-Yosef * * *-*********************************************************************/ #ifndef _DNS_H #define _DNS_H #include "http_util.h" #define DNS_PORT 53 #define DNS_TASK_PRIORITY 100 #define DNS_STACK_SIZE 4096*8 /* The default string lengths */ #define MAX_STRING_LEN HUGE_STRING_LEN #define HUGE_STRING_LEN 2048 #define LITTLE_STRING_LEN 128 #define VERY_LITTLE_STRING_LEN 16 /* The timeout for waiting for messages */ #define DEFAULT_TIMEOUT 300 /* The timeout for waiting for keepalive timeout until next request */ #define DEFAULT_KEEPALIVE_TIMEOUT 15 /* The number of requests to entertain per connection */ #define DEFAULT_KEEPALIVE 100 /* The number of concurrent Http Tasks */ #define MAX_SESSIONS 2 #define OK 0 /* Module has handled this stage. */ typedef unsigned short int WORD; typedef unsigned int DWORD; typedef unsigned char BYTE; #define DNS_ANSWER_SIZE 16 #define DNS_RESPONSE_DATA_LENGTH 0x0004 #define SIZE_OF_WORD 2 #define OK_RESPONSE_FLAGS 0x8500 #define ERROR_RESPONSE_FLAGS 0x8503 #define RESPONE_CLASS_INTERNET 0x0001 #define RESPONE_TYPE_A 0x0001 #define RESPONSE_TTL 0x00015180 #define RESPONSE_DOMAIN_NAME_PTR 0xc00c #define ATTRIB_PACKED __attribute__ ((packed)) #pragma align 1 typedef struct { WORD identification ATTRIB_PACKED; WORD flags ATTRIB_PACKED; WORD number_of_questions ATTRIB_PACKED; WORD number_of_answers_rr ATTRIB_PACKED; WORD number_of_aturity_rr ATTRIB_PACKED; WORD number_of_additional_rr ATTRIB_PACKED; }DNS_MSG_HEADER_STRUCT; #pragma align 0 #endif