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