Commit | Line | Data |
---|---|---|
7fe7fe74 | 1 | /* defs.h 4.14 83/01/11 */ |
b242391c SL |
2 | |
3 | /* | |
4 | * Internal data structure definitions for | |
5 | * user routing process. Based on Xerox NS | |
6 | * protocol specs with mods relevant to more | |
7 | * general addressing scheme. | |
8 | */ | |
c8c4156e SL |
9 | #include <sys/types.h> |
10 | #include <sys/socket.h> | |
4f306a0d | 11 | |
3cec0c76 | 12 | #include <net/route.h> |
4f306a0d SL |
13 | #include <netinet/in.h> |
14 | ||
c8c4156e SL |
15 | #include <stdio.h> |
16 | #include <netdb.h> | |
4f306a0d | 17 | |
7fe7fe74 SL |
18 | #include "protocol.h" |
19 | #include "trace.h" | |
20 | #include "interface.h" | |
21 | #include "table.h" | |
22 | #include "af.h" | |
c8c4156e | 23 | |
7fe7fe74 | 24 | #define COMPAT 1 /* stay compatible with 4.1a daemons */ |
e0a3d4f9 SL |
25 | |
26 | /* | |
27 | * When we find any interfaces marked down we rescan the | |
28 | * kernel every CHECK_INTERVAL seconds to see if they've | |
29 | * come up. | |
30 | */ | |
31 | #define CHECK_INTERVAL (1*60) | |
c8c4156e SL |
32 | |
33 | #define LOOPBACKNET 0177 | |
c8c4156e SL |
34 | #define equal(a1, a2) \ |
35 | (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0) | |
36 | #define min(a,b) ((a)>(b)?(b):(a)) | |
37 | ||
7fe7fe74 | 38 | struct sockaddr_in addr; /* address of daemon's socket */ |
c8c4156e | 39 | |
7fe7fe74 | 40 | int s; /* source and sink of all data */ |
c8c4156e SL |
41 | int kmem; |
42 | int supplier; /* process should supply updates */ | |
43 | int install; /* if 1 call kernel */ | |
7fe7fe74 SL |
44 | int lookforinterfaces; /* if 1 probe kernel for new up interfaces */ |
45 | int performnlist; /* if 1 check if /vmunix has changed */ | |
c8c4156e | 46 | int externalinterfaces; /* # of remote and local interfaces */ |
7fe7fe74 | 47 | int timeval; /* local idea of time */ |
c8c4156e SL |
48 | |
49 | char packet[MAXPACKETSIZE+1]; | |
50 | struct rip *msg; | |
51 | ||
52 | char **argv0; | |
53 | struct servent *sp; | |
54 | ||
7fe7fe74 SL |
55 | extern char *sys_errlist[]; |
56 | extern int errno; | |
c8c4156e | 57 | |
7fe7fe74 SL |
58 | struct in_addr inet_makeaddr(); |
59 | int inet_addr(); | |
60 | char *malloc(); | |
61 | int exit(); | |
62 | int sendmsg(); | |
63 | int supply(); | |
64 | int timer(); | |
65 | int cleanup(); |