xref: /csrg-svn/old/htable/htable.h (revision 21126)
1*21126Sdist /*
2*21126Sdist  * Copyright (c) 1983 Regents of the University of California.
3*21126Sdist  * All rights reserved.  The Berkeley software License Agreement
4*21126Sdist  * specifies the terms and conditions for redistribution.
5*21126Sdist  *
6*21126Sdist  *	@(#)htable.h	5.1 (Berkeley) 05/28/85
7*21126Sdist  */
88733Ssam 
98733Ssam #include <sys/types.h>
108733Ssam 
118733Ssam /*
128733Ssam  * common definitions for htable
138733Ssam  */
148733Ssam 
158733Ssam struct addr {
168733Ssam 	u_long	addr_val;
178733Ssam 	struct	addr *addr_link;
188733Ssam };
198733Ssam 
208733Ssam struct name {
218733Ssam 	char	*name_val;
228733Ssam 	struct	name *name_link;
238733Ssam };
248733Ssam 
2515377Skarels struct gateway {
2615377Skarels 	struct	gateway *g_link;
2715377Skarels 	struct	gateway *g_dst;		/* connected gateway if metric > 0 */
2815377Skarels 	struct	gateway *g_firstent;	/* first entry for this gateway */
2915377Skarels 	struct	name	*g_name;
3015377Skarels 	int	g_net;
3115377Skarels 	u_long	g_addr;			/* address on g_net */
3215377Skarels 	int	g_metric;		/* hops to this net */
3315377Skarels };
3415377Skarels 
358784Ssam #define	NOADDR			((struct addr *)0)
368784Ssam #define	NONAME			((struct name *)0)
378733Ssam 
388733Ssam #define	KW_NET		1
398733Ssam #define	KW_GATEWAY	2
408733Ssam #define	KW_HOST		3
418733Ssam 
428733Ssam struct name *newname();
438733Ssam char *malloc();
448733Ssam 
458733Ssam char *infile;			/* Input file name */
46