Commit | Line | Data |
---|---|---|
5ff67f98 | 1 | /* |
d55095c4 | 2 | * Copyright (c) 1983, 1988 Regents of the University of California. |
0eb85d71 | 3 | * All rights reserved. |
5ff67f98 | 4 | * |
0eb85d71 | 5 | * Redistribution and use in source and binary forms are permitted |
b8c620d6 KB |
6 | * provided that the above copyright notice and this paragraph are |
7 | * duplicated in all such forms and that any documentation, | |
8 | * advertising materials, and other materials related to such | |
9 | * distribution and use acknowledge that the software was developed | |
10 | * by the University of California, Berkeley. The name of the | |
11 | * University may not be used to endorse or promote products derived | |
12 | * from this software without specific prior written permission. | |
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
0eb85d71 | 16 | * |
4033c8f6 | 17 | * @(#)defs.h 5.7 (Berkeley) %G% |
5ff67f98 | 18 | */ |
b242391c SL |
19 | |
20 | /* | |
21 | * Internal data structure definitions for | |
22 | * user routing process. Based on Xerox NS | |
23 | * protocol specs with mods relevant to more | |
24 | * general addressing scheme. | |
25 | */ | |
4033c8f6 | 26 | #include <sys/param.h> |
c8c4156e | 27 | #include <sys/socket.h> |
4033c8f6 | 28 | #include <sys/time.h> |
4f306a0d | 29 | |
3cec0c76 | 30 | #include <net/route.h> |
4f306a0d | 31 | #include <netinet/in.h> |
0f6100ed | 32 | #include <protocols/routed.h> |
4f306a0d | 33 | |
c8c4156e SL |
34 | #include <stdio.h> |
35 | #include <netdb.h> | |
4f306a0d | 36 | |
7fe7fe74 SL |
37 | #include "trace.h" |
38 | #include "interface.h" | |
39 | #include "table.h" | |
40 | #include "af.h" | |
c8c4156e | 41 | |
e0a3d4f9 SL |
42 | /* |
43 | * When we find any interfaces marked down we rescan the | |
44 | * kernel every CHECK_INTERVAL seconds to see if they've | |
45 | * come up. | |
46 | */ | |
47 | #define CHECK_INTERVAL (1*60) | |
c8c4156e | 48 | |
c8c4156e SL |
49 | #define equal(a1, a2) \ |
50 | (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0) | |
c8c4156e | 51 | |
7fe7fe74 | 52 | struct sockaddr_in addr; /* address of daemon's socket */ |
c8c4156e | 53 | |
7fe7fe74 | 54 | int s; /* source and sink of all data */ |
c8c4156e SL |
55 | int kmem; |
56 | int supplier; /* process should supply updates */ | |
57 | int install; /* if 1 call kernel */ | |
7fe7fe74 SL |
58 | int lookforinterfaces; /* if 1 probe kernel for new up interfaces */ |
59 | int performnlist; /* if 1 check if /vmunix has changed */ | |
c8c4156e | 60 | int externalinterfaces; /* # of remote and local interfaces */ |
4033c8f6 MK |
61 | struct timeval now; /* current idea of time */ |
62 | struct timeval lastbcast; /* last time all/changes broadcast */ | |
63 | struct timeval lastfullupdate; /* last time full table broadcast */ | |
64 | struct timeval nextbcast; /* time to wait before changes broadcast */ | |
65 | int needupdate; /* true if we need update at nextbcast */ | |
c8c4156e SL |
66 | |
67 | char packet[MAXPACKETSIZE+1]; | |
68 | struct rip *msg; | |
69 | ||
70 | char **argv0; | |
71 | struct servent *sp; | |
72 | ||
7fe7fe74 SL |
73 | extern char *sys_errlist[]; |
74 | extern int errno; | |
c8c4156e | 75 | |
7fe7fe74 SL |
76 | struct in_addr inet_makeaddr(); |
77 | int inet_addr(); | |
78 | char *malloc(); | |
d55095c4 | 79 | char *ctime(); |
7fe7fe74 SL |
80 | int exit(); |
81 | int sendmsg(); | |
82 | int supply(); | |
83 | int timer(); | |
84 | int cleanup(); |