+struct rtstat {
+ short rts_badredirect; /* bogus redirect calls */
+ short rts_dynamic; /* routes created by redirects */
+ short rts_newgateway; /* routes modified by redirects */
+ short rts_unreach; /* lookups which failed */
+ short rts_wildcard; /* lookups satisfied by a wildcard */
+};
+
+#ifdef KERNEL
+#define RTFREE(rt) \
+ if ((rt)->rt_refcnt == 1) \
+ rtfree(rt); \
+ else \
+ (rt)->rt_refcnt--;
+
+#ifdef GATEWAY
+#define RTHASHSIZ 64
+#else
+#define RTHASHSIZ 8
+#endif
+#if (RTHASHSIZ & (RTHASHSIZ - 1)) == 0
+#define RTHASHMOD(h) ((h) & (RTHASHSIZ - 1))
+#else
+#define RTHASHMOD(h) ((h) % RTHASHSIZ)
+#endif
+struct mbuf *rthost[RTHASHSIZ];
+struct mbuf *rtnet[RTHASHSIZ];
+struct rtstat rtstat;