1*24306Ssklower /* defs.h */ 2*24306Ssklower 3*24306Ssklower /* 4*24306Ssklower */ 5*24306Ssklower #include <sys/types.h> 6*24306Ssklower #include <sys/socket.h> 7*24306Ssklower 8*24306Ssklower #include <net/route.h> 9*24306Ssklower #include <netxns/xn.h> 10*24306Ssklower #include <netxns/idp.h> 11*24306Ssklower 12*24306Ssklower #include <stdio.h> 13*24306Ssklower 14*24306Ssklower #include "protocol.h" 15*24306Ssklower #include "trace.h" 16*24306Ssklower #include "interface.h" 17*24306Ssklower #include "table.h" 18*24306Ssklower #include "af.h" 19*24306Ssklower 20*24306Ssklower 21*24306Ssklower /* 22*24306Ssklower * When we find any interfaces marked down we rescan the 23*24306Ssklower * kernel every CHECK_INTERVAL seconds to see if they've 24*24306Ssklower * come up. 25*24306Ssklower */ 26*24306Ssklower #define CHECK_INTERVAL (1*60) 27*24306Ssklower 28*24306Ssklower #define equal(a1, a2) \ 29*24306Ssklower (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0) 30*24306Ssklower #define min(a,b) ((a)>(b)?(b):(a)) 31*24306Ssklower 32*24306Ssklower int kmem; 33*24306Ssklower int supplier; /* process should supply updates */ 34*24306Ssklower int install; /* if 1 call kernel */ 35*24306Ssklower int lookforinterfaces; /* if 1 probe kernel for new up interfaces */ 36*24306Ssklower int performnlist; /* if 1 check if /vmunix has changed */ 37*24306Ssklower int externalinterfaces; /* # of remote and local interfaces */ 38*24306Ssklower int timeval; /* local idea of time */ 39*24306Ssklower 40*24306Ssklower char packet[MAXPACKETSIZE+sizeof(struct idp)+1]; 41*24306Ssklower struct rip *msg; 42*24306Ssklower 43*24306Ssklower char **argv0; 44*24306Ssklower 45*24306Ssklower extern char *sys_errlist[]; 46*24306Ssklower extern int errno; 47*24306Ssklower 48*24306Ssklower char *malloc(); 49*24306Ssklower int exit(); 50*24306Ssklower int sendmsg(); 51*24306Ssklower int supply(); 52*24306Ssklower int timer(); 53*24306Ssklower int cleanup(); 54