-/*
- * Look in a file for any gateways we should configure
- * outside the directly connected ones. This is a kludge,
- * but until we can find out about gateways on the "other side"
- * of the ARPANET using GGP, it's a must.
- *
- * We don't really know the distance to the gateway, so we
- * assume it's a neighbor.
- */
-getothers()
-{
- struct sockaddr_in dst, gate;
- FILE *fp = fopen("/etc/gateways", "r");
- struct rt_entry *rt;
-
- if (fp == NULL)
- return;
- bzero((char *)&dst, sizeof (dst));
- bzero((char *)&gate, sizeof (gate));
- dst.sin_family = AF_INET;
- gate.sin_family = AF_INET;
- while (fscanf(fp, "%x %x", &dst.sin_addr.s_addr,
- &gate.sin_addr.s_addr) != EOF) {
- rtadd((struct sockaddr *)&dst, (struct sockaddr *)&gate, 1);
- rt = rtlookup((struct sockaddr *)&dst);
- if (rt)
- rt->rt_flags |= RTF_SILENT;
- }
- fclose(fp);
-}
-
-/*
- * Timer routine:
- *
- * o handle timers on table entries,
- * o invalidate entries which haven't been updated in a while,
- * o delete entries which are too old,
- * o retry ioctl's which weren't successful the first
- * time due to the kernel entry being busy
- * o if we're an internetwork router, supply routing updates
- * periodically
- */
-timer()