BSD 4_3_Net_1 release
[unix-history] / htable / htable.h
CommitLineData
ab6da654
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
8f66080b 3 * All rights reserved.
ab6da654 4 *
8f66080b 5 * Redistribution and use in source and binary forms are permitted
b8c620d6
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
8f66080b 16 *
ca67e7b4 17 * @(#)htable.h 5.3 (Berkeley) 6/18/88
ab6da654 18 */
d5d4aed4
SL
19
20#include <sys/types.h>
8f66080b 21#include <netinet/in.h>
d5d4aed4
SL
22
23/*
24 * common definitions for htable
25 */
26
27struct addr {
8f66080b 28 struct in_addr addr_val;
d5d4aed4
SL
29 struct addr *addr_link;
30};
31
32struct name {
33 char *name_val;
34 struct name *name_link;
35};
36
99d3ae94
MK
37struct gateway {
38 struct gateway *g_link;
39 struct gateway *g_dst; /* connected gateway if metric > 0 */
40 struct gateway *g_firstent; /* first entry for this gateway */
41 struct name *g_name;
42 int g_net;
8f66080b 43 struct in_addr g_addr; /* address on g_net */
99d3ae94
MK
44 int g_metric; /* hops to this net */
45};
46
cd08f4dd
SL
47#define NOADDR ((struct addr *)0)
48#define NONAME ((struct name *)0)
d5d4aed4
SL
49
50#define KW_NET 1
51#define KW_GATEWAY 2
52#define KW_HOST 3
53
54struct name *newname();
55char *malloc();
56
57char *infile; /* Input file name */