1 /* 2 * Copyright (c) 1983 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)htable.h 5.5 (Berkeley) 02/06/91 8 */ 9 10 #include <sys/types.h> 11 #include <netinet/in.h> 12 13 /* 14 * common definitions for htable 15 */ 16 17 struct addr { 18 struct in_addr addr_val; 19 struct addr *addr_link; 20 }; 21 22 struct name { 23 char *name_val; 24 struct name *name_link; 25 }; 26 27 struct gateway { 28 struct gateway *g_link; 29 struct gateway *g_dst; /* connected gateway if metric > 0 */ 30 struct gateway *g_firstent; /* first entry for this gateway */ 31 struct name *g_name; 32 int g_net; 33 struct in_addr g_addr; /* address on g_net */ 34 int g_metric; /* hops to this net */ 35 }; 36 37 #define NOADDR ((struct addr *)0) 38 #define NONAME ((struct name *)0) 39 40 #define KW_NET 1 41 #define KW_GATEWAY 2 42 #define KW_HOST 3 43 44 struct name *newname(); 45 46 char *infile; /* Input file name */ 47