121126Sdist /* 221126Sdist * Copyright (c) 1983 Regents of the University of California. 333539Sbostic * All rights reserved. 421126Sdist * 542798Sbostic * %sccs.include.redist.c% 633539Sbostic * 7*46299Sbostic * @(#)htable.h 5.5 (Berkeley) 02/06/91 821126Sdist */ 98733Ssam 108733Ssam #include <sys/types.h> 1133539Sbostic #include <netinet/in.h> 128733Ssam 138733Ssam /* 148733Ssam * common definitions for htable 158733Ssam */ 168733Ssam 178733Ssam struct addr { 1833539Sbostic struct in_addr addr_val; 198733Ssam struct addr *addr_link; 208733Ssam }; 218733Ssam 228733Ssam struct name { 238733Ssam char *name_val; 248733Ssam struct name *name_link; 258733Ssam }; 268733Ssam 2715377Skarels struct gateway { 2815377Skarels struct gateway *g_link; 2915377Skarels struct gateway *g_dst; /* connected gateway if metric > 0 */ 3015377Skarels struct gateway *g_firstent; /* first entry for this gateway */ 3115377Skarels struct name *g_name; 3215377Skarels int g_net; 3333539Sbostic struct in_addr g_addr; /* address on g_net */ 3415377Skarels int g_metric; /* hops to this net */ 3515377Skarels }; 3615377Skarels 378784Ssam #define NOADDR ((struct addr *)0) 388784Ssam #define NONAME ((struct name *)0) 398733Ssam 408733Ssam #define KW_NET 1 418733Ssam #define KW_GATEWAY 2 428733Ssam #define KW_HOST 3 438733Ssam 448733Ssam struct name *newname(); 458733Ssam 468733Ssam char *infile; /* Input file name */ 47