121126Sdist /* 221126Sdist * Copyright (c) 1983 Regents of the University of California. 3*33539Sbostic * All rights reserved. 421126Sdist * 5*33539Sbostic * Redistribution and use in source and binary forms are permitted 6*33539Sbostic * provided that this notice is preserved and that due credit is given 7*33539Sbostic * to the University of California at Berkeley. The name of the University 8*33539Sbostic * may not be used to endorse or promote products derived from this 9*33539Sbostic * software without specific prior written permission. This software 10*33539Sbostic * is provided ``as is'' without express or implied warranty. 11*33539Sbostic * 12*33539Sbostic * @(#)htable.h 5.2 (Berkeley) 02/23/88 1321126Sdist */ 148733Ssam 158733Ssam #include <sys/types.h> 16*33539Sbostic #include <netinet/in.h> 178733Ssam 188733Ssam /* 198733Ssam * common definitions for htable 208733Ssam */ 218733Ssam 228733Ssam struct addr { 23*33539Sbostic struct in_addr addr_val; 248733Ssam struct addr *addr_link; 258733Ssam }; 268733Ssam 278733Ssam struct name { 288733Ssam char *name_val; 298733Ssam struct name *name_link; 308733Ssam }; 318733Ssam 3215377Skarels struct gateway { 3315377Skarels struct gateway *g_link; 3415377Skarels struct gateway *g_dst; /* connected gateway if metric > 0 */ 3515377Skarels struct gateway *g_firstent; /* first entry for this gateway */ 3615377Skarels struct name *g_name; 3715377Skarels int g_net; 38*33539Sbostic struct in_addr g_addr; /* address on g_net */ 3915377Skarels int g_metric; /* hops to this net */ 4015377Skarels }; 4115377Skarels 428784Ssam #define NOADDR ((struct addr *)0) 438784Ssam #define NONAME ((struct name *)0) 448733Ssam 458733Ssam #define KW_NET 1 468733Ssam #define KW_GATEWAY 2 478733Ssam #define KW_HOST 3 488733Ssam 498733Ssam struct name *newname(); 508733Ssam char *malloc(); 518733Ssam 528733Ssam char *infile; /* Input file name */ 53