make sleep spin-wait during autoconfiguration
[unix-history] / usr / src / old / htable / htable.h
index 586f32e..4c42125 100644 (file)
@@ -1,4 +1,10 @@
-/*     @(#)htable.h    4.1 (Berkeley) %G%      */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)htable.h    5.1 (Berkeley) %G%
+ */
 
 #include <sys/types.h>
 
 
 #include <sys/types.h>
 
@@ -16,18 +22,18 @@ struct name {
        struct  name *name_link;
 };
 
        struct  name *name_link;
 };
 
-#define        alloc_addr(dummy)       ((struct addr *) malloc(sizeof(struct addr)))
-#define        free_addr(x)            free((char *) x)
-#define        NOADDR                  ((struct addr *) 0)
-#define net(x)                 ((x) & 0xff)
-#define host(x)                        (((x) >> 8) & 0xff)
-#define lhost(x)               (((x) >> 16) & 0xff)
-#define imp(x)                 (((x) >> 24) & 0xff)
-
-#define        alloc_name(dummy)       ((struct name *) malloc(sizeof(struct name)))
-#define        free_name(x)            free(x->name_val); \
-                               free((char *) x)
-#define        NONAME                  ((struct name *) 0)
+struct gateway {
+       struct  gateway *g_link;
+       struct  gateway *g_dst;         /* connected gateway if metric > 0 */
+       struct  gateway *g_firstent;    /* first entry for this gateway */
+       struct  name    *g_name;
+       int     g_net;
+       u_long  g_addr;                 /* address on g_net */
+       int     g_metric;               /* hops to this net */
+};
+
+#define        NOADDR                  ((struct addr *)0)
+#define        NONAME                  ((struct name *)0)
 
 #define        KW_NET          1
 #define        KW_GATEWAY      2
 
 #define        KW_NET          1
 #define        KW_GATEWAY      2