1 /* 2 * Copyright (c) 1983 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 * 6 * @(#)defs.h 5.4 (Berkeley) 09/17/85"; 7 */ 8 9 #include <sys/types.h> 10 #include <sys/socket.h> 11 12 #include <net/route.h> 13 #include <netns/ns.h> 14 #include <netns/idp.h> 15 #define xnnet(p) (*(long *)&(p)) 16 #define IDPPORT_RIF 1 17 18 #include <stdio.h> 19 #include <syslog.h> 20 21 #include "protocol.h" 22 #include "trace.h" 23 #include "interface.h" 24 #include "table.h" 25 #include "af.h" 26 27 28 /* 29 * When we find any interfaces marked down we rescan the 30 * kernel every CHECK_INTERVAL seconds to see if they've 31 * come up. 32 */ 33 #define CHECK_INTERVAL (1*60) 34 35 #define equal(a1, a2) \ 36 (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0) 37 #define min(a,b) ((a)>(b)?(b):(a)) 38 39 struct sockaddr_ns addr; /* Daemon's Address */ 40 int s; /* Socket to listen on */ 41 int kmem; 42 int supplier; /* process should supply updates */ 43 int install; /* if 1 call kernel */ 44 int lookforinterfaces; /* if 1 probe kernel for new up interfaces */ 45 int performnlist; /* if 1 check if /vmunix has changed */ 46 int externalinterfaces; /* # of remote and local interfaces */ 47 int timeval; /* local idea of time */ 48 int noteremoterequests; /* squawk on requests from non-local nets */ 49 50 char packet[MAXPACKETSIZE+sizeof(struct idp)+1]; 51 struct rip *msg; 52 53 char **argv0; 54 55 extern char *sys_errlist[]; 56 extern int errno; 57 58 char *malloc(); 59 int exit(); 60 int sendmsg(); 61 int supply(); 62 int timer(); 63 int cleanup(); 64