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