Add copyright
[unix-history] / usr / src / sbin / routed / defs.h
CommitLineData
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 36struct sockaddr_in addr; /* address of daemon's socket */
c8c4156e 37
7fe7fe74 38int s; /* source and sink of all data */
c8c4156e
SL
39int kmem;
40int supplier; /* process should supply updates */
41int install; /* if 1 call kernel */
7fe7fe74
SL
42int lookforinterfaces; /* if 1 probe kernel for new up interfaces */
43int performnlist; /* if 1 check if /vmunix has changed */
c8c4156e 44int externalinterfaces; /* # of remote and local interfaces */
7fe7fe74 45int timeval; /* local idea of time */
c8c4156e
SL
46
47char packet[MAXPACKETSIZE+1];
48struct rip *msg;
49
50char **argv0;
51struct servent *sp;
52
7fe7fe74
SL
53extern char *sys_errlist[];
54extern int errno;
c8c4156e 55
7fe7fe74
SL
56struct in_addr inet_makeaddr();
57int inet_addr();
58char *malloc();
59int exit();
60int sendmsg();
61int supply();
62int timer();
63int cleanup();