for bostic, I think he's done after 5 months
[unix-history] / usr / src / sbin / routed / defs.h
CommitLineData
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 52struct sockaddr_in addr; /* address of daemon's socket */
c8c4156e 53
7fe7fe74 54int s; /* source and sink of all data */
c8c4156e
SL
55int kmem;
56int supplier; /* process should supply updates */
57int install; /* if 1 call kernel */
7fe7fe74
SL
58int lookforinterfaces; /* if 1 probe kernel for new up interfaces */
59int performnlist; /* if 1 check if /vmunix has changed */
c8c4156e 60int externalinterfaces; /* # of remote and local interfaces */
4033c8f6
MK
61struct timeval now; /* current idea of time */
62struct timeval lastbcast; /* last time all/changes broadcast */
63struct timeval lastfullupdate; /* last time full table broadcast */
64struct timeval nextbcast; /* time to wait before changes broadcast */
65int needupdate; /* true if we need update at nextbcast */
c8c4156e
SL
66
67char packet[MAXPACKETSIZE+1];
68struct rip *msg;
69
70char **argv0;
71struct servent *sp;
72
7fe7fe74
SL
73extern char *sys_errlist[];
74extern int errno;
c8c4156e 75
7fe7fe74
SL
76struct in_addr inet_makeaddr();
77int inet_addr();
78char *malloc();
d55095c4 79char *ctime();
7fe7fe74
SL
80int exit();
81int sendmsg();
82int supply();
83int timer();
84int cleanup();