|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1983 The Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * Redistribution and use in source and binary forms are permitted ! 6: * provided that: (1) source distributions retain this entire copyright ! 7: * notice and comment, and (2) distributions including binaries display ! 8: * the following acknowledgement: ``This product includes software ! 9: * developed by the University of California, Berkeley and its contributors'' ! 10: * in the documentation or other materials provided with the distribution ! 11: * and in all advertising materials mentioning features or use of this ! 12: * software. Neither the name of the University nor the names of its ! 13: * contributors may be used to endorse or promote products derived ! 14: * from this software without specific prior written permission. ! 15: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 16: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 17: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 18: * ! 19: * @(#)defs.h 5.8 (Berkeley) 6/1/90 ! 20: */ ! 21: ! 22: #include <sys/types.h> ! 23: #include <sys/socket.h> ! 24: ! 25: #include <net/route.h> ! 26: #include <netns/ns.h> ! 27: #include <netns/idp.h> ! 28: #if defined(vax) || defined(pdp11) ! 29: #define xnnet(x) ((u_long) (x)->rip_dst[1] << 16 | (u_long) (x)->rip_dst[0] ) ! 30: #else ! 31: #define xnnet(x) ((u_long) (x)->rip_dst[0] << 16 | (u_long) (x)->rip_dst[1] ) ! 32: #endif ! 33: #define IDPPORT_RIF 1 ! 34: ! 35: #include <stdio.h> ! 36: #include <syslog.h> ! 37: ! 38: #include "protocol.h" ! 39: #include "trace.h" ! 40: #include "interface.h" ! 41: #include "table.h" ! 42: #include "af.h" ! 43: ! 44: ! 45: /* ! 46: * When we find any interfaces marked down we rescan the ! 47: * kernel every CHECK_INTERVAL seconds to see if they've ! 48: * come up. ! 49: */ ! 50: #define CHECK_INTERVAL (5*60) ! 51: ! 52: #define equal(a1, a2) \ ! 53: (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0) ! 54: #define min(a,b) ((a)>(b)?(b):(a)) ! 55: ! 56: struct sockaddr_ns addr; /* Daemon's Address */ ! 57: int s; /* Socket to listen on */ ! 58: int kmem; ! 59: int supplier; /* process should supply updates */ ! 60: int install; /* if 1 call kernel */ ! 61: int lookforinterfaces; /* if 1 probe kernel for new up interfaces */ ! 62: int performnlist; /* if 1 check if /vmunix has changed */ ! 63: int externalinterfaces; /* # of remote and local interfaces */ ! 64: int timeval; /* local idea of time */ ! 65: int noteremoterequests; /* squawk on requests from non-local nets */ ! 66: ! 67: char packet[MAXPACKETSIZE+sizeof(struct idp)+1]; ! 68: struct rip *msg; ! 69: ! 70: char **argv0; ! 71: ! 72: extern int errno; ! 73: ! 74: char *malloc(); ! 75: int exit(); ! 76: int sendmsg(); ! 77: int supply(); ! 78: int timer(); ! 79: int cleanup();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.