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