1/* $Id: loc.h,v 1.1 2008/02/15 01:47:15 marka Exp $ */ 2 3#define VERSION "0.4.0" 4 5#include "config.h" 6 7/* Probably too many inclusions but this is to keep 'gcc -Wall' happy... */ 8#include <stdio.h> 9#include <stdlib.h> 10#include <sys/types.h> 11#include <netdb.h> 12#include <sys/socket.h> 13#include <netinet/in.h> 14#include <arpa/inet.h> 15#include <sys/time.h> 16#include <errno.h> 17#include <unistd.h> 18#include <string.h> 19#include <signal.h> 20#include <arpa/nameser.h> 21#include <resolv.h> 22 23#ifndef FALSE 24#define FALSE 0 25#endif 26#ifndef TRUE 27#define TRUE 1 28#endif 29 30#if SIZEOF_LONG == 4 31#define u_int32_t unsigned long 32#ifndef int32_t 33#define int32_t long 34#endif 35#else 36#define u_int32_t unsigned int 37#ifndef int32_t 38#define int32_t int 39#endif 40#endif 41 42#if SIZEOF_CHAR == 1 43#define u_int8_t unsigned char 44#ifndef int8_t 45#define int8_t char 46#endif 47#else 48#if SIZEOF_SHORT == 1 49#define u_int8_t unsigned short 50#ifndef int8_t 51#define int8_t short 52#endif 53#else 54#error "No suitable native type for storing bytes" 55#endif 56#endif 57 58#ifndef INADDR_NONE 59#define INADDR_NONE (in_addr_t)-1 60#endif 61 62struct list_in_addr 63 { 64 struct in_addr addr; 65 void *next; 66 }; 67 68void usage (); 69void panic (); 70 71char *getlocbyname (); 72char *getlocbyaddr (); 73char *getlocbynet (); 74char *findRR (); 75struct list_in_addr *findA (); 76 77extern char *progname; 78extern short debug; 79