Commit | Line | Data |
---|---|---|
0c44388d | 1 | /* defs.h 4.17 85/06/03 */ |
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 | |
e0a3d4f9 SL |
24 | /* |
25 | * When we find any interfaces marked down we rescan the | |
26 | * kernel every CHECK_INTERVAL seconds to see if they've | |
27 | * come up. | |
28 | */ | |
29 | #define CHECK_INTERVAL (1*60) | |
c8c4156e | 30 | |
0c44388d | 31 | #define LOOPBACKNET 0x7f000000 /* 127.0.0.0 */ |
c8c4156e SL |
32 | #define equal(a1, a2) \ |
33 | (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0) | |
34 | #define min(a,b) ((a)>(b)?(b):(a)) | |
35 | ||
7fe7fe74 | 36 | struct sockaddr_in addr; /* address of daemon's socket */ |
c8c4156e | 37 | |
7fe7fe74 | 38 | int s; /* source and sink of all data */ |
c8c4156e SL |
39 | int kmem; |
40 | int supplier; /* process should supply updates */ | |
41 | int install; /* if 1 call kernel */ | |
7fe7fe74 SL |
42 | int lookforinterfaces; /* if 1 probe kernel for new up interfaces */ |
43 | int performnlist; /* if 1 check if /vmunix has changed */ | |
c8c4156e | 44 | int externalinterfaces; /* # of remote and local interfaces */ |
7fe7fe74 | 45 | int timeval; /* local idea of time */ |
c8c4156e SL |
46 | |
47 | char packet[MAXPACKETSIZE+1]; | |
48 | struct rip *msg; | |
49 | ||
50 | char **argv0; | |
51 | struct servent *sp; | |
52 | ||
7fe7fe74 SL |
53 | extern char *sys_errlist[]; |
54 | extern int errno; | |
c8c4156e | 55 | |
7fe7fe74 SL |
56 | struct in_addr inet_makeaddr(); |
57 | int inet_addr(); | |
58 | char *malloc(); | |
59 | int exit(); | |
60 | int sendmsg(); | |
61 | int supply(); | |
62 | int timer(); | |
63 | int cleanup(); |