Commit | Line | Data |
---|---|---|
cfe365d0 | 1 | /* |
e69f81e0 KS |
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 | * | |
84f93e8f | 6 | * @(#)defs.h 5.5 (Berkeley) %G%"; |
cfe365d0 | 7 | */ |
e69f81e0 | 8 | |
cfe365d0 KS |
9 | #include <sys/types.h> |
10 | #include <sys/socket.h> | |
11 | ||
12 | #include <net/route.h> | |
48681466 KS |
13 | #include <netns/ns.h> |
14 | #include <netns/idp.h> | |
84f93e8f KS |
15 | #if defined(vax) || defined(pdp11) |
16 | #define xnnet(x) ((u_long) (x)->rip_dst[1] << 16 | (u_long) (x)->rip_dst[0] ) | |
17 | #else | |
18 | #define xnnet(x) ((u_long) (x)->rip_dst[0] << 16 | (u_long) (x)->rip_dst[1] ) | |
19 | #endif | |
48681466 | 20 | #define IDPPORT_RIF 1 |
cfe365d0 KS |
21 | |
22 | #include <stdio.h> | |
610b111d | 23 | #include <syslog.h> |
cfe365d0 KS |
24 | |
25 | #include "protocol.h" | |
26 | #include "trace.h" | |
27 | #include "interface.h" | |
28 | #include "table.h" | |
29 | #include "af.h" | |
30 | ||
31 | ||
32 | /* | |
33 | * When we find any interfaces marked down we rescan the | |
34 | * kernel every CHECK_INTERVAL seconds to see if they've | |
35 | * come up. | |
36 | */ | |
84f93e8f | 37 | #define CHECK_INTERVAL (5*60) |
cfe365d0 KS |
38 | |
39 | #define equal(a1, a2) \ | |
40 | (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0) | |
41 | #define min(a,b) ((a)>(b)?(b):(a)) | |
42 | ||
48681466 KS |
43 | struct sockaddr_ns addr; /* Daemon's Address */ |
44 | int s; /* Socket to listen on */ | |
cfe365d0 KS |
45 | int kmem; |
46 | int supplier; /* process should supply updates */ | |
47 | int install; /* if 1 call kernel */ | |
48 | int lookforinterfaces; /* if 1 probe kernel for new up interfaces */ | |
49 | int performnlist; /* if 1 check if /vmunix has changed */ | |
50 | int externalinterfaces; /* # of remote and local interfaces */ | |
51 | int timeval; /* local idea of time */ | |
610b111d | 52 | int noteremoterequests; /* squawk on requests from non-local nets */ |
cfe365d0 KS |
53 | |
54 | char packet[MAXPACKETSIZE+sizeof(struct idp)+1]; | |
55 | struct rip *msg; | |
56 | ||
57 | char **argv0; | |
58 | ||
59 | extern char *sys_errlist[]; | |
60 | extern int errno; | |
61 | ||
62 | char *malloc(); | |
63 | int exit(); | |
64 | int sendmsg(); | |
65 | int supply(); | |
66 | int timer(); | |
67 | int cleanup(); |